Download data/lean/ComparatorChallenges/DukePrimeDegree.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 9.71 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/ComparatorChallenges/DukePrimeDegree.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/ComparatorChallenges/DukePrimeDegree.lean
-
curl -L -o DukePrimeDegree.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/ComparatorChallenges/DukePrimeDegree.lean
9.71 kB
| import Mathlib | |
| namespace OAI | |
| section | |
| noncomputable section | |
| open scoped Matrix Topology BigOperators Classical TensorProduct ENNReal | |
| open MeasureTheory Filter Set Module | |
| namespace PrimeDegreePackets | |
| abbrev G (n : β) := Matrix.SpecialLinearGroup (Fin n) β | |
| def integralGroup (n : β) : Subgroup (G n) := | |
| (Matrix.SpecialLinearGroup.map (Int.castRingHom β)).range | |
| abbrev X (n : β) := Quotient (QuotientGroup.rightRel (integralGroup n)) | |
| instance xMeasurableSpace (n : β) : MeasurableSpace (X n) := borel (X n) | |
| instance xBorelSpace (n : β) : BorelSpace (X n) := β¨rflβ© | |
| def rightAction {n : β} (x : X n) (g : G n) : X n := | |
| Quotient.map (fun h => h * g) (by | |
| intro a b hab | |
| change (QuotientGroup.rightRel (integralGroup n)) a b at hab | |
| change (QuotientGroup.rightRel (integralGroup n)) (a * g) (b * g) | |
| rw [QuotientGroup.rightRel_apply] at hab β’ | |
| simpa only [mul_inv_rev, mul_assoc, mul_inv_cancel_left] using hab) x | |
| @[simp] theorem rightAction_one {n : β} (x : X n) : rightAction x 1 = x := by | |
| induction x using Quotient.inductionOn with | |
| | h a => exact congrArg (Quotient.mk _) (mul_one a) | |
| @[simp] theorem rightAction_mul {n : β} (x : X n) (g h : G n) : | |
| rightAction (rightAction x g) h = rightAction x (g * h) := by | |
| induction x using Quotient.inductionOn with | |
| | h a => exact congrArg (Quotient.mk _) (mul_assoc a g h) | |
| def signMatrices (n : β) : Set (G n) := | |
| {g | (β i j, i β j β g.1 i j = 0) β§ β i, g.1 i i = 1 β¨ g.1 i i = -1} | |
| def rowLattice {n : β} (g : Matrix (Fin n) (Fin n) β) : Submodule β€ (Fin n β β) := | |
| Submodule.span β€ (Set.range fun i => g i) | |
| structure FullLattice (n : β) (K : Type*) [Field K] [NumberField K] where | |
| carrier : Submodule β€ K | |
| basis : Basis (Fin n) β€ carrier | |
| spans : Submodule.span β (carrier : Set K) = β€ | |
| def multiplierOrder {n : β} {K : Type*} [Field K] [NumberField K] (M : FullLattice n K) : AddSubgroup K where | |
| carrier := {a | β x β M.carrier, a * x β M.carrier} | |
| zero_mem' := by simp | |
| add_mem' := by | |
| intro a b ha hb x hx | |
| simpa only [add_mul] using M.carrier.add_mem (ha x hx) (hb x hx) | |
| neg_mem' := by | |
| intro a ha x hx | |
| simpa only [neg_mul] using M.carrier.neg_mem (ha x hx) | |
| def integralElements (K : Type*) [Field K] : AddSubgroup K := | |
| (integralClosure β€ K).toSubring.toAddSubgroup | |
| def multiplierDiscriminant {n : β} {K : Type*} [Field K] [NumberField K] | |
| (M : FullLattice n K) : β := | |
| |(NumberField.discr K : β)| * | |
| ((multiplierOrder M).relIndex (integralElements K) : β) ^ 2 | |
| abbrev OrderedEmbeddings (n : β) (K : Type*) [Field K] := Fin n β (K β+* β) | |
| def embeddingMatrix {n : β} {K : Type*} [Field K] [NumberField K] | |
| (M : FullLattice n K) (Ο : OrderedEmbeddings n K) : Matrix (Fin n) (Fin n) β := | |
| fun i j => Ο j (M.basis i) | |
| def normalizedLattice {n : β} {K : Type*} [Field K] [NumberField K] | |
| (M : FullLattice n K) (Ο : OrderedEmbeddings n K) : Submodule β€ (Fin n β β) := | |
| let B := embeddingMatrix M Ο | |
| rowLattice (|(Matrix.det B)| ^ (-(1 : β) / n) β’ B) | |
| def latticePoint {n : β} {K : Type*} [Field K] [NumberField K] | |
| (M : FullLattice n K) (Ο : OrderedEmbeddings n K) : X n := | |
| if h : β g : G n, rowLattice g.1 = normalizedLattice M Ο then | |
| Quotient.mk _ h.choose | |
| else Quotient.mk _ (1 : G n) | |
| abbrev LogCoordinates (d : β) := Fin d β β | |
| def diagonalFlow {d : β} (u : LogCoordinates d) : G (d + 1) := | |
| β¨Matrix.diagonal (Fin.snoc (fun i => Real.exp (u i)) (Real.exp (-β i, u i))), by | |
| rw [Matrix.det_diagonal, Fin.prod_univ_castSucc] | |
| simp only [Fin.snoc_castSucc, Fin.snoc_last] | |
| rw [β Real.exp_sum, β Real.exp_add, add_neg_cancel, Real.exp_zero]β© | |
| @[simp] theorem diagonalFlow_zero (d : β) : diagonalFlow (0 : LogCoordinates d) = 1 := by | |
| apply Subtype.ext | |
| change Matrix.diagonal _ = (1 : Matrix (Fin (d + 1)) (Fin (d + 1)) β) | |
| simp | |
| ext i | |
| refine Fin.lastCases ?_ (fun j => ?_) i <;> simp | |
| @[simp] theorem diagonalFlow_add {d : β} (u v : LogCoordinates d) : | |
| diagonalFlow (u + v) = diagonalFlow u * diagonalFlow v := by | |
| apply Subtype.ext | |
| change Matrix.diagonal _ = Matrix.diagonal _ * Matrix.diagonal _ | |
| rw [Matrix.diagonal_mul_diagonal] | |
| congr 1 | |
| funext i | |
| refine Fin.lastCases ?_ (fun j => ?_) i | |
| Β· simp [Real.exp_add, Finset.sum_add_distrib, neg_add_rev, mul_comm] | |
| Β· simp [Real.exp_add] | |
| def orbitMap {d : β} (x : X (d + 1)) (u : LogCoordinates d) : X (d + 1) := | |
| rightAction x (diagonalFlow u) | |
| @[simp] theorem orbitMap_zero {d : β} (x : X (d + 1)) : orbitMap x 0 = x := by | |
| simp [orbitMap] | |
| @[simp] theorem orbitMap_add {d : β} (x : X (d + 1)) (u v : LogCoordinates d) : | |
| orbitMap x (u + v) = orbitMap (orbitMap x u) v := by | |
| simp [orbitMap] | |
| def periodGroup {d : β} (x : X (d + 1)) : AddSubgroup (LogCoordinates d) where | |
| carrier := {u | orbitMap x u = x} | |
| zero_mem' := orbitMap_zero x | |
| add_mem' := by | |
| intro u v hu hv | |
| change orbitMap x (u + v) = x | |
| rw [orbitMap_add, hu, hv] | |
| neg_mem' := by | |
| intro u hu | |
| have h := congrArg (fun y => orbitMap y (-u)) hu | |
| rw [β orbitMap_add, add_neg_cancel, orbitMap_zero] at h | |
| exact h.symm | |
| def diagonalOrbit {d : β} (x : X (d + 1)) : Set (X (d + 1)) := Set.range (orbitMap x) | |
| def orbitVolume {d : β} (x : X (d + 1)) : ββ₯0β := | |
| addCovolume (periodGroup x) (LogCoordinates d) volume | |
| def orbitalHaar {d : β} (x : X (d + 1)) : Measure (X (d + 1)) := | |
| if h : HasAddFundamentalDomain (periodGroup x) (LogCoordinates d) volume then | |
| Measure.map (orbitMap x) (volume.restrict h.ExistsIsAddFundamentalDomain.choose) | |
| else 0 | |
| def orbitProbability {d : β} (x : X (d + 1)) : Measure (X (d + 1)) := | |
| (orbitVolume x)β»ΒΉ β’ orbitalHaar x | |
| abbrev LocalAlgebra (p : β) [Fact p.Prime] (K : Type*) [Field K] [NumberField K] := | |
| Padic p β[β] K | |
| def completedLattice {n : β} {K : Type*} [Field K] [NumberField K] | |
| (p : β) [Fact p.Prime] (M : FullLattice n K) : | |
| Submodule (PadicInt p) (LocalAlgebra p K) := | |
| Submodule.span (PadicInt p) | |
| ((Algebra.TensorProduct.includeRight : K ββ[β] LocalAlgebra p K) '' (M.carrier : Set K)) | |
| def LocallyHomothetic {n : β} {K : Type*} [Field K] [NumberField K] | |
| (M M' : FullLattice n K) : Prop := | |
| β (p : β) (hp : p.Prime), letI : Fact p.Prime := β¨hpβ© | |
| β c : (LocalAlgebra p K)Λ£, | |
| (completedLattice p M' : Set (LocalAlgebra p K)) = | |
| (fun z => (c : LocalAlgebra p K) * z) '' (completedLattice p M : Set (LocalAlgebra p K)) | |
| def packetOrbits {d : β} {K : Type*} [Field K] [NumberField K] | |
| (M : FullLattice (d + 1) K) (Ο : OrderedEmbeddings (d + 1) K) : | |
| Set (Set (X (d + 1))) := | |
| {O | β M' : FullLattice (d + 1) K, LocallyHomothetic M M' β§ | |
| β w β signMatrices (d + 1), O = diagonalOrbit (rightAction (latticePoint M' Ο) w)} | |
| def orbitBasepoint {d : β} {K : Type*} [Field K] [NumberField K] | |
| {M : FullLattice (d + 1) K} {Ο : OrderedEmbeddings (d + 1) K} | |
| (O : packetOrbits M Ο) : X (d + 1) := | |
| Classical.epsilon (fun x => diagonalOrbit x = O.1) | |
| def packetMeasure {d : β} {K : Type*} [Field K] [NumberField K] | |
| (M : FullLattice (d + 1) K) (Ο : OrderedEmbeddings (d + 1) K) : Measure (X (d + 1)) := | |
| (β' O : packetOrbits M Ο, orbitVolume (orbitBasepoint O))β»ΒΉ β’ | |
| Measure.sum (fun O : packetOrbits M Ο => | |
| orbitVolume (orbitBasepoint O) β’ orbitProbability (orbitBasepoint O)) | |
| def IsHaarProbability {n : β} (ΞΌ : Measure (X n)) : Prop := | |
| IsProbabilityMeasure ΞΌ β§ β g : G n, Measure.map (fun x => rightAction x g) ΞΌ = ΞΌ | |
| def WeakProbabilityConvergence {n : β} (ΞΌ : β β Measure (X n)) (m : Measure (X n)) : Prop := | |
| (β i, IsProbabilityMeasure (ΞΌ i)) β§ IsProbabilityMeasure m β§ | |
| β f : BoundedContinuousFunction (X n) β, | |
| Tendsto (fun i => β« x, f x βΞΌ i) atTop (π (β« x, f x βm)) | |
| end PrimeDegreePackets | |
| end | |
| end | |
| open MeasureTheory Filter | |
| open scoped Topology | |
| namespace DukePrimeDegree | |
| open PrimeDegreePackets | |
| universe u | |
| /-- Theorem 1.1 as weak convergence of the actual complete packet measures, | |
| including tightness of the entire family. -/ | |
| theorem prime_degree_packet_measure_equidistribution_unconditional | |
| (d : β) (hprime : Nat.Prime (d+1)) (hfive : 5 β€ d+1) | |
| (K : β β Type u) [β i, Field (K i)] [β i, NumberField (K i)] | |
| [β i, NumberField.IsTotallyReal (K i)] | |
| (M : β i, PrimeDegreePackets.FullLattice (d+1) (K i)) | |
| (Ο : β i, OrderedEmbeddings (d+1) (K i)) | |
| (hn : β i, Module.finrank β (K i)=d+1) | |
| (hD : Tendsto (fun i => PrimeDegreePackets.multiplierDiscriminant (M i)) atTop atTop) : | |
| β Ξ½ : Measure (X (d+1)), IsHaarProbability Ξ½ β§ | |
| WeakProbabilityConvergence (fun i => packetMeasure (M i) (Ο i)) Ξ½ β§ | |
| IsTightMeasureSet (Set.range (fun i => packetMeasure (M i) (Ο i))) := by | |
| sorry | |
| /-- The complete packet measures converge weakly to any specified Haar | |
| probability, in the formulation by bounded continuous test functions. -/ | |
| theorem prime_degree_packet_measures_tendsto_haar_unconditional | |
| (d : β) (hprime : Nat.Prime (d+1)) (hfive : 5 β€ d+1) | |
| (K : β β Type u) [β i, Field (K i)] [β i, NumberField (K i)] | |
| [β i, NumberField.IsTotallyReal (K i)] | |
| (M : β i, PrimeDegreePackets.FullLattice (d+1) (K i)) | |
| (Ο : β i, OrderedEmbeddings (d+1) (K i)) | |
| (hn : β i, Module.finrank β (K i)=d+1) | |
| (hD : Tendsto (fun i => PrimeDegreePackets.multiplierDiscriminant (M i)) atTop atTop) | |
| (m : ProbabilityMeasure (X (d+1))) | |
| (hm : IsHaarProbability (m : Measure (X (d+1)))) : | |
| WeakProbabilityConvergence (fun i => packetMeasure (M i) (Ο i)) | |
| (m : Measure (X (d+1))) := by | |
| sorry | |
| end DukePrimeDegree | |
| end OAI | |