|
| 1 | +import Start.StarHeightHCore |
| 2 | +import Start.StarHeightA4Core |
| 3 | +import Start.StarHeightZ4ModTwo |
| 4 | +import Start.StarHeightS4 |
| 5 | + |
| 6 | +/-! |
| 7 | +# The `H`-core modulo `2`, and the wreath product principle at exponent `2` |
| 8 | +
|
| 9 | +* `HCoreModTwo H`: every prefix-product count `hcount ρ g x` of `H` has height at most one |
| 10 | + modulo `2`. It follows from `HCoreHeightOne H` (`HCoreHeightOne.modTwo`) and depends only on |
| 11 | + `H` up to isomorphism (`HCoreModTwo.of_mulEquiv`). |
| 12 | +* `hcoreModTwo_zmod_four`: the `ZMod 4`-core modulo `2` holds (from `vcount_z4_mod_two_height`); |
| 13 | + `hcoreModTwo_zmod_prime`: so does the `ZMod p`-core for every prime `p`. |
| 14 | +* `height_one_of_exponent_two_normal_of_core_mod_two`: if `N` is an abelian normal subgroup of a |
| 15 | + finite group `G` with `x * x = 1` on `N`, and the `G ⧸ N`-core modulo `2` holds, every language |
| 16 | + recognized by `G` has height at most one (`..._equiv` for `G ⧸ N ≃* H`). The proof is that of |
| 17 | + `height_one_of_abelian_normal_of_core_equiv` with modulus `2` in place of `2 · |N|`: the |
| 18 | + kernel value only needs the counts modulo `2` (`valN_mod_two`), and the final state of the |
| 19 | + quotient walk is recovered from the counts modulo `2` by the flow identity. |
| 20 | +* `height_one_S4_of_core_mod_two`: every language recognized by `S₄`, from the `S₃`-core |
| 21 | + modulo `2` (the Klein kernel has exponent `2`). |
| 22 | +* `height_one_of_central_order_two_of_core_mod_two`: a group with a central subgroup of order |
| 23 | + `2` over a quotient whose core modulo `2` holds (e.g. `SL(2,3)` over `A₄`). |
| 24 | +-/ |
| 25 | + |
| 26 | +namespace GeneralizedStarHeight |
| 27 | + |
| 28 | +universe u |
| 29 | + |
| 30 | +open EpisodeAlgebra |
| 31 | +open scoped Computability |
| 32 | + |
| 33 | +/-- **The `H`-core modulo `2`.** Every prefix-product count of `H` has height at most one |
| 34 | +modulo `2`. -/ |
| 35 | +def HCoreModTwo (H : Type) [Group H] : Prop := |
| 36 | + ∀ (α : Type) [Fintype α] [DecidableEq α] (ρ : α → H) (x : α) (g : H) (k : ℕ), k < 2 → |
| 37 | + HasHeightAtMost {w : List α | hcount ρ g x w % 2 = k} 1 |
| 38 | + |
| 39 | +/-- The core for every modulus gives the core modulo `2`. -/ |
| 40 | +theorem HCoreHeightOne.modTwo {H : Type} [Group H] (h : HCoreHeightOne H) : HCoreModTwo H := |
| 41 | + fun α _ _ ρ x g k hk => h α ρ x g 2 k hk |
| 42 | + |
| 43 | +namespace HCoreModTwo |
| 44 | + |
| 45 | +variable {H : Type} [Group H] |
| 46 | + |
| 47 | +/-- The core property modulo `2` is invariant under isomorphism. -/ |
| 48 | +theorem of_mulEquiv {H' : Type} [Group H'] (f : H ≃* H') (h : HCoreModTwo H) : |
| 49 | + HCoreModTwo H' := by |
| 50 | + intro α _ _ ρ x g k hk |
| 51 | + have := h α (fun a => f.symm (ρ a)) x (f.symm g) k hk |
| 52 | + have heq : ({w : List α | hcount ρ g x w % 2 = k} : Language α) = |
| 53 | + {w | hcount (fun a => f.symm (ρ a)) (f.symm g) x w % 2 = k} := by |
| 54 | + ext w |
| 55 | + show hcount ρ g x w % 2 = k ↔ hcount _ _ x w % 2 = k |
| 56 | + rw [hcount_eq_hcountFrom, hcount_eq_hcountFrom, |
| 57 | + ← hcountFrom_mulEquiv f (fun a => f.symm (ρ a)) (f.symm g) x 1 w] |
| 58 | + simp |
| 59 | + rw [heq] |
| 60 | + exact this |
| 61 | + |
| 62 | +/-- The core property modulo `2` for alphabets in any universe. -/ |
| 63 | +theorem univ (h : HCoreModTwo H) {α : Type u} [Finite α] [DecidableEq α] (ρ : α → H) (x : α) |
| 64 | + (g : H) (k : ℕ) (hk : k < 2) : |
| 65 | + HasHeightAtMost {w : List α | hcount ρ g x w % 2 = k} 1 := by |
| 66 | + obtain ⟨m, ⟨e⟩⟩ := Finite.exists_equiv_fin α |
| 67 | + have h0 := h (Fin m) (fun i => ρ (e.symm i)) (e x) g k hk |
| 68 | + have heq : {w : List α | hcount ρ g x w % 2 = k} = |
| 69 | + invAlph (fun a => some (e a)) {u | hcount (fun i => ρ (e.symm i)) g (e x) u % 2 = k} := by |
| 70 | + ext w |
| 71 | + have hfm : w.filterMap (fun a => some (e a)) = w.map e := by |
| 72 | + induction w with |
| 73 | + | nil => rfl |
| 74 | + | cons b w ih => simp [ih] |
| 75 | + show _ % 2 = k ↔ hcount _ g (e x) (w.filterMap _) % 2 = k |
| 76 | + rw [hfm, hcount_eq_hcountFrom, hcount_eq_hcountFrom, hcountFrom_map e e.injective] |
| 77 | + have : ((fun i => ρ (e.symm i)) ∘ e) = ρ := funext fun a => by simp |
| 78 | + rw [this] |
| 79 | + rw [heq] |
| 80 | + exact h0.invAlph _ |
| 81 | + |
| 82 | +end HCoreModTwo |
| 83 | + |
| 84 | +/-- **The `ZMod 4`-core modulo `2`.** -/ |
| 85 | +theorem hcoreModTwo_zmod_four : HCoreModTwo (Multiplicative (ZMod 4)) := by |
| 86 | + intro α _ _ ρ x g k hk |
| 87 | + have := vcount_z4_mod_two_height (fun a => Multiplicative.toAdd (ρ a)) (Multiplicative.toAdd g) |
| 88 | + x k hk |
| 89 | + simpa only [← hcount_ofAdd_eq_vcount, ofAdd_toAdd] using this |
| 90 | + |
| 91 | +/-- **The `ZMod p`-core modulo `2`**, for every prime `p`. -/ |
| 92 | +theorem hcoreModTwo_zmod_prime (p : ℕ) [Fact p.Prime] : HCoreModTwo (Multiplicative (ZMod p)) := |
| 93 | + (hcore_zmod_prime p).modTwo |
| 94 | + |
| 95 | +/-! ### The reduction at exponent `2` -/ |
| 96 | + |
| 97 | +section Assembly |
| 98 | + |
| 99 | +open Classical |
| 100 | + |
| 101 | +variable {Alphabet : Type u} |
| 102 | + |
| 103 | +/-- **Reduction to the core modulo `2`, through an isomorphism.** Let `N` be an abelian normal |
| 104 | +subgroup of a finite group `G` in which every element has order at most `2`. If `G ⧸ N ≃* H` |
| 105 | +and the `H`-core modulo `2` holds, every language recognized by `G` has generalized star height |
| 106 | +at most one. -/ |
| 107 | +theorem height_one_of_exponent_two_normal_of_core_mod_two_equiv [Finite Alphabet] {G : Type} |
| 108 | + [Group G] [Fintype G] (N : Subgroup G) [N.Normal] (hab : ∀ x ∈ N, ∀ y ∈ N, x * y = y * x) |
| 109 | + (hexp : ∀ x ∈ N, x * x = 1) {H : Type} [Group H] (e : G ⧸ N ≃* H) (hcore : HCoreModTwo H) |
| 110 | + (T : FreeMonoid Alphabet →* G) (F : Set G) : |
| 111 | + HasHeightAtMost {w | T (FreeMonoid.ofList w) ∈ F} 1 := by |
| 112 | + have := Fintype.ofFinite Alphabet |
| 113 | + have : Fintype (G ⧸ N) := Fintype.ofFinite _ |
| 114 | + have hcore' : HCoreModTwo (G ⧸ N) := hcore.of_mulEquiv e.symm |
| 115 | + let ρ : Alphabet → G ⧸ N := fun b => psi N T (FreeMonoid.of b) |
| 116 | + let cnt : (G ⧸ N) × Alphabet → List Alphabet → ℕ := fun pr w => (tpairs N T 1 w).count pr |
| 117 | + have hval : ∀ w : List Alphabet, T (FreeMonoid.ofList w) = |
| 118 | + (valN N T hab (fun pr => cnt pr w % 2) : G) * rep N (psi N T (FreeMonoid.ofList w)) := by |
| 119 | + intro w |
| 120 | + have ht := telescope N T 1 w |
| 121 | + rw [rep_one, one_mul, one_mul, list_prod_cv N T hab, mul_inv_eq_iff_eq_mul, |
| 122 | + valN_mod_card N T hab (fun pr => (tpairs N T 1 w).count pr), valN_mod_two N T hab hexp] at ht |
| 123 | + exact ht |
| 124 | + -- the final state from the counts modulo `2` |
| 125 | + let fin : ((G ⧸ N) × Alphabet → ℕ) → (G ⧸ N) → Prop := fun r q => |
| 126 | + (if q = 1 then 1 else 0 : ZMod 2) + |
| 127 | + ∑ x, ((r (q * (ρ x)⁻¹, x) : ZMod 2) + (r (q, x) : ZMod 2)) = 1 |
| 128 | + have hfin : ∀ (w : List Alphabet) (q : G ⧸ N), |
| 129 | + fin (fun pr => cnt pr w % 2) q ↔ psi N T (FreeMonoid.ofList w) = q := by |
| 130 | + intro w q |
| 131 | + have hmod : ∀ c : ℕ, ((c % 2 : ℕ) : ZMod 2) = (c : ZMod 2) := fun c => ZMod.natCast_mod c 2 |
| 132 | + have hid := congrArg (fun n : ℕ => (n : ZMod 2)) (flow_identity N T q w 1) |
| 133 | + simp only [one_mul, Nat.cast_add, Nat.cast_sum] at hid |
| 134 | + show (if q = 1 then 1 else 0 : ZMod 2) + |
| 135 | + ∑ x, (((cnt (q * (ρ x)⁻¹, x) w % 2 : ℕ) : ZMod 2) + ((cnt (q, x) w % 2 : ℕ) : ZMod 2)) = 1 ↔ _ |
| 136 | + simp only [hmod, Finset.sum_add_distrib] |
| 137 | + have hc : ∀ (P : Prop) [Decidable P], (((if P then 1 else 0 : ℕ)) : ZMod 2) = |
| 138 | + if P then 1 else 0 := fun P _ => by split_ifs <;> simp |
| 139 | + rw [hc, hc] at hid |
| 140 | + have h2 : ∀ z : ZMod 2, z + z = 0 := by decide |
| 141 | + have key : (if q = 1 then 1 else 0 : ZMod 2) + ((∑ x, (cnt (q * (ρ x)⁻¹, x) w : ZMod 2)) + |
| 142 | + ∑ x, (cnt (q, x) w : ZMod 2)) = |
| 143 | + if psi N T (FreeMonoid.ofList w) = q then 1 else 0 := by |
| 144 | + have hq1 : (if (1 : G ⧸ N) = q then 1 else 0 : ZMod 2) = if q = 1 then 1 else 0 := by |
| 145 | + simp only [eq_comm] |
| 146 | + rw [hq1] at hid |
| 147 | + calc _ = ((∑ x, (cnt (q * (ρ x)⁻¹, x) w : ZMod 2)) + (if q = 1 then 1 else 0 : ZMod 2)) + |
| 148 | + ∑ x, (cnt (q, x) w : ZMod 2) := by ring |
| 149 | + _ = _ := by |
| 150 | + rw [show (∑ x, (cnt (q * (ρ x)⁻¹, x) w : ZMod 2)) = ∑ x, |
| 151 | + ((tpairs N T 1 w).count (q * (psi N T (FreeMonoid.of x))⁻¹, x) : ZMod 2) from rfl, |
| 152 | + hid] |
| 153 | + rw [show (∑ x, (cnt (q, x) w : ZMod 2)) = ∑ x, ((tpairs N T 1 w).count (q, x) : ZMod 2) |
| 154 | + from rfl] |
| 155 | + rw [add_right_comm, h2, zero_add] |
| 156 | + rw [key] |
| 157 | + split_ifs with h |
| 158 | + · simp [h] |
| 159 | + · simp only [zero_ne_one, false_iff]; exact h |
| 160 | + refine height_one_of_residues_univ (ι := (G ⧸ N) × Alphabet) cnt (M := 2) (by norm_num) ?_ _ |
| 161 | + (fun r => ∃ q, fin r q ∧ (valN N T hab r : G) * rep N q ∈ F) ?_ |
| 162 | + · intro pr r hr |
| 163 | + have := hcore'.univ ρ pr.2 pr.1 r hr |
| 164 | + have heq : ({w | cnt pr w % 2 = r} : Language Alphabet) = {w | hcount ρ pr.1 pr.2 w % 2 = r} := by |
| 165 | + ext w |
| 166 | + show (tpairs N T 1 w).count pr % 2 = r ↔ hcount ρ pr.1 pr.2 w % 2 = r |
| 167 | + rw [hcount_eq_hcountFrom, ← tpairs_count_eq_hcountFrom] |
| 168 | + rw [heq] |
| 169 | + exact this |
| 170 | + · intro w |
| 171 | + show T (FreeMonoid.ofList w) ∈ F ↔ _ |
| 172 | + constructor |
| 173 | + · intro hw |
| 174 | + exact ⟨psi N T (FreeMonoid.ofList w), (hfin w _).mpr rfl, by rw [← hval]; exact hw⟩ |
| 175 | + · rintro ⟨q, hq, hF⟩ |
| 176 | + have hpq := (hfin w q).mp hq |
| 177 | + rw [hval, hpq] |
| 178 | + exact hF |
| 179 | + |
| 180 | +/-- **The wreath product principle at exponent `2`, with the core modulo `2`.** If `N` is an |
| 181 | +abelian normal subgroup of a finite group `G` in which every element has order at most `2`, and |
| 182 | +the `G ⧸ N`-core modulo `2` holds, every language recognized by `G` has generalized star height |
| 183 | +at most one. No hypothesis on the fibres of the walk in `G ⧸ N` is needed. -/ |
| 184 | +theorem height_one_of_exponent_two_normal_of_core_mod_two [Finite Alphabet] {G : Type} [Group G] |
| 185 | + [Fintype G] (N : Subgroup G) [N.Normal] (hab : ∀ x ∈ N, ∀ y ∈ N, x * y = y * x) |
| 186 | + (hexp : ∀ x ∈ N, x * x = 1) (hcore : HCoreModTwo (G ⧸ N)) (T : FreeMonoid Alphabet →* G) |
| 187 | + (F : Set G) : HasHeightAtMost {w | T (FreeMonoid.ofList w) ∈ F} 1 := |
| 188 | + height_one_of_exponent_two_normal_of_core_mod_two_equiv N hab hexp (MulEquiv.refl _) hcore T F |
| 189 | + |
| 190 | +/-- **A central subgroup of order `2`.** If `N` is a central subgroup of order `2` of a finite |
| 191 | +group `G`, `G ⧸ N ≃* H` and the `H`-core modulo `2` holds, every language recognized by `G` has |
| 192 | +generalized star height at most one. -/ |
| 193 | +theorem height_one_of_central_order_two_of_core_mod_two [Finite Alphabet] {G : Type} [Group G] |
| 194 | + [Fintype G] (N : Subgroup G) [N.Normal] (hcen : ∀ x ∈ N, ∀ y : G, x * y = y * x) |
| 195 | + (hcard : Nat.card N = 2) {H : Type} [Group H] (e : G ⧸ N ≃* H) (hcore : HCoreModTwo H) (T : FreeMonoid Alphabet →* G) |
| 196 | + (F : Set G) : HasHeightAtMost {w | T (FreeMonoid.ofList w) ∈ F} 1 := by |
| 197 | + refine height_one_of_exponent_two_normal_of_core_mod_two_equiv N (fun x hx y _ => hcen x hx y) |
| 198 | + (fun x hx => ?_) e hcore T F |
| 199 | + have h1 : (⟨x, hx⟩ : N) ^ Nat.card N = 1 := pow_card_eq_one' |
| 200 | + rw [hcard, pow_two] at h1 |
| 201 | + exact congrArg Subtype.val h1 |
| 202 | + |
| 203 | +/-- **A central extension of `A₄` by `Z₂`** (such as `SL(2,3)`): if the `A₄`-core modulo `2` |
| 204 | +holds, every language recognized by `G` has generalized star height at most one. -/ |
| 205 | +theorem height_one_of_central_order_two_over_A4_of_core_mod_two [Finite Alphabet] {G : Type} |
| 206 | + [Group G] [Fintype G] (N : Subgroup G) [N.Normal] (hcen : ∀ x ∈ N, ∀ y : G, x * y = y * x) |
| 207 | + (hcard : Nat.card N = 2) (e : G ⧸ N ≃* alternatingGroup (Fin 4)) |
| 208 | + (hcore : HCoreModTwo (alternatingGroup (Fin 4))) (T : FreeMonoid Alphabet →* G) (F : Set G) : |
| 209 | + HasHeightAtMost {w | T (FreeMonoid.ofList w) ∈ F} 1 := |
| 210 | + height_one_of_central_order_two_of_core_mod_two N hcen hcard e hcore T F |
| 211 | + |
| 212 | +end Assembly |
| 213 | + |
| 214 | +/-! ### `S₄` over the `S₃`-core modulo `2` -/ |
| 215 | + |
| 216 | +/-- The Klein kernel of `S₄ → S₃` has exponent `2`. -/ |
| 217 | +lemma S4Klein.ker_sq : ∀ x ∈ S4Klein.kleinHom.ker, x * x = 1 := by |
| 218 | + intro x hx |
| 219 | + ext i |
| 220 | + simp only [Equiv.Perm.coe_mul, Function.comp_apply, Equiv.Perm.coe_one, id_eq] |
| 221 | + rw [S4Klein.mem_ker_apply hx (x i), S4Klein.mem_ker_apply hx i] |
| 222 | + generalize x 0 = a |
| 223 | + revert a i |
| 224 | + decide |
| 225 | + |
| 226 | +/-- **`S₄` over the `S₃`-core modulo `2`.** If the `S₃`-core holds modulo `2`, every language |
| 227 | +recognized by `S₄` has generalized star height at most one. -/ |
| 228 | +theorem height_one_S4_of_core_mod_two (hcore : HCoreModTwo (Equiv.Perm (Fin 3))) |
| 229 | + {Alphabet : Type u} [Finite Alphabet] (T : FreeMonoid Alphabet →* Equiv.Perm (Fin 4)) |
| 230 | + (F : Set (Equiv.Perm (Fin 4))) : |
| 231 | + HasHeightAtMost {w | T (FreeMonoid.ofList w) ∈ F} 1 := |
| 232 | + height_one_of_exponent_two_normal_of_core_mod_two_equiv S4Klein.kleinHom.ker S4Klein.ker_comm |
| 233 | + S4Klein.ker_sq S4Klein.quotEquiv hcore T F |
| 234 | + |
| 235 | +end GeneralizedStarHeight |
0 commit comments