Theorem: Sylow.exists_subgroup_card_pow_succ
File: Mathlib/GroupTheory/Sylow.lean

tactic: rw [← card_eq_card_quotient_mul_card_subgroup H, hH, hs, pow_succ', mul_assoc, mul_comm p]
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p n : ℕ
hp : Fact (Nat.Prime p)
hdvd : p ^ (n + 1) ∣ Fintype.card G
H : Subgroup G
hH : Fintype.card { x // x ∈ H } = p ^ n
s : ℕ
hs : Fintype.card G = s * p ^ (n + 1)
⊢ Fintype.card (G ⧸ H) * Fintype.card { x // x ∈ H } = s * p * Fintype.card { x // x ∈ H }

tactic: rwa [Nat.mod_eq_zero_of_dvd (dvd_mul_left _ _), eq_comm] at hm
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p n : ℕ
hp : Fact (Nat.Prime p)
hdvd : p ^ (n + 1) ∣ Fintype.card G
H : Subgroup G
hH : Fintype.card { x // x ∈ H } = p ^ n
s : ℕ
hs : Fintype.card G = s * p ^ (n + 1)
hcard : Fintype.card (G ⧸ H) = s * p
hm : s * p % p = Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)) % p
⊢ Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)) % p = 0

tactic: show Fintype.card (Subgroup.map H.normalizer.subtype
          (comap (mk' (H.subgroupOf H.normalizer)) (Subgroup.zpowers x))) = p ^ (n + 1)
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p n : ℕ
hp : Fact (Nat.Prime p)
hdvd : p ^ (n + 1) ∣ Fintype.card G
H : Subgroup G
hH : Fintype.card { x // x ∈ H } = p ^ n
s : ℕ
hs : Fintype.card G = s * p ^ (n + 1)
hcard : Fintype.card (G ⧸ H) = s * p
hm : s * p % p = Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)) % p
hm' : p ∣ Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H))
x : { x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)
hx : orderOf x = p
hequiv : { x // x ∈ H } ≃ { x // x ∈ subgroupOf H (normalizer H) }
⊢ Fintype.card
      { x_1 //
        x_1 ∈
          Subgroup.map (Subgroup.subtype (normalizer H))
            (Subgroup.comap (mk' (subgroupOf H (normalizer H))) (zpowers x)) } =
    p ^ (n + 1)

tactic: suffices Fintype.card (Subtype.val ''
          (Subgroup.comap (mk' (H.subgroupOf H.normalizer)) (zpowers x) : Set H.normalizer)) =
    p ^ (n + 1)
  by convert this using 2
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p n : ℕ
hp : Fact (Nat.Prime p)
hdvd : p ^ (n + 1) ∣ Fintype.card G
H : Subgroup G
hH : Fintype.card { x // x ∈ H } = p ^ n
s : ℕ
hs : Fintype.card G = s * p ^ (n + 1)
hcard : Fintype.card (G ⧸ H) = s * p
hm : s * p % p = Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)) % p
hm' : p ∣ Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H))
x : { x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)
hx : orderOf x = p
hequiv : { x // x ∈ H } ≃ { x // x ∈ subgroupOf H (normalizer H) }
⊢ Fintype.card
      { x_1 //
        x_1 ∈
          Subgroup.map (Subgroup.subtype (normalizer H))
            (Subgroup.comap (mk' (subgroupOf H (normalizer H))) (zpowers x)) } =
    p ^ (n + 1)

tactic: rw [Set.card_image_of_injective
    (Subgroup.comap (mk' (H.subgroupOf H.normalizer)) (zpowers x) : Set H.normalizer)
    Subtype.val_injective,
  pow_succ', ← hH, Fintype.card_congr hequiv, ← hx, orderOf_eq_card_zpowers, ←
  Fintype.card_prod]
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p n : ℕ
hp : Fact (Nat.Prime p)
hdvd : p ^ (n + 1) ∣ Fintype.card G
H : Subgroup G
hH : Fintype.card { x // x ∈ H } = p ^ n
s : ℕ
hs : Fintype.card G = s * p ^ (n + 1)
hcard : Fintype.card (G ⧸ H) = s * p
hm : s * p % p = Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)) % p
hm' : p ∣ Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H))
x : { x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)
hx : orderOf x = p
hequiv : { x // x ∈ H } ≃ { x // x ∈ subgroupOf H (normalizer H) }
⊢ Fintype.card ↑(Subtype.val '' ↑(Subgroup.comap (mk' (subgroupOf H (normalizer H))) (zpowers x))) = p ^ (n + 1)

tactic: exact @Fintype.card_congr _ _ (_) (_)
  (preimageMkEquivSubgroupProdSet (H.subgroupOf H.normalizer) (zpowers x))
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p n : ℕ
hp : Fact (Nat.Prime p)
hdvd : p ^ (n + 1) ∣ Fintype.card G
H : Subgroup G
hH : Fintype.card { x // x ∈ H } = p ^ n
s : ℕ
hs : Fintype.card G = s * p ^ (n + 1)
hcard : Fintype.card (G ⧸ H) = s * p
hm : s * p % p = Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)) % p
hm' : p ∣ Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H))
x : { x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)
hx : orderOf x = p
hequiv : { x // x ∈ H } ≃ { x // x ∈ subgroupOf H (normalizer H) }
⊢ Fintype.card ↑↑(Subgroup.comap (mk' (subgroupOf H (normalizer H))) (zpowers x)) =
    Fintype.card ({ x // x ∈ subgroupOf H (normalizer H) } × { x_1 // x_1 ∈ zpowers x })

tactic: convert this using 2
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p n : ℕ
hp : Fact (Nat.Prime p)
hdvd : p ^ (n + 1) ∣ Fintype.card G
H : Subgroup G
hH : Fintype.card { x // x ∈ H } = p ^ n
s : ℕ
hs : Fintype.card G = s * p ^ (n + 1)
hcard : Fintype.card (G ⧸ H) = s * p
hm : s * p % p = Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)) % p
hm' : p ∣ Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H))
x : { x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)
hx : orderOf x = p
hequiv : { x // x ∈ H } ≃ { x // x ∈ subgroupOf H (normalizer H) }
this : Fintype.card ↑(Subtype.val '' ↑(Subgroup.comap (mk' (subgroupOf H (normalizer H))) (zpowers x))) = p ^ (n + 1)
⊢ Fintype.card
      { x_1 //
        x_1 ∈
          Subgroup.map (Subgroup.subtype (normalizer H))
            (Subgroup.comap (mk' (subgroupOf H (normalizer H))) (zpowers x)) } =
    p ^ (n + 1)

tactic: intro y hy
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p n : ℕ
hp : Fact (Nat.Prime p)
hdvd : p ^ (n + 1) ∣ Fintype.card G
H : Subgroup G
hH : Fintype.card { x // x ∈ H } = p ^ n
s : ℕ
hs : Fintype.card G = s * p ^ (n + 1)
hcard : Fintype.card (G ⧸ H) = s * p
hm : s * p % p = Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)) % p
hm' : p ∣ Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H))
x : { x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)
hx : orderOf x = p
hequiv : { x // x ∈ H } ≃ { x // x ∈ subgroupOf H (normalizer H) }
⊢ H ≤ Subgroup.map (Subgroup.subtype (normalizer H)) (Subgroup.comap (mk' (subgroupOf H (normalizer H))) (zpowers x))

tactic: simp only [exists_prop, Subgroup.coeSubtype, mk'_apply, Subgroup.mem_map, Subgroup.mem_comap]
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p n : ℕ
hp : Fact (Nat.Prime p)
hdvd : p ^ (n + 1) ∣ Fintype.card G
H : Subgroup G
hH : Fintype.card { x // x ∈ H } = p ^ n
s : ℕ
hs : Fintype.card G = s * p ^ (n + 1)
hcard : Fintype.card (G ⧸ H) = s * p
hm : s * p % p = Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)) % p
hm' : p ∣ Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H))
x : { x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)
hx : orderOf x = p
hequiv : { x // x ∈ H } ≃ { x // x ∈ subgroupOf H (normalizer H) }
y : G
hy : y ∈ H
⊢ y ∈ Subgroup.map (Subgroup.subtype (normalizer H)) (Subgroup.comap (mk' (subgroupOf H (normalizer H))) (zpowers x))

tactic: refine' ⟨⟨y, le_normalizer hy⟩, ⟨0, _⟩, rfl⟩
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p n : ℕ
hp : Fact (Nat.Prime p)
hdvd : p ^ (n + 1) ∣ Fintype.card G
H : Subgroup G
hH : Fintype.card { x // x ∈ H } = p ^ n
s : ℕ
hs : Fintype.card G = s * p ^ (n + 1)
hcard : Fintype.card (G ⧸ H) = s * p
hm : s * p % p = Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)) % p
hm' : p ∣ Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H))
x : { x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)
hx : orderOf x = p
hequiv : { x // x ∈ H } ≃ { x // x ∈ subgroupOf H (normalizer H) }
y : G
hy : y ∈ H
⊢ ∃ x_1, ↑x_1 ∈ zpowers x ∧ ↑x_1 = y

tactic: dsimp only
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p n : ℕ
hp : Fact (Nat.Prime p)
hdvd : p ^ (n + 1) ∣ Fintype.card G
H : Subgroup G
hH : Fintype.card { x // x ∈ H } = p ^ n
s : ℕ
hs : Fintype.card G = s * p ^ (n + 1)
hcard : Fintype.card (G ⧸ H) = s * p
hm : s * p % p = Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)) % p
hm' : p ∣ Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H))
x : { x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)
hx : orderOf x = p
hequiv : { x // x ∈ H } ≃ { x // x ∈ subgroupOf H (normalizer H) }
y : G
hy : y ∈ H
⊢ (fun x x_1 => x ^ x_1) x 0 = ↑{ val := y, property := (_ : y ∈ normalizer H) }

tactic: rw [zpow_zero, eq_comm, QuotientGroup.eq_one_iff]
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p n : ℕ
hp : Fact (Nat.Prime p)
hdvd : p ^ (n + 1) ∣ Fintype.card G
H : Subgroup G
hH : Fintype.card { x // x ∈ H } = p ^ n
s : ℕ
hs : Fintype.card G = s * p ^ (n + 1)
hcard : Fintype.card (G ⧸ H) = s * p
hm : s * p % p = Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)) % p
hm' : p ∣ Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H))
x : { x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)
hx : orderOf x = p
hequiv : { x // x ∈ H } ≃ { x // x ∈ subgroupOf H (normalizer H) }
y : G
hy : y ∈ H
⊢ x ^ 0 = ↑{ val := y, property := (_ : y ∈ normalizer H) }

tactic: simpa using hy
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p n : ℕ
hp : Fact (Nat.Prime p)
hdvd : p ^ (n + 1) ∣ Fintype.card G
H : Subgroup G
hH : Fintype.card { x // x ∈ H } = p ^ n
s : ℕ
hs : Fintype.card G = s * p ^ (n + 1)
hcard : Fintype.card (G ⧸ H) = s * p
hm : s * p % p = Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)) % p
hm' : p ∣ Fintype.card ({ x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H))
x : { x // x ∈ normalizer H } ⧸ subgroupOf H (normalizer H)
hx : orderOf x = p
hequiv : { x // x ∈ H } ≃ { x // x ∈ subgroupOf H (normalizer H) }
y : G
hy : y ∈ H
⊢ { val := y, property := (_ : y ∈ normalizer H) } ∈ subgroupOf H (normalizer H)