🏛️ Atlas✒️Formalizations.NumberTheory.SymplecticCharacterOrders.Multipliers view on GitHub ↗11 theorems
/-Copyright (c) 2026 Carles Marín. All rights reserved.Released under Apache 2.0 license as described in the file LICENSE.Authors: Carles Marín-/module public import Mathlib.LinearAlgebra.Matrix.Rankpublic import Mathlib.LinearAlgebra.FiniteDimensional.Lemmaspublic import Mathlib.LinearAlgebra.Dimension.Constructionspublic import Mathlib.Algebra.Module.Equiv.Basicpublic import Mathlib.Data.Nat.Totientpublic import Mathlib.Data.ZMod.QuotientGrouppublic import Mathlib.GroupTheory.Coset.Cardpublic import Mathlib.Tactic.Ringpublic import Mathlib.Tactic.LinearCombination /-!# Other multipliers: the rank of a difference matrix Let `n ≥ 3`, `ℓ ∈ (ZMod n)ˣ`, `F` a field with `2 ≠ 0`, `s : ZMod n → F` odd, and rows indexed byrepresentatives `ρ q` of `(ZMod n)ˣ / ±1`. If the matrix `M = [s(u⁻¹ c)]` (rows `u = ρ q`, columns`c ∈ ZMod n`) has rank `|Q|` (hypothesis `hM`), then`A = [½ (s(ℓ u⁻¹ c) − s(u⁻¹ c))]` has rank `d − δ_ℓ`, with `d = |Q|`, `2d = φ(n)`, `δ_ℓ = 0` if`−1 ∈ ⟨ℓ⟩` and `δ_ℓ = d / ord(ℓ)` otherwise. The hypothesis `hM` (over `ℚ` a theorem ofKurihara; over `𝔽_p` a consequence of Sinnott's index formula when `p ∤ n h⁻`) is not formalized. ## Main results * `Multiplicadores.prop_multiplicadores_of_mem`: the case `−1 ∈ ⟨ℓ⟩`.* `Multiplicadores.prop_multiplicadores_of_not_mem`: the case `−1 ∉ ⟨ℓ⟩`.* `Multiplicadores.finrank_oddSub`, `Multiplicadores.rank_eq`: the dimension count behind them. ## References * C. Marín, *Conductors of orders generated by character values of Sp(2m)*, preprint (2026);  programs and outputs: Zenodo, doi:10.5281/zenodo.23090540.* C. Marín, *Where the character values of Sp(2m) at a torsion element fail to generate the ring  of integers*, Zenodo (2026), doi:10.5281/zenodo.22813216 (a longer preprint of the same work).-/ @[expose] public section open Module namespace Multiplicadores variable {F : Type*} [Field F] /-! ## Odd functions for a fixed-point-free involution -/ /-- Functions `v` with `v (σ y) = - v y`. -/def oddSub {Y : Type*} (σ : Y → Y) : Submodule F (Y → F) where  carrier := {v | ∀ y, v (σ y) = - v y}  add_mem' := by    intro a b ha hb y    simp only [Pi.add_apply, ha y, hb y]; ring  zero_mem' := by intro y; simp  smul_mem' := by    intro c a ha y    simp only [Pi.smul_apply, smul_eq_mul, ha y]; ring /-- Functions `v` with `v (σ y) = v y`. -/def evenSub {Y : Type*} (σ : Y → Y) : Submodule F (Y → F) where  carrier := {v | ∀ y, v (σ y) = v y}  add_mem' := by    intro a b ha hb y    simp only [Pi.add_apply, ha y, hb y]  zero_mem' := by intro y; simp  smul_mem' := by    intro c a ha y    simp only [Pi.smul_apply, smul_eq_mul, ha y] /-- For an involution `σ` without fixed points on a finite set `Y` and `2 ≠ 0` in `F`,the odd functions have dimension `|Y| / 2`. -/theorem finrank_oddSub {Y : Type*} [Fintype Y] (hF : (2 : F) ≠ 0) (σ : Y → Y)    (hinv : ∀ y, σ (σ y) = y) (hfree : ∀ y, σ y ≠ y) :    finrank F (oddSub (F := F) σ) * 2 = Fintype.card Y := by  classical  -- a sign function with `sg (σ y) = - sg y`  let e0 := Fintype.equivFin Y  let sg : Y → F := fun y => if e0 y < e0 (σ y) then 1 else -1  have hsg : ∀ y, sg (σ y) = - sg y := by    intro y    have hne : e0 y ≠ e0 (σ y) := fun h => hfree y (e0.injective h).symm    simp only [sg, hinv y]    rcases lt_or_gt_of_ne hne with h | h    · simp [h, not_lt.mpr h.le]    · simp [h, not_lt.mpr h.le]  have hsq : ∀ y, sg y * sg y = 1 := by    intro y; simp only [sg]; split_ifs <;> ring  -- multiplication by `sg` is a linear involution exchanging even and odd  let E : (Y → F) ≃ₗ[F] (Y → F) :=    { toFun := fun v => sg * v      invFun := fun v => sg * v      map_add' := fun a b => by ring      map_smul' := fun c a => by ext y; simp [Pi.mul_apply]; ring      left_inv := fun v => by ext y; simp only [Pi.mul_apply]; rw [← mul_assoc, hsq, one_mul]      right_inv := fun v => by ext y; simp only [Pi.mul_apply]; rw [← mul_assoc, hsq, one_mul] }  have hmap : (evenSub (F := F) σ).map (E : (Y → F) →ₗ[F] (Y → F)) = oddSub σ := by    apply le_antisymm    · rintro _ ⟨v, hv, rfl⟩ y      change sg (σ y) * v (σ y) = -(sg y * v y)      rw [hsg, hv y]; ring    · intro v hv      refine ⟨sg * v, ?_, ?_⟩      · intro y        change sg (σ y) * v (σ y) = sg y * v y        rw [hsg, hv y]; ring      · ext y; change sg y * (sg y * v y) = v y; rw [← mul_assoc, hsq, one_mul]  have hEO : finrank F (evenSub (F := F) σ) = finrank F (oddSub (F := F) σ) := by    rw [← hmap, LinearEquiv.finrank_map_eq]  have hinf : oddSub (F := F) σ ⊓ evenSub σ = ⊥ := by    rw [eq_bot_iff]    rintro v ⟨ho, he⟩    ext y    have h1 := ho y    rw [he y] at h1    have : (2 : F) * v y = 0 := by linear_combination h1    simpa [hF] using this  have hsup : oddSub (F := F) σ ⊔ evenSub σ = ⊤ := by    rw [eq_top_iff]    intro v _    have hv : v = (2 : F)⁻¹ • (v - fun y => v (σ y)) + (2 : F)⁻¹ • (v + fun y => v (σ y)) := by      ext y; simp only [Pi.add_apply, Pi.smul_apply, Pi.sub_apply, smul_eq_mul]      field_simp; ring    rw [hv]    refine Submodule.add_mem_sup (Submodule.smul_mem _ _ ?_) (Submodule.smul_mem _ _ ?_)    · intro y; simp only [Pi.sub_apply, hinv y]; ring    · intro y; simp only [Pi.add_apply, hinv y]; ring  have key := Submodule.finrank_sup_add_finrank_inf_eq (oddSub (F := F) σ) (evenSub σ)  rw [hsup, hinf, finrank_bot, finrank_top, Module.finrank_fintype_fun_eq_card, hEO] at key  omega /-! ## Rank-nullity along a subspace -/ /-- If `f` is injective on `S`, then `f(S)` has the dimension of `S`. -/lemma finrank_map_of_injOn {V W : Type*} [AddCommGroup V] [Module F V] [FiniteDimensional F V]    [AddCommGroup W] [Module F W] (f : V →ₗ[F] W) (S : Submodule F V)    (h : ∀ v ∈ S, f v = 0 → v = 0) : finrank F (S.map f) = finrank F S := by  have hk : LinearMap.ker (f.domRestrict S) = ⊥ := by    rw [eq_bot_iff]    intro x hx    have := h x.1 x.2 hx    simp [Subtype.ext_iff, this]  have := LinearMap.finrank_range_add_finrank_ker (f.domRestrict S)  rw [hk, finrank_bot, add_zero, LinearMap.range_domRestrict] at this  exact this /-- Rank-nullity for `f` restricted to `S`. -/lemma finrank_map_add_fix {V W : Type*} [AddCommGroup V] [Module F V] [FiniteDimensional F V]    [AddCommGroup W] [Module F W] (f : V →ₗ[F] W) (S : Submodule F V) :    finrank F (S.map f) + finrank F (S ⊓ LinearMap.ker f : Submodule F V) = finrank F S := by  have := LinearMap.finrank_range_add_finrank_ker (f.domRestrict S)  rw [LinearMap.range_domRestrict, LinearMap.ker_domRestrict] at this  have e : finrank F ((LinearMap.ker f).comap S.subtype)      = finrank F (S ⊓ LinearMap.ker f : Submodule F V) := by    have := finrank_map_of_injOn S.subtype ((LinearMap.ker f).comap S.subtype)      (fun v _ hv => by simpa using hv)    rw [← this, Submodule.map_comap_subtype]  rw [e] at this  exact this /-! ## The setting of `prop:multiplicadores` -/ variable {n : ℕ} [NeZero n] omit [NeZero n] in/-- `-u ≠ u` in `(ZMod n)ˣ` for `n ≥ 3`. -/lemma neg_ne_self (hn : 3 ≤ n) (u : (ZMod n)ˣ) : -u ≠ u := by  intro h  have h1 : ((-u : (ZMod n)ˣ) : ZMod n) * (u⁻¹ : (ZMod n)ˣ) = (u : ZMod n) * (u⁻¹ : (ZMod n)ˣ) := by    rw [h]  rw [Units.val_neg, neg_mul, Units.mul_inv] at h1  have h2 : ((2 : ℕ) : ZMod n) = 0 := by    push_cast; linear_combination -h1  rw [ZMod.natCast_eq_zero_iff] at h2  have := Nat.le_of_dvd (by norm_num) h2  omega /-- The full matrix `[s(u⁻¹ c)]`, rows over all units. -/def Mfull (s : ZMod n → F) : Matrix (ZMod n)ˣ (ZMod n) F :=  fun u c => s (((u⁻¹ : (ZMod n)ˣ) : ZMod n) * c) /-- The matrix of the paper, `[½ (s(ℓ u⁻¹ c) - s(u⁻¹ c))]`, rows `u = ρ q`. -/def Amat (s : ZMod n → F) (ℓ : (ZMod n)ˣ) {Q : Type*} (ρ : Q → (ZMod n)ˣ) :    Matrix Q (ZMod n) F :=  fun q c => (1 / 2 : F) * (s ((ℓ : ZMod n) * ((ρ q)⁻¹ : (ZMod n)ˣ) * c)    - s (((ρ q)⁻¹ : (ZMod n)ˣ) * c)) /-- The matrix `M_n = [s(u⁻¹ c)]`, rows `u = ρ q`. -/def Mmat (s : ZMod n → F) {Q : Type*} (ρ : Q → (ZMod n)ˣ) : Matrix Q (ZMod n) F :=  fun q c => s (((ρ q)⁻¹ : (ZMod n)ˣ) * c) /-- The fixed space of `P_ℓ` on odd functions: `v` odd with `v(u ℓ⁻¹) = v(u)`. -/def fixSub (ℓ : (ZMod n)ˣ) : Submodule F ((ZMod n)ˣ → F) :=  oddSub (fun u => -u) ⊓ LinearMap.ker    (LinearMap.funLeft F F (fun u => u * ℓ⁻¹) - LinearMap.id) omit [NeZero n] inlemma mem_fixSub {ℓ : (ZMod n)ˣ} {v : (ZMod n)ˣ → F} :    v ∈ fixSub (F := F) ℓ ↔ (∀ u, v (-u) = - v u) ∧ ∀ u, v (u * ℓ⁻¹) = v u := by  simp only [fixSub, Submodule.mem_inf, LinearMap.mem_ker, LinearMap.sub_apply,    LinearMap.id_apply, sub_eq_zero, funext_iff, LinearMap.funLeft_apply]  rfl omit [Field F] [NeZero n] in/-- `ℓ⁻¹`-invariance gives invariance under all of `⟨ℓ⟩`. -/lemma inv_zpow {ℓ : (ZMod n)ˣ} {v : (ZMod n)ˣ → F} (h : ∀ u, v (u * ℓ⁻¹) = v u) (j : ℤ)    (u : (ZMod n)ˣ) : v (u * ℓ ^ j) = v u := by  induction j using Int.induction_on generalizing u with  | zero => simp  | succ j ih =>    have := h (u * ℓ ^ ((j : ℤ) + 1))    rw [show u * ℓ ^ ((j : ℤ) + 1) * ℓ⁻¹ = u * ℓ ^ (j : ℤ) by group] at this    rw [← this, ih]  | pred j ih =>    have := h (u * ℓ ^ (-(j : ℤ)))    rw [show u * ℓ ^ (-(j : ℤ)) * ℓ⁻¹ = u * ℓ ^ (-(j : ℤ) - 1) by group] at this    rw [this, ih] omit [NeZero n] in/-- `δ_ℓ = 0`: if `-1 ∈ ⟨ℓ⟩`, the fixed space is zero (characteristic `≠ 2`). -/lemma fixSub_eq_bot (hF : (2 : F) ≠ 0) {ℓ : (ZMod n)ˣ} (h : (-1 : (ZMod n)ˣ) ∈ Subgroup.zpowers ℓ) :    fixSub (F := F) ℓ = ⊥ := by  rw [eq_bot_iff]  intro v hv  rw [mem_fixSub] at hv  obtain ⟨k, hk⟩ := Subgroup.mem_zpowers_iff.mp h  ext u  have h1 := hv.1 u  have h2 := inv_zpow hv.2 k u  rw [hk, mul_neg_one] at h2  rw [h2] at h1  have : (2 : F) * v u = 0 := by linear_combination h1  simpa [hF] using this /-- `δ_ℓ = d / ord(ℓ)`: if `-1 ∉ ⟨ℓ⟩`, `2 · dim Fix · ord(ℓ) = φ(n)`. -/lemma finrank_fixSub (hF : (2 : F) ≠ 0) {ℓ : (ZMod n)ˣ}    (h : (-1 : (ZMod n)ˣ) ∉ Subgroup.zpowers ℓ) :    finrank F (fixSub (F := F) ℓ) * 2 * orderOf ℓ = Nat.card (ZMod n)ˣ := by  classical  set K := Subgroup.zpowers ℓ  have : K.Normal := Subgroup.normal_of_isMulCommutative K  let mk : (ZMod n)ˣ → (ZMod n)ˣ ⧸ K := QuotientGroup.mk  let σ : (ZMod n)ˣ ⧸ K → (ZMod n)ˣ ⧸ K := fun t => mk (-1) * t  have hinv : ∀ t, σ (σ t) = t := by    intro t    change mk (-1) * (mk (-1) * t) = t    rw [← mul_assoc]    simp only [mk, ← QuotientGroup.mk_mul, neg_one_mul, neg_neg, QuotientGroup.mk_one]    exact one_mul t  have hfree : ∀ t, σ t ≠ t := by    intro t ht    apply h    have : mk (-1) = 1 := mul_right_cancel (ht.trans (one_mul t).symm)    exact (QuotientGroup.eq_one_iff _).mp this  have hodd := finrank_oddSub (F := F) hF σ hinv hfree  -- `fixSub` is the image of the odd functions on the quotient  let Φ : ((ZMod n)ˣ ⧸ K → F) →ₗ[F] ((ZMod n)ˣ → F) := LinearMap.funLeft F F mk  have hΦinj : Function.Injective Φ :=    LinearMap.funLeft_injective_of_surjective _ _ _ QuotientGroup.mk_surjective  have hmap : (oddSub (F := F) σ).map Φ = fixSub ℓ := by    apply le_antisymm    · rintro _ ⟨w, hw, rfl⟩      rw [mem_fixSub]      refine ⟨fun u => ?_, fun u => ?_⟩      · change w (mk (-u)) = - w (mk u)        rw [← hw (mk u)]        congr 1        simp only [σ, mk, ← QuotientGroup.mk_mul, neg_one_mul]      · change w (mk (u * ℓ⁻¹)) = w (mk u)        congr 1        rw [QuotientGroup.eq]        simp only [K]        refine Subgroup.mem_zpowers_iff.mpr ⟨1, ?_⟩        group    · intro v hv      rw [mem_fixSub] at hv      have hK : ∀ u, ∀ k ∈ K, v (u * k) = v u := by        intro u k hk        obtain ⟨j, rfl⟩ := Subgroup.mem_zpowers_iff.mp hk        exact inv_zpow hv.2 j u      refine ⟨fun t => v t.out, ?_, ?_⟩      · intro t        change v (σ t).out = - v t.out        obtain ⟨k, hk⟩ := QuotientGroup.mk_out_eq_mul K ((-1 : (ZMod n)ˣ) * t.out)        have ht : σ t = mk ((-1 : (ZMod n)ˣ) * t.out) := by          simp only [σ, mk, QuotientGroup.mk_mul, QuotientGroup.out_eq']        rw [ht]        change v (QuotientGroup.mk (s := K) ((-1 : (ZMod n)ˣ) * t.out)).out = _        rw [hk, hK _ k k.2, neg_one_mul, hv.1]      · ext u        change v (mk u).out = v u        obtain ⟨k, hk⟩ := QuotientGroup.mk_out_eq_mul K u        change v (QuotientGroup.mk (s := K) u).out = v u        rw [hk, hK _ k k.2]  have hfin : finrank F (fixSub (F := F) ℓ) = finrank F (oddSub (F := F) σ) := by    rw [← hmap]    exact finrank_map_of_injOn Φ _ (fun v _ hv => hΦinj (by rw [hv, map_zero]))  have hcard := Subgroup.card_eq_card_quotient_mul_card_subgroup K  rw [Nat.card_zpowers] at hcard  rw [hfin, hodd, hcard, Nat.card_eq_fintype_card] /-! ## `prop:multiplicadores` -/ variable {Q : Type*} [Fintype Q] /-- **`prop:multiplicadores` (6.1), core.** `n ≥ 3`, `F` a field with `2 ≠ 0`, `s` odd,`ρ : Q → (ZMod n)ˣ` hitting every class of `(ZMod n)ˣ/±1`, and `hM`: `M_n = [s(u⁻¹ c)]` has rank`|Q|` over `F` (Kurihara over `ℚ`; `prop:sinnott` over `𝔽_p`, `p ∤ n h⁻`). Then `2|Q| = φ(n)`, and`A = [½(s(ℓu⁻¹c) - s(u⁻¹c))]` has rank `|Q| - δ`, where `δ` is the dimension of the fixed spaceof `P_ℓ` on odd functions. -/theorem rank_eq (hF : (2 : F) ≠ 0) (hn : 3 ≤ n) (s : ZMod n → F) (hs : ∀ x, s (-x) = - s x)    (ℓ : (ZMod n)ˣ) (ρ : Q → (ZMod n)ˣ) (hρ : ∀ u, ∃ q, ρ q = u ∨ ρ q = -u)    (hM : (Mmat s ρ).rank = Fintype.card Q) :    Fintype.card Q * 2 = Nat.totient n ∧    (Amat s ℓ ρ).rank + finrank F (fixSub (F := F) ℓ) = Fintype.card Q := by  classical  let O : Submodule F ((ZMod n)ˣ → F) := oddSub (fun u => -u)  let m := (Mfull s).mulVecLin  let R : ((ZMod n)ˣ → F) →ₗ[F] (Q → F) := LinearMap.funLeft F F ρ  let P : ((ZMod n)ˣ → F) →ₗ[F] ((ZMod n)ˣ → F) :=    LinearMap.funLeft F F (fun u => u * ℓ⁻¹) - LinearMap.id  -- the matrices as compositions  have hMm : (Mmat s ρ).mulVecLin = R ∘ₗ m := by    apply LinearMap.ext; intro x; ext q    simp [R, m, Mmat, Mfull, Matrix.mulVec, dotProduct, LinearMap.funLeft_apply]  have hAm : (Amat s ℓ ρ).mulVecLin = (1 / 2 : F) • (R ∘ₗ P ∘ₗ m) := by    apply LinearMap.ext; intro x; ext q    simp only [Matrix.mulVecLin_apply, LinearMap.smul_apply, LinearMap.comp_apply, Pi.smul_apply,      smul_eq_mul, R, P, m, LinearMap.funLeft_apply, LinearMap.sub_apply, LinearMap.id_apply,      Pi.sub_apply, Matrix.mulVec, dotProduct, Amat, Mfull, Finset.mul_sum, ← Finset.sum_sub_distrib]    refine Finset.sum_congr rfl (fun c _ => ?_)    rw [mul_inv_rev, inv_inv, Units.val_mul]    ring  -- `m` lands in the odd functions; `R` is injective on them  have hmO : LinearMap.range m ≤ O := by    rintro _ ⟨x, rfl⟩ u    simp only [m, Matrix.mulVecLin_apply, Matrix.mulVec, dotProduct, Mfull,      ← Finset.sum_neg_distrib]    refine Finset.sum_congr rfl (fun c _ => ?_)    have hi : (-u)⁻¹ = -u⁻¹ := inv_eq_of_mul_eq_one_right (by rw [neg_mul_neg, mul_inv_cancel])    rw [hi, Units.val_neg, neg_mul, hs]; ring  have hRinj : ∀ v ∈ O, R v = 0 → v = 0 := by    intro v hv hR    ext u    obtain ⟨q, hq | hq⟩ := hρ u    · have := congrFun hR q      simpa [R, LinearMap.funLeft_apply, hq] using this    · have := congrFun hR q      simp only [R, LinearMap.funLeft_apply, hq, Pi.zero_apply] at this      have h2 := hv u      simp only at h2      rw [this] at h2      simpa using h2.symm  have hPO : ∀ v ∈ O, P v ∈ O := by    intro v hv u    simp only [P, LinearMap.sub_apply, LinearMap.funLeft_apply, LinearMap.id_apply, Pi.sub_apply]    rw [neg_mul, hv (u * ℓ⁻¹), hv u]; ring  -- dimensions  have hOle : finrank F O ≤ Fintype.card Q := by    rw [← finrank_map_of_injOn R O hRinj, ← Module.finrank_fintype_fun_eq_card F]    exact Submodule.finrank_le _  have hrm : finrank F (LinearMap.range m) = Fintype.card Q := by    have h1 := finrank_map_of_injOn R (LinearMap.range m) (fun v hv => hRinj v (hmO hv))    rw [← h1, ← LinearMap.range_comp, ← hMm]    exact hM  have hOeq : LinearMap.range m = O :=    Submodule.eq_of_le_of_finrank_le hmO (by rw [hrm]; exact hOle)  have hOd : finrank F O = Fintype.card Q := by rw [← hOeq, hrm]  refine ⟨?_, ?_⟩  · have := finrank_oddSub (F := F) hF (fun u : (ZMod n)ˣ => -u) (fun u => neg_neg u)      (neg_ne_self hn)    rw [ZMod.card_units_eq_totient] at this    change finrank F O * 2 = _ at this    rw [hOd] at this    exact this  · have hPOle : O.map P ≤ O := by      rintro _ ⟨v, hv, rfl⟩; exact hPO v hv    have hA : (Amat s ℓ ρ).rank = finrank F (O.map P) := by      rw [Matrix.rank, hAm, LinearMap.range_smul _ _ (by simpa using hF), LinearMap.range_comp,        LinearMap.range_comp, hOeq]      exact finrank_map_of_injOn R _ (fun v hv => hRinj v (hPOle hv))    rw [hA, ← hOd]    exact finrank_map_add_fix P O /-- **`prop:multiplicadores`**, case `-1 ∈ ⟨ℓ⟩`: `δ_ℓ = 0`, the rank is `d = |Q| = φ(n)/2`. -/theorem prop_multiplicadores_of_mem (hF : (2 : F) ≠ 0) (hn : 3 ≤ n) (s : ZMod n → F)    (hs : ∀ x, s (-x) = - s x) (ℓ : (ZMod n)ˣ) (ρ : Q → (ZMod n)ˣ)    (hρ : ∀ u, ∃ q, ρ q = u ∨ ρ q = -u) (hM : (Mmat s ρ).rank = Fintype.card Q)    (h : (-1 : (ZMod n)ˣ) ∈ Subgroup.zpowers ℓ) :    Fintype.card Q * 2 = Nat.totient n ∧ (Amat s ℓ ρ).rank = Fintype.card Q := by  obtain ⟨h1, h2⟩ := rank_eq hF hn s hs ℓ ρ hρ hM  rw [fixSub_eq_bot hF h, finrank_bot, add_zero] at h2  exact ⟨h1, h2⟩ /-- **`prop:multiplicadores`**, case `-1 ∉ ⟨ℓ⟩`: `δ_ℓ = d / ord_n(ℓ)` (and `ord_n(ℓ) ∣ d`),the rank is `d - d / ord_n(ℓ)`, `d = |Q| = φ(n)/2`. -/theorem prop_multiplicadores_of_not_mem (hF : (2 : F) ≠ 0) (hn : 3 ≤ n) (s : ZMod n → F)    (hs : ∀ x, s (-x) = - s x) (ℓ : (ZMod n)ˣ) (ρ : Q → (ZMod n)ˣ)    (hρ : ∀ u, ∃ q, ρ q = u ∨ ρ q = -u) (hM : (Mmat s ρ).rank = Fintype.card Q)    (h : (-1 : (ZMod n)ˣ) ∉ Subgroup.zpowers ℓ) :    Fintype.card Q * 2 = Nat.totient n ∧ orderOf ℓ ∣ Fintype.card Q ∧    (Amat s ℓ ρ).rank = Fintype.card Q - Fintype.card Q / orderOf ℓ := by  classical  obtain ⟨h1, h2⟩ := rank_eq hF hn s hs ℓ ρ hρ hM  have h3 := finrank_fixSub (F := F) hF h  rw [Nat.card_eq_fintype_card, ZMod.card_units_eq_totient, ← h1] at h3  have hf : finrank F (fixSub (F := F) ℓ) * orderOf ℓ = Fintype.card Q := by    have : (finrank F (fixSub (F := F) ℓ) * orderOf ℓ) * 2 = Fintype.card Q * 2 := by      rw [← h3]; ring    omega  have hord : 0 < orderOf ℓ := orderOf_pos ℓ  refine ⟨h1, ⟨finrank F (fixSub (F := F) ℓ), by rw [← hf, mul_comm]⟩, ?_⟩  rw [← hf, Nat.mul_div_cancel _ hord, hf]  omega end Multiplicadores