Riemann hypothesis: the Lean proof, cleaned up together
The 2026 Lean proof of the Riemann hypothesis and GRH, machine-checked by others, not refereed, no word from Clay; cleaned up together: more readable, faster to build, the theorems unchanged

| 1 | module |
| 2 | |
| 3 | import TauCeti.Algebra.MvPolynomial.Degrees |
| 4 | import TauCeti.RingTheory.LocalRing.ResidueField.RootCount |
| 5 | public import Mathlib.LinearAlgebra.Matrix.Swap |
| 6 | import Mathlib.Algebra.Order.Star.Int |
| 7 | import Mathlib.Algebra.Order.Star.Real |
| 8 | import Mathlib.Algebra.Ring.IsFormallyReal |
| 9 | import Mathlib.Data.Finsupp.Pointwise |
| 10 | import Mathlib.RingTheory.PiTensorProduct |
| 11 | import Mathlib.RingTheory.SimpleRing.Principal |
| 12 | public import New.UpperBound.ElementaryDivisors.TwistingData |
| 13 | |
| 14 | /-! |
| 15 | # Gauss filtrations, Stepanov's count and the root lemma |
| 16 | |
| 17 | The group GL_k(W) acts on polynomials over R in variables x_{b,s} (b < k, s ∈ ℤ/N) through a |
| 18 | `New.FrobeniusCycle`: a power P of a prime p, ring maps ι_s : W → R with ι_{s+1} ≡ ι_s^P mod p, |
| 19 | and w in R with w² = p. The indices s ∈ ℤ/N are called letters and are alternately even and odd. |
| 20 | This file shows which monomials can carry the least w-adic order plus weight among all translates |
| 21 | of a polynomial. |
| 22 | |
| 23 | * `New.IsRealFiltration`, `New.adicFiltration`, `New.gaussFiltration`: multiplicative filtrations |
| 24 | indexed by ℝ, the w-adic one, and the Gauss filtration on polynomials with weighted variables. |
| 25 | * `New.FrobeniusCycle.RootAt`: a root and a letter, with the variables X_s, Y_s, the substitution |
| 26 | that defines the auxiliary polynomial, and its expansions at the rational points. |
| 27 | * `New.FrobeniusCycle.defect_nonpos_of_extreme_term`: for weights that rise by an amount in [1/2, 1] |
| 28 | from X_s to Y_s, a term of least order plus weight among all translates by SL₂(W) has defect at |
| 29 | most 0 (see `New.FrobeniusCycle.defectWeight`). |
| 30 | |
| 31 | The proof compares the degree of an auxiliary binary form with its zeros at the q + 1 rational |
| 32 | points of the projective line, in the affine coordinate t. For an extreme term it writes the defect |
| 33 | in the two variables X_s, Y_s of each letter, substitutes polynomials in t for them, and expands one |
| 34 | coefficient at infinity (which gives its degree) and at the q finite points. |
| 35 | |
| 36 | Notions from other files: |
| 37 | * `New.FrobeniusCycle.polyAction`: the action of GL_k(W) on polynomials in the variables x_{b,s}; g |
| 38 | sends x_{b,s} to ∑_c (g_s)_{cb} x_{c,s}, where g_s is ι_s(g) for even letters s and ι_s of the |
| 39 | inverse transpose of g for odd s. |
| 40 | * `New.levi`: the Levi subgroup of a labelling τ of the indices, the matrices in GL_k(W) whose (i,j) |
| 41 | entry vanishes whenever τ(i) ≠ τ(j). |
| 42 | * `New.FrobeniusCycle.rootVar`: for indices a, a' and a letter s, the variable (a',s) if s is even |
| 43 | and (a,s) if s is odd. |
| 44 | * `New.FrobeniusCycle.defectWeight`: at a letter i along a root (a, a'), the weight of x_{b,s} is a |
| 45 | signed multiple of P^((s - i) mod N) / (q - 1) at the variables X_s, Y_s and 0 elsewhere, plus 1 |
| 46 | at Y_i; the sum of these weights over a monomial is its defect. |
| 47 | |
| 48 | ## Notation |
| 49 | |
| 50 | After the substitution the variable Y_s, s ≠ i, is kept by `mainSubst` as the variable |
| 51 | `X (D.varY s)` of the letter s. The functions `RootAt.sign` and `RootAt.moveSign` carry the signs. |
| 52 | |
| 53 | ## Relation to the literature |
| 54 | |
| 55 | The group SL₂(W), placed in two rows and columns of GL_k(W), acts on polynomials in a circle of |
| 56 | variable sets, alternately by Frobenius twists and by inverse transposes, and a term that is least |
| 57 | for valuation plus a suitable weight among all translates has exponents obeying linear inequalities. |
| 58 | Other files use them to bound the elementary divisors of the Hecke operator. Twisted Dickson forms |
| 59 | on Frobenius twists of symmetric powers, weight inequalities via the Lang map, and the count of |
| 60 | zeros against degree are known in the literature. Related work: Ghate–Jana, Modular representations |
| 61 | of GL2(F_q) using calculus, 2025; Imai–Koskivirta, Automorphic vector bundles on the stack of |
| 62 | G-zips, 2021; Bombieri, Counting points on curves over finite fields, Sém. Bourbaki 430, 1973. |
| 63 | -/ |
| 64 | |
| 65 | @[expose] public section |
| 66 | |
| 67 | namespace New |
| 68 | |
| 69 | /-! ### Filtrations and Gauss weights -/ |
| 70 | |
| 71 | /-- A decreasing multiplicative filtration of a commutative ring by additive subgroups F_t, t |
| 72 | real: 1 ∈ F_0, F_s·F_t ⊆ F_{s+t}, and F_t ⊆ F_s for s ≤ t. -/ |
| 73 | class IsRealFiltration {R : Type} [CommRing R] (F : ℝ → AddSubgroup R) extends |
| 74 | SetLike.GradedMonoid F where |
| 75 | /-- The filtration is decreasing: `F t ≤ F s` for `s ≤ t`. -/ |
| 76 | antitone : Antitone F |
| 77 | |
| 78 | open MvPolynomial Matrix Finsupp SetLike Nat Ideal.Quotient IsRealFiltration AddSubgroup |
| 79 | |
| 80 | section Filtration |
| 81 | |
| 82 | variable {σ : Type*} {R A : Type} [CommRing R] [CommRing A] [Algebra R A] |
| 83 | |
| 84 | /-- For a ring element `w` and real `t`, the additive subgroup of elements divisible by `w` to the |
| 85 | power `max(⌈t⌉, 0)`. -/ |
| 86 | @[simp] def adicFiltration (w : R) (t : ℝ) : AddSubgroup R where |
| 87 | carrier := {x : R | w ^ ⌈t⌉₊ ∣ x} |
| 88 | add_mem' := Dvd.dvd.add |
| 89 | zero_mem' := by simp only [Set.mem_ofPred_eq, dvd_zero] |
| 90 | neg_mem' := by simp only [Set.mem_ofPred_eq, dvd_neg, imp_self, implies_true] |
| 91 | |
| 92 | /-- Membership in the adic filtration: `x ∈ adicFiltration w t` if and only if `w ^ ⌈t⌉₊ ∣ x`. -/ |
| 93 | lemma mem_adicFiltration_iff {w : R} {t : ℝ} {x : R} : x ∈ adicFiltration w t ↔ w ^ ⌈t⌉₊ ∣ x := |
| 94 | Iff.rfl |
| 95 | |
| 96 | instance (w : R) : IsRealFiltration (adicFiltration w) where |
| 97 | one_mem := by simp only [adicFiltration, ceil_zero, pow_zero, isUnit_one, IsUnit.dvd, |
| 98 | Set.ofPred_true, AddSubgroup.mem_mk, AddSubmonoid.mem_mk, AddSubsemigroup.mem_mk, |
| 99 | Set.mem_univ] |
| 100 | mul_mem s t x y hx hy := |
| 101 | calc w ^ ⌈s + t⌉₊ ∣ w ^ (⌈s⌉₊ + ⌈t⌉₊) := pow_dvd_pow w (ceil_add_le s t) |
| 102 | _ ∣ x • y := by simpa only [pow_add, smul_eq_mul] using mul_dvd_mul hx hy |
| 103 | antitone s t hst x hx := (pow_dvd_pow w (ceil_mono hst)).trans hx |
| 104 | |
| 105 | /-- The Gauss filtration: for subgroups `F t` of `R` and weights `c` of the variables, the additive |
| 106 | group of polynomials whose coefficient at each `x ^ α` lies in `F (t - c · α)`. -/ |
| 107 | def gaussFiltration (F : ℝ → AddSubgroup R) (c : σ → ℝ) (t : ℝ) : |
| 108 | AddSubgroup (MvPolynomial σ R) where |
| 109 | carrier := {f : MvPolynomial σ R | ∀ α : σ →₀ ℕ, f.coeff α ∈ F (t - weight c α)} |
| 110 | add_mem' hf hg α := by |
| 111 | simpa only [AddMonoidAlgebra.coeff_add, Finsupp.coe_add, Pi.add_apply] using |
| 112 | add_mem (hf α) (hg α) |
| 113 | zero_mem' := by |
| 114 | simp only [Set.mem_ofPred_eq, AddMonoidAlgebra.coeff_zero, Finsupp.coe_zero, |
| 115 | Pi.zero_apply, zero_mem, implies_true] |
| 116 | neg_mem' := by |
| 117 | simp only [Set.mem_ofPred_eq, AddMonoidAlgebra.coeff_neg, Finsupp.coe_neg, |
| 118 | Pi.neg_apply, neg_mem_iff, imp_self, implies_true] |
| 119 | |
| 120 | variable {F : ℝ → AddSubgroup R} {c : σ → ℝ} {w : R} {t : ℝ} |
| 121 | |
| 122 | /-- Membership criterion for the Gauss filtration on multivariate polynomials. -/ |
| 123 | lemma mem_gaussFiltration_iff {f : MvPolynomial σ R} : |
| 124 | f ∈ gaussFiltration F c t ↔ ∀ α : σ →₀ ℕ, f.coeff α ∈ F (t - weight c α) := Iff.rfl |
| 125 | |
| 126 | lemma mem_adicFiltration_of_nonpos {x : R} (h_nonpos : x ≠ 0 → t ≤ 0) : |
| 127 | x ∈ adicFiltration w t := by |
| 128 | by_cases hx : x = 0 |
| 129 | · subst hx; exact zero_mem _ |
| 130 | · rw [mem_adicFiltration_iff, ceil_eq_zero.2 (h_nonpos hx), pow_zero]; exact one_dvd x |
| 131 | |
| 132 | /-- The term `x * X ^ α` lies in the level `t` of the Gauss filtration if `x` lies in |
| 133 | `F (t - c · α)`. -/ |
| 134 | lemma monomial_mem_gaussFiltration {α : σ →₀ ℕ} {x : R} (hx : x ∈ F (t - weight c α)) : |
| 135 | monomial α x ∈ gaussFiltration F c t := by |
| 136 | classical |
| 137 | intro β |
| 138 | by_cases h : β = α |
| 139 | · subst h; rwa [coeff_monomial, ite_eq_left rfl] |
| 140 | · rw [coeff_monomial, ite_eq_right fun heq ↦ h heq.symm]; exact zero_mem _ |
| 141 | |
| 142 | lemma C_mem_gaussFiltration {x : R} (hx : x ∈ F t) : |
| 143 | (C x : MvPolynomial σ R) ∈ gaussFiltration F c t := |
| 144 | monomial_mem_gaussFiltration (by simpa only [map_zero, sub_zero]) |
| 145 | |
| 146 | open scoped Classical in |
| 147 | instance {σ R : Type} [CommRing R] {F : ℝ → AddSubgroup R} {c : σ → ℝ} [IsRealFiltration F] : |
| 148 | IsRealFiltration (gaussFiltration F c) where |
| 149 | one_mem := monomial_mem_gaussFiltration (by simp only [map_zero, sub_self, one_mem_graded]) |
| 150 | mul_mem s t f g hf hg α := by |
| 151 | -- The coefficient at `α` is a sum of products of coefficients at `β`, `γ` with `β + γ = α`. |
| 152 | rw [coeff_mul] |
| 153 | refine sum_mem fun (β, γ) hβγ ↦ ?_ |
| 154 | obtain rfl : β + γ = α := by simpa only [Finset.HasAntidiagonal.mem_antidiagonal] using hβγ |
| 155 | simpa only [map_add, add_sub_add_comm] using mul_mem_graded (hf β) (hg γ) |
| 156 | antitone s t hst f hf α := antitone (sub_le_sub_right hst _) (hf α) |
| 157 | |
| 158 | /-- Substitution respects weights. Let `G` be a filtration of the `R`-algebra `A` such that the |
| 159 | algebra map sends `F t` into `G t`, and let `f` lie in the level `t` of the Gauss filtration for |
| 160 | `F` and the weights `c` of the variables. Let `χ`, `ψ` be substitutions with `χ X_i` in `G (c i)` |
| 161 | and `ψ X_i - χ X_i` in `G (c i + 1 / 20)`. Then `ψ f` lies in `G t` and `ψ f - χ f` in |
| 162 | `G (t + 1 / 20)`. -/ |
| 163 | lemma algHom_sub_mem_of_mem_gaussFiltration (χ : MvPolynomial σ R →ₐ[R] A) (G : ℝ → AddSubgroup A) |
| 164 | [IsRealFiltration G] {f : MvPolynomial σ R} (hf : f ∈ gaussFiltration F c t) |
| 165 | (hχ : ∀ i : σ, χ (X i) ∈ G (c i)) (ψ : MvPolynomial σ R →ₐ[R] A) |
| 166 | (hψ : ∀ i : σ, ψ (X i) - χ (X i) ∈ G (c i + 20⁻¹)) |
| 167 | (hF : ∀ {s : ℝ} {x : R}, x ∈ F s → algebraMap R A x ∈ G s) : |
| 168 | ψ f ∈ G t ∧ ψ f - χ f ∈ G (t + 20⁻¹) := by |
| 169 | classical |
| 170 | -- Induction on `f`: degrees in the filtration add in products, so a gain of `20⁻¹` on one |
| 171 | -- factor is a gain of `20⁻¹` on the product. |
| 172 | induction f using induction_on'' generalizing t with |
| 173 | | C x => simpa only [algHom_C, sub_self, zero_mem, and_true, map_zero, sub_zero, coeff_C, |
| 174 | ↓reduceIte] using hF (hf 0) |
| 175 | | monomial_add α x f hα _ ih_f ih_monomial => |
| 176 | -- both summands lie in `gaussFiltration F c t`, since `α` is not in the support of `f` |
| 177 | have h_monomial : monomial α x ∈ gaussFiltration F c t := |
| 178 | monomial_mem_gaussFiltration (by |
| 179 | simpa only [AddMonoidAlgebra.coeff_add, Finsupp.coe_add, Pi.add_apply, |
| 180 | coeff_monomial, ↓reduceIte, f.notMem_support_iff.1 hα, add_zero] using hf α) |
| 181 | have h_rest : f ∈ gaussFiltration F c t := (add_mem_cancel_left h_monomial).1 hf |
| 182 | have h_sum1 : ψ (monomial α x) + ψ f ∈ G t := |
| 183 | add_mem (ih_monomial h_monomial).1 (ih_f h_rest).1 |
| 184 | simpa only [map_add, h_sum1, add_sub_add_comm, true_and] using |
| 185 | add_mem (ih_monomial h_monomial).2 (ih_f h_rest).2 |
| 186 | | mul_X p i ih => |
| 187 | have hp : p ∈ gaussFiltration F c (t - c i) := fun α ↦ by |
| 188 | have h_level : t - c i - weight c α = t - weight c (α + .single i 1) := by |
| 189 | simp only [map_add, weight_single, one_smul, sub_add_eq_sub_sub_swap] |
| 190 | simpa only [h_level, coeff_mul_X α i p] using hf (α + .single i 1) |
| 191 | obtain ⟨hψp, h_diff⟩ : ψ p ∈ G (t - c i) ∧ ψ p - χ p ∈ G (t - c i + 20⁻¹) := ih hp |
| 192 | have hψX : ψ (X i) ∈ G (c i) := by |
| 193 | simpa only [add_sub_cancel] using add_mem (hχ i) |
| 194 | (antitone (by simp only [le_add_iff_nonneg_right, inv_nonneg, ofNat_nonneg]) (hψ i)) |
| 195 | refine ⟨by simpa only [map_mul, sub_add_cancel] using mul_mem_graded hψp hψX, ?_⟩ |
| 196 | rw [show ψ (p * X i) - χ (p * X i) = |
| 197 | (ψ p - χ p) * χ (X i) + ψ p * (ψ (X i) - χ (X i)) by |
| 198 | simp only [map_mul, sub_mul, mul_sub, sub_add_sub_cancel']] |
| 199 | exact add_mem |
| 200 | (by simpa only [add_right_comm, sub_add_cancel] using mul_mem_graded h_diff (hχ i)) |
| 201 | (by simpa only [← add_assoc, sub_add_cancel] using mul_mem_graded hψp (hψ i)) |
| 202 | |
| 203 | end Filtration |
| 204 | |
| 205 | /-! ### One root and one letter -/ |
| 206 | |
| 207 | section Root |
| 208 | |
| 209 | variable {R : Type} {N k : ℕ} {W : Type} [CommRing R] [CommRing W] [IsLocalRing W] |
| 210 | (T : FrobeniusCycle N W R) {a a' : Fin k} |
| 211 | |
| 212 | /-- The group `SL₂(W)` placed in the rows and columns `a`, `a'` of `GL_k(W)`: the matrices of |
| 213 | determinant `1` that agree with the identity matrix at `(i, j)` unless both `i` and `j` are among |
| 214 | `a`, `a'`. It is trivial for `a = a'`. -/ |
| 215 | def rootSL (W : Type) [CommRing W] (a a' : Fin k) : Subgroup (GL (Fin k) W) := |
| 216 | agreeWithOneOn (fun i j : Fin k ↦ (i ≠ a ∧ i ≠ a') ∨ (j ≠ a ∧ j ≠ a')) W |
| 217 | (fun _ _ _ hij ↦ hij.imp .inl .inr) ⊓ GeneralLinearGroup.det.ker |
| 218 | |
| 219 | omit [IsLocalRing W] in |
| 220 | lemma rootSL_le_levi {τ : Fin k → ℕ} (hτ : τ a = τ a') : rootSL W a a' ≤ levi W τ := |
| 221 | fun _ hg i j hij ↦ (hg.1 i j <| by |
| 222 | by_cases hi : i = a ∨ i = a' |
| 223 | · refine .inr ⟨fun h ↦ hij ?_, fun h ↦ hij ?_⟩ <;> |
| 224 | rcases hi with rfl | rfl <;> subst h <;> first | rfl | exact hτ | exact hτ.symm |
| 225 | · exact .inl (not_or.1 hi)).trans (one_apply_ne (ne_of_apply_ne τ hij)) |
| 226 | |
| 227 | /-- A root `(a, a')` of `GL_k` and a letter `i`, the data at which a defect is measured. -/ |
| 228 | structure FrobeniusCycle.RootAt (T : FrobeniusCycle N W R) (k : ℕ) where |
| 229 | /-- The letter `i`. -/ |
| 230 | letter : ZMod N |
| 231 | /-- The index `a`. -/ |
| 232 | fst : Fin k |
| 233 | /-- The index `a'`. -/ |
| 234 | snd : Fin k |
| 235 | /-- The two indices differ. -/ |
| 236 | ne : fst ≠ snd |
| 237 | |
| 238 | namespace FrobeniusCycle.RootAt |
| 239 | |
| 240 | variable {T} (D : T.RootAt k) {s : ZMod N} {z : Fin k × ZMod N} |
| 241 | |
| 242 | /-- The variable `X_s`: index `a` at even and `a'` at odd letters `s`. -/ |
| 243 | def varX (s : ZMod N) : Fin k × ZMod N := T.rootVar D.snd D.fst s |
| 244 | |
| 245 | /-- The variable `Y_s`: index `a'` at even and `a` at odd letters `s`. -/ |
| 246 | def varY (s : ZMod N) : Fin k × ZMod N := T.rootVar D.fst D.snd s |
| 247 | |
| 248 | /-- The variables whose index is neither `a` nor `a'`. -/ |
| 249 | def IsFixed (z : Fin k × ZMod N) : Prop := z.1 ≠ D.fst ∧ z.1 ≠ D.snd |
| 250 | |
| 251 | /-- The permutation of the variables that swaps `X_s` and `Y_s` in each letter. -/ |
| 252 | def swapVar (z : Fin k × ZMod N) : Fin k × ZMod N := (Equiv.swap D.fst D.snd z.1, z.2) |
| 253 | |
| 254 | /-- The map of variables that sends `Y_i` to `X_i` and fixes the others. -/ |
| 255 | def merge (z : Fin k × ZMod N) : Fin k × ZMod N := |
| 256 | if z = D.varY D.letter then D.varX D.letter else z |
| 257 | |
| 258 | /-- The sign at `Y_s`: `-1` if `s` has the parity of `i = D.letter` and `1` otherwise. It is `0` at |
| 259 | the other variables. The parity of a letter is its mark `T.isEven` in the twisting data, which |
| 260 | alternates from `s` to `s + 1`. -/ |
| 261 | def sign (z : Fin k × ZMod N) : ℤ := |
| 262 | if z = D.varY z.2 then if T.isEven z.2 = T.isEven D.letter then -1 else 1 else 0 |
| 263 | |
| 264 | /-- The number `q = P ^ N` of residue classes of `W`, as a constant whose casts `simp` keeps. -/ |
| 265 | def card (_ : T.RootAt k) : ℕ := T.q |
| 266 | |
| 267 | /-- The power `P_s = P ^ (s - i)`, with `s - i` read in `[0, N)`. -/ |
| 268 | def frobPower (s : ZMod N) : ℕ := T.P ^ (s - D.letter).val |
| 269 | |
| 270 | /-- The weights `q P_s` at `X_s` and `0` at the other variables, where `q = D.card` and |
| 271 | `P_s = D.frobPower s`. Under the hypotheses of `HasBoundedIncrements.weight_zeroOrder_mul_card_le`, |
| 272 | the weight of the exponent `α` bounds the degree in `t` of the auxiliary polynomial: the coefficient |
| 273 | `D.mergedCoeff α` after the substitution `D.mainSubst - D.crossSubst`, modulo `w ^ (l + 1)`. -/ |
| 274 | def poleOrder (z : Fin k × ZMod N) : ℕ := if z = D.varX z.2 then D.card * D.frobPower z.2 else 0 |
| 275 | |
| 276 | /-- The weights `q = D.card` at `Y_i`, `P_s = D.frobPower s` at `Y_s` for `s ≠ i`, and `0` at the |
| 277 | other variables, where `i = D.letter`. Under the hypotheses of |
| 278 | `HasBoundedIncrements.weight_zeroOrder_mul_card_le`, the weight of the exponent `α` bounds from |
| 279 | below the order of vanishing of the auxiliary polynomial (see `poleOrder`) at the points |
| 280 | `t = ι_i(r)`, `r ∈ W`. -/ |
| 281 | def zeroOrder (z : Fin k × ZMod N) : ℕ := |
| 282 | if z = D.varY z.2 then if z.2 = D.letter then D.card else D.frobPower z.2 else 0 |
| 283 | |
| 284 | /-- The sign of `Y_s` at both `X_s` and `Y_s` for `s ≠ i`, and `0` at the other variables. -/ |
| 285 | def crossSign (z : Fin k × ZMod N) : R := |
| 286 | if z.2 = D.letter then 0 else D.sign z + D.sign (D.swapVar z) |
| 287 | |
| 288 | private lemma one_lt_cast_card [NeZero N] : (1 : ℝ) < D.card := by |
| 289 | simpa only [card, cast_pow] using T.one_lt_q |
| 290 | |
| 291 | lemma cast_card_pos [NeZero N] : (0 : ℝ) < D.card := |
| 292 | one_pos.trans D.one_lt_cast_card |
| 293 | |
| 294 | @[simp] lemma varX_snd : (D.varX s).2 = s := rfl |
| 295 | |
| 296 | @[simp] lemma varY_snd : (D.varY s).2 = s := rfl |
| 297 | |
| 298 | @[simp] lemma varX_ne_varY (s t : ZMod N) : D.varX s ≠ D.varY t := by |
| 299 | intro h |
| 300 | obtain rfl : s = t := congrArg Prod.snd h |
| 301 | by_cases hs : T.isEven s <;> simp [varX, varY, rootVar, hs, D.ne, D.ne.symm] at h |
| 302 | |
| 303 | @[simp] lemma varY_ne_varX (s t : ZMod N) : D.varY s ≠ D.varX t := (D.varX_ne_varY t s).symm |
| 304 | |
| 305 | @[simp] lemma varY_inj {t : ZMod N} : D.varY s = D.varY t ↔ s = t := |
| 306 | ⟨congrArg Prod.snd, congrArg D.varY⟩ |
| 307 | |
| 308 | @[simp] lemma swapVar_snd : (D.swapVar z).2 = z.2 := rfl |
| 309 | |
| 310 | /-- Swapping the two root variables is an involution. -/ |
| 311 | @[simp] lemma swapVar_swapVar : D.swapVar (D.swapVar z) = z := |
| 312 | Prod.ext (Equiv.swap_apply_self ..) rfl |
| 313 | |
| 314 | @[simp] lemma swapVar_varX : D.swapVar (D.varX s) = D.varY s := by |
| 315 | by_cases hs : T.isEven s <;> simp [swapVar, varX, varY, rootVar, hs] |
| 316 | |
| 317 | @[simp] lemma swapVar_varY : D.swapVar (D.varY s) = D.varX s := by |
| 318 | rw [← D.swapVar_varX (s := s), swapVar_swapVar] |
| 319 | |
| 320 | /-- Every variable is `Y_i`, `X_i`, some `Y_s` or `X_s` with `s ≠ i`, or lies off the root. -/ |
| 321 | lemma var_cases (z : Fin k × ZMod N) : z = D.varY D.letter ∨ z = D.varX D.letter ∨ |
| 322 | (∃ s : ZMod N, s ≠ D.letter ∧ (z = D.varY s ∨ z = D.varX s)) ∨ D.IsFixed z := by |
| 323 | by_cases hz : D.IsFixed z |
| 324 | · exact .inr (.inr (.inr hz)) |
| 325 | have h_fst : z.1 = D.fst ∨ z.1 = D.snd := by |
| 326 | by_contra h |
| 327 | exact hz ⟨fun h1 ↦ h (.inl h1), fun h2 ↦ h (.inr h2)⟩ |
| 328 | have h_letter : z = D.varY z.2 ∨ z = D.varX z.2 := by |
| 329 | -- The parity of this letter determines which of the two root coordinates is `varX`. |
| 330 | simp only [varX, varY, rootVar, Prod.ext_iff, and_true] |
| 331 | split_ifs |
| 332 | · exact h_fst.symm |
| 333 | · exact h_fst |
| 334 | by_cases hs : z.2 = D.letter |
| 335 | · rw [hs] at h_letter |
| 336 | tauto |
| 337 | · exact .inr (.inr (.inl ⟨z.2, hs, h_letter⟩)) |
| 338 | |
| 339 | @[simp] lemma sign_varX : D.sign (D.varX s) = 0 := by |
| 340 | simp only [sign, varX_snd, varX_ne_varY, ↓reduceIte] |
| 341 | |
| 342 | @[simp] lemma sign_varY_letter : D.sign (D.varY D.letter) = -1 := by |
| 343 | simp only [sign, varY_snd, ↓reduceIte, Int.reduceNeg] |
| 344 | |
| 345 | lemma sign_varY_eq_one_or_neg_one (s : ZMod N) : |
| 346 | D.sign (D.varY s) = 1 ∨ D.sign (D.varY s) = -1 := by |
| 347 | simp only [sign, varY_snd, ↓reduceIte] |
| 348 | by_cases h : T.isEven s = T.isEven D.letter |
| 349 | · exact .inr (ite_eq_left h) |
| 350 | · exact .inl (ite_eq_right h) |
| 351 | |
| 352 | @[simp] lemma frobPower_letter : D.frobPower D.letter = 1 := by |
| 353 | simp only [frobPower, sub_self, ZMod.val_zero, pow_zero] |
| 354 | |
| 355 | @[simp] lemma merge_varX : D.merge (D.varX s) = D.varX s := by |
| 356 | simp only [merge, varX_ne_varY, ↓reduceIte] |
| 357 | |
| 358 | @[simp] lemma merge_varY : |
| 359 | D.merge (D.varY s) = if s = D.letter then D.varX D.letter else D.varY s := by |
| 360 | simp only [merge, varY_inj] |
| 361 | |
| 362 | @[simp] lemma poleOrder_varX : D.poleOrder (D.varX s) = D.card * D.frobPower s := by |
| 363 | simp only [poleOrder, varX_snd, ↓reduceIte] |
| 364 | |
| 365 | @[simp] lemma poleOrder_varY : D.poleOrder (D.varY s) = 0 := by |
| 366 | simp only [poleOrder, varY_snd, varY_ne_varX, ↓reduceIte] |
| 367 | |
| 368 | @[simp] lemma zeroOrder_varX : D.zeroOrder (D.varX s) = 0 := by |
| 369 | simp only [zeroOrder, varX_snd, varX_ne_varY, ↓reduceIte] |
| 370 | |
| 371 | @[simp] lemma zeroOrder_varY : |
| 372 | D.zeroOrder (D.varY s) = if s = D.letter then D.card else D.frobPower s := ite_eq_left rfl |
| 373 | |
| 374 | @[simp] lemma crossSign_varX : D.crossSign (D.varX s) = |
| 375 | if s = D.letter then 0 else (D.sign (D.varY s) : R) := by |
| 376 | simp only [crossSign, varX_snd, sign_varX, Int.cast_zero, swapVar_varX, zero_add] |
| 377 | |
| 378 | @[simp] lemma crossSign_varY : D.crossSign (D.varY s) = |
| 379 | if s = D.letter then 0 else (D.sign (D.varY s) : R) := by |
| 380 | simp only [crossSign, varY_snd, swapVar_varY, sign_varX, Int.cast_zero, add_zero] |
| 381 | |
| 382 | namespace IsFixed |
| 383 | |
| 384 | variable {D} |
| 385 | |
| 386 | lemma swapVar_eq (hz : D.IsFixed z) : D.swapVar z = z := by |
| 387 | rw [swapVar, Equiv.swap_apply_of_ne_of_ne hz.1 hz.2] |
| 388 | |
| 389 | lemma ne_varX (hz : D.IsFixed z) (s : ZMod N) : z ≠ D.varX s := by |
| 390 | rintro rfl |
| 391 | exact D.varY_ne_varX s s (D.swapVar_varX.symm.trans hz.swapVar_eq) |
| 392 | |
| 393 | lemma ne_varY (hz : D.IsFixed z) (s : ZMod N) : z ≠ D.varY s := by |
| 394 | intro h |
| 395 | apply hz.ne_varX s |
| 396 | simpa only [hz.swapVar_eq, swapVar_varY] using congrArg D.swapVar h |
| 397 | |
| 398 | lemma merge_eq (hz : D.IsFixed z) : D.merge z = z := ite_eq_right (hz.ne_varY D.letter) |
| 399 | |
| 400 | lemma sign_eq_zero (hz : D.IsFixed z) : D.sign z = 0 := ite_eq_right (hz.ne_varY z.2) |
| 401 | |
| 402 | lemma poleOrder_eq_zero (hz : D.IsFixed z) : D.poleOrder z = 0 := ite_eq_right (hz.ne_varX z.2) |
| 403 | |
| 404 | lemma zeroOrder_eq_zero (hz : D.IsFixed z) : D.zeroOrder z = 0 := ite_eq_right (hz.ne_varY z.2) |
| 405 | |
| 406 | lemma crossSign_eq_zero (hz : D.IsFixed z) : D.crossSign z = 0 := by |
| 407 | simp only [crossSign, hz.sign_eq_zero, Int.cast_zero, hz.swapVar_eq, add_zero, ite_self] |
| 408 | |
| 409 | end IsFixed |
| 410 | |
| 411 | end FrobeniusCycle.RootAt |
| 412 | |
| 413 | end Root |
| 414 | |
| 415 | namespace FrobeniusCycle.RootAt |
| 416 | |
| 417 | variable {R : Type} {N k : ℕ} {W : Type} [CommRing R] [CommRing W] [IsLocalRing W] |
| 418 | |
| 419 | /-- Let `D` consist of two distinct indices `D.fst`, `D.snd` in `Fin k` and a letter. Let the |
| 420 | variable `z = (b, s)` lie off the root. Then the maps of variables `D.swapVar` and `D.merge` fix |
| 421 | `z`, and the signs `D.sign`, `D.crossSign` and the weights `D.poleOrder`, `D.zeroOrder` vanish at |
| 422 | `z`. -/ |
| 423 | lemma IsFixed.swapVar_merge_eq_self_and_weights_eq_zero {T : FrobeniusCycle N W R} |
| 424 | {D : T.RootAt k} {z : Fin k × ZMod N} (hz : D.IsFixed z) : |
| 425 | D.swapVar z = z ∧ |
| 426 | D.merge z = z ∧ |
| 427 | D.sign z = 0 ∧ |
| 428 | D.poleOrder z = 0 ∧ |
| 429 | D.zeroOrder z = 0 ∧ |
| 430 | D.crossSign z = 0 := |
| 431 | ⟨hz.swapVar_eq, hz.merge_eq, hz.sign_eq_zero, hz.poleOrder_eq_zero, hz.zeroOrder_eq_zero, |
| 432 | hz.crossSign_eq_zero⟩ |
| 433 | |
| 434 | /-- The defect weight `T.defectWeight D.letter D.fst D.snd z` of a variable `z` equals |
| 435 | `(D.zeroOrder z - D.poleOrder z / q) / (q - 1)` with `q = D.card`. Summing, the defect of an |
| 436 | exponent is `(ν - ν') / (q - 1)`, where `ν` is its weight for `D.zeroOrder` and `q ν'` its weight |
| 437 | for `D.poleOrder`. -/ |
| 438 | lemma defectWeight_eq [NeZero N] {T : FrobeniusCycle N W R} (D : T.RootAt k) (z : Fin k × ZMod N) : |
| 439 | T.defectWeight D.letter D.fst D.snd z = |
| 440 | (D.zeroOrder z - D.poleOrder z / D.card) / (D.card - 1) := by |
| 441 | change ((if z = D.varY z.2 then (T.P : ℝ) ^ (1 + (z.2 - 1 - D.letter).val) else 0) - |
| 442 | if z = D.varX z.2 then (T.P : ℝ) ^ (z.2 - D.letter).val else 0) / (D.card - 1) = _ |
| 443 | rw [one_add_val_sub_one_sub, zeroOrder, poleOrder] |
| 444 | congr 1 |
| 445 | split_ifs <;> simp [card, frobPower, T.prime.ne_zero] |
| 446 | |
| 447 | /-- The matrix `!![0, 1; -1, x]` in the rows and columns `a`, `a'`, with `x = -r` if `i` is even and |
| 448 | `x = r` otherwise, written as a transposition times a transvection times the diagonal matrix with |
| 449 | `-1` at `a`. It relates the point at infinity of the projective line to the finite point with the |
| 450 | affine coordinate `ι_i(r)`. -/ |
| 451 | def swapTransvection {T : FrobeniusCycle N W R} (D : T.RootAt k) (r : W) : GL (Fin k) W := |
| 452 | .swap W D.fst D.snd * transvectionGL D.ne (if T.isEven D.letter then -r else r) * |
| 453 | diagGL (Function.update 1 D.fst (-1)) |
| 454 | |
| 455 | /-- The sign `-1` at the variables with index `a`, and `1` at the other variables. -/ |
| 456 | def moveSign {T : FrobeniusCycle N W R} (D : T.RootAt k) (z : Fin k × ZMod N) : ℤ := |
| 457 | if z.1 = D.fst then -1 else 1 |
| 458 | |
| 459 | /-- Let `T : FrobeniusCycle N W R` give each letter `s ∈ ℤ/N` a parity `T.isEven s`, and let |
| 460 | `D : T.RootAt k` consist of two distinct indices `a = D.fst`, `a' = D.snd` below `k` and a letter |
| 461 | `i = D.letter`. The matrix `D.swapTransvection r`, which is `!![0, 1; -1, x]` in the rows and |
| 462 | columns `a`, `a'` with `x = -r` for even `i` and `x = r` for odd `i`, lies in `SL₂(W)` placed there |
| 463 | (`rootSL`): its three factors, the transposition of `a` and `a'`, the transvection by `x` and the |
| 464 | diagonal matrix with `-1` at `a`, agree with the identity elsewhere and have determinants |
| 465 | `-1`, `1`, `-1`. -/ |
| 466 | lemma swapTransvection_mem_rootSL {T : FrobeniusCycle N W R} (D : T.RootAt k) (r : W) : |
| 467 | D.swapTransvection r ∈ rootSL W D.fst D.snd := by |
| 468 | refine ⟨mul_mem (mul_mem (fun i j hij ↦ ?_) fun i j hij ↦ ?_) fun i j hij ↦ ?_, Units.ext ?_⟩ |
| 469 | · have h_swap : Equiv.swap D.fst D.snd i = j ↔ i = j := hij.elim |
| 470 | (fun hi ↦ by rw [Equiv.swap_apply_of_ne_of_ne hi.1 hi.2]) |
| 471 | (fun hj ↦ by |
| 472 | conv_lhs => rw [← Equiv.swap_apply_of_ne_of_ne hj.1 hj.2] |
| 473 | exact (Equiv.swap D.fst D.snd).injective.eq_iff) |
| 474 | simp only [GeneralLinearGroup.val_swap, swap, PEquiv.toMatrix_apply, |
| 475 | Equiv.toPEquiv_apply, Option.mem_def, Option.some.injEq, h_swap, Matrix.one_apply] |
| 476 | · have h_off : ¬(D.fst = i ∧ D.snd = j) := fun ⟨h1, h2⟩ ↦ |
| 477 | hij.elim (fun hi ↦ hi.1 h1.symm) (fun hj ↦ hj.2 h2.symm) |
| 478 | simp only [val_transvectionGL, transvection, Matrix.single, Matrix.add_apply, |
| 479 | Matrix.one_apply, of_apply, h_off, ↓reduceIte, add_zero] |
| 480 | · obtain rfl | h_ne := eq_or_ne i j |
| 481 | · simp only [coe_diagGL, diagonal_apply_eq, ne_eq, hij.elim And.left And.left, |
| 482 | not_false_eq_true, Function.update_of_ne, Pi.one_apply, Units.val_one, |
| 483 | one_apply_eq] |
| 484 | · simp only [coe_diagGL, ne_eq, h_ne, not_false_eq_true, diagonal_apply_ne, |
| 485 | one_apply_ne] |
| 486 | · change (D.swapTransvection r).val.det = 1 |
| 487 | have h_diag : (diagGL (Function.update 1 D.fst (-1)) : GL (Fin k) W).val.det = -1 := by |
| 488 | simp only [coe_diagGL, det_diagonal, ← Units.coe_prod, Finset.mem_univ, |
| 489 | Finset.prod_update_of_mem, Pi.one_apply, Finset.prod_const_one, mul_one, |
| 490 | Units.val_neg, Units.val_one] |
| 491 | rw [swapTransvection, Units.val_mul, det_mul, h_diag] |
| 492 | simp only [transvectionGL, Units.val_mul, GeneralLinearGroup.val_swap, swap, det_mul, |
| 493 | det_permutation, Equiv.Perm.sign_swap D.ne, Units.val_neg, Units.val_one, |
| 494 | Int.reduceNeg, Int.cast_neg, Int.cast_one, det_transvection_of_ne _ _ D.ne, mul_one, |
| 495 | mul_neg, neg_neg] |
| 496 | |
| 497 | /-- The action of the matrix `D.swapTransvection r` on the variable `z = (b, s)` with index |
| 498 | `b : Fin k` and letter `s : ZMod N`. Let `a = D.fst` and `a' = D.snd`. The variable |
| 499 | `X_s = D.varX s` is `(a, s)` for even and `(a', s)` for odd `s`, and `Y_s = D.varY s` is the other |
| 500 | of the two; `D.swapVar` swaps them and fixes all other variables. Up to the sign `D.moveSign z`, |
| 501 | which is `-1` if `b = a` and `1` otherwise, the matrix sends `X_s` to `Y_s`, sends `Y_s` to |
| 502 | `X_s + ε_s ι_s(r) Y_s` and fixes the other variables. Here `ι_s = T.embedding s : W → R`, and |
| 503 | `ε_s = D.sign Y_s` is `-1` if `s` has the parity of the letter `D.letter` and `1` otherwise; |
| 504 | `D.sign` is `0` at the variables other than the `Y_s`. -/ |
| 505 | lemma polyAction_swapTransvection_X [NeZero N] {T : FrobeniusCycle N W R} (D : T.RootAt k) (r : W) |
| 506 | (z : Fin k × ZMod N) : |
| 507 | T.polyAction (D.swapTransvection r) (X z) = |
| 508 | D.moveSign z • (X (D.swapVar z) + C (D.sign z * T.embedding z.2 r) * X (D.varY z.2)) := by |
| 509 | set x : W := if T.isEven D.letter then -r else r with hx |
| 510 | -- The diagonal factor is its own inverse transpose, so it gives the same sign at all letters. |
| 511 | let d : GL (Fin k) W := diagGL (Function.update 1 D.fst (-1)) |
| 512 | have h_diag : T.polyAction d (X z) = D.moveSign z • X z := by |
| 513 | rw [polyAction_X, letterMatrix_apply, ← map_inv, ← Function.update_inv, inv_one, inv_neg_one] |
| 514 | simp only [coe_diagGL, Function.update_apply, Pi.one_apply, apply_ite Units.val, |
| 515 | Units.val_neg, Units.val_one, diagonal_transpose, ite_self, map_apply, |
| 516 | diagonal_apply, apply_ite (T.embedding _), map_neg, map_one, map_zero, apply_ite C, |
| 517 | ite_mul, neg_mul, one_mul, zero_mul, Finset.sum_ite_eq', |
| 518 | Finset.mem_univ, ↓reduceIte, Prod.mk.eta, moveSign, Int.reduceNeg, ite_smul, |
| 519 | neg_smul, one_smul, d] |
| 520 | -- Read the column of `z` in the matrix of the letter, for both parities of `z.2` and of |
| 521 | -- `D.letter`. |
| 522 | let M : Matrix (Fin k) (Fin k) W := |
| 523 | if T.isEven z.2 then transvection D.fst D.snd x else (transvection D.fst D.snd (-x))ᵀ |
| 524 | have h_column : T.polyAction (.swap W D.fst D.snd * transvectionGL D.ne x) (X z) = |
| 525 | ∑ b : Fin k, C (T.embedding z.2 (M b z.1)) * X (Equiv.swap D.fst D.snd b, z.2) := by |
| 526 | simp only [GeneralLinearGroup.swap, swap, transvectionGL, map_mul, AlgHom.mul_apply, |
| 527 | polyAction_X, letterMatrix_apply, Units.inv_mk, map_apply, map_sum, algHom_C, |
| 528 | MvPolynomial.algebraMap_eq, transpose_permMatrix, Equiv.swap_inv, ite_self, |
| 529 | PEquiv.toMatrix_apply, Equiv.toPEquiv_apply, Option.mem_def, Option.some.injEq, |
| 530 | Equiv.swap_apply_eq_iff, MonoidWithZeroHom.map_ite_one_zero, ite_mul, one_mul, |
| 531 | zero_mul, Finset.sum_ite_eq', Finset.mem_univ, ↓reduceIte, M] |
| 532 | -- Off the diagonal, the column of `z` has only the entry `D.sign z * r`, in the row of `X_s`. |
| 533 | have h_entry (b : Fin k) : M b z.1 = |
| 534 | (if b = z.1 then 1 else 0) + if (b, z.2) = D.varX z.2 then D.sign z * r else 0 := by |
| 535 | cases h_letter : T.isEven D.letter <;> cases h_z : T.isEven z.2 <;> |
| 536 | simp [M, transvection, Matrix.single, Matrix.one_apply, hx, h_letter, h_z, varX, varY, |
| 537 | rootVar, sign, Function.swap, Prod.ext_iff, eq_comm, and_comm, ← ite_and, ite_mul] |
| 538 | rw [swapTransvection, map_mul, AlgHom.mul_apply, h_diag, map_zsmul, h_column, |
| 539 | ← swapVar_varX, swapVar, swapVar] |
| 540 | simp only [h_entry, Prod.ext_iff, varX_snd, and_true, map_add, apply_ite (T.embedding _), |
| 541 | map_one, map_zero, map_mul, map_intCast, apply_ite C, add_mul, |
| 542 | ite_mul, one_mul, zero_mul, Finset.sum_add_distrib, Finset.sum_ite_eq', Finset.mem_univ, |
| 543 | ↓reduceIte, smul_add, zsmul_eq_mul] |
| 544 | |
| 545 | /-- The weights `c` of the variables rise from `X_s` to `Y_s` by an amount in `[1 / 2, 1]`. -/ |
| 546 | def HasBoundedIncrements {T : FrobeniusCycle N W R} (D : T.RootAt k) (c : Fin k × ZMod N → ℝ) : |
| 547 | Prop := |
| 548 | ∀ s : ZMod N, c (D.varY s) - c (D.varX s) ∈ Set.Icc 2⁻¹ 1 |
| 549 | |
| 550 | /-- The slope `ρ = (c Y_i - c X_i) / q` of weights `c` of the variables, where `i = D.letter` and |
| 551 | `q = D.card`. The variable `t` of the auxiliary polynomial weighs `-ρ` in the expansion at infinity |
| 552 | and `ρ` in the expansion at a finite point, after the shift `t ↦ t + ι_i(r)`. -/ |
| 553 | noncomputable def slope {T : FrobeniusCycle N W R} (D : T.RootAt k) (c : Fin k × ZMod N → ℝ) : ℝ := |
| 554 | (c (D.varY D.letter) - c (D.varX D.letter)) / D.card |
| 555 | |
| 556 | lemma card_mul_slope [NeZero N] |
| 557 | {T : FrobeniusCycle N W R} {D : T.RootAt k} {c : Fin k × ZMod N → ℝ} : |
| 558 | D.card * D.slope c = c (D.varY D.letter) - c (D.varX D.letter) := |
| 559 | mul_div_cancel₀ _ D.cast_card_pos.ne' |
| 560 | |
| 561 | lemma HasBoundedIncrements.slope_pos [NeZero N] {T : FrobeniusCycle N W R} {D : T.RootAt k} |
| 562 | {c : Fin k × ZMod N → ℝ} (hc : D.HasBoundedIncrements c) : 0 < D.slope c := |
| 563 | div_pos (by linarith [(hc D.letter).1]) D.cast_card_pos |
| 564 | |
| 565 | /-- If the steps of `c` lie in `[1 / 2, 1]`, then `P_s` times the slope is at most `1 / 5`, because |
| 566 | `5 P_s ≤ q`. -/ |
| 567 | lemma HasBoundedIncrements.frobPower_mul_slope_le [NeZero N] |
| 568 | {T : FrobeniusCycle N W R} {D : T.RootAt k} |
| 569 | {c : Fin k × ZMod N → ℝ} (hc : D.HasBoundedIncrements c) (s : ZMod N) : |
| 570 | D.frobPower s * D.slope c ≤ 1 / 5 := by |
| 571 | have h_power : (5 * D.frobPower s : ℝ) ≤ D.card := mod_cast T.five_mul_P_pow_le_q (s - D.letter) |
| 572 | have h_step : D.card * D.slope c ≤ 1 := card_mul_slope.trans_le (hc D.letter).2 |
| 573 | nlinarith [hc.slope_pos] |
| 574 | |
| 575 | /-- If the steps of `c` lie in `[1 / 2, 1]` and `s ≠ D.letter`, then `q P_s` times the slope is at |
| 576 | least `2`, because `P_s ≥ 5`. -/ |
| 577 | lemma HasBoundedIncrements.two_le_card_mul_frobPower_mul_slope [NeZero N] {T : FrobeniusCycle N W R} |
| 578 | {D : T.RootAt k} {s : ZMod N} {c : Fin k × ZMod N → ℝ} (hc : D.HasBoundedIncrements c) |
| 579 | (hs : s ≠ D.letter) : |
| 580 | 2 ≤ D.card * D.frobPower s * D.slope c := by |
| 581 | have h_power : (5 : ℝ) ≤ D.frobPower s := |
| 582 | mod_cast T.five_le_P.trans |
| 583 | (le_self_pow (by simpa only [ne_eq, ZMod.val_eq_zero, sub_eq_zero] using hs) _) |
| 584 | have h_step : (2⁻¹ : ℝ) ≤ D.card * D.slope c := (hc D.letter).1.trans_eq card_mul_slope.symm |
| 585 | nlinarith |
| 586 | |
| 587 | /-! ### The auxiliary polynomial -/ |
| 588 | |
| 589 | /-- The main part of the substitution, with a new variable `t = X ()`: `Y_i ↦ X_i`, |
| 590 | `X_s ↦ t ^ (q P_s) X_s`, and the other variables are fixed. -/ |
| 591 | noncomputable def mainSubst {T : FrobeniusCycle N W R} (D : T.RootAt k) (z : Fin k × ZMod N) : |
| 592 | MvPolynomial (Fin k × ZMod N) (MvPolynomial Unit R) := |
| 593 | C (monomial (single () (D.poleOrder z)) 1) * X (D.merge z) |
| 594 | |
| 595 | /-- The cross terms: for `s ≠ i`, `Y_s ↦ ε_s X_s` and `X_s ↦ ε_s t ^ P_s Y_s`, where `ε_s` is the |
| 596 | sign `D.sign` at `Y_s`; the other variables go to `0`. The substitution that defines the auxiliary |
| 597 | polynomial is `D.mainSubst - D.crossSubst`. For `ε_s = -1` it sends `(X_s, Y_s)` to |
| 598 | `Y_s (t ^ P_s, 1) + X_s (t ^ (q P_s), 1)`, and for `ε_s = 1` to the same with `-Y_s` for `Y_s` on |
| 599 | both sides. -/ |
| 600 | noncomputable def crossSubst {T : FrobeniusCycle N W R} (D : T.RootAt k) (z : Fin k × ZMod N) : |
| 601 | MvPolynomial (Fin k × ZMod N) (MvPolynomial Unit R) := |
| 602 | C (monomial (single () (D.zeroOrder (D.swapVar z))) (D.crossSign z)) * X (D.swapVar z) |
| 603 | |
| 604 | /-- The Gauss filtration on polynomials over `R[t]` in which `w` weighs `1`, `t` weighs `ρ` and |
| 605 | each variable `z` weighs `c z - v z * ρ`. -/ |
| 606 | noncomputable abbrev _root_.New.FrobeniusCycle.iteratedGaussFiltration (T : FrobeniusCycle N W R) |
| 607 | (c : Fin k × ZMod N → ℝ) (ρ : ℝ) (v : Fin k × ZMod N → ℕ) : |
| 608 | ℝ → AddSubgroup (MvPolynomial (Fin k × ZMod N) (MvPolynomial Unit R)) := |
| 609 | gaussFiltration (gaussFiltration (adicFiltration T.sqrtPrime) fun _ : Unit ↦ ρ) |
| 610 | fun z : Fin k × ZMod N ↦ c z - v z * ρ |
| 611 | |
| 612 | lemma algebraMap_mem_iteratedGaussFiltration {T : FrobeniusCycle N W R} {c : Fin k × ZMod N → ℝ} |
| 613 | {ρ b : ℝ} {v : Fin k × ZMod N → ℕ} {r : R} |
| 614 | (hr : r ∈ adicFiltration T.sqrtPrime b) : |
| 615 | algebraMap R (MvPolynomial (Fin k × ZMod N) (MvPolynomial Unit R)) r ∈ |
| 616 | T.iteratedGaussFiltration c ρ v b := |
| 617 | C_mem_gaussFiltration (C_mem_gaussFiltration hr) |
| 618 | |
| 619 | /-- The term `C (monomial (single () n) r) * X z`, that is `r t ^ n` times the variable `X z`, lies |
| 620 | in `T.iteratedGaussFiltration c ρ v b` if `r = 0` or `b ≤ c z - v z * ρ + n * ρ`. That bound is the |
| 621 | weight of `t ^ n * X z`. -/ |
| 622 | lemma C_monomial_mul_X_mem_iteratedGaussFiltration {T : FrobeniusCycle N W R} {z : Fin k × ZMod N} |
| 623 | {c : Fin k × ZMod N → ℝ} {ρ b : ℝ} {v : Fin k × ZMod N → ℕ} {n : ℕ} {r : R} |
| 624 | (hb : r ≠ 0 → b ≤ c z - v z * ρ + n * ρ) : |
| 625 | C (monomial (single () n) r) * X z ∈ T.iteratedGaussFiltration c ρ v b := by |
| 626 | rw [C_mul_X_eq_monomial] |
| 627 | refine monomial_mem_gaussFiltration (monomial_mem_gaussFiltration ?_) |
| 628 | exact mem_adicFiltration_of_nonpos (by simpa only [ne_eq, weight_single, one_smul, |
| 629 | nsmul_eq_mul, tsub_le_iff_right, add_comm, add_zero] using hb) |
| 630 | |
| 631 | /-- Expansion at infinity. Let `w = T.sqrtPrime`, a square root of the prime `T.p` in `R`, let |
| 632 | `i = D.letter` and let `q = D.card = P ^ N` with `P = T.P`. In each letter `s`, `X_s = D.varX s` and |
| 633 | `Y_s = D.varY s` are the variables with index `D.fst`, `D.snd` if `s` is even, in reverse order if |
| 634 | it is odd. Let the weights `c` rise from `X_s` to `Y_s` by amounts in `[1 / 2, 1]`, let each term of |
| 635 | `f` have `w`-adic order plus `c`-weight at least `b`, and put |
| 636 | `P_s = D.frobPower s = P ^ (s - i).val` and `ρ = D.slope c = (c Y_i - c X_i) / q`. |
| 637 | |
| 638 | In the filtration on polynomials in the variables `z` over `R[t]`, `w` weighs `1`, `t` weighs `-ρ`, |
| 639 | `X_s` weighs `c X_s + q P_s ρ` and any other variable `z` weighs `c z`. The main part `D.mainSubst` |
| 640 | minus the cross terms `D.crossSubst` sends `f` to level `b`, and the cross terms change the image of |
| 641 | `f` only in level `b + 1 / 20`. -/ |
| 642 | lemma HasBoundedIncrements.aeval_mem_and_sub_mem_iteratedGaussFiltration [NeZero N] |
| 643 | {T : FrobeniusCycle N W R} |
| 644 | {D : T.RootAt k} {c : Fin k × ZMod N → ℝ} (hc : D.HasBoundedIncrements c) {b : ℝ} |
| 645 | {f : MvPolynomial (Fin k × ZMod N) R} |
| 646 | (hf : f ∈ gaussFiltration (adicFiltration T.sqrtPrime) c b) : |
| 647 | aeval (D.mainSubst - D.crossSubst) f ∈ T.iteratedGaussFiltration c (-D.slope c) D.poleOrder b ∧ |
| 648 | aeval (D.mainSubst - D.crossSubst) f - aeval D.mainSubst f ∈ |
| 649 | T.iteratedGaussFiltration c (-D.slope c) D.poleOrder (b + 20⁻¹) := by |
| 650 | have h_main (z : Fin k × ZMod N) : |
| 651 | D.mainSubst z ∈ T.iteratedGaussFiltration c (-D.slope c) D.poleOrder (c z) := by |
| 652 | refine C_monomial_mul_X_mem_iteratedGaussFiltration fun _ ↦ ?_ |
| 653 | by_cases hz : z = D.varY D.letter |
| 654 | · simp only [hz, merge_varY, ↓reduceIte, poleOrder_varX, frobPower_letter, mul_one, |
| 655 | mul_neg, card_mul_slope, neg_sub, sub_sub_cancel, poleOrder_varY, cast_zero, |
| 656 | zero_mul, neg_zero, add_zero, Std.le_refl] |
| 657 | · simp only [merge, hz, ↓reduceIte, mul_neg, sub_neg_eq_add, add_neg_cancel_right, |
| 658 | Std.le_refl] |
| 659 | have h_cross (z : Fin k × ZMod N) : |
| 660 | D.crossSubst z ∈ T.iteratedGaussFiltration c (-D.slope c) D.poleOrder (c z + 20⁻¹) := by |
| 661 | refine C_monomial_mul_X_mem_iteratedGaussFiltration fun h_sign ↦ ?_ |
| 662 | rcases D.var_cases z with rfl | rfl | ⟨s, hs, rfl | rfl⟩ | hz |
| 663 | · simp only [crossSign_varY, ↓reduceIte, ne_eq, not_true_eq_false] at h_sign |
| 664 | · simp only [crossSign_varX, ↓reduceIte, ne_eq, not_true_eq_false] at h_sign |
| 665 | · -- `X_s` weighs `c X_s + q P_s * D.slope c ≥ c X_s + 2 ≥ c Y_s + 1` |
| 666 | suffices c (D.varY s) + 20⁻¹ ≤ c (D.varX s) + D.card * D.frobPower s * D.slope c by |
| 667 | simpa only [swapVar_varY, poleOrder_varX, cast_mul, mul_neg, sub_neg_eq_add, |
| 668 | zeroOrder_varX, cast_zero, zero_mul, neg_zero, add_zero, ge_iff_le] |
| 669 | linarith [(hc s).2, hc.two_le_card_mul_frobPower_mul_slope hs] |
| 670 | · -- `t ^ P_s Y_s` weighs `c Y_s - P_s * D.slope c ≥ c X_s + 1 / 2 - 1 / 5` |
| 671 | suffices c (D.varX s) + 20⁻¹ ≤ c (D.varY s) + -(D.frobPower s * D.slope c) by |
| 672 | simpa only [swapVar_varX, poleOrder_varY, cast_zero, mul_neg, zero_mul, neg_zero, |
| 673 | sub_zero, zeroOrder_varY, hs, ↓reduceIte, le_add_neg_iff_add_le, ge_iff_le] |
| 674 | linarith [(hc s).1, hc.frobPower_mul_slope_le s] |
| 675 | · exact absurd hz.crossSign_eq_zero h_sign |
| 676 | exact algHom_sub_mem_of_mem_gaussFiltration (aeval D.mainSubst) _ hf |
| 677 | (by simpa only [aeval_X, Prod.forall] using h_main) _ |
| 678 | (by simpa only [aeval_X, Pi.sub_apply, sub_sub_cancel_left, neg_mem_iff, |
| 679 | Prod.forall] using h_cross) |
| 680 | algebraMap_mem_iteratedGaussFiltration |
| 681 | |
| 682 | /-- The error in the rule `(t + ι_i(r)) ^ P ^ n = t ^ P ^ n + ι_{i + n}(r)`. -/ |
| 683 | noncomputable def _root_.New.FrobeniusCycle.frobeniusError (T : FrobeniusCycle N W R) (i : ZMod N) |
| 684 | (r : W) (n : ℕ) : MvPolynomial Unit R := |
| 685 | (X () + C (T.embedding i r)) ^ T.P ^ n - X () ^ T.P ^ n - C (T.embedding (i + n) r) |
| 686 | |
| 687 | /-- For a letter `i`, `r` in `W` and natural `n`, take the polynomial in `t` `T.frobeniusError i r |
| 688 | n = (t + ι_i(r)) ^ P ^ n - t ^ P ^ n - ι_{i + n}(r)`. In `T.iteratedGaussFiltration c ρ v`, `w` |
| 689 | weighs `1`, `t` weighs `ρ` and a variable `z` weighs `c z - v z * ρ`. So for `ρ ≥ 0` the product of |
| 690 | this polynomial with `z` has level `2` more than the weight of `z`. -/ |
| 691 | lemma frobeniusError_mul_X_mem {T : FrobeniusCycle N W R} {c : Fin k × ZMod N → ℝ} {ρ : ℝ} |
| 692 | (hρ : 0 ≤ ρ) (v : Fin k × ZMod N → ℕ) (z : Fin k × ZMod N) (i : ZMod N) (r : W) (n : ℕ) : |
| 693 | C (T.frobeniusError i r n) * X z ∈ T.iteratedGaussFiltration c ρ v (c z - v z * ρ + 2) := by |
| 694 | have h_add : (T.p : MvPolynomial Unit R) ∣ |
| 695 | (X () + C (T.embedding i r)) ^ T.P ^ n - X () ^ T.P ^ n - C (T.embedding i r) ^ T.P ^ n := by |
| 696 | simp only [← pow_mul, add_pow_prime_pow_eq' T.prime, add_assoc, add_sub_cancel_left, |
| 697 | dvd_mul_right] |
| 698 | have h_shift : (T.p : MvPolynomial Unit R) ∣ C (T.embedding (i + n) r) - C (T.embedding i r) ^ T.P |
| 699 | ^ n := by |
| 700 | simpa only [map_natCast, C_sub, C_pow] using map_dvd C (T.frobenius_pow_congr n i r) |
| 701 | have h_dvd : C (T.sqrtPrime ^ 2) ∣ T.frobeniusError i r n := by |
| 702 | simpa only [sqrtPrime_sq, map_natCast, frobeniusError, sub_sub_sub_cancel_right] using |
| 703 | dvd_sub h_add h_shift |
| 704 | rw [C_mul_X_eq_monomial] |
| 705 | refine monomial_mem_gaussFiltration fun β ↦ |
| 706 | (pow_dvd_pow T.sqrtPrime ?_).trans ((C_dvd_iff_dvd_coeff _ _).1 h_dvd β) |
| 707 | -- The order asked for is `2` minus the weight `β () * ρ ≥ 0` of the monomial `β` in `t`. |
| 708 | simpa only [weight_single, one_smul, add_sub_cancel_left, β.weight_eq_sum _, |
| 709 | Finset.univ_unique, PUnit.default_eq_unit, nsmul_eq_mul, Finset.sum_singleton, ceil_le, |
| 710 | cast_ofNat, tsub_le_iff_right, le_add_iff_nonneg_right] using |
| 711 | mul_nonneg (β ()).cast_nonneg hρ |
| 712 | |
| 713 | /-- The substitution `t ↦ t + x` in the coefficients. -/ |
| 714 | noncomputable def _root_.New.shiftCoeff (σ : Type*) (x : R) : |
| 715 | MvPolynomial σ (MvPolynomial Unit R) →ₐ[R] MvPolynomial σ (MvPolynomial Unit R) := |
| 716 | mapAlgHom (((uniqueAlgEquiv R Unit).arrowCongr (uniqueAlgEquiv R Unit)).symm |
| 717 | (Polynomial.taylorAlgHom x)) |
| 718 | |
| 719 | /-- The shift of `t` undoes the transvection in `D.swapTransvection r` up to Frobenius errors. For |
| 720 | `a = D.fst`, `a' = D.snd` and a letter `s ∈ ℤ/N`, `X_s = D.varX s` is `(a, s)` for even and |
| 721 | `(a', s)` for odd `s`, and `Y_s = D.varY s` is the other of the two. Let `i = D.letter`, |
| 722 | `q = P ^ N`, `P_s = P ^ (s - i).val` with `P = T.P`, and `ι_s = T.embedding s : W → R`. |
| 723 | |
| 724 | Act on the variable `z` by `D.swapTransvection r` through `T.polyAction`, the action of `GL_k(W)` on |
| 725 | polynomials in the variables `(b, s)`. Then substitute `D.mainSubst - D.crossSubst`, with values in |
| 726 | the polynomials over `R[t]`, and replace `t` by `t + ι_i(r)` (`shiftCoeff`). Here `ε_s = D.sign Y_s` |
| 727 | is `-1` if `s` has the parity of `i` and `1` otherwise. |
| 728 | |
| 729 | Up to the sign `D.moveSign z`, which is `-1` if `z` has index `a` and `1` otherwise, the result is |
| 730 | the polynomial substituted for `D.swapVar z` plus errors `T.frobeniusError i r n = (t + ι_i(r)) ^ P |
| 731 | ^ n - t ^ P ^ n - ι_{i + n}(r)`. They occur only for `z = Y_s`: with `d = (s - i).val`, the error |
| 732 | for `n = N + d` multiplies `X_s`, and `-ε_s` times the error for `n = d` multiplies `Y_s`. -/ |
| 733 | lemma shiftCoeff_aeval_swapTransvection_X [NeZero N] |
| 734 | {T : FrobeniusCycle N W R} {D : T.RootAt k} (r : W) (z : Fin k × ZMod N) : |
| 735 | shiftCoeff (Fin k × ZMod N) (T.embedding D.letter r) |
| 736 | (aeval (D.mainSubst - D.crossSubst) (T.polyAction (D.swapTransvection r) (X z))) - |
| 737 | D.moveSign z • (D.mainSubst - D.crossSubst) (D.swapVar z) = |
| 738 | D.moveSign z • |
| 739 | (C (T.frobeniusError D.letter (|D.sign z| * r) (N + (z.2 - D.letter).val)) * |
| 740 | X (D.swapVar z) - |
| 741 | D.sign z • (C (T.frobeniusError D.letter r (z.2 - D.letter).val) * X z)) := by |
| 742 | rw [polyAction_swapTransvection_X, map_zsmul, map_zsmul, ← smul_sub] |
| 743 | unfold shiftCoeff mainSubst crossSubst frobeniusError |
| 744 | congr 1 |
| 745 | rcases D.var_cases z with rfl | rfl | ⟨s, hs, rfl | rfl⟩ | hz |
| 746 | · -- `z = Y_i` |
| 747 | simp [monomial_eq, card, ZMod.natCast_self, |
| 748 | MvPolynomial.uniqueAlgEquiv_apply, Polynomial.taylorAlgHom_apply, |
| 749 | MvPolynomial.uniqueAlgEquiv_symm_apply] |
| 750 | ring |
| 751 | · -- `z = X_i` |
| 752 | simp [monomial_eq] |
| 753 | · -- `z = Y_s` with `s ≠ i`, for both signs |
| 754 | rcases D.sign_varY_eq_one_or_neg_one s with h_sign | h_sign <;> |
| 755 | simp [h_sign, hs, monomial_eq, card, frobPower, pow_add, ZMod.natCast_self, |
| 756 | MvPolynomial.uniqueAlgEquiv_apply, Polynomial.taylorAlgHom_apply, |
| 757 | MvPolynomial.uniqueAlgEquiv_symm_apply] <;> ring |
| 758 | · -- `z = X_s` with `s ≠ i` |
| 759 | simp [hs, monomial_eq, pow_add] |
| 760 | · -- `z` lies off the root |
| 761 | simp [hz.swapVar_eq, hz.sign_eq_zero, hz.poleOrder_eq_zero, hz.crossSign_eq_zero, monomial_eq] |
| 762 | |
| 763 | /-- In each letter `s`, `X_s = D.varX s` and `Y_s = D.varY s` are the variables with the two indices |
| 764 | of the root, and `D.swapVar` swaps them and fixes the others. Let the weights `c` rise from `X_s` to |
| 765 | `Y_s` by amounts in `[1 / 2, 1]`, and put `i = D.letter`, `q = D.card = P ^ N`, |
| 766 | `P_s = P ^ (s - i).val` with `P = T.P` and `ρ = D.slope c = (c Y_i - c X_i) / q`. Filter polynomials |
| 767 | over `R[t]` so that `w = T.sqrtPrime` weighs `1`, `t` weighs `ρ` and a variable `y` weighs |
| 768 | `c y - D.zeroOrder y * ρ`. |
| 769 | |
| 770 | Then the substitution `D.mainSubst - D.crossSubst` (`Y_i ↦ X_i`, |
| 771 | `X_s ↦ t ^ (q P_s) X_s - ε_s t ^ P_s Y_s`, `Y_s ↦ Y_s - ε_s X_s` for `s ≠ i`, where |
| 772 | `ε_s = D.sign Y_s` is `± 1`) sends `D.swapVar z` to level `c z`. -/ |
| 773 | lemma HasBoundedIncrements.subst_swapVar_mem_iteratedGaussFiltration [NeZero N] |
| 774 | {T : FrobeniusCycle N W R} |
| 775 | {D : T.RootAt k} {c : Fin k × ZMod N → ℝ} (hc : D.HasBoundedIncrements c) (z : Fin k × ZMod N) : |
| 776 | (D.mainSubst - D.crossSubst) (D.swapVar z) ∈ |
| 777 | T.iteratedGaussFiltration c (D.slope c) D.zeroOrder (c z) := by |
| 778 | refine sub_mem (C_monomial_mul_X_mem_iteratedGaussFiltration fun _ ↦ ?_) |
| 779 | (C_monomial_mul_X_mem_iteratedGaussFiltration |
| 780 | (by simp only [swapVar_swapVar, ne_eq, sub_add_cancel, Std.le_refl, implies_true])) |
| 781 | rcases D.var_cases z with rfl | rfl | ⟨s, hs, rfl | rfl⟩ | hz |
| 782 | · simp only [swapVar_varY, merge_varX, zeroOrder_varX, cast_zero, zero_mul, sub_zero, |
| 783 | poleOrder_varX, frobPower_letter, mul_one, card_mul_slope, add_sub_cancel, Std.le_refl] |
| 784 | · simp only [swapVar_varX, merge_varY, ↓reduceIte, zeroOrder_varX, cast_zero, zero_mul, |
| 785 | sub_zero, poleOrder_varY, add_zero, Std.le_refl] |
| 786 | · suffices c (D.varY s) ≤ c (D.varX s) + D.card * D.frobPower s * D.slope c by |
| 787 | simpa only [swapVar_varY, merge_varX, zeroOrder_varX, cast_zero, zero_mul, sub_zero, |
| 788 | poleOrder_varX, cast_mul, ge_iff_le] |
| 789 | linarith [(hc s).2, hc.two_le_card_mul_frobPower_mul_slope hs] |
| 790 | · suffices c (D.varX s) + D.frobPower s * D.slope c ≤ c (D.varY s) by |
| 791 | simpa only [swapVar_varX, merge_varY, hs, ↓reduceIte, zeroOrder_varY, poleOrder_varY, |
| 792 | cast_zero, zero_mul, add_zero, le_sub_iff_add_le, ge_iff_le] |
| 793 | linarith [(hc s).1, hc.frobPower_mul_slope_le s] |
| 794 | · simp only [hz.swapVar_merge_eq_self_and_weights_eq_zero, cast_zero, zero_mul, sub_zero, |
| 795 | add_zero, Std.le_refl] |
| 796 | |
| 797 | /-- Let `i = D.letter`, and let `X_s = D.varX s`, `Y_s = D.varY s` be the two variables of the root |
| 798 | in the letter `s`. At a finite point a variable `y` weighs `c y - D.zeroOrder y * D.slope c`. If `c` |
| 799 | rises from `X_s` to `Y_s` by amounts in `[1 / 2, 1]`, then `c z + 1 / 20` is at most `2` plus the |
| 800 | weight of `y`, both for `y = z` and for `y = D.swapVar z`, the image of `z` when `X_s` and `Y_s` are |
| 801 | exchanged. -/ |
| 802 | lemma HasBoundedIncrements.add_le_sub_zeroOrder_mul_slope_add_two [NeZero N] |
| 803 | {T : FrobeniusCycle N W R} |
| 804 | {D : T.RootAt k} {c : Fin k × ZMod N → ℝ} (hc : D.HasBoundedIncrements c) (z : Fin k × ZMod N) : |
| 805 | c z + 20⁻¹ ≤ c (D.swapVar z) - D.zeroOrder (D.swapVar z) * D.slope c + 2 ∧ |
| 806 | c z + 20⁻¹ ≤ c z - D.zeroOrder z * D.slope c + 2 := by |
| 807 | rcases D.var_cases z with rfl | rfl | ⟨s, hs, rfl | rfl⟩ | hz |
| 808 | · suffices c (D.varY D.letter) + 20⁻¹ ≤ c (D.varX D.letter) + 2 by |
| 809 | simpa only [swapVar_varY, zeroOrder_varX, cast_zero, zero_mul, sub_zero, |
| 810 | zeroOrder_varY, ↓reduceIte, card_mul_slope, sub_sub_cancel, and_self, ge_iff_le] |
| 811 | linarith [(hc D.letter).2] |
| 812 | · norm_num [card_mul_slope] |
| 813 | · suffices c (D.varY s) + 20⁻¹ ≤ c (D.varX s) + 2 ∧ |
| 814 | c (D.varY s) + 20⁻¹ ≤ c (D.varY s) - D.frobPower s * D.slope c + 2 by |
| 815 | simpa only [swapVar_varY, zeroOrder_varX, cast_zero, zero_mul, sub_zero, |
| 816 | zeroOrder_varY, hs, ↓reduceIte] |
| 817 | constructor <;> linarith [(hc s).2, hc.frobPower_mul_slope_le s] |
| 818 | · suffices c (D.varX s) + 20⁻¹ ≤ c (D.varY s) - D.frobPower s * D.slope c + 2 ∧ |
| 819 | (20⁻¹ : ℝ) ≤ 2 by |
| 820 | simpa only [swapVar_varX, zeroOrder_varY, hs, ↓reduceIte, zeroOrder_varX, cast_zero, |
| 821 | zero_mul, sub_zero, add_le_add_iff_left] |
| 822 | constructor <;> linarith [(hc s).1, hc.frobPower_mul_slope_le s] |
| 823 | · norm_num [hz.swapVar_merge_eq_self_and_weights_eq_zero] |
| 824 | |
| 825 | /-- Expansion at the finite point `ι_i(r)`, where `i = D.letter` and `ι_i = T.embedding i : W → R`. |
| 826 | In each letter `s`, `X_s = D.varX s` and `Y_s = D.varY s` are the variables with the indices |
| 827 | `a = D.fst`, `a' = D.snd` if `s` is even and in reverse order if it is odd. The matrix |
| 828 | `D.swapTransvection r` is `!![0, 1; -1, ± r]` in the rows and columns `a`, `a'` and acts on |
| 829 | polynomials by `T.polyAction`. Let the weights `c` rise from `X_s` to `Y_s` by amounts in |
| 830 | `[1 / 2, 1]`, and let each term of the translate of `f` by `(D.swapTransvection r)⁻¹` have order for |
| 831 | `w = T.sqrtPrime` plus `c`-weight at least `b`. |
| 832 | |
| 833 | In `f`, substitute `D.mainSubst - D.crossSubst` (`Y_i ↦ X_i`, |
| 834 | `X_s ↦ t ^ (q P_s) X_s - ε_s t ^ P_s Y_s`, `Y_s ↦ Y_s - ε_s X_s` for `s ≠ i`, with `q = D.card`, |
| 835 | `P_s = D.frobPower s = T.P ^ (s - i).val` and `ε_s = D.sign Y_s`, which is `-1` if `s` has the |
| 836 | parity of `i` and `1` otherwise), then replace `t` by `t + ι_i(r)`. The result has level `b` when |
| 837 | `w` weighs `1`, `t` weighs `ρ = D.slope c = (c Y_i - c X_i) / q` and a variable `z` weighs |
| 838 | `c z - D.zeroOrder z * ρ`. -/ |
| 839 | lemma HasBoundedIncrements.shiftCoeff_aeval_mem [NeZero N] |
| 840 | {T : FrobeniusCycle N W R} {D : T.RootAt k} |
| 841 | {c : Fin k × ZMod N → ℝ} (hc : D.HasBoundedIncrements c) (r : W) {b : ℝ} |
| 842 | {f : MvPolynomial (Fin k × ZMod N) R} |
| 843 | (hf : T.polyAction (D.swapTransvection r)⁻¹ f ∈ |
| 844 | gaussFiltration (adicFiltration T.sqrtPrime) c b) : |
| 845 | shiftCoeff (Fin k × ZMod N) (T.embedding D.letter r) (aeval (D.mainSubst - D.crossSubst) f) ∈ |
| 846 | T.iteratedGaussFiltration c (D.slope c) D.zeroOrder b := by |
| 847 | -- `ψ` (act, substitute, shift) is `θ` (signed swap, substitute) up to terms of more weight. |
| 848 | let E := MvPolynomial (Fin k × ZMod N) R →ₐ[R] MvPolynomial (Fin k × ZMod N) (MvPolynomial Unit R) |
| 849 | let ψ : E := (shiftCoeff _ (T.embedding D.letter r)).comp |
| 850 | (.comp (aeval (D.mainSubst - D.crossSubst)) (T.polyAction (D.swapTransvection r))) |
| 851 | let θ : E := aeval fun z ↦ D.moveSign z • (D.mainSubst - D.crossSubst) (D.swapVar z) |
| 852 | have h_main (z : Fin k × ZMod N) : |
| 853 | θ (X z) ∈ T.iteratedGaussFiltration c (D.slope c) D.zeroOrder (c z) := by |
| 854 | rw [aeval_X] |
| 855 | exact zsmul_mem (hc.subst_swapVar_mem_iteratedGaussFiltration z) _ |
| 856 | have h_error (z : Fin k × ZMod N) : |
| 857 | ψ (X z) - θ (X z) ∈ T.iteratedGaussFiltration c (D.slope c) D.zeroOrder (c z + 20⁻¹) := by |
| 858 | obtain ⟨h_exchange, h_self⟩ : |
| 859 | c z + 20⁻¹ ≤ c (D.swapVar z) - D.zeroOrder (D.swapVar z) * D.slope c + 2 ∧ |
| 860 | c z + 20⁻¹ ≤ c z - D.zeroOrder z * D.slope c + 2 := |
| 861 | hc.add_le_sub_zeroOrder_mul_slope_add_two z |
| 862 | rw [aeval_X, AlgHom.comp_apply, AlgHom.comp_apply, shiftCoeff_aeval_swapTransvection_X] |
| 863 | refine zsmul_mem (sub_mem (antitone h_exchange ?_) (zsmul_mem (antitone h_self ?_) _)) _ |
| 864 | all_goals apply frobeniusError_mul_X_mem hc.slope_pos.le |
| 865 | have h_level : ψ (T.polyAction (D.swapTransvection r)⁻¹ f) ∈ T.iteratedGaussFiltration c |
| 866 | (D.slope c) D.zeroOrder b := |
| 867 | (algHom_sub_mem_of_mem_gaussFiltration θ _ hf h_main ψ h_error |
| 868 | algebraMap_mem_iteratedGaussFiltration).left |
| 869 | have h_cancel : T.polyAction (D.swapTransvection r) (T.polyAction (D.swapTransvection r)⁻¹ f) = |
| 870 | f := by |
| 871 | simp only [← AlgHom.mul_apply, ← map_mul, mul_inv_cancel, map_one, AlgHom.one_apply] |
| 872 | rwa [AlgHom.comp_apply, AlgHom.comp_apply, h_cancel] at h_level |
| 873 | |
| 874 | /-- The coefficient, a polynomial in `t`, of the monomial obtained from `x ^ α` by writing `X_i` |
| 875 | for `Y_i`. -/ |
| 876 | noncomputable def mergedCoeff {T : FrobeniusCycle N W R} (D : T.RootAt k) |
| 877 | (α : Fin k × ZMod N →₀ ℕ) (p : MvPolynomial (Fin k × ZMod N) (MvPolynomial Unit R)) : |
| 878 | Polynomial R := |
| 879 | uniqueAlgEquiv R Unit (p.coeff (mapDomain D.merge α)) |
| 880 | |
| 881 | lemma mergedCoeff_add {T : FrobeniusCycle N W R} {D : T.RootAt k} (α : Fin k × ZMod N →₀ ℕ) |
| 882 | (p p' : MvPolynomial (Fin k × ZMod N) (MvPolynomial Unit R)) : |
| 883 | D.mergedCoeff α (p + p') = D.mergedCoeff α p + D.mergedCoeff α p' := by |
| 884 | simp only [mergedCoeff, AddMonoidAlgebra.coeff_add, Finsupp.coe_add, Pi.add_apply, |
| 885 | MvPolynomial.uniqueAlgEquiv_apply, eval₂_add] |
| 886 | |
| 887 | lemma mergedCoeff_sub {T : FrobeniusCycle N W R} {D : T.RootAt k} (α : Fin k × ZMod N →₀ ℕ) |
| 888 | (p p' : MvPolynomial (Fin k × ZMod N) (MvPolynomial Unit R)) : |
| 889 | D.mergedCoeff α (p - p') = D.mergedCoeff α p - D.mergedCoeff α p' := by |
| 890 | simp only [mergedCoeff, AddMonoidAlgebra.coeff_sub, Finsupp.coe_sub, Pi.sub_apply, |
| 891 | MvPolynomial.uniqueAlgEquiv_apply, eval₂_sub] |
| 892 | |
| 893 | /-- Shifting `t` by `x` in the coefficients of `p` shifts the polynomial `D.mergedCoeff α p` by |
| 894 | `x`. -/ |
| 895 | lemma mergedCoeff_shiftCoeff {T : FrobeniusCycle N W R} {D : T.RootAt k} (α : Fin k × ZMod N →₀ ℕ) |
| 896 | (x : R) (p : MvPolynomial (Fin k × ZMod N) (MvPolynomial Unit R)) : |
| 897 | D.mergedCoeff α (shiftCoeff (Fin k × ZMod N) x p) = (D.mergedCoeff α p).taylor x := by |
| 898 | simpa only [mergedCoeff, shiftCoeff, AlgEquiv.arrowCongr_symm, AlgEquiv.arrowCongr_apply, |
| 899 | AlgEquiv.symm_symm, mapAlgHom_apply, coeff_map, RingHom.coe_coe, AlgHom.coe_comp, |
| 900 | AlgEquiv.coe_toAlgHom, Function.comp_apply, MvPolynomial.uniqueAlgEquiv_apply, |
| 901 | Polynomial.taylorAlgHom_apply, MvPolynomial.uniqueAlgEquiv_symm_apply, |
| 902 | PUnit.default_eq_unit] using |
| 903 | (uniqueAlgEquiv R Unit).apply_symm_apply ((D.mergedCoeff α p).taylor x) |
| 904 | |
| 905 | /-- In `T.iteratedGaussFiltration c ρ v`, `w = T.sqrtPrime` weighs `1`, `t` weighs `ρ` and a |
| 906 | variable `z` weighs `c z - v z * ρ`. Let the polynomial `p` over `R[t]` have level `b` there, and |
| 907 | let `X_i = D.varX i` and `Y_i = D.varY i` have the same weight, where `i = D.letter` is the letter |
| 908 | of the root `D`. The univariate polynomial `D.mergedCoeff α p` in `t` is the coefficient in `p` of |
| 909 | the monomial obtained from `x ^ α` by writing `X_i` for `Y_i`. Its coefficient of `t ^ j` is |
| 910 | divisible by `w ^ (l + 1)` once `b` less the weight of `t ^ j x ^ α` exceeds `l`. -/ |
| 911 | lemma pow_dvd_coeff_mergedCoeff {T : FrobeniusCycle N W R} {D : T.RootAt k} {c : Fin k × ZMod N → ℝ} |
| 912 | {ρ b : ℝ} {v : Fin k × ZMod N → ℕ} {α : Fin k × ZMod N →₀ ℕ} |
| 913 | {p : MvPolynomial (Fin k × ZMod N) (MvPolynomial Unit R)} {l : ℕ} (j : ℕ) |
| 914 | (hp : p ∈ T.iteratedGaussFiltration c ρ v b) |
| 915 | (h_merge_weight : c (D.varX D.letter) - v (D.varX D.letter) * ρ = |
| 916 | c (D.varY D.letter) - v (D.varY D.letter) * ρ) |
| 917 | (hj : l < b - (weight c α - weight v α * ρ) - j * ρ) : |
| 918 | T.sqrtPrime ^ (l + 1) ∣ (D.mergedCoeff α p).coeff j := by |
| 919 | have h_var (z : Fin k × ZMod N) : c (D.merge z) - v (D.merge z) * ρ = c z - v z * ρ := by |
| 920 | by_cases hz : z = D.varY D.letter |
| 921 | · simp only [merge, hz, ↓reduceIte, h_merge_weight] |
| 922 | · simp only [merge, hz, ↓reduceIte] |
| 923 | have h_weight : weight (fun z ↦ c z - v z * ρ) (mapDomain D.merge α) = |
| 924 | weight c α - weight v α * ρ := by |
| 925 | rw [weight_apply, sum_mapDomain_index (by simp only [zero_nsmul, implies_true]) |
| 926 | (by simp only [nsmul_eq_mul, cast_add, add_mul, implies_true])] |
| 927 | simp only [h_var, nsmul_eq_mul, mul_sub, sum_sub, weight_apply, smul_eq_mul, |
| 928 | cast_finsupp_sum, cast_mul, sum_mul, mul_assoc] |
| 929 | have h_coeff : T.sqrtPrime ^ ⌈b - (weight c α - weight v α * ρ) - j * ρ⌉₊ ∣ |
| 930 | (D.mergedCoeff α p).coeff j := by |
| 931 | rw [mergedCoeff, coeff_uniqueAlgEquiv] |
| 932 | simpa only [PUnit.default_eq_unit, mem_adicFiltration_iff, h_weight, weight_single, |
| 933 | nsmul_eq_mul] using hp (mapDomain D.merge α) (single () j) |
| 934 | exact (pow_dvd_pow T.sqrtPrime (lt_ceil.2 hj)).trans h_coeff |
| 935 | |
| 936 | /-- Let `i = D.letter`. The map of variables `D.merge` sends `Y_i = D.varY i` to `X_i = D.varX i` |
| 937 | and fixes the others, and the weights `D.poleOrder` are `D.card * D.frobPower s` at `X_s` and `0` |
| 938 | at the other variables, in particular non-zero at `X_i` and `0` at `Y_i`. An exponent is determined |
| 939 | by its image under `D.merge` and its weight for `D.poleOrder`: the first forgets only how the degree |
| 940 | splits between `X_i` and `Y_i`, and the second recovers it. -/ |
| 941 | lemma eq_of_mapDomain_merge_eq {T : FrobeniusCycle N W R} {D : T.RootAt k} |
| 942 | {α β : Fin k × ZMod N →₀ ℕ} (h_merge : mapDomain D.merge β = mapDomain D.merge α) |
| 943 | (h_weight : weight D.poleOrder β = weight D.poleOrder α) : β = α := by |
| 944 | have h_merge_add (γ : Fin k × ZMod N →₀ ℕ) : |
| 945 | mapDomain D.merge γ + single (D.varY D.letter) (γ (D.varY D.letter)) = |
| 946 | γ + single (D.varX D.letter) (γ (D.varY D.letter)) := by |
| 947 | induction γ using induction_linear with |
| 948 | | zero => simp only [mapDomain_zero, Finsupp.coe_zero, Pi.zero_apply, Finsupp.single_zero, |
| 949 | add_zero] |
| 950 | | add γ γ' hγ hγ' => |
| 951 | simp only [mapDomain_add, Finsupp.add_apply, Finsupp.single_add] |
| 952 | rw [add_add_add_comm, hγ, hγ', add_add_add_comm] |
| 953 | | single z n => |
| 954 | by_cases hz : z = D.varY D.letter |
| 955 | · simp only [hz, merge, mapDomain_single, ↓reduceIte, single_eq_same, add_comm] |
| 956 | · simp only [merge, mapDomain_single, hz, ↓reduceIte, ne_eq, not_false_eq_true, |
| 957 | Ne.symm, single_eq_of_ne, Finsupp.single_zero, add_zero] |
| 958 | have h_pole_merge (γ : Fin k × ZMod N →₀ ℕ) : weight D.poleOrder (mapDomain D.merge γ) = |
| 959 | weight D.poleOrder γ + γ (D.varY D.letter) * D.card := by |
| 960 | simpa only [map_add, weight_single, poleOrder_varY, nsmul_zero, mul_zero, add_zero, |
| 961 | poleOrder_varX, frobPower_letter, mul_one, smul_eq_mul] using |
| 962 | congrArg (weight D.poleOrder) (h_merge_add γ) |
| 963 | have h_sum : weight D.poleOrder α + β (D.varY D.letter) * D.card = |
| 964 | weight D.poleOrder α + α (D.varY D.letter) * D.card := by |
| 965 | rw [← h_pole_merge, ← h_merge, h_pole_merge, h_weight] |
| 966 | have h_exponent : β (D.varY D.letter) = α (D.varY D.letter) := by |
| 967 | simpa only [card, Nat.add_left_cancel_iff, mul_eq_mul_right_iff, Nat.pow_eq_zero, |
| 968 | T.prime.ne_zero, ne_eq, false_and, or_false] using h_sum |
| 969 | refine add_right_cancel (b := Finsupp.single (D.varX D.letter) (α (D.varY D.letter))) ?_ |
| 970 | rw [← h_merge_add α, ← h_merge, ← h_exponent, h_merge_add β] |
| 971 | |
| 972 | /-- Put `i = D.letter`. In each letter `s`, `X_s = D.varX s` and `Y_s = D.varY s` are the two |
| 973 | variables of the root. The weights `D.poleOrder` are `q P_s` at `X_s` and `0` at the other |
| 974 | variables, where `q = D.card = P ^ N` and `P_s = D.frobPower s = P ^ (s - i).val` for `P = T.P`. In |
| 975 | `f` substitute `D.mainSubst`, which sends `Y_i` to `X_i` and any other variable `z` to |
| 976 | `t ^ D.poleOrder z * z`. Take the coefficient, a polynomial in `t`, of the monomial obtained from |
| 977 | `x ^ α` by writing `X_i` for `Y_i` (`D.mergedCoeff α`). Its coefficient of `t ^ d`, with `d` the |
| 978 | weight of `α` for `D.poleOrder`, is the coefficient of `x ^ α` in `f`: no other monomial of `f` |
| 979 | contributes to it. -/ |
| 980 | lemma coeff_mergedCoeff_aeval_mainSubst {T : FrobeniusCycle N W R} {D : T.RootAt k} |
| 981 | (α : Fin k × ZMod N →₀ ℕ) (f : MvPolynomial (Fin k × ZMod N) R) : |
| 982 | (D.mergedCoeff α (aeval D.mainSubst f)).coeff (weight D.poleOrder α) = f.coeff α := by |
| 983 | induction f using MvPolynomial.induction_on' with |
| 984 | | monomial β r => |
| 985 | have h_image : aeval D.mainSubst (monomial β r) = |
| 986 | monomial (mapDomain D.merge β) (monomial (single () (weight D.poleOrder β)) r) := by |
| 987 | simp only [aeval_monomial, MvPolynomial.algebraMap_apply, MvPolynomial.algebraMap_eq, |
| 988 | Finsupp.prod, mainSubst, X, C_mul_monomial, mul_one, monomial_pow, Finsupp.smul_single, |
| 989 | smul_eq_mul, single_mul, one_pow, ← monomial_sum_prod, Finset.prod_const_one, |
| 990 | mapDomain, sum, weight_apply, single_finsetSum] |
| 991 | have h_iff : mapDomain D.merge β = mapDomain D.merge α ∧ |
| 992 | weight D.poleOrder β = weight D.poleOrder α ↔ β = α := |
| 993 | ⟨fun h ↦ eq_of_mapDomain_merge_eq h.left h.right, fun h ↦ by simp only [h, and_self]⟩ |
| 994 | rw [h_image, mergedCoeff, coeff_uniqueAlgEquiv, coeff_monomial, coeff_monomial] |
| 995 | by_cases h_m : mapDomain D.merge β = mapDomain D.merge α <;> by_cases hβα : β = α |
| 996 | · subst hβα; rw [ite_eq_left rfl, ite_eq_left rfl, coeff_monomial, ite_eq_left rfl] |
| 997 | · rw [ite_eq_left h_m, ite_eq_right hβα, coeff_monomial, ite_eq_right fun h ↦ hβα <| |
| 998 | h_iff.1 ⟨h_m, by have h' := Finsupp.ext_iff.1 h (); simpa only [single_eq_same] using |
| 999 | h'⟩] |
| 1000 | · exact absurd (congrArg (mapDomain D.merge) hβα) h_m |
| 1001 | · rw [ite_eq_right h_m, ite_eq_right hβα, AddMonoidAlgebra.coeff_zero, Finsupp.coe_zero, |
| 1002 | Pi.zero_apply] |
| 1003 | | add p p' hp hp' => |
| 1004 | simp only [map_add, mergedCoeff_add, AddMonoidAlgebra.coeff_add, Finsupp.coe_add, |
| 1005 | Pi.add_apply, hp, hp'] |
| 1006 | |
| 1007 | /-- Let the weights `c` have bounded increments along the root `D`, with slope `D.slope c > 0`, |
| 1008 | let each term of `f` have `w`-adic order plus `c`-weight at least `l + c · α` for |
| 1009 | `w = T.sqrtPrime`, and suppose that `w ^ (l + 1)` does not divide the coefficient of `x ^ α` in |
| 1010 | `f`. Then the reduction modulo `w ^ (l + 1)` of `D.mergedCoeff α` of the image of `f` under |
| 1011 | `D.mainSubst - D.crossSubst` is not zero and has degree at most the weight of `α` for |
| 1012 | `D.poleOrder`. -/ |
| 1013 | private lemma HasBoundedIncrements.map_mergedCoeff_ne_zero_and_natDegree_le [NeZero N] |
| 1014 | {T : FrobeniusCycle N W R} {D : T.RootAt k} {c : Fin k × ZMod N → ℝ} |
| 1015 | (hc : D.HasBoundedIncrements c) (h_slope : 0 < D.slope c) |
| 1016 | {f : MvPolynomial (Fin k × ZMod N) R} {α : Fin k × ZMod N →₀ ℕ} {l : ℕ} |
| 1017 | (hf : f ∈ gaussFiltration (adicFiltration T.sqrtPrime) c (l + weight c α)) |
| 1018 | (h_not_dvd : ¬T.sqrtPrime ^ (l + 1) ∣ f.coeff α) : |
| 1019 | (D.mergedCoeff α (aeval (D.mainSubst - D.crossSubst) f)).map |
| 1020 | (Ideal.Quotient.mk (Ideal.span {T.sqrtPrime ^ (l + 1)})) ≠ 0 ∧ |
| 1021 | ((D.mergedCoeff α (aeval (D.mainSubst - D.crossSubst) f)).map |
| 1022 | (Ideal.Quotient.mk (Ideal.span {T.sqrtPrime ^ (l + 1)}))).natDegree ≤ |
| 1023 | weight D.poleOrder α := by |
| 1024 | let p : MvPolynomial (Fin k × ZMod N) (MvPolynomial Unit R) := |
| 1025 | aeval (D.mainSubst - D.crossSubst) f |
| 1026 | let Φ : Polynomial (R ⧸ Ideal.span {T.sqrtPrime ^ (l + 1)}) := |
| 1027 | (D.mergedCoeff α p).map (Ideal.Quotient.mk _) |
| 1028 | change Φ ≠ 0 ∧ Φ.natDegree ≤ weight D.poleOrder α |
| 1029 | obtain ⟨h_infinity, h_cross⟩ : |
| 1030 | p ∈ T.iteratedGaussFiltration c (-D.slope c) D.poleOrder (l + weight c α) ∧ p - aeval |
| 1031 | D.mainSubst f ∈ |
| 1032 | T.iteratedGaussFiltration c (-D.slope c) D.poleOrder (l + weight c α + 20⁻¹) := |
| 1033 | hc.aeval_mem_and_sub_mem_iteratedGaussFiltration hf |
| 1034 | have h_merge_weight : c (D.varX D.letter) - D.poleOrder (D.varX D.letter) * -D.slope c = |
| 1035 | c (D.varY D.letter) - D.poleOrder (D.varY D.letter) * -D.slope c := by |
| 1036 | simp only [poleOrder_varX, frobPower_letter, mul_one, mul_neg, card_mul_slope, neg_sub, |
| 1037 | sub_sub_cancel, poleOrder_varY, cast_zero, zero_mul, neg_zero, sub_zero] |
| 1038 | -- Modulo `w ^ (l + 1)` the coefficient of `t ^ (q ν')` is the coefficient of `x ^ α` in `f`. |
| 1039 | have h_top : T.sqrtPrime ^ (l + 1) ∣ (D.mergedCoeff α p).coeff (weight D.poleOrder α) - f.coeff |
| 1040 | α := by |
| 1041 | rw [← coeff_mergedCoeff_aeval_mainSubst (D := D), ← Polynomial.coeff_sub, ← mergedCoeff_sub] |
| 1042 | exact pow_dvd_coeff_mergedCoeff _ h_cross h_merge_weight (by linarith) |
| 1043 | have Φ_ne : Φ ≠ 0 := by |
| 1044 | refine fun hΦ ↦ h_not_dvd ((dvd_sub_right ?_).1 h_top) |
| 1045 | rw [← eq_zero_iff_dvd, ← Polynomial.coeff_map] |
| 1046 | exact (congrArg (fun q : Polynomial _ ↦ q.coeff (weight D.poleOrder α)) hΦ).trans |
| 1047 | (Polynomial.coeff_zero _) |
| 1048 | have Φ_deg : Φ.natDegree ≤ weight D.poleOrder α := by |
| 1049 | refine Polynomial.natDegree_le_iff_coeff_eq_zero.2 fun j hj ↦ ?_ |
| 1050 | have h_gap : weight D.poleOrder α * D.slope c < j * D.slope c := by gcongr |
| 1051 | rw [Polynomial.coeff_map, eq_zero_iff_dvd] |
| 1052 | exact pow_dvd_coeff_mergedCoeff j h_infinity h_merge_weight (by linarith) |
| 1053 | exact ⟨Φ_ne, Φ_deg⟩ |
| 1054 | |
| 1055 | /-- Zeros against degree. Let `w = T.sqrtPrime`, a square root of the prime `T.p` in `R`, let |
| 1056 | `i = D.letter` and let `q = D.card = P ^ N` be the number of residue classes of `W`. In each letter |
| 1057 | `s`, `X_s = D.varX s` and `Y_s = D.varY s` are the variables with the indices `a = D.fst`, |
| 1058 | `a' = D.snd` if `s` is even and in reverse order if it is odd. Let the weights `c` rise from `X_s` |
| 1059 | to `Y_s` by amounts in `[1 / 2, 1]`. Suppose that in all translates of `f` by `SL₂(W)`, placed in |
| 1060 | the rows and columns `a`, `a'` (`rootSL`), each term has `w`-adic order plus `c`-weight at least |
| 1061 | `l + c · α`, and that `w ^ (l + 1)` does not divide the coefficient of `x ^ α` in `f`. |
| 1062 | |
| 1063 | Let `ν` be the weight of `α` for `D.zeroOrder`, which is `q` at `Y_i` and `P_s = P ^ (s - i).val` at |
| 1064 | `Y_s` for `s ≠ i`, and `q ν'` its weight for `D.poleOrder`, which is `q P_s` at `X_s`; both weights |
| 1065 | vanish at all other variables. Then `ν q ≤ q ν'`. -/ |
| 1066 | lemma HasBoundedIncrements.weight_zeroOrder_mul_card_le [NeZero N] |
| 1067 | {T : FrobeniusCycle N W R} {D : T.RootAt k} |
| 1068 | {c : Fin k × ZMod N → ℝ} (hc : D.HasBoundedIncrements c) |
| 1069 | {f : MvPolynomial (Fin k × ZMod N) R} {α : Fin k × ZMod N →₀ ℕ} {l : ℕ} |
| 1070 | (h_least : ∀ g ∈ rootSL W D.fst D.snd, |
| 1071 | T.polyAction g f ∈ gaussFiltration (adicFiltration T.sqrtPrime) c (l + weight c α)) |
| 1072 | (h_not_dvd : ¬T.sqrtPrime ^ (l + 1) ∣ f.coeff α) : |
| 1073 | weight D.zeroOrder α * D.card ≤ weight D.poleOrder α := by |
| 1074 | -- `Φ` is the auxiliary binary form of degree `ν + q ν'` in the affine coordinate `t`, modulo |
| 1075 | -- `w ^ (l + 1)`. It vanishes to order exactly `ν` at infinity, that is, it has the degree |
| 1076 | -- `q ν'`, and to order at least `ν` at the other `q` rational points. |
| 1077 | let p : MvPolynomial (Fin k × ZMod N) (MvPolynomial Unit R) := |
| 1078 | aeval (D.mainSubst - D.crossSubst) f |
| 1079 | let Φ : Polynomial (R ⧸ Ideal.span {T.sqrtPrime ^ (l + 1)}) := |
| 1080 | (D.mergedCoeff α p).map (Ideal.Quotient.mk _) |
| 1081 | have h_slope : 0 < D.slope c := hc.slope_pos |
| 1082 | obtain ⟨Φ_ne, Φ_deg⟩ : Φ ≠ 0 ∧ Φ.natDegree ≤ weight D.poleOrder α := |
| 1083 | hc.map_mergedCoeff_ne_zero_and_natDegree_le h_slope |
| 1084 | (by simpa only [map_one, AlgHom.one_apply] using h_least 1 (one_mem _)) h_not_dvd |
| 1085 | have Φ_zero (r : W) : Polynomial.X ^ weight D.zeroOrder α ∣ |
| 1086 | Φ.taylor (((Ideal.Quotient.mk _).comp (T.embedding D.letter)) r) := by |
| 1087 | refine Polynomial.X_pow_dvd_iff.2 fun j hj ↦ ?_ |
| 1088 | have h_gap : j * D.slope c < weight D.zeroOrder α * D.slope c := by gcongr |
| 1089 | have h_shift : shiftCoeff _ (T.embedding D.letter r) p ∈ |
| 1090 | T.iteratedGaussFiltration c (D.slope c) D.zeroOrder (l + weight c α) := |
| 1091 | hc.shiftCoeff_aeval_mem r (h_least _ (inv_mem (D.swapTransvection_mem_rootSL r))) |
| 1092 | rw [RingHom.comp_apply, ← Polynomial.map_taylor, ← mergedCoeff_shiftCoeff, Polynomial.coeff_map, |
| 1093 | eq_zero_iff_dvd] |
| 1094 | exact pow_dvd_coeff_mergedCoeff j h_shift (by simp only [zeroOrder_varX, cast_zero, |
| 1095 | zero_mul, sub_zero, zeroOrder_varY, ↓reduceIte, card_mul_slope, sub_sub_cancel]) |
| 1096 | (by linarith) |
| 1097 | calc weight D.zeroOrder α * D.card |
| 1098 | = weight D.zeroOrder α * Nat.card (IsLocalRing.ResidueField W) := by |
| 1099 | rw [T.card_residueField, card] |
| 1100 | _ ≤ Φ.natDegree := Polynomial.mul_natCard_residueField_le_natDegree Φ_ne Φ_zero |
| 1101 | _ ≤ weight D.poleOrder α := Φ_deg |
| 1102 | |
| 1103 | end FrobeniusCycle.RootAt |
| 1104 | |
| 1105 | variable {R : Type} {N k : ℕ} {W : Type} [CommRing R] [NeZero N] [CommRing W] [IsLocalRing W] |
| 1106 | |
| 1107 | /-- The root lemma. Let `T` be a Frobenius cycle: ring maps `ι_s : W → R` for the letters `s ∈ ℤ/N`, |
| 1108 | alternately even and odd, with `ι_{s+1} ≡ ι_s ^ P` modulo a prime `p`, where `P = T.P` is a power of |
| 1109 | `p` and `W` has `q = P ^ N` residue classes, and a square root `w = T.sqrtPrime` of `p` in `R`. |
| 1110 | |
| 1111 | In the letter `s` let `Y_s = T.rootVar a a' s` be the variable `(a', s)` for even and |
| 1112 | `(a, s)` for odd `s`, and let `X_s = T.rootVar a' a s` be the other of the two. Let the weights `c` |
| 1113 | of the variables rise from `X_s` to `Y_s` by amounts in `[1 / 2, 1]`. Suppose that in all translates |
| 1114 | of `f` by `SL₂(W)` in the rows and columns `a`, `a'` each term has `w`-adic order plus weight at |
| 1115 | least `l + c · α`, and that `w ^ (l + 1)` does not divide the coefficient of `x ^ α` in `f`. Then |
| 1116 | the defect of `α` at the letter `i` is at most `0`. |
| 1117 | |
| 1118 | These bounds along the roots are Pieri's inequalities for the exponent of a term that is least among |
| 1119 | all translates. -/ |
| 1120 | theorem FrobeniusCycle.defect_nonpos_of_extreme_term (T : FrobeniusCycle N W R) {a a' : Fin k} |
| 1121 | (i : ZMod N) {c : Fin k × ZMod N → ℝ} |
| 1122 | (hc : ∀ s : ZMod N, c (T.rootVar a a' s) - c (T.rootVar a' a s) ∈ Set.Icc 2⁻¹ 1) |
| 1123 | {f : MvPolynomial (Fin k × ZMod N) R} {α : Fin k × ZMod N →₀ ℕ} {l : ℕ} |
| 1124 | (h_least : ∀ g ∈ rootSL W a a', |
| 1125 | T.polyAction g f ∈ gaussFiltration (adicFiltration T.sqrtPrime) c (l + weight c α)) |
| 1126 | (h_not_dvd : ¬T.sqrtPrime ^ (l + 1) ∣ f.coeff α) : weight (T.defectWeight i a a') α ≤ 0 := by |
| 1127 | have ha : a ≠ a' := by |
| 1128 | rintro rfl |
| 1129 | have h_lower := (hc i).1 |
| 1130 | norm_num at h_lower |
| 1131 | let D : T.RootAt k := ⟨i, a, a', ha⟩ |
| 1132 | -- Stepanov's count gives `ν q ≤ q ν'`, and the defect is `(ν - ν') / (q - 1)`. |
| 1133 | have h_count : weight D.zeroOrder α * D.card ≤ weight D.poleOrder α := |
| 1134 | RootAt.HasBoundedIncrements.weight_zeroOrder_mul_card_le (D := D) hc h_least h_not_dvd |
| 1135 | have h_defect : weight (T.defectWeight D.letter D.fst D.snd) α = |
| 1136 | (weight D.zeroOrder α - weight D.poleOrder α / D.card) / (D.card - 1) := by |
| 1137 | simp only [weight_eq_sum, D.defectWeight_eq, nsmul_eq_mul, mul_div, mul_sub, |
| 1138 | ← Finset.sum_div, Finset.sum_sub_distrib, smul_eq_mul, cast_sum, cast_mul] |
| 1139 | refine h_defect.trans_le (div_nonpos_of_nonpos_of_nonneg (sub_nonpos.2 ?_) |
| 1140 | (sub_nonneg.mpr D.one_lt_cast_card.le)) |
| 1141 | exact (le_div_iff₀ D.cast_card_pos).2 (mod_cast h_count) |
| 1142 | |
| 1143 | /-! ### Consequences -/ |
| 1144 | |
| 1145 | /-- The translate of a polynomial `f` by `g` in `GL_k(W)` has total degree at most that of `f`. -/ |
| 1146 | lemma FrobeniusCycle.totalDegree_polyAction_le (T : FrobeniusCycle N W R) (g : GL (Fin k) W) |
| 1147 | (f : MvPolynomial (Fin k × ZMod N) R) : (T.polyAction g f).totalDegree ≤ f.totalDegree := by |
| 1148 | have h_linear (x : Fin k × ZMod N) : (T.polyAction g (X x)).IsHomogeneous 1 := by |
| 1149 | rw [polyAction_X] |
| 1150 | exact .sum _ _ 1 fun b _ ↦ isHomogeneous_C_mul_X _ (b, x.2) |
| 1151 | rw [aeval_unique (T.polyAction g)] |
| 1152 | exact (MvPolynomial.totalDegree_aeval_le f fun x _ ↦ (h_linear x).totalDegree_le).trans_eq |
| 1153 | (Nat.mul_one _) |
| 1154 | |
| 1155 | /-- For the variable weights `fun x ↦ depth x - T.defectWeight i a a' x / 3`, the weight of `α` is |
| 1156 | `weight depth α` minus a third of `weight (T.defectWeight i a a') α`. -/ |
| 1157 | lemma FrobeniusCycle.weight_sub_defectWeight_div_three (T : FrobeniusCycle N W R) {a a' : Fin k} |
| 1158 | (i : ZMod N) (depth : Fin k × ZMod N → ℝ) (α : Fin k × ZMod N →₀ ℕ) : |
| 1159 | weight (fun x : Fin k × ZMod N ↦ depth x - T.defectWeight i a a' x / 3) α = |
| 1160 | weight depth α - weight (T.defectWeight i a a') α / 3 := by |
| 1161 | simp only [weight_eq_sum, nsmul_eq_mul, mul_sub, mul_div, Finset.sum_sub_distrib, |
| 1162 | ← Finset.sum_div] |
| 1163 | |
| 1164 | /-- If the weights `depth` rise by `1` along the root `(a, a')` in the letter `s`, then the weights |
| 1165 | `depth - T.defectWeight i a a' / 3` rise there by an amount in `[1 / 2, 1]`. -/ |
| 1166 | private lemma FrobeniusCycle.sub_defectWeight_div_three_sub_mem_Icc (T : FrobeniusCycle N W R) |
| 1167 | {a a' : Fin k} (i : ZMod N) {depth : Fin k × ZMod N → ℝ} (s : ZMod N) |
| 1168 | (h_step : depth (T.rootVar a a' s) - depth (T.rootVar a' a s) = 1) : |
| 1169 | depth (T.rootVar a a' s) - T.defectWeight i a a' (T.rootVar a a' s) / 3 - |
| 1170 | (depth (T.rootVar a' a s) - T.defectWeight i a a' (T.rootVar a' a s) / 3) ∈ |
| 1171 | Set.Icc 2⁻¹ 1 := by |
| 1172 | have h_rise : T.defectWeight i a a' (T.rootVar a a' s) - |
| 1173 | T.defectWeight i a a' (T.rootVar a' a s) ∈ Set.Icc 0 (3 / 2) := |
| 1174 | T.defectWeight_sub_mem_Icc s |
| 1175 | have h_diff : depth (T.rootVar a a' s) - T.defectWeight i a a' (T.rootVar a a' s) / 3 - |
| 1176 | (depth (T.rootVar a' a s) - T.defectWeight i a a' (T.rootVar a' a s) / 3) = |
| 1177 | 1 - (T.defectWeight i a a' (T.rootVar a a' s) - |
| 1178 | T.defectWeight i a a' (T.rootVar a' a s)) / 3 := by |
| 1179 | linarith [h_step] |
| 1180 | rw [h_diff] |
| 1181 | exact ⟨by linarith [h_rise.2], by linarith [h_rise.1]⟩ |
| 1182 | |
| 1183 | /-- Let `t ≤ v₀`. If every term `x ^ α` of `p` whose coefficient is not divisible by `w ^ (l + 1)`, |
| 1184 | with `l + ω · α < v₀`, satisfies `t ≤ l + ω · α`, then `p` lies at level `t` of the Gauss |
| 1185 | filtration of the `w`-adic filtration for the weights `ω`. -/ |
| 1186 | private lemma mem_gaussFiltration_of_forall_not_dvd {ι : Type*} {w : R} {ω : ι → ℝ} {t v₀ : ℝ} |
| 1187 | {p : MvPolynomial ι R} (ht : t ≤ v₀) |
| 1188 | (h_low : ∀ (α : ι →₀ ℕ) (l : ℕ), (l : ℝ) + weight ω α < v₀ → ¬w ^ (l + 1) ∣ p.coeff α → |
| 1189 | t ≤ l + weight ω α) : |
| 1190 | p ∈ gaussFiltration (adicFiltration w) ω t := by |
| 1191 | intro α |
| 1192 | rw [mem_adicFiltration_iff] |
| 1193 | cases h : ⌈t - weight ω α⌉₊ with |
| 1194 | | zero => simp |
| 1195 | | succ l => |
| 1196 | by_contra h_not |
| 1197 | have hl : l + weight ω α < t := lt_sub_iff_add_lt.1 (lt_ceil.1 (by simp [h])) |
| 1198 | exact hl.not_ge (h_low α l (hl.trans_le ht) h_not) |
| 1199 | |
| 1200 | /-- A large defect forces a divisible coefficient. In each letter `s ∈ ℤ/N` let |
| 1201 | `Y_s = T.rootVar a a' s` be the variable `(a', s)` for even and `(a, s)` for odd `s`, and |
| 1202 | `X_s = T.rootVar a' a s` the other of the two. Let `depth` be weights of the variables that rise by |
| 1203 | `1` from `X_s` to `Y_s` in each letter. If in all translates of `f` by `SL₂(W)` in the rows and |
| 1204 | columns `a`, `a'` each term has order for `w = T.sqrtPrime` plus depth at least `v₀`, then each term |
| 1205 | of `f` has order plus depth at least `v₀` plus a third of its defect at the letter `i` along the |
| 1206 | root `(a, a')`. -/ |
| 1207 | theorem FrobeniusCycle.mem_gaussFiltration_sub_defect_div_three (T : FrobeniusCycle N W R) |
| 1208 | {a a' : Fin k} (i : ZMod N) {depth : Fin k × ZMod N → ℝ} |
| 1209 | (h_step : ∀ s : ZMod N, depth (T.rootVar a a' s) - depth (T.rootVar a' a s) = 1) |
| 1210 | {v₀ : ℝ} {f : MvPolynomial (Fin k × ZMod N) R} |
| 1211 | (hf : ∀ g ∈ rootSL W a a', T.polyAction g f ∈ gaussFiltration (adicFiltration T.sqrtPrime) depth |
| 1212 | v₀) : |
| 1213 | f ∈ gaussFiltration (adicFiltration T.sqrtPrime) |
| 1214 | (fun x : Fin k × ZMod N ↦ depth x - T.defectWeight i a a' x / 3) v₀ := by |
| 1215 | -- Let `ω` be the depth minus a third of the defect weight. Suppose that some translate has a |
| 1216 | -- term whose order plus `ω`-weight is below `v₀`, and take a least such term. By |
| 1217 | -- `defect_nonpos_of_extreme_term` its defect is at most `0`, so its order plus depth is below |
| 1218 | -- `v₀` as well, against the hypothesis. |
| 1219 | set ω : Fin k × ZMod N → ℝ := fun x ↦ depth x - T.defectWeight i a a' x / 3 |
| 1220 | have ω_step (s : ZMod N) : ω (T.rootVar a a' s) - ω (T.rootVar a' a s) ∈ Set.Icc 2⁻¹ 1 := |
| 1221 | T.sub_defectWeight_div_three_sub_mem_Icc i s (h_step s) |
| 1222 | -- `(α, l) ∈ low`: in some translate the term at `α` has order at most `l`, and `l + ω · α < v₀`. |
| 1223 | let low : Set ((Fin k × ZMod N →₀ ℕ) × ℕ) := {x | x.2 + weight ω x.1 < v₀ ∧ |
| 1224 | ∃ g ∈ rootSL W a a', ¬T.sqrtPrime ^ (x.2 + 1) ∣ (T.polyAction g f).coeff x.1} |
| 1225 | -- A lower bound `t ≤ v₀` for `l + ω · α` on `low` is a level of all translates. |
| 1226 | have mem_of_forall {t : ℝ} (ht : t ≤ v₀) (h_low : ∀ x ∈ low, t ≤ x.2 + weight ω x.1) |
| 1227 | {g : GL (Fin k) W} (hg : g ∈ rootSL W a a') : |
| 1228 | T.polyAction g f ∈ gaussFiltration (adicFiltration T.sqrtPrime) ω t := |
| 1229 | mem_gaussFiltration_of_forall_not_dvd ht fun α l h_lt h_not ↦ |
| 1230 | h_low (α, l) ⟨h_lt, g, hg, h_not⟩ |
| 1231 | suffices h_empty : ¬low.Nonempty by |
| 1232 | simpa only [map_one, AlgHom.one_apply] using |
| 1233 | mem_of_forall le_rfl (fun x hx ↦ absurd ⟨x, hx⟩ h_empty) (one_mem _) |
| 1234 | intro h_ne |
| 1235 | -- The degree of `f` bounds `α`, and `v₀` bounds `l`. |
| 1236 | have h_finite : low.Finite := by |
| 1237 | refine ((finite_of_degree_le f.totalDegree).biUnion fun α _ ↦ |
| 1238 | (Set.finite_singleton α).prod (Set.finite_Iio ⌈v₀ - weight ω α⌉₊)).subset ?_ |
| 1239 | rintro ⟨α, l⟩ ⟨h_lt, g, -, h_not⟩ |
| 1240 | have h_degree : α.degree ≤ f.totalDegree := |
| 1241 | (le_totalDegree (MvPolynomial.mem_support_iff.2 fun h_zero ↦ |
| 1242 | h_not (by simp only [h_zero, dvd_zero]))).trans (T.totalDegree_polyAction_le g f) |
| 1243 | exact Set.mem_biUnion h_degree ⟨rfl, lt_ceil.2 (by linarith)⟩ |
| 1244 | obtain ⟨⟨α, l⟩, ⟨h_lt, g₀, hg₀, h_not⟩, h_min⟩ : |
| 1245 | ∃ x ∈ low, ∀ y ∈ low, x.2 + weight ω x.1 ≤ y.2 + weight ω y.1 := |
| 1246 | Set.exists_min_image low _ h_finite h_ne |
| 1247 | have h_defect : weight (T.defectWeight i a a') α ≤ 0 := |
| 1248 | T.defect_nonpos_of_extreme_term i ω_step |
| 1249 | (fun g hg ↦ by |
| 1250 | simpa only [map_mul, AlgHom.mul_apply] using mem_of_forall h_lt.le h_min (mul_mem hg hg₀)) |
| 1251 | h_not |
| 1252 | have h_weight : weight ω α = weight depth α - weight (T.defectWeight i a a') α / 3 := |
| 1253 | T.weight_sub_defectWeight_div_three i depth α |
| 1254 | have h_depth : l < v₀ - weight depth α := by linarith |
| 1255 | exact h_not ((pow_dvd_pow _ (lt_ceil.2 h_depth)).trans (hf g₀ hg₀ α)) |
| 1256 | |
| 1257 | /-- The root lemma for weights that rise by `1`, over a field of characteristic `T.p`. |
| 1258 | Let `height` be weights of the variables that rise by `1` from `X_s = T.rootVar a' a s` to |
| 1259 | `Y_s = T.rootVar a a' s` in each letter `s ∈ ℤ/N`; these are the variables with index `a`, `a'` for |
| 1260 | even `s` and in reverse order for odd `s`. A term of `f` whose height is least among the terms of |
| 1261 | all translates of `f` by `SL₂(W)` in the rows and columns `a`, `a'` has defect at most `0`. -/ |
| 1262 | lemma FrobeniusCycle.weight_defectWeight_nonpos_of_least {a a' : Fin k} {K : Type} [Field K] |
| 1263 | (T : FrobeniusCycle N W K) [CharP K T.p] (i : ZMod N) |
| 1264 | {height : Fin k × ZMod N → ℝ} |
| 1265 | (h_step : ∀ s : ZMod N, height (T.rootVar a a' s) - height (T.rootVar a' a s) = 1) |
| 1266 | {f : MvPolynomial (Fin k × ZMod N) K} {α : Fin k × ZMod N →₀ ℕ} |
| 1267 | (h_least : ∀ g ∈ rootSL W a a', |
| 1268 | T.polyAction g f ∈ gaussFiltration (adicFiltration T.sqrtPrime) height (weight height α)) |
| 1269 | (hα : f.coeff α ≠ 0) : weight (T.defectWeight i a a') α ≤ 0 := by |
| 1270 | have w_zero : T.sqrtPrime = 0 := (pow_eq_zero_iff two_ne_zero).1 |
| 1271 | (T.sqrtPrime_sq.trans (CharP.cast_eq_zero K _)) |
| 1272 | exact T.defect_nonpos_of_extreme_term i (c := height) (l := 0) (fun s ↦ by norm_num [h_step]) |
| 1273 | (by simpa only [cast_zero, zero_add] using h_least) |
| 1274 | (by simpa only [w_zero, zero_add, pow_one, zero_dvd_iff, ne_eq] using hα) |
| 1275 | |
| 1276 | end New |