Lean formalization of the Riemann Hypothesis (Alpöge, 2026-11-20) being cleaned up by members of the Lean community.
Python
Read Frobenius commutation at the order of the affine inertia element
Grativy64a819c082609
diff --git a/src/New/Congruences/Selmer/Untied.lean b/src/New/Congruences/Selmer/Untied.leanindex f50e4654221..f0c99937762 100644--- a/src/New/Congruences/Selmer/Untied.lean+++ b/src/New/Congruences/Selmer/Untied.lean@@ -82,28 +82,33 @@ lemma affineAction_pow_eq_one (hc : ∀ g h : Gal(Ω/E), c (g * h) = c g + ρ gexact Equiv.ext fun u ↦ bysimp [affineAction_pow_apply hc hg, hα, TauCeti.pow_eq_one_of_geom_sum_eq_zero hα]-/-- Let `c` be a locally constant cocycle for `ρ`, let `A` be a place of `Ω` over the prime `v`, and-let `ρ` be trivial on the elements of inertia at `A` near `1`. Each `g` acts by the affine map-`u ↦ c(g) + ρ(g) u` (`affineAction`). Suppose that this map has `q`-th power `1` for every `g` in-inertia at `A`, with `q` prime to `A`. Then the affine maps of a Frobenius element `φ` at `A` of-norm `k ≡ 1` modulo `q` and of an element `γ` of inertia at `A` commute. -/-lemma commute_affineAction (hc : ∀ g h : Gal(Ω/E), c (g * h) = c g + ρ g • c h)+/-- Suppose the affine inertia at `A` is killed by `q`, a unit at `A`. A Frobenius of norm `k`+(or its inverse) commutes with the affine action of `γ` precisely when `k` is one modulo the+order of that particular action. -/+lemma commute_affineAction_iff (hc : ∀ g h : Gal(Ω/E), c (g * h) = c g + ρ g • c h){A : ClosurePlace} {v : FinPlace E} (hA : IsPlaceOver A v) (hc_lc : IsLocallyConstant c)(h_open : ∀ᶠ g : Gal(Ω/E) in nhds 1, g ∈ inertiaGroup Gal(Ω/E) A → ρ g = 1) {q k : ℕ}(hq : A.valuation (q : ℕ) = 1)- (h_pow : ∀ g ∈ inertiaGroup Gal(Ω/E) A, affineAction hc g ^ q = 1) (hk : k ≡ 1 [MOD q])- {φ γ : Gal(Ω/E)} (hφ : IsFrob A k φ) (hγ : γ ∈ inertiaGroup Gal(Ω/E) A) :- Commute (affineAction hc φ) (affineAction hc γ) := by+ (h_pow : ∀ g ∈ inertiaGroup Gal(Ω/E) A, affineAction hc g ^ q = 1) {φ γ : Gal(Ω/E)}+ (hφ : IsFrob A k φ ∨ IsFrob A k φ⁻¹) (hγ : γ ∈ inertiaGroup Gal(Ω/E) A) :+ Commute (affineAction hc φ) (affineAction hc γ) ↔+ k ≡ 1 [MOD orderOf (affineAction hc γ)] := byhave h_one : c 1 = 0 := by simpa using hc 1 1have h_near : ∀ᶠ g : Gal(Ω/E) in nhds 1,g ∈ inertiaGroup Gal(Ω/E) A → affineAction hc g = 1 := byfilter_upwards [hc_lc.eventually_eq 1, h_open] with g hcg hρg hgexact Equiv.ext fun u ↦ by simp [affineAction_apply, hcg, h_one, hρg hg]- -- On inertia the action is tame, so conjugation by `φ` is the power `k ≡ 1` modulo `q`.- have h_conj : affineAction hc (φ * γ * φ⁻¹) = affineAction hc γ := by- rw [(hA.tame_inertia (affineAction hc) h_near hq h_pow ⟨γ, hγ⟩).right k φ hφ,- pow_eq_pow_of_modEq hk (h_pow γ hγ), pow_one]- rw [commute_iff_eq, ← map_mul, ← h_conj, ← map_mul, inv_mul_cancel_right]+ let f := affineAction hc+ have at_frob {σ : Gal(Ω/E)} (hf : IsFrob A k σ) :+ Commute (f σ) (f γ) ↔ k ≡ 1 [MOD orderOf (f γ)] := by+ have conjugate := (hA.tame_inertia f h_near hq h_pow ⟨γ, hγ⟩).right k σ hf+ change f (σ * γ * σ⁻¹) = (f γ)^k at conjugate+ rw [map_mul, map_mul, map_inv] at conjugate+ rw [← pow_eq_pow_iff_modEq, pow_one, ← conjugate, mul_inv_eq_iff_eq_mul]+ rfl+ rcases hφ with hf | hf+ · exact at_frob hf+ · simpa only [map_inv, Commute.inv_left_iff] using at_frob hf/-- If the affine maps `u ↦ c(g) + g u` of the cocycle `c` at `g = φ` and `g = γ` commute, then`c(γ φ) = c(φ γ)`, which is `(φ - 1) c(γ) = (γ - 1) c(φ)` by the cocycle rule. -/@@ -115,40 +120,17 @@ lemma sub_one_smul_eq_of_commute (hc : ∀ g h : Gal(Ω/E), c (g * h) = c g + ρrw [sub_smul, sub_smul, one_smul, one_smul]linear_combination (norm := abel) h_swap-/-- The relation `(φ - 1) c(γ) = (γ - 1) c(φ)` for a cocycle `c` passes from `φ` to `φ⁻¹` if `γ`-acts by a scalar: multiply it by `-φ⁻¹` and use `c(φ⁻¹) = -φ⁻¹ c(φ)`. -/-lemma inv_sub_one_smul_eq (hc : ∀ g h : Gal(Ω/E), c (g * h) = c g + ρ g • c h)- {φ γ : Gal(Ω/E)} {α : O} (hγ : ρ γ = α • 1) (h_rel : (ρ φ - 1) • c γ = (ρ γ - 1) • c φ) :- (ρ φ⁻¹ - 1) • c γ = (ρ γ - 1) • c φ⁻¹ := by- have h_inv : ρ φ⁻¹ * ρ φ = 1 := by rw [← map_mul, inv_mul_cancel, map_one]- have h_comm : ρ φ⁻¹ * (ρ γ - 1) = (ρ γ - 1) * ρ φ⁻¹ := by simp [hγ, mul_sub, sub_mul]- calc- (ρ φ⁻¹ - 1) • c γ = -(ρ φ⁻¹ • (ρ φ - 1) • c γ) := by- rw [← mul_smul, mul_sub, h_inv, mul_one, ← neg_smul, neg_sub]- _ = -(ρ φ⁻¹ • (ρ γ - 1) • c φ) := by rw [h_rel]- _ = (ρ γ - 1) • c φ⁻¹ := by- rw [cocycle_apply_inv hc, smul_neg, ← mul_smul, h_comm, mul_smul]--/-- The relation from tame inertia. Let `q` be prime to the place `A`, let `ρ` be trivial on-inertia near `1`, and let each inertial element act by a scalar `α` with `∑ i < q, α ^ i = 0`. If-`φ` or `φ⁻¹` is a Frobenius element of norm `k ≡ 1` modulo `q` and `γ` is inertial, every locally-constant cocycle `c` has `(φ - 1) c(γ) = (γ - 1) c(φ)`. -/+/-- If the affine inertia at `A` is killed by `q` prime to `A`, the cocycle equation at an+inertial `γ` and a Frobenius `φ` (or its inverse) is symmetric whenever the norm is one+modulo the order of the affine action of `γ`. -/lemma sub_one_smul_eq_of_tame (hc : ∀ g h : Gal(Ω/E), c (g * h) = c g + ρ g • c h){A : ClosurePlace} {v : FinPlace E} (hA : IsPlaceOver A v) (hc_lc : IsLocallyConstant c)(h_open : ∀ᶠ g : Gal(Ω/E) in nhds 1, g ∈ inertiaGroup Gal(Ω/E) A → ρ g = 1) {q k : ℕ}(hq : A.valuation (q : ℕ) = 1)- (h_scalar : ∀ g ∈ inertiaGroup Gal(Ω/E) A, ∃ α : O, ρ g = α • 1 ∧ ∑ i ∈ range q, α ^ i = 0)- (hk : k ≡ 1 [MOD q]) {φ γ : Gal(Ω/E)} (hφ : IsFrob A k φ ∨ IsFrob A k φ⁻¹)- (hγ : γ ∈ inertiaGroup Gal(Ω/E) A) : (ρ φ - 1) • c γ = (ρ γ - 1) • c φ := by- have h_frob {φ' : Gal(Ω/E)} (hφ' : IsFrob A k φ') : (ρ φ' - 1) • c γ = (ρ γ - 1) • c φ' := by- refine sub_one_smul_eq_of_commute hc- (commute_affineAction hc hA hc_lc h_open hq (fun g hg ↦ ?_) hk hφ' hγ)- obtain ⟨α, hα, h_sum⟩ := h_scalar g hg- exact affineAction_pow_eq_one hc hα h_sum- obtain hφ | hφ := hφ- · exact h_frob hφ- · obtain ⟨α, hα, -⟩ := h_scalar γ hγ- simpa only [inv_inv] using inv_sub_one_smul_eq hc hα (h_frob hφ)+ (h_pow : ∀ g ∈ inertiaGroup Gal(Ω/E) A, affineAction hc g ^ q = 1) {φ γ : Gal(Ω/E)}+ (hk : k ≡ 1 [MOD orderOf (affineAction hc γ)]) (hφ : IsFrob A k φ ∨ IsFrob A k φ⁻¹)+ (hγ : γ ∈ inertiaGroup Gal(Ω/E) A) : (ρ φ - 1) • c γ = (ρ γ - 1) • c φ :=+ sub_one_smul_eq_of_commute hc ((commute_affineAction_iff hc hA hc_lc h_open hq h_pow hφ hγ).2 hk)end Affine@@ -284,15 +266,15 @@ lemma exists_monoidHom_smul_eq_pointTwist_smul {σ O' : Type} [Fintype σ] [Comm/-- Let `v ∤ ℓ` be a prime of the CM field `E` of norm `≡ 1` modulo `ℓ ^ N`, and let `a` consist ofa place over `v`, a Frobenius element `φ`, the tame generator `γ` and a character(`IsAuxPrimeDataAt`). Let `S` contain `v` and its complex conjugate `star v`, let `ρ` be trivial-on inertia above `S` near `1`, and let each element of inertia above `S` act by a scalar `α` with-`∑ j < ℓ ^ N, α ^ j = 0`. Then every locally constant cocycle `c` has+on inertia above `S` near `1`, and let the affine action of every element+of inertia above `S` be killed by `ℓ ^ N`. Then every locally constant cocycle `c` has`(φ_b - 1) c(γ_b) = (γ_b - 1) c(φ_b)`. Here `g_b = idOrConjInv b g` is `g` for `b = true` and`(τ g τ)⁻¹` for `b = false`, where `τ = cmConj` is the chosen complex conjugation of `Ω`. -/lemma sub_one_smul_eq_of_isAuxPrimeDataAt {B : Type} [AddCommGroup B] [Module O B]{c : Gal(Ω/E) → n → B} (hc : ∀ g h : Gal(Ω/E), c (g * h) = c g + ρ g • c h)(hc_lc : IsLocallyConstant c) {S : Set (FinPlace E)}(h_open : ∀ᶠ g : Gal(Ω/E) in nhds 1, g ∈ inertiaAbove S → ρ g = 1)- (h_scalar : ∀ g ∈ inertiaAbove S, ∃ α : O, ρ g = α • 1 ∧ ∑ j ∈ range (ℓ ^ N), α ^ j = 0)+ (h_pow : ∀ g ∈ inertiaAbove S, affineAction hc g ^ (ℓ ^ N) = 1){v : FinPlace E} {a : AuxPrimeData E (ℓ ^ N)}(ha : IsAuxPrimeDataAt (placesDividing E ℓ) v a) (hv : v ∈ S) (hv_star : star v ∈ S)(b : Bool) :@@ -303,7 +285,8 @@ lemma sub_one_smul_eq_of_isAuxPrimeDataAt {B : Type} [AddCommGroup B] [Module O(hγ : γ ∈ inertiaGroup Gal(Ω/E) A) : (ρ φ - 1) • c γ = (ρ γ - 1) • c φ :=sub_one_smul_eq_of_tame hc hA hc_lc (h_open.mono fun g hg hgA ↦ hg ⟨w, hw, A, hA, hgA⟩)(q := ℓ ^ N) (by simp [hA.valuation_natCast_eq_one_iff.2 hℓ])- (fun g hgA ↦ h_scalar g ⟨w, hw, A, hA, hgA⟩) ha.norm_modEq hφ hγ+ (fun g hgA ↦ h_pow g ⟨w, hw, A, hA, hgA⟩)+ (ha.norm_modEq.of_dvd (orderOf_dvd_of_pow_eq_one (h_pow γ ⟨w, hw, A, hA, hγ⟩))) hφ hγcases b· -- At the conjugate prime, `φ_w` is the inverse of a Frobenius element.exact h_tame ha.isPlaceOver.conjPlace_star hv_star (by simpa using ha.notMem)@@ -355,13 +338,13 @@ lemma IsTiedPrimes.frob_sub_one_smul_eq [ThePrime ℓ] (hp : IsTiedPrimes ℓ SFilter.eventually_all.2 fun u ↦ (hp.isAuxPrimeDataAt u u.2).isLocallyConstant.eventually_eq 1filter_upwards [h_near] with g hg hg_inertiasimp [hR_scalar g (h_unr g hg_inertia), eval_universalChar, hg]- have h_scalar (g : Gal(Ω/E)) (hg : g ∈ inertiaAbove S₀ᶜ) :- ∃ α : B, R g = α • 1 ∧ ∑ j ∈ range (ℓ ^ N), α ^ j = 0 :=- ⟨_, hR_scalar g (h_unr g hg), h_sum (dvd_eval_universalChar_sub_one lam hx_dvd g)⟩+ have h_pow (g : Gal(Ω/E)) (hg : g ∈ inertiaAbove S₀ᶜ) : affineAction hc g ^ (ℓ ^ N) = 1 :=+ affineAction_pow_eq_one hc (hR_scalar g (h_unr g hg))+ (h_sum (dvd_eval_universalChar_sub_one lam hx_dvd g))obtain ⟨hv_off, -, -, hv_star_off⟩ := hp.auxiliary v v.property-- Tame inertia at `v` or at its conjugate, both off `S₀`, gives the relation for `R`.simpa only [sub_smul, one_smul, hR_smul] using- sub_one_smul_eq_of_isAuxPrimeDataAt hc hz_lc h_open h_scalar (hp.isAuxPrimeDataAt v v.property)+ sub_one_smul_eq_of_isAuxPrimeDataAt hc hz_lc h_open h_pow (hp.isAuxPrimeDataAt v v.property)hv_off hv_star_off b/-- Let `J` be a finite set of primes of the CM field `E` that lie, with their conjugates, outside