Skip to content

Commit dd04633

Browse files
authored
Quaternion algebras project (#170)
* start on quat alg project * fix * More quat alg * fix build
1 parent e76d258 commit dd04633

File tree

8 files changed

+386
-153
lines changed

8 files changed

+386
-153
lines changed
+106-149
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
/-
22
Copyright (c) 2024 Kevin Buzzard. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
4-
Authors: Kevin Buzzard, Ludwig Monnerjahn, Hannah Scholz
4+
Authors: Kevin Buzzard
55
-/
6-
import Mathlib.Geometry.Manifold.Instances.UnitsOfNormedAlgebra
7-
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Basic
8-
import Mathlib.NumberTheory.NumberField.Basic
9-
import Mathlib.RingTheory.DedekindDomain.FiniteAdeleRing
10-
import Mathlib.Algebra.Group.Subgroup.Pointwise
11-
import FLT.ForMathlib.ActionTopology
6+
import FLT.TotallyDefiniteQuaternionAlgebra.Finiteness
127

138
/-
149
@@ -18,136 +13,112 @@ import FLT.ForMathlib.ActionTopology
1813

1914
suppress_compilation
2015

21-
variable (F : Type*) [Field F] [NumberField F]
16+
variable (F : Type*) [Field F] [NumberField F] --[NumberField.IsTotallyReal F]
2217

23-
variable (D : Type*) [Ring D] [Algebra F D]
18+
variable (D : Type*) [Ring D] [Algebra F D] --[IsCentralSimple F D] [FiniteDimensional F D]
2419

25-
open DedekindDomain
26-
27-
open scoped NumberField
28-
29-
open scoped TensorProduct
30-
31-
section missing_instances
32-
33-
variable {R D A : Type*} [CommRing R] [Ring D] [CommRing A] [Algebra R D] [Algebra R A]
34-
35-
#synth Algebra A (A ⊗[R] D)
36-
-- does this make a diamond?
37-
instance : Algebra A (D ⊗[R] A) :=
38-
Algebra.TensorProduct.includeRight.toRingHom.toAlgebra' (by
39-
simp only [AlgHom.toRingHom_eq_coe, RingHom.coe_coe, Algebra.TensorProduct.includeRight_apply]
40-
intro a b
41-
apply TensorProduct.induction_on (motive := fun b ↦ 1 ⊗ₜ[R] a * b = b * 1 ⊗ₜ[R] a)
42-
· simp only [mul_zero, zero_mul]
43-
· intro d a'
44-
simp only [Algebra.TensorProduct.tmul_mul_tmul, one_mul, mul_one]
45-
rw [NonUnitalCommSemiring.mul_comm]
46-
· intro x y hx hy
47-
rw [left_distrib, hx, hy, right_distrib]
48-
)
49-
50-
instance [Module.Finite R D] : Module.Finite A (D ⊗[R] A) := sorry
51-
instance [Module.Free R D] : Module.Free A (D ⊗[R] A) := sorry
20+
namespace TotallyDefiniteQuaternionAlgebra
5221

53-
-- #synth Ring (D ⊗[F] FiniteAdeleRing (𝓞 F) F)
22+
-- noncomputable example : D →+* (D ⊗[F] FiniteAdeleRing (𝓞 F) F) :=
23+
-- Algebra.TensorProduct.includeLeftRingHom
5424

55-
end missing_instances
25+
open scoped TensorProduct NumberField
5626

57-
instance : TopologicalSpace (D ⊗[F] (FiniteAdeleRing (𝓞 F) F)) := actionTopology (FiniteAdeleRing (𝓞 F) F) _
58-
instance : IsActionTopology (FiniteAdeleRing (𝓞 F) F) (D ⊗[F] (FiniteAdeleRing (𝓞 F) F)) := ⟨rfl⟩
59-
instance [FiniteDimensional F D] : TopologicalRing (D ⊗[F] (FiniteAdeleRing (𝓞 F) F)) :=
60-
-- this def would be a dangerous instance
61-
-- (it can't guess R) but it's just a Prop so we can easily add it here
62-
ActionTopology.Module.topologicalRing (FiniteAdeleRing (𝓞 F) F) _
27+
open DedekindDomain
6328

64-
namespace TotallyDefiniteQuaternionAlgebra
29+
abbrev Dfx := (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ
6530

66-
noncomputable example : D →+* (D ⊗[F] FiniteAdeleRing (𝓞 F) F) :=
67-
Algebra.TensorProduct.includeLeftRingHom
31+
noncomputable abbrev incl₁ : Dˣ →* Dfx F D :=
32+
Units.map Algebra.TensorProduct.includeLeftRingHom.toMonoidHom
6833

69-
abbrev Dfx := (D ⊗[F] (FiniteAdeleRing (𝓞 F) F)
70-
noncomputable abbrev incl : Dˣ →* Dfx F D := Units.map Algebra.TensorProduct.includeLeftRingHom.toMonoidHom
34+
noncomputable abbrev incl₂ : (FiniteAdeleRing (𝓞 F) F)ˣ →* Dfx F D :=
35+
Units.map Algebra.TensorProduct.rightAlgebra'.toMonoidHom
7136

72-
structure AutomorphicForm (M : Type*) [AddCommGroup M] where
73-
toFun : (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ → M
74-
left_invt : ∀ (d : Dˣ) (x : (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ),
75-
toFun (Units.map Algebra.TensorProduct.includeLeftRingHom.toMonoidHom d * x) = toFun x
76-
loc_cst : ∃ U : Subgroup (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ,
77-
IsOpen (U : Set (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ) ∧
78-
∀ (x : (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ),
79-
∀ u ∈ U, toFun (x * u) = toFun x
37+
/-!
38+
This definition is made in mathlib-generality but is *not* the definition of an automorphic
39+
form unless Dˣ is compact mod centre at infinity. This hypothesis will be true if `D` is a
40+
totally definite quaternion algebra.
41+
-/
42+
structure AutomorphicForm
43+
-- defined over R
44+
(R : Type*) [CommRing R]
45+
-- of weight W
46+
(W : Type*) [AddCommGroup W] [Module R W] [MulAction Dˣ W]
47+
-- and level U
48+
(U : Subgroup (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ)
49+
-- and character χ
50+
(χ : (FiniteAdeleRing (𝓞 F) F)ˣ →* R) where
51+
-- definition
52+
toFun : (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ → W
53+
left_invt : ∀ (δ : Dˣ) (g : (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ),
54+
toFun (Units.map Algebra.TensorProduct.includeLeftRingHom.toMonoidHom δ * g) = δ • (toFun g)
55+
has_character : ∀ (g : (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ) (z : (FiniteAdeleRing (𝓞 F) F)ˣ),
56+
toFun (g * incl₂ F D z) = χ z • toFun g
57+
right_invt : ∀ (g : (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ),
58+
∀ u ∈ U, toFun (g * u) = toFun g
8059

8160
namespace AutomorphicForm
8261

83-
variable {M : Type*} [AddCommGroup M]
62+
-- defined over R
63+
variable (R : Type*) [CommRing R]
64+
-- weight
65+
(W : Type*) [AddCommGroup W] [Module R W] [MulAction Dˣ W] -- actions should commute in practice
66+
-- level
67+
(U : Subgroup (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ) -- subgroup should be compact and open
68+
-- character
69+
(χ : (FiniteAdeleRing (𝓞 F) F)ˣ →* R)
8470

85-
variable {F D}
71+
variable {F D R W U χ}
8672

87-
instance : CoeFun (AutomorphicForm F D M) (fun _ ↦ Dfx F D → M) where
73+
instance : CoeFun (AutomorphicForm F D R W U χ) (fun _ ↦ Dfx F D → W) where
8874
coe := toFun
8975

9076
attribute [coe] AutomorphicForm.toFun
9177

9278
@[ext]
93-
theorem ext (φ ψ : AutomorphicForm F D M) (h : ∀ x, φ x = ψ x) : φ = ψ := by
79+
theorem ext (φ ψ : AutomorphicForm F D R W U χ) (h : ∀ x, φ x = ψ x) : φ = ψ := by
9480
cases φ; cases ψ; simp only [mk.injEq]; ext; apply h
9581

96-
def zero [FiniteDimensional F D] : (AutomorphicForm F D M) where
82+
def zero : (AutomorphicForm F D R W U χ) where
9783
toFun := 0
98-
left_invt := by simp
99-
loc_cst := by use ⊤; simp
84+
left_invt := sorry
85+
has_character := sorry
86+
right_invt := sorry
10087

101-
instance [FiniteDimensional F D] : Zero (AutomorphicForm F D M) where
88+
instance : Zero (AutomorphicForm F D R W U χ) where
10289
zero := zero
10390

10491
@[simp]
105-
theorem zero_apply [FiniteDimensional F D] (x : (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ) :
106-
(0 : AutomorphicForm F D M) x = 0 := rfl
92+
theorem zero_apply (x : (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ) :
93+
(0 : AutomorphicForm F D R W U χ) x = 0 := rfl
10794

108-
def neg (φ : AutomorphicForm F D M) : AutomorphicForm F D M where
95+
def neg (φ : AutomorphicForm F D R W U χ) : AutomorphicForm F D R W U χ where
10996
toFun x := - φ x
110-
left_invt := by
111-
intro d x
112-
simp only [RingHom.toMonoidHom_eq_coe, neg_inj]
113-
exact φ.left_invt d x
114-
loc_cst := by
115-
rcases φ.loc_cst with ⟨U, openU, hU⟩
116-
use U
117-
exact ⟨openU, fun x u umem ↦ by rw [neg_inj]; exact hU x u umem⟩
118-
119-
instance : Neg (AutomorphicForm F D M) where
97+
left_invt := sorry
98+
has_character := sorry
99+
right_invt := sorry
100+
101+
instance : Neg (AutomorphicForm F D R W U χ) where
120102
neg := neg
121103

122104
@[simp, norm_cast]
123-
theorem neg_apply (φ : AutomorphicForm F D M) (x : (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ) :
124-
(-φ : AutomorphicForm F D M) x = -(φ x) := rfl
105+
theorem neg_apply (φ : AutomorphicForm F D R W U χ) (x : (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ) :
106+
(-φ : AutomorphicForm F D R W U χ) x = -(φ x) := rfl
125107

126-
instance add (φ ψ : AutomorphicForm F D M) : AutomorphicForm F D M where
108+
instance add (φ ψ : AutomorphicForm F D R W U χ) : AutomorphicForm F D R W U χ where
127109
toFun x := φ x + ψ x
128-
left_invt := by
129-
intro d x
130-
simp only [← φ.left_invt d x, ← ψ.left_invt d x]
131-
loc_cst := by
132-
rcases φ.loc_cst with ⟨U, openU, hU⟩
133-
rcases ψ.loc_cst with ⟨V, openV, hV⟩
134-
use U ⊓ V
135-
constructor
136-
· unfold Subgroup.instInf Submonoid.instInf
137-
simp only [Subgroup.coe_toSubmonoid, Subgroup.coe_set_mk]
138-
exact IsOpen.inter openU openV
139-
· intro x u ⟨umemU, umemV⟩
140-
simp only
141-
rw [hU x u umemU, hV x u umemV]
142-
143-
instance : Add (AutomorphicForm F D M) where
110+
left_invt := sorry
111+
has_character := sorry
112+
right_invt := sorry
113+
114+
instance : Add (AutomorphicForm F D R W U χ) where
144115
add := add
145116

146117
@[simp, norm_cast]
147-
theorem add_apply (φ ψ : AutomorphicForm F D M) (x : (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ) :
118+
theorem add_apply (φ ψ : AutomorphicForm F D R W U χ) (x : (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ) :
148119
(φ + ψ) x = (φ x) + (ψ x) := rfl
149120

150-
instance addCommGroup [FiniteDimensional F D] : AddCommGroup (AutomorphicForm F D M) where
121+
instance addCommGroup : AddCommGroup (AutomorphicForm F D R W U χ) where
151122
add := (· + ·)
152123
add_assoc := by intros; ext; simp [add_assoc];
153124
zero := 0
@@ -159,55 +130,41 @@ instance addCommGroup [FiniteDimensional F D] : AddCommGroup (AutomorphicForm F
159130
neg_add_cancel := by intros; ext; simp
160131
add_comm := by intros; ext; simp [add_comm]
161132

162-
open ConjAct
163-
open scoped Pointwise
164-
165-
theorem conjAct_mem {G: Type*} [Group G] (U: Subgroup G) (g: G) (x : G):
166-
x ∈ toConjAct g • U ↔ ∃ u ∈ U, g * u * g⁻¹ = x := by rfl
167-
168-
theorem toConjAct_open {G : Type*} [Group G] [TopologicalSpace G] [TopologicalGroup G]
169-
(U : Subgroup G) (hU : IsOpen (U : Set G)) (g : G) : IsOpen (toConjAct g • U : Set G) := by
170-
have this1 := continuous_mul_left g⁻¹
171-
have this2 := continuous_mul_right g
172-
rw [continuous_def] at this1 this2
173-
specialize this2 U hU
174-
specialize this1 _ this2
175-
convert this1 using 1
176-
ext x
177-
convert conjAct_mem _ _ _ using 1
178-
simp only [Set.mem_preimage, SetLike.mem_coe]
179-
refine ⟨?_, ?_⟩ <;> intro h
180-
· use g⁻¹ * x * g -- duh
181-
simp [h]
182-
group
183-
· rcases h with ⟨u, hu, rfl⟩
184-
group
185-
exact hu
186-
187-
instance [FiniteDimensional F D] : SMul (Dfx F D) (AutomorphicForm F D M) where
188-
smul g φ := { -- (g • f) (x) := f(xg) -- x(gf)=(xg)f
189-
toFun := fun x => φ (x * g)
190-
left_invt := by
191-
intros d x
192-
simp only [← φ.left_invt d x, mul_assoc]
193-
exact φ.left_invt d (x * g)
194-
loc_cst := by
195-
rcases φ.loc_cst with ⟨U, openU, hU⟩
196-
use toConjAct g • U
197-
constructor
198-
· apply toConjAct_open _ openU
199-
· intros x u umem
200-
simp only
201-
rw[conjAct_mem] at umem
202-
obtain ⟨ugu, hugu, eq⟩ := umem
203-
rw[←eq, ←mul_assoc, ←mul_assoc, inv_mul_cancel_right, hU (x*g) ugu hugu]
204-
}
133+
-- from this point we need the Dˣ-action on W to be R-linear
134+
variable [SMulCommClass R Dˣ W]
205135

206-
@[simp]
207-
theorem sMul_eval [FiniteDimensional F D] (g : Dfx F D) (f : AutomorphicForm F D M) (x : (D ⊗[F] FiniteAdeleRing (𝓞 F) F)ˣ) :
208-
(g • f) x = f (x * g) := rfl
136+
def smul (r : R) (φ : AutomorphicForm F D R W U χ) :
137+
AutomorphicForm F D R W U χ where
138+
toFun g := r • φ g
139+
left_invt := sorry
140+
has_character := sorry
141+
right_invt := sorry
142+
143+
instance : SMul R (AutomorphicForm F D R W U χ) where
144+
smul := smul
145+
146+
instance module : Module R (AutomorphicForm F D R W U χ) where
147+
one_smul := sorry
148+
mul_smul := sorry
149+
smul_zero := sorry
150+
smul_add := sorry
151+
add_smul := sorry
152+
zero_smul := sorry
153+
154+
155+
end AutomorphicForm
156+
157+
-- Now assume R is a field.
158+
159+
variable (R : Type*) [Field R]
160+
-- weight
161+
(W : Type*) [AddCommGroup W] [Module R W] [MulAction Dˣ W] -- actions should commute in practice
162+
-- level
163+
(U : Subgroup (D ⊗[F] (FiniteAdeleRing (𝓞 F) F))ˣ) -- subgroup should be compact and open
164+
-- character
165+
(χ : (FiniteAdeleRing (𝓞 F) F)ˣ →* R)
166+
167+
theorem AutomorphicForm.finiteDimensional [FiniteDimensional R W] :
168+
FiniteDimensional R (AutomorphicForm F D R W U χ) := sorry
209169

210-
instance [FiniteDimensional F D] : MulAction (Dfx F D) (AutomorphicForm F D M) where
211-
smul := (· • ·)
212-
one_smul := by intros; ext; simp only [sMul_eval, mul_one]
213-
mul_smul := by intros; ext; simp only [sMul_eval, mul_assoc]
170+
end TotallyDefiniteQuaternionAlgebra

FLT/FLT_files.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ import FLT.MathlibExperiments.Frobenius
2323
import FLT.MathlibExperiments.Frobenius2
2424
import FLT.MathlibExperiments.FrobeniusRiou
2525
import FLT.MathlibExperiments.HopfAlgebra.Basic
26-
import FLT.MathlibExperiments.IsCentralSimple
26+
--import FLT.MathlibExperiments.IsCentralSimple
2727
import FLT.MathlibExperiments.IsFrobenius
2828
import FLT.TateCurve.TateCurve

FLT/NumberField/IsTotallyReal.lean

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Mathlib.NumberTheory.NumberField.Basic
2+
import Mathlib.Data.Complex.Basic
3+
4+
class NumberField.IsTotallyReal (F : Type*) [Field F] [NumberField F] : Prop where
5+
isTotallyReal : ∀ τ : F →+* ℂ, ∀ f : F, ∃ r : ℝ, τ f = r

0 commit comments

Comments
 (0)