Theorem: Subgroup.card_commutator_dvd_index_center_pow
File: Mathlib/GroupTheory/Schreier.lean

tactic: by_cases hG : (center G).index = 0
state_before: G : Type u_1
inst✝¹ : Group G
H : Subgroup G
R S : Set G
inst✝ : Finite ↑(commutatorSet G)
⊢ Nat.card { x // x ∈ _root_.commutator G } ∣ index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G) + 1)

tactic: haveI : FiniteIndex (center G) := ⟨hG⟩
state_before: case neg
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
R S : Set G
inst✝ : Finite ↑(commutatorSet G)
hG : ¬index (center G) = 0
⊢ Nat.card { x // x ∈ _root_.commutator G } ∣ index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G) + 1)

tactic: rw [← ((center G).subgroupOf (_root_.commutator G)).card_mul_index, pow_succ']
state_before: case neg
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
R S : Set G
inst✝ : Finite ↑(commutatorSet G)
hG : ¬index (center G) = 0
this : FiniteIndex (center G)
⊢ Nat.card { x // x ∈ _root_.commutator G } ∣ index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G) + 1)

tactic: have h1 := relindex_dvd_index_of_normal (center G) (_root_.commutator G)
state_before: case neg
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
R S : Set G
inst✝ : Finite ↑(commutatorSet G)
hG : ¬index (center G) = 0
this : FiniteIndex (center G)
⊢ Nat.card { x // x ∈ subgroupOf (center G) (_root_.commutator G) } *
      index (subgroupOf (center G) (_root_.commutator G)) ∣
    index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G)) * index (center G)

tactic: refine' mul_dvd_mul _ h1
state_before: case neg
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
R S : Set G
inst✝ : Finite ↑(commutatorSet G)
hG : ¬index (center G) = 0
this : FiniteIndex (center G)
h1 : relindex (center G) (_root_.commutator G) ∣ index (center G)
⊢ Nat.card { x // x ∈ subgroupOf (center G) (_root_.commutator G) } *
      index (subgroupOf (center G) (_root_.commutator G)) ∣
    index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G)) * index (center G)

tactic: haveI : FiniteIndex ((center G).subgroupOf (_root_.commutator G)) :=
  ⟨ne_zero_of_dvd_ne_zero hG h1⟩
state_before: case neg
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
R S : Set G
inst✝ : Finite ↑(commutatorSet G)
hG : ¬index (center G) = 0
this : FiniteIndex (center G)
h1 : relindex (center G) (_root_.commutator G) ∣ index (center G)
⊢ Nat.card { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ∣
    index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G))

tactic: have h2 := rank_le_index_mul_rank ((center G).subgroupOf (_root_.commutator G))
state_before: case neg
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
R S : Set G
inst✝ : Finite ↑(commutatorSet G)
hG : ¬index (center G) = 0
this✝ : FiniteIndex (center G)
h1 : relindex (center G) (_root_.commutator G) ∣ index (center G)
this : FiniteIndex (subgroupOf (center G) (_root_.commutator G))
⊢ Nat.card { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ∣
    index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G))

tactic: have h3 := Nat.mul_le_mul (Nat.le_of_dvd (Nat.pos_of_ne_zero hG) h1) (rank_commutator_le_card G)
state_before: case neg
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
R S : Set G
inst✝ : Finite ↑(commutatorSet G)
hG : ¬index (center G) = 0
this✝ : FiniteIndex (center G)
h1 : relindex (center G) (_root_.commutator G) ∣ index (center G)
this : FiniteIndex (subgroupOf (center G) (_root_.commutator G))
h2 :
  Group.rank { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ≤
    index (subgroupOf (center G) (_root_.commutator G)) * Group.rank { x // x ∈ _root_.commutator G }
⊢ Nat.card { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ∣
    index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G))

tactic: refine' dvd_trans _ (pow_dvd_pow (center G).index (h2.trans h3))
state_before: case neg
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
R S : Set G
inst✝ : Finite ↑(commutatorSet G)
hG : ¬index (center G) = 0
this✝ : FiniteIndex (center G)
h1 : relindex (center G) (_root_.commutator G) ∣ index (center G)
this : FiniteIndex (subgroupOf (center G) (_root_.commutator G))
h2 :
  Group.rank { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ≤
    index (subgroupOf (center G) (_root_.commutator G)) * Group.rank { x // x ∈ _root_.commutator G }
h3 :
  relindex (center G) (_root_.commutator G) * Group.rank { x // x ∈ _root_.commutator G } ≤
    index (center G) * Nat.card ↑(commutatorSet G)
⊢ Nat.card { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ∣
    index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G))

tactic: apply card_dvd_exponent_pow_rank'
state_before: case neg
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
R S : Set G
inst✝ : Finite ↑(commutatorSet G)
hG : ¬index (center G) = 0
this✝ : FiniteIndex (center G)
h1 : relindex (center G) (_root_.commutator G) ∣ index (center G)
this : FiniteIndex (subgroupOf (center G) (_root_.commutator G))
h2 :
  Group.rank { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ≤
    index (subgroupOf (center G) (_root_.commutator G)) * Group.rank { x // x ∈ _root_.commutator G }
h3 :
  relindex (center G) (_root_.commutator G) * Group.rank { x // x ∈ _root_.commutator G } ≤
    index (center G) * Nat.card ↑(commutatorSet G)
⊢ Nat.card { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ∣
    index (center G) ^ Group.rank { x // x ∈ subgroupOf (center G) (_root_.commutator G) }

tactic: intro g
state_before: case neg.hG
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
R S : Set G
inst✝ : Finite ↑(commutatorSet G)
hG : ¬index (center G) = 0
this✝ : FiniteIndex (center G)
h1 : relindex (center G) (_root_.commutator G) ∣ index (center G)
this : FiniteIndex (subgroupOf (center G) (_root_.commutator G))
h2 :
  Group.rank { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ≤
    index (subgroupOf (center G) (_root_.commutator G)) * Group.rank { x // x ∈ _root_.commutator G }
h3 :
  relindex (center G) (_root_.commutator G) * Group.rank { x // x ∈ _root_.commutator G } ≤
    index (center G) * Nat.card ↑(commutatorSet G)
⊢ ∀ (g : { x // x ∈ subgroupOf (center G) (_root_.commutator G) }), g ^ index (center G) = 1

tactic: have := Abelianization.commutator_subset_ker (MonoidHom.transferCenterPow G) g.1.2
state_before: case neg.hG
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
R S : Set G
inst✝ : Finite ↑(commutatorSet G)
hG : ¬index (center G) = 0
this✝ : FiniteIndex (center G)
h1 : relindex (center G) (_root_.commutator G) ∣ index (center G)
this : FiniteIndex (subgroupOf (center G) (_root_.commutator G))
h2 :
  Group.rank { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ≤
    index (subgroupOf (center G) (_root_.commutator G)) * Group.rank { x // x ∈ _root_.commutator G }
h3 :
  relindex (center G) (_root_.commutator G) * Group.rank { x // x ∈ _root_.commutator G } ≤
    index (center G) * Nat.card ↑(commutatorSet G)
g : { x // x ∈ subgroupOf (center G) (_root_.commutator G) }
⊢ g ^ index (center G) = 1

tactic: simpa only [MonoidHom.mem_ker, Subtype.ext_iff] using this
state_before: case neg.hG
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
R S : Set G
inst✝ : Finite ↑(commutatorSet G)
hG : ¬index (center G) = 0
this✝¹ : FiniteIndex (center G)
h1 : relindex (center G) (_root_.commutator G) ∣ index (center G)
this✝ : FiniteIndex (subgroupOf (center G) (_root_.commutator G))
h2 :
  Group.rank { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ≤
    index (subgroupOf (center G) (_root_.commutator G)) * Group.rank { x // x ∈ _root_.commutator G }
h3 :
  relindex (center G) (_root_.commutator G) * Group.rank { x // x ∈ _root_.commutator G } ≤
    index (center G) * Nat.card ↑(commutatorSet G)
g : { x // x ∈ subgroupOf (center G) (_root_.commutator G) }
this : ↑↑g ∈ MonoidHom.ker (MonoidHom.transferCenterPow G)
⊢ g ^ index (center G) = 1

tactic: simp_rw [hG, MulZeroClass.zero_mul, zero_add, pow_one, dvd_zero]
state_before: case pos
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
R S : Set G
inst✝ : Finite ↑(commutatorSet G)
hG : index (center G) = 0
⊢ Nat.card { x // x ∈ _root_.commutator G } ∣ index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G) + 1)