File size: 2,193 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import OAI.AlgebraicGeometry.Isogenies.NeighborCounting.CompactTypedChoices
import Mathlib.Algebra.Group.ULift

/-! # Compact Choice Existence -/

namespace OAI.AlgebraicGeometry.Isogenies.NeighborCounting.CompactChoiceExistence

noncomputable section

/-! A constructed rank-three coordinate equivalence supplies the
compact subgroup of the original elementary type. Together with the
cardinality argument this proves existence and uniqueness, preserving
the entire subgroup or the identity subgroup as appropriate. -/

open OAI.AlgebraicGeometry.Isogenies.NeighborCounting.CompactTypedChoices

variable (q m : ℕ) [NeZero q] (G : Type) [AddCommGroup G]
  (e : G ≃+ (Fin 3 → ZMod (q ^ m)))

def compactTypedChoice (flag : Bool) :
    {J : AddSubgroup G //
      Nonempty (J ≃+ AbelianScheme.IsogenyQuotient.ElementaryModules.Construction.RankThreeElementaryModule.{0} q (fun _ => if flag then m else 0))} := by
  cases flag with
  | false =>
    refine ⟨⊥, ⟨?_⟩⟩
    change (⊥ : AddSubgroup G) ≃+ ULift (Fin 3 → ZMod 1)
    let : Unique (ULift (Fin 3 → ZMod 1)) := Unique.mk' _
    exact AddEquiv.ofUnique
  | true =>
    exact ⟨⊤, ⟨AddSubgroup.topEquiv.trans (e.trans AddEquiv.ulift.symm)⟩⟩

omit [NeZero q] in
theorem compactTypedChoice_subgroup (flag : Bool) :
    (compactTypedChoice q m G e flag).val = if flag then ⊤ else ⊥ := by
  cases flag <;> rfl

include e in
theorem compactTypedChoice_unique (flag : Bool)
    (J : {J : AddSubgroup G //
      Nonempty (J ≃+ AbelianScheme.IsogenyQuotient.ElementaryModules.Construction.RankThreeElementaryModule.{0} q (fun _ => if flag then m else 0))}) :
    J = compactTypedChoice q m G e flag := by
  have : Finite G := Finite.of_equiv (Fin 3 → ZMod (q ^ m)) e.symm.toEquiv
  have hc : Nat.card G = (q ^ m) ^ 3 := by
    simpa only [Nat.card_pi, Nat.card_zmod, Finset.prod_const, Finset.card_univ,
      Fintype.card_fin] using Nat.card_congr e.toEquiv
  apply Subtype.ext
  exact (CompactTypedChoices.typed_compact_subgroup_eq q m G hc flag J.val J.property).trans
    (compactTypedChoice_subgroup q m G e flag).symm

end

end OAI.AlgebraicGeometry.Isogenies.NeighborCounting.CompactChoiceExistence