Hodge conjecture: the CM case in Lean, read and discussed
OpenAI's Lean proof of the Hodge conjecture for CM abelian varieties: rerun it, read its statement, and keep the open questions with their sources. The conjecture is open

| 1 | import Mathlib.LinearAlgebra.Prod |
| 2 | import Mathlib.LinearAlgebra.Dimension.Constructions |
| 3 | import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas |
| 4 | import Mathlib.FieldTheory.Finiteness |
| 5 | import Mathlib.Data.Multiset.Bind |
| 6 | import Mathlib.Tactic |
| 7 | import OAI.AlgebraicGeometry.Isogenies.NeighborCounting.Components |
| 8 | |
| 9 | /-! # Subspace Counts -/ |
| 10 | |
| 11 | namespace OAI.AlgebraicGeometry.Isogenies.NeighborCounting.SubspaceCounts.Construction |
| 12 | |
| 13 | noncomputable section |
| 14 | |
| 15 | /-! |
| 16 | NeighborCounting: finite-subspace counting core and component-specialization bridge. |
| 17 | |
| 18 | This file proves the graph/product parametrization and all three counting |
| 19 | formulas without assuming fiber cardinalities. NativeNeighbors now |
| 20 | defines actual quotient-sheaf neighbors and proves their reduction formula |
| 21 | using FrobeniusKernel's native quotient base-change constructors. GenericParameters |
| 22 | computes the generic scheme-map images, proving the enumeration from their |
| 23 | coordinate formulas; KernelProperties proves finite flatness and closed |
| 24 | immersion; PELAdapter places these kernels in the native integral PEL |
| 25 | abelian family. No committed statement stub is imported. |
| 26 | |
| 27 | The diagnostic at the end remains deliberately about an unconnected raw |
| 28 | multiset; it is not a counterexample to the manuscript or the new native |
| 29 | construction. The full polarized, marked C0/opposite-block comparison is |
| 30 | not claimed by this counting core or the split-block quotient bridge. |
| 31 | |
| 32 | Input accounting: h_HenselianLifting and h_SchematicClosure are explicit in Components, and |
| 33 | h_FrobeniusKernel supplies mixed-term order below. The native helpers also use proved |
| 34 | Homomorphisms Frobenius infrastructure to kill etale-to-multiplicative characters. |
| 35 | They do not infer a quotient equality from commutation alone. |
| 36 | -/ |
| 37 | |
| 38 | variable {F V : Type*} [Field F] [AddCommGroup V] [Module F V] |
| 39 | |
| 40 | /-- The distinguished one-dimensional identity-part direction. -/ |
| 41 | def identityLine : Submodule F (V × F) := |
| 42 | LinearMap.ker (LinearMap.fst F V F) |
| 43 | |
| 44 | /-- Generic subspaces with fixed quotient image, disjoint from the identity line. -/ |
| 45 | def DisjointLift (U : Submodule F V) := |
| 46 | {L : Submodule F (V × F) // |
| 47 | Disjoint L identityLine ∧ L.map (LinearMap.fst F V F) = U} |
| 48 | |
| 49 | /-- Generic subspaces with fixed quotient image, containing the identity line. -/ |
| 50 | def ContainingLift (U : Submodule F V) := |
| 51 | {L : Submodule F (V × F) // |
| 52 | identityLine ≤ L ∧ L.map (LinearMap.fst F V F) = U} |
| 53 | |
| 54 | def fiberGraph (U : Submodule F V) (f : U →ₗ[F] F) : Submodule F (V × F) := |
| 55 | LinearMap.range (U.subtype.prod f) |
| 56 | |
| 57 | lemma fiberGraph_disjoint (U : Submodule F V) (f : U →ₗ[F] F) : |
| 58 | Disjoint (fiberGraph U f) identityLine := by |
| 59 | apply Submodule.disjoint_def.mpr |
| 60 | intro z hz hzero |
| 61 | obtain ⟨u, rfl⟩ := hz |
| 62 | have hu : (u : V) = 0 := hzero |
| 63 | have hu' : u = 0 := Subtype.ext hu |
| 64 | simp [hu'] |
| 65 | |
| 66 | lemma fiberGraph_image (U : Submodule F V) (f : U →ₗ[F] F) : |
| 67 | (fiberGraph U f).map (LinearMap.fst F V F) = U := by |
| 68 | ext v |
| 69 | constructor |
| 70 | · rintro ⟨z, ⟨u, rfl⟩, rfl⟩ |
| 71 | exact u.property |
| 72 | · intro hv |
| 73 | exact ⟨(v, f ⟨v, hv⟩), ⟨⟨v, hv⟩, rfl⟩, rfl⟩ |
| 74 | |
| 75 | def graphLift (U : Submodule F V) (f : U →ₗ[F] F) : DisjointLift U := |
| 76 | ⟨fiberGraph U f, fiberGraph_disjoint U f, fiberGraph_image U f⟩ |
| 77 | |
| 78 | lemma graphLift_injective (U : Submodule F V) : Function.Injective (graphLift U) := by |
| 79 | intro f g h |
| 80 | have heq : fiberGraph U f = fiberGraph U g := congrArg Subtype.val h |
| 81 | ext u |
| 82 | have hmem : ((u : V), f u) ∈ fiberGraph U g := heq ▸ ⟨u, rfl⟩ |
| 83 | obtain ⟨v, hv⟩ := hmem |
| 84 | have hvu : v = u := Subtype.ext (congrArg Prod.fst hv) |
| 85 | simpa [hvu] using (congrArg Prod.snd hv).symm |
| 86 | |
| 87 | def liftProjection (U : Submodule F V) (L : DisjointLift U) : L.val →ₗ[F] U := |
| 88 | ((LinearMap.fst F V F).comp L.val.subtype).codRestrict U fun z => by |
| 89 | change z.val.1 ∈ U |
| 90 | have hmem : z.val.1 ∈ L.val.map (LinearMap.fst F V F) := |
| 91 | ⟨z.val, z.property, rfl⟩ |
| 92 | simpa only [L.property.2] using hmem |
| 93 | |
| 94 | lemma liftProjection_bijective (U : Submodule F V) (L : DisjointLift U) : |
| 95 | Function.Bijective (liftProjection U L) := by |
| 96 | constructor |
| 97 | · intro a b h |
| 98 | have hab : a.val.1 = b.val.1 := congrArg Subtype.val h |
| 99 | have hz : a.val - b.val ∈ L.val ⊓ identityLine := |
| 100 | ⟨L.val.sub_mem a.property b.property, sub_eq_zero.mpr hab⟩ |
| 101 | have hzero : a.val - b.val = 0 := |
| 102 | Submodule.disjoint_def.mp L.property.1 _ hz.1 hz.2 |
| 103 | exact Subtype.ext (sub_eq_zero.mp hzero) |
| 104 | · intro u |
| 105 | have hu : (u : V) ∈ L.val.map (LinearMap.fst F V F) := |
| 106 | L.property.2.symm ▸ u.property |
| 107 | obtain ⟨z, hz, hzu⟩ := hu |
| 108 | exact ⟨⟨z, hz⟩, Subtype.ext hzu⟩ |
| 109 | |
| 110 | lemma graphLift_surjective (U : Submodule F V) : Function.Surjective (graphLift U) := by |
| 111 | intro L |
| 112 | let e := LinearEquiv.ofBijective (liftProjection U L) (liftProjection_bijective U L) |
| 113 | let f : U →ₗ[F] F := ((LinearMap.snd F V F).comp L.val.subtype).comp e.symm.toLinearMap |
| 114 | refine ⟨f, Subtype.ext ?_⟩ |
| 115 | apply le_antisymm |
| 116 | · rintro z ⟨u, rfl⟩ |
| 117 | have he : ((e.symm u : L.val) : V × F).1 = (u : V) := |
| 118 | congrArg Subtype.val (e.apply_symm_apply u) |
| 119 | have hz : (U.subtype.prod f) u = (e.symm u : V × F) := |
| 120 | Prod.ext he.symm rfl |
| 121 | rw [hz] |
| 122 | exact (e.symm u).property |
| 123 | · intro z hz |
| 124 | refine ⟨e ⟨z, hz⟩, ?_⟩ |
| 125 | apply Prod.ext |
| 126 | · rfl |
| 127 | · change ((e.symm (e ⟨z, hz⟩) : L.val) : V × F).2 = z.2 |
| 128 | rw [e.symm_apply_apply] |
| 129 | |
| 130 | /-- Every disjoint lift is a unique graph; the parametrization is proved. -/ |
| 131 | def disjointLiftEquiv (U : Submodule F V) : (U →ₗ[F] F) ≃ DisjointLift U := |
| 132 | Equiv.ofBijective (graphLift U) ⟨graphLift_injective U, graphLift_surjective U⟩ |
| 133 | |
| 134 | theorem disjointLift_card (U : Submodule F V) [Module.Finite F U] : |
| 135 | Nat.card (DisjointLift U) = Nat.card F ^ Module.finrank F U := by |
| 136 | rw [← Nat.card_congr (disjointLiftEquiv U), Module.natCard_eq_pow_finrank (K := F)] |
| 137 | simp |
| 138 | |
| 139 | lemma containingLift_eq_preimage (U : Submodule F V) (L : ContainingLift U) : |
| 140 | L.val = U.comap (LinearMap.fst F V F) := by |
| 141 | apply le_antisymm |
| 142 | · intro z hz |
| 143 | show z.1 ∈ U |
| 144 | rw [← L.property.2] |
| 145 | exact ⟨z, hz, rfl⟩ |
| 146 | · intro z hz |
| 147 | have hz' : z.1 ∈ L.val.map (LinearMap.fst F V F) := |
| 148 | L.property.2.symm ▸ hz |
| 149 | obtain ⟨w, hw, hwz⟩ := hz' |
| 150 | have hdiff : z - w ∈ identityLine := sub_eq_zero.mpr hwz.symm |
| 151 | have hsum := L.val.add_mem (L.property.1 hdiff) hw |
| 152 | simpa using hsum |
| 153 | |
| 154 | instance containingLift_unique (U : Submodule F V) : Unique (ContainingLift U) where |
| 155 | default := ⟨U.comap (LinearMap.fst F V F), |
| 156 | LinearMap.ker_le_comap _, |
| 157 | Submodule.map_comap_eq_of_surjective (fun v => ⟨(v, 0), rfl⟩) U⟩ |
| 158 | uniq L := Subtype.ext (containingLift_eq_preimage U L) |
| 159 | |
| 160 | theorem containingLift_card (U : Submodule F V) : Nat.card (ContainingLift U) = 1 := by |
| 161 | simp |
| 162 | |
| 163 | lemma disjointLift_finrank (U : Submodule F V) (L : DisjointLift U) : |
| 164 | Module.finrank F L.val = Module.finrank F U := |
| 165 | (LinearEquiv.ofBijective (liftProjection U L) (liftProjection_bijective U L)).finrank_eq |
| 166 | |
| 167 | def preimageEquiv (U : Submodule F V) : |
| 168 | U.comap (LinearMap.fst F V F) ≃ₗ[F] U × F where |
| 169 | toFun z := (⟨z.val.1, z.property⟩, z.val.2) |
| 170 | invFun z := ⟨(z.1.val, z.2), z.1.property⟩ |
| 171 | left_inv _ := rfl |
| 172 | right_inv _ := rfl |
| 173 | map_add' _ _ := rfl |
| 174 | map_smul' _ _ := rfl |
| 175 | |
| 176 | lemma containingLift_finrank (U : Submodule F V) [Module.Finite F U] |
| 177 | (L : ContainingLift U) : |
| 178 | Module.finrank F L.val = Module.finrank F U + 1 := by |
| 179 | rw [containingLift_eq_preimage U L, (preimageEquiv U).finrank_eq] |
| 180 | simp |
| 181 | |
| 182 | /-- A one-dimensional identity part meets a subspace in zero or in the entire line. -/ |
| 183 | theorem identityLine_dichotomy (L : Submodule F (V × F)) : |
| 184 | Disjoint L identityLine ∨ identityLine ≤ L := by |
| 185 | by_cases h : ((0 : V), (1 : F)) ∈ L |
| 186 | · right |
| 187 | rintro ⟨v, c⟩ hz |
| 188 | have hv : v = 0 := hz |
| 189 | subst v |
| 190 | simpa using L.smul_mem c h |
| 191 | · left |
| 192 | apply Submodule.disjoint_def.mpr |
| 193 | rintro ⟨v, c⟩ hz hz' |
| 194 | have hv : v = 0 := hz' |
| 195 | subst v |
| 196 | by_cases hc : c = 0 |
| 197 | · exact Prod.ext rfl hc |
| 198 | · have hmem := L.smul_mem c⁻¹ hz |
| 199 | have hunit : ((0 : V), (1 : F)) ∈ L := by |
| 200 | simpa [hc] using hmem |
| 201 | exact (h hunit).elim |
| 202 | |
| 203 | theorem line_cases [Module.Finite F V] (L : Submodule F (V × F)) |
| 204 | (hdim : Module.finrank F L = 1) : |
| 205 | L = identityLine ∨ |
| 206 | (Disjoint L identityLine ∧ Module.finrank F (L.map (LinearMap.fst F V F)) = 1) := by |
| 207 | rcases identityLine_dichotomy L with hd | hc |
| 208 | · right |
| 209 | exact ⟨hd, (disjointLift_finrank _ ⟨L, hd, rfl⟩).symm.trans hdim⟩ |
| 210 | · left |
| 211 | have hr : Module.finrank F L = |
| 212 | Module.finrank F (L.map (LinearMap.fst F V F)) + 1 := |
| 213 | containingLift_finrank _ ⟨L, hc, rfl⟩ |
| 214 | have hz : Module.finrank F (L.map (LinearMap.fst F V F)) = 0 := by omega |
| 215 | have hb : L.map (LinearMap.fst F V F) = ⊥ := Submodule.finrank_eq_zero.mp hz |
| 216 | have heq := containingLift_eq_preimage _ ⟨L, hc, rfl⟩ |
| 217 | simpa [hb, identityLine] using heq |
| 218 | |
| 219 | theorem plane_cases [Module.Finite F V] (hV : Module.finrank F V = 2) |
| 220 | (L : Submodule F (V × F)) (hdim : Module.finrank F L = 2) : |
| 221 | (identityLine ≤ L ∧ Module.finrank F (L.map (LinearMap.fst F V F)) = 1) ∨ |
| 222 | (Disjoint L identityLine ∧ L.map (LinearMap.fst F V F) = ⊤) := by |
| 223 | rcases identityLine_dichotomy L with hd | hc |
| 224 | · right |
| 225 | refine ⟨hd, Submodule.eq_top_of_finrank_eq ?_⟩ |
| 226 | exact (disjointLift_finrank _ ⟨L, hd, rfl⟩).symm.trans (hdim.trans hV.symm) |
| 227 | · left |
| 228 | have hr : Module.finrank F L = |
| 229 | Module.finrank F (L.map (LinearMap.fst F V F)) + 1 := |
| 230 | containingLift_finrank _ ⟨L, hc, rfl⟩ |
| 231 | exact ⟨hc, by omega⟩ |
| 232 | |
| 233 | theorem full_kernel_unique [Module.Finite F V] (hV : Module.finrank F V = 2) |
| 234 | (L : Submodule F (V × F)) (hdim : Module.finrank F L = 3) : L = ⊤ := by |
| 235 | apply Submodule.eq_top_of_finrank_eq |
| 236 | simpa [hV] using hdim |
| 237 | |
| 238 | /-- The two nontrivial coefficients of NeighborCounting, before the geometric bridge. -/ |
| 239 | theorem line_and_plane_lift_counts |
| 240 | (q : ℕ) (hcard : Nat.card F = q) |
| 241 | (U₁ U₂ : Submodule F V) [Module.Finite F U₁] [Module.Finite F U₂] |
| 242 | (h₁ : Module.finrank F U₁ = 1) (h₂ : Module.finrank F U₂ = 2) : |
| 243 | Nat.card (DisjointLift U₁) = q ∧ |
| 244 | Nat.card (DisjointLift U₂) = q ^ 2 ∧ |
| 245 | Nat.card (ContainingLift U₁) = 1 ∧ |
| 246 | Nat.card (ContainingLift U₂) = 1 := by |
| 247 | simp [disjointLift_card, hcard, h₁, h₂] |
| 248 | |
| 249 | lemma identityLine_not_le_of_disjoint (L : Submodule F (V × F)) |
| 250 | (h : Disjoint L identityLine) : ¬identityLine ≤ L := by |
| 251 | intro hc |
| 252 | have hz : ((0 : V), (1 : F)) = 0 := |
| 253 | Submodule.disjoint_def.mp h _ (hc (by rfl)) (by rfl) |
| 254 | exact one_ne_zero (congrArg Prod.snd hz) |
| 255 | |
| 256 | abbrev LiftData (F V : Type*) [Field F] [AddCommGroup V] [Module F V] := |
| 257 | Σ U : Submodule F V, DisjointLift U ⊕ ContainingLift U |
| 258 | |
| 259 | def liftForget : LiftData F V → Submodule F (V × F) |
| 260 | | ⟨_, Sum.inl L⟩ => L.val |
| 261 | | ⟨_, Sum.inr L⟩ => L.val |
| 262 | |
| 263 | lemma liftForget_injective : Function.Injective (liftForget (F := F) (V := V)) := by |
| 264 | rintro ⟨U, L | L⟩ ⟨W, M | M⟩ h |
| 265 | · have hUW : U = W := L.property.2.symm.trans |
| 266 | ((congrArg (Submodule.map (LinearMap.fst F V F)) h).trans M.property.2) |
| 267 | subst W |
| 268 | exact congrArg (fun N : DisjointLift U => (⟨U, Sum.inl N⟩ : LiftData F V)) |
| 269 | (Subtype.ext h) |
| 270 | · change L.val = M.val at h |
| 271 | exact (identityLine_not_le_of_disjoint L.val L.property.1 |
| 272 | (h.symm ▸ M.property.1)).elim |
| 273 | · change L.val = M.val at h |
| 274 | exact (identityLine_not_le_of_disjoint M.val M.property.1 |
| 275 | (h ▸ L.property.1)).elim |
| 276 | · have hUW : U = W := L.property.2.symm.trans |
| 277 | ((congrArg (Submodule.map (LinearMap.fst F V F)) h).trans M.property.2) |
| 278 | subst W |
| 279 | exact congrArg (fun N : ContainingLift U => (⟨U, Sum.inr N⟩ : LiftData F V)) |
| 280 | (Subtype.ext h) |
| 281 | |
| 282 | lemma liftForget_surjective : Function.Surjective (liftForget (F := F) (V := V)) := by |
| 283 | intro L |
| 284 | rcases identityLine_dichotomy L with hd | hc |
| 285 | · exact ⟨⟨L.map (LinearMap.fst F V F), Sum.inl ⟨L, hd, rfl⟩⟩, rfl⟩ |
| 286 | · exact ⟨⟨L.map (LinearMap.fst F V F), Sum.inr ⟨L, hc, rfl⟩⟩, rfl⟩ |
| 287 | |
| 288 | /-- Exhaustive classification, not merely a count of a chosen family of graphs. -/ |
| 289 | def allSubspacesEquiv : LiftData F V ≃ Submodule F (V × F) := |
| 290 | Equiv.ofBijective liftForget ⟨liftForget_injective, liftForget_surjective⟩ |
| 291 | |
| 292 | section Finite |
| 293 | |
| 294 | variable [Fintype F] [Fintype V] |
| 295 | |
| 296 | local instance submoduleFintype : Fintype (Submodule F V) := Fintype.ofFinite _ |
| 297 | local instance productSubmoduleFintype : Fintype (Submodule F (V × F)) := Fintype.ofFinite _ |
| 298 | local instance disjointLiftFintype (U : Submodule F V) : Fintype (DisjointLift U) := by |
| 299 | classical |
| 300 | exact inferInstanceAs (Fintype {L : Submodule F (V × F) // |
| 301 | Disjoint L identityLine ∧ L.map (LinearMap.fst F V F) = U}) |
| 302 | local instance containingLiftFintype (U : Submodule F V) : Fintype (ContainingLift U) := |
| 303 | Fintype.ofFinite _ |
| 304 | local instance liftDataFintype : Fintype (LiftData F V) := |
| 305 | inferInstanceAs (Fintype (Σ U : Submodule F V, DisjointLift U ⊕ ContainingLift U)) |
| 306 | |
| 307 | variable {A : Type*} [AddCommMonoid A] |
| 308 | |
| 309 | /-- The image and connected-part flag define the special subgroup label. -/ |
| 310 | def labeledReduction (i : ℕ) (R : Submodule F V → Bool → A) : A := by |
| 311 | classical |
| 312 | exact ∑ L : Submodule F (V × F), |
| 313 | if Module.finrank F L = i then |
| 314 | R (L.map (LinearMap.fst F V F)) (decide (identityLine ≤ L)) else 0 |
| 315 | |
| 316 | /-- General multiplicity formula, with no fiber cardinalities assumed. -/ |
| 317 | theorem labeledReduction_eq (i : ℕ) (R : Submodule F V → Bool → A) : |
| 318 | labeledReduction i R = |
| 319 | ∑ U : Submodule F V, |
| 320 | ((if Module.finrank F U = i then |
| 321 | (Nat.card F ^ Module.finrank F U) • R U false else 0) + |
| 322 | (if Module.finrank F U + 1 = i then R U true else 0)) := by |
| 323 | classical |
| 324 | unfold labeledReduction |
| 325 | rw [← (allSubspacesEquiv (F := F) (V := V)).sum_comp] |
| 326 | change (∑ d : (Σ U : Submodule F V, DisjointLift U ⊕ ContainingLift U), |
| 327 | if Module.finrank F (liftForget d) = i then |
| 328 | R ((liftForget d).map (LinearMap.fst F V F)) |
| 329 | (decide (identityLine ≤ liftForget d)) else 0) = _ |
| 330 | rw [Fintype.sum_sigma] |
| 331 | apply Finset.sum_congr rfl |
| 332 | intro U _ |
| 333 | rw [Fintype.sum_sum_type] |
| 334 | change |
| 335 | (∑ L : DisjointLift U, |
| 336 | if Module.finrank F L.val = i then |
| 337 | R (L.val.map (LinearMap.fst F V F)) (decide (identityLine ≤ L.val)) else 0) + |
| 338 | (∑ L : ContainingLift U, |
| 339 | if Module.finrank F L.val = i then |
| 340 | R (L.val.map (LinearMap.fst F V F)) (decide (identityLine ≤ L.val)) else 0) = _ |
| 341 | have hd : ∀ L : DisjointLift U, |
| 342 | (if Module.finrank F L.val = i then |
| 343 | R (L.val.map (LinearMap.fst F V F)) (decide (identityLine ≤ L.val)) else 0) = |
| 344 | (if Module.finrank F U = i then R U false else 0) := by |
| 345 | intro L |
| 346 | simp only [disjointLift_finrank U L, L.property.2, |
| 347 | decide_eq_false (identityLine_not_le_of_disjoint _ L.property.1)] |
| 348 | have hc : ∀ L : ContainingLift U, |
| 349 | (if Module.finrank F L.val = i then |
| 350 | R (L.val.map (LinearMap.fst F V F)) (decide (identityLine ≤ L.val)) else 0) = |
| 351 | (if Module.finrank F U + 1 = i then R U true else 0) := by |
| 352 | intro L |
| 353 | simp only [containingLift_finrank U L, L.property.2, decide_eq_true L.property.1] |
| 354 | simp_rw [hd, hc] |
| 355 | simp only [Finset.sum_const, Finset.card_univ, |
| 356 | Fintype.card_eq_nat_card, disjointLift_card, containingLift_card, one_nsmul] |
| 357 | split_ifs <;> simp |
| 358 | |
| 359 | theorem labeledReduction_one (R : Submodule F V → Bool → A) : |
| 360 | labeledReduction 1 R = R ⊥ true + |
| 361 | Nat.card F • ∑ U : Submodule F V, |
| 362 | if Module.finrank F U = 1 then R U false else 0 := by |
| 363 | classical |
| 364 | rw [labeledReduction_eq, Finset.sum_add_distrib] |
| 365 | have hleft : |
| 366 | (∑ U : Submodule F V, if Module.finrank F U = 1 then |
| 367 | Nat.card F ^ Module.finrank F U • R U false else 0) = |
| 368 | Nat.card F • ∑ U : Submodule F V, |
| 369 | if Module.finrank F U = 1 then R U false else 0 := by |
| 370 | rw [Finset.smul_sum] |
| 371 | apply Finset.sum_congr rfl |
| 372 | intro U _ |
| 373 | by_cases h : Module.finrank F U = 1 <;> simp [h] |
| 374 | have hright : |
| 375 | (∑ U : Submodule F V, if Module.finrank F U + 1 = 1 then R U true else 0) = |
| 376 | R ⊥ true := by |
| 377 | simp [Submodule.finrank_eq_zero] |
| 378 | rw [hleft, hright, add_comm] |
| 379 | |
| 380 | omit [Fintype F] in |
| 381 | lemma quotient_full_rank_iff (hV : Module.finrank F V = 2) (U : Submodule F V) : |
| 382 | Module.finrank F U = 2 ↔ U = ⊤ := by |
| 383 | constructor |
| 384 | · intro h |
| 385 | exact Submodule.eq_top_of_finrank_eq (h.trans hV.symm) |
| 386 | · rintro rfl |
| 387 | simpa using hV |
| 388 | |
| 389 | theorem labeledReduction_two (hV : Module.finrank F V = 2) |
| 390 | (R : Submodule F V → Bool → A) : |
| 391 | labeledReduction 2 R = |
| 392 | (∑ U : Submodule F V, if Module.finrank F U = 1 then R U true else 0) + |
| 393 | (Nat.card F ^ 2) • R ⊤ false := by |
| 394 | classical |
| 395 | rw [labeledReduction_eq, Finset.sum_add_distrib] |
| 396 | have hleft : |
| 397 | (∑ U : Submodule F V, if Module.finrank F U = 2 then |
| 398 | Nat.card F ^ Module.finrank F U • R U false else 0) = |
| 399 | Nat.card F ^ 2 • R ⊤ false := by |
| 400 | simp [quotient_full_rank_iff hV, hV] |
| 401 | have hright : |
| 402 | (∑ U : Submodule F V, if Module.finrank F U + 1 = 2 then R U true else 0) = |
| 403 | ∑ U : Submodule F V, if Module.finrank F U = 1 then R U true else 0 := by |
| 404 | apply Finset.sum_congr rfl |
| 405 | intro U _ |
| 406 | have h : Module.finrank F U + 1 = 2 ↔ Module.finrank F U = 1 := by omega |
| 407 | simp only [h] |
| 408 | rw [hleft, hright, add_comm] |
| 409 | |
| 410 | theorem labeledReduction_three (hV : Module.finrank F V = 2) |
| 411 | (R : Submodule F V → Bool → A) : labeledReduction 3 R = R ⊤ true := by |
| 412 | classical |
| 413 | rw [labeledReduction_eq, Finset.sum_add_distrib] |
| 414 | have hleft : |
| 415 | (∑ U : Submodule F V, if Module.finrank F U = 3 then |
| 416 | Nat.card F ^ Module.finrank F U • R U false else 0) = 0 := by |
| 417 | apply Finset.sum_eq_zero |
| 418 | intro U _ |
| 419 | have hle : Module.finrank F U ≤ 2 := U.finrank_le.trans_eq hV |
| 420 | simp [show Module.finrank F U ≠ 3 by omega] |
| 421 | have hright : |
| 422 | (∑ U : Submodule F V, if Module.finrank F U + 1 = 3 then R U true else 0) = |
| 423 | R ⊤ true := by |
| 424 | have h : ∀ U : Submodule F V, |
| 425 | Module.finrank F U + 1 = 3 ↔ U = ⊤ := by |
| 426 | intro U |
| 427 | rw [← quotient_full_rank_iff hV] |
| 428 | omega |
| 429 | simp [h] |
| 430 | rw [hleft, hright, zero_add] |
| 431 | |
| 432 | end Finite |
| 433 | |
| 434 | /-- The commutation part of FrobeniusKernel puts both mixed terms in the target's order. -/ |
| 435 | theorem mixed_term_order_of_FrobeniusKernel |
| 436 | {P : Type*} (X Z : P → P) (Y : P → Multiset P) |
| 437 | (h_FrobeniusKernel : |
| 438 | (∀ x, (Y x).map X = Y (X x)) ∧ |
| 439 | (∀ x, X (Z x) = Z (X x))) (x : P) : |
| 440 | (Y x).map X = Y (X x) ∧ |
| 441 | ({X (Z x)} : Multiset P) = {Z (X x)} := by |
| 442 | exact ⟨h_FrobeniusKernel.1 x, congrArg (fun p => ({p} : Multiset P)) (h_FrobeniusKernel.2 x)⟩ |
| 443 | |
| 444 | /-- An interface counterexample: even all operator commutation identities and |
| 445 | the correct number of etale lines leave a separately supplied raw multiset |
| 446 | unconstrained. This does not refute the manuscript's geometric construction. -/ |
| 447 | theorem raw_neighbors_not_determined_by_operator_identities (q : ℕ) : |
| 448 | ∃ (X Z : Unit → Unit) (Y : Unit → Multiset Unit) |
| 449 | (raw : Unit → ℕ → Multiset Unit), |
| 450 | (∀ x, (Y x).map X = Y (X x)) ∧ |
| 451 | (∀ x, X (Z x) = Z (X x)) ∧ |
| 452 | (∀ x, (Y x).card = q + 1) ∧ |
| 453 | raw () 1 ≠ ({X ()} : Multiset Unit) + q • Y () := by |
| 454 | refine ⟨id, id, fun _ => Multiset.replicate (q + 1) (), fun _ _ => 0, |
| 455 | ?_, ?_, ?_, ?_⟩ |
| 456 | · intro x |
| 457 | simp |
| 458 | · intro x |
| 459 | rfl |
| 460 | · intro x |
| 461 | exact Multiset.card_replicate _ _ |
| 462 | · intro h |
| 463 | have hc := congrArg Multiset.card h |
| 464 | simp only [Multiset.card_zero, Multiset.card_add, Multiset.card_singleton, |
| 465 | Multiset.card_nsmul, Multiset.card_replicate] at hc |
| 466 | omega |
| 467 | |
| 468 | end |
| 469 | |
| 470 | end OAI.AlgebraicGeometry.Isogenies.NeighborCounting.SubspaceCounts.Construction |