l3lab/ntp-mathlib huggingface dataset:
/-- The nilpotency class of a nilpotent `G` is equal to the smallest `n` for which the descending
central series reaches `⊥` in its `n`'th term. -/
theorem least_descending_central_series_length_eq_nilpotencyClass :
    Nat.find ((nilpotent_iff_finite_descending_central_series G).mp hG) =
    Group.nilpotencyClass G := by
  rw [← least_ascending_central_series_length_eq_nilpotencyClass]
  refine le_antisymm (Nat.find_mono ?_) (Nat.find_mono ?_)
  · rintro n ⟨H, ⟨hH, hn⟩⟩
    refine ⟨fun m => H (n - m), is_decending_rev_series_of_is_ascending G hn hH, ?_⟩
    dsimp only
    rw [tsub_self]
    exact hH.1
  · rintro n ⟨H, ⟨hH, hn⟩⟩
    refine ⟨fun m => H (n - m), is_ascending_rev_series_of_is_descending G hn hH, ?_⟩
    

Proof state:
case refine_2.intro.intro
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
hG : Group.IsNilpotent G
n : ℕ
H : ℕ → Subgroup G
hH : IsDescendingCentralSeries H
hn : H n = ⊥
⊢ (fun m => H (n - m)) n = ⊤

Next tactic:
dsimp only
/-- The nilpotency class of a nilpotent `G` is equal to the smallest `n` for which the descending
central series reaches `⊥` in its `n`'th term. -/
theorem least_descending_central_series_length_eq_nilpotencyClass :
    Nat.find ((nilpotent_iff_finite_descending_central_series G).mp hG) =
    Group.nilpotencyClass G := by
  rw [← least_ascending_central_series_length_eq_nilpotencyClass]
  refine le_antisymm (Nat.find_mono ?_) (Nat.find_mono ?_)
  · rintro n ⟨H, ⟨hH, hn⟩⟩
    refine ⟨fun m => H (n - m), is_decending_rev_series_of_is_ascending G hn hH, ?_⟩
    dsimp only
    rw [tsub_self]
    exact hH.1
  · rintro n ⟨H, ⟨hH, hn⟩⟩
    refine ⟨fun m => H (n - m), is_ascending_rev_series_of_is_descending G hn hH, ?_⟩
    dsimp only
    

Proof state:
case refine_2.intro.intro
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
hG : Group.IsNilpotent G
n : ℕ
H : ℕ → Subgroup G
hH : IsDescendingCentralSeries H
hn : H n = ⊥
⊢ H (n - n) = ⊤

Next tactic:
rw [tsub_self]
/-- The nilpotency class of a nilpotent `G` is equal to the smallest `n` for which the descending
central series reaches `⊥` in its `n`'th term. -/
theorem least_descending_central_series_length_eq_nilpotencyClass :
    Nat.find ((nilpotent_iff_finite_descending_central_series G).mp hG) =
    Group.nilpotencyClass G := by
  rw [← least_ascending_central_series_length_eq_nilpotencyClass]
  refine le_antisymm (Nat.find_mono ?_) (Nat.find_mono ?_)
  · rintro n ⟨H, ⟨hH, hn⟩⟩
    refine ⟨fun m => H (n - m), is_decending_rev_series_of_is_ascending G hn hH, ?_⟩
    dsimp only
    rw [tsub_self]
    exact hH.1
  · rintro n ⟨H, ⟨hH, hn⟩⟩
    refine ⟨fun m => H (n - m), is_ascending_rev_series_of_is_descending G hn hH, ?_⟩
    dsimp only
    rw [tsub_self]
    

Proof state:
case refine_2.intro.intro
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
hG : Group.IsNilpotent G
n : ℕ
H : ℕ → Subgroup G
hH : IsDescendingCentralSeries H
hn : H n = ⊥
⊢ H 0 = ⊤

Next tactic:
exact hH.1
/-- The nilpotency class of a nilpotent `G` is equal to the length of the lower central series. -/
theorem lowerCentralSeries_length_eq_nilpotencyClass :
    Nat.find (nilpotent_iff_lowerCentralSeries.mp hG) = @Group.nilpotencyClass G _ _ := by
  

Proof state:
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
hG : Group.IsNilpotent G
⊢ Nat.find (_ : ∃ n, lowerCentralSeries G n = ⊥) = nilpotencyClass G

Next tactic:
rw [← least_descending_central_series_length_eq_nilpotencyClass]
/-- The nilpotency class of a nilpotent `G` is equal to the length of the lower central series. -/
theorem lowerCentralSeries_length_eq_nilpotencyClass :
    Nat.find (nilpotent_iff_lowerCentralSeries.mp hG) = @Group.nilpotencyClass G _ _ := by
  rw [← least_descending_central_series_length_eq_nilpotencyClass]
  

Proof state:
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
hG : Group.IsNilpotent G
⊢ Nat.find (_ : ∃ n, lowerCentralSeries G n = ⊥) = Nat.find (_ : ∃ n H, IsDescendingCentralSeries H ∧ H n = ⊥)

Next tactic:
refine' le_antisymm (Nat.find_mono _) (Nat.find_mono _)
/-- The nilpotency class of a nilpotent `G` is equal to the length of the lower central series. -/
theorem lowerCentralSeries_length_eq_nilpotencyClass :
    Nat.find (nilpotent_iff_lowerCentralSeries.mp hG) = @Group.nilpotencyClass G _ _ := by
  rw [← least_descending_central_series_length_eq_nilpotencyClass]
  refine' le_antisymm (Nat.find_mono _) (Nat.find_mono _)
  · 

Proof state:
case refine'_1
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
hG : Group.IsNilpotent G
⊢ ∀ (n : ℕ), (∃ H, IsDescendingCentralSeries H ∧ H n = ⊥) → lowerCentralSeries G n = ⊥

Next tactic:
rintro n ⟨H, ⟨hH, hn⟩⟩
/-- The nilpotency class of a nilpotent `G` is equal to the length of the lower central series. -/
theorem lowerCentralSeries_length_eq_nilpotencyClass :
    Nat.find (nilpotent_iff_lowerCentralSeries.mp hG) = @Group.nilpotencyClass G _ _ := by
  rw [← least_descending_central_series_length_eq_nilpotencyClass]
  refine' le_antisymm (Nat.find_mono _) (Nat.find_mono _)
  · rintro n ⟨H, ⟨hH, hn⟩⟩
    

Proof state:
case refine'_1.intro.intro
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
hG : Group.IsNilpotent G
n : ℕ
H : ℕ → Subgroup G
hH : IsDescendingCentralSeries H
hn : H n = ⊥
⊢ lowerCentralSeries G n = ⊥

Next tactic:
rw [← le_bot_iff, ← hn]
/-- The nilpotency class of a nilpotent `G` is equal to the length of the lower central series. -/
theorem lowerCentralSeries_length_eq_nilpotencyClass :
    Nat.find (nilpotent_iff_lowerCentralSeries.mp hG) = @Group.nilpotencyClass G _ _ := by
  rw [← least_descending_central_series_length_eq_nilpotencyClass]
  refine' le_antisymm (Nat.find_mono _) (Nat.find_mono _)
  · rintro n ⟨H, ⟨hH, hn⟩⟩
    rw [← le_bot_iff, ← hn]
    

Proof state:
case refine'_1.intro.intro
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
hG : Group.IsNilpotent G
n : ℕ
H : ℕ → Subgroup G
hH : IsDescendingCentralSeries H
hn : H n = ⊥
⊢ lowerCentralSeries G n ≤ H n

Next tactic:
exact descending_central_series_ge_lower H hH n
/-- The nilpotency class of a nilpotent `G` is equal to the length of the lower central series. -/
theorem lowerCentralSeries_length_eq_nilpotencyClass :
    Nat.find (nilpotent_iff_lowerCentralSeries.mp hG) = @Group.nilpotencyClass G _ _ := by
  rw [← least_descending_central_series_length_eq_nilpotencyClass]
  refine' le_antisymm (Nat.find_mono _) (Nat.find_mono _)
  · rintro n ⟨H, ⟨hH, hn⟩⟩
    rw [← le_bot_iff, ← hn]
    exact descending_central_series_ge_lower H hH n
  · 

Proof state:
case refine'_2
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
hG : Group.IsNilpotent G
⊢ ∀ (n : ℕ), lowerCentralSeries G n = ⊥ → ∃ H, IsDescendingCentralSeries H ∧ H n = ⊥

Next tactic:
rintro n h
/-- The nilpotency class of a nilpotent `G` is equal to the length of the lower central series. -/
theorem lowerCentralSeries_length_eq_nilpotencyClass :
    Nat.find (nilpotent_iff_lowerCentralSeries.mp hG) = @Group.nilpotencyClass G _ _ := by
  rw [← least_descending_central_series_length_eq_nilpotencyClass]
  refine' le_antisymm (Nat.find_mono _) (Nat.find_mono _)
  · rintro n ⟨H, ⟨hH, hn⟩⟩
    rw [← le_bot_iff, ← hn]
    exact descending_central_series_ge_lower H hH n
  · rintro n h
    

Proof state:
case refine'_2
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
hG : Group.IsNilpotent G
n : ℕ
h : lowerCentralSeries G n = ⊥
⊢ ∃ H, IsDescendingCentralSeries H ∧ H n = ⊥

Next tactic:
exact ⟨lowerCentralSeries G, ⟨lowerCentralSeries_isDescendingCentralSeries, h⟩⟩
@[simp]
theorem lowerCentralSeries_nilpotencyClass :
    lowerCentralSeries G (Group.nilpotencyClass G) = ⊥ := by
  

Proof state:
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
hG : Group.IsNilpotent G
⊢ lowerCentralSeries G (nilpotencyClass G) = ⊥

Next tactic:
rw [← lowerCentralSeries_length_eq_nilpotencyClass]
@[simp]
theorem lowerCentralSeries_nilpotencyClass :
    lowerCentralSeries G (Group.nilpotencyClass G) = ⊥ := by
  rw [← lowerCentralSeries_length_eq_nilpotencyClass]
  

Proof state:
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
hG : Group.IsNilpotent G
⊢ lowerCentralSeries G (Nat.find (_ : ∃ n, lowerCentralSeries G n = ⊥)) = ⊥

Next tactic:
exact Nat.find_spec (nilpotent_iff_lowerCentralSeries.mp hG)
theorem lowerCentralSeries_eq_bot_iff_nilpotencyClass_le {n : ℕ} :
    lowerCentralSeries G n = ⊥ ↔ Group.nilpotencyClass G ≤ n := by
  

Proof state:
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
hG : Group.IsNilpotent G
n : ℕ
⊢ lowerCentralSeries G n = ⊥ ↔ nilpotencyClass G ≤ n

Next tactic:
constructor
theorem lowerCentralSeries_eq_bot_iff_nilpotencyClass_le {n : ℕ} :
    lowerCentralSeries G n = ⊥ ↔ Group.nilpotencyClass G ≤ n := by
  constructor
  · 

Proof state:
case mp
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
hG : Group.IsNilpotent G
n : ℕ
⊢ lowerCentralSeries G n = ⊥ → nilpotencyClass G ≤ n

Next tactic:
intro h
theorem lowerCentralSeries_eq_bot_iff_nilpotencyClass_le {n : ℕ} :
    lowerCentralSeries G n = ⊥ ↔ Group.nilpotencyClass G ≤ n := by
  constructor
  · intro h
    

Proof state:
case mp
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
hG : Group.IsNilpotent G
n : ℕ
h : lowerCentralSeries G n = ⊥
⊢ nilpotencyClass G ≤ n

Next tactic:
rw [← lowerCentralSeries_length_eq_nilpotencyClass]
theorem lowerCentralSeries_eq_bot_iff_nilpotencyClass_le {n : ℕ} :
    lowerCentralSeries G n = ⊥ ↔ Group.nilpotencyClass G ≤ n := by
  constructor
  · intro h
    rw [← lowerCentralSeries_length_eq_nilpotencyClass]
    

Proof state:
case mp
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
hG : Group.IsNilpotent G
n : ℕ
h : lowerCentralSeries G n = ⊥
⊢ Nat.find (_ : ∃ n, lowerCentralSeries G n = ⊥) ≤ n

Next tactic:
exact Nat.find_le h
theorem lowerCentralSeries_eq_bot_iff_nilpotencyClass_le {n : ℕ} :
    lowerCentralSeries G n = ⊥ ↔ Group.nilpotencyClass G ≤ n := by
  constructor
  · intro h
    rw [← lowerCentralSeries_length_eq_nilpotencyClass]
    exact Nat.find_le h
  · 

Proof state:
case mpr
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
hG : Group.IsNilpotent G
n : ℕ
⊢ nilpotencyClass G ≤ n → lowerCentralSeries G n = ⊥

Next tactic:
intro h
theorem lowerCentralSeries_eq_bot_iff_nilpotencyClass_le {n : ℕ} :
    lowerCentralSeries G n = ⊥ ↔ Group.nilpotencyClass G ≤ n := by
  constructor
  · intro h
    rw [← lowerCentralSeries_length_eq_nilpotencyClass]
    exact Nat.find_le h
  · intro h
    

Proof state:
case mpr
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
hG : Group.IsNilpotent G
n : ℕ
h : nilpotencyClass G ≤ n
⊢ lowerCentralSeries G n = ⊥

Next tactic:
apply eq_bot_iff.mpr
theorem lowerCentralSeries_eq_bot_iff_nilpotencyClass_le {n : ℕ} :
    lowerCentralSeries G n = ⊥ ↔ Group.nilpotencyClass G ≤ n := by
  constructor
  · intro h
    rw [← lowerCentralSeries_length_eq_nilpotencyClass]
    exact Nat.find_le h
  · intro h
    apply eq_bot_iff.mpr
    

Proof state:
case mpr
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
hG : Group.IsNilpotent G
n : ℕ
h : nilpotencyClass G ≤ n
⊢ lowerCentralSeries G n ≤ ⊥

Next tactic:
rw [← lowerCentralSeries_nilpotencyClass]
theorem lowerCentralSeries_eq_bot_iff_nilpotencyClass_le {n : ℕ} :
    lowerCentralSeries G n = ⊥ ↔ Group.nilpotencyClass G ≤ n := by
  constructor
  · intro h
    rw [← lowerCentralSeries_length_eq_nilpotencyClass]
    exact Nat.find_le h
  · intro h
    apply eq_bot_iff.mpr
    rw [← lowerCentralSeries_nilpotencyClass]
    

Proof state:
case mpr
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
hG : Group.IsNilpotent G
n : ℕ
h : nilpotencyClass G ≤ n
⊢ lowerCentralSeries G n ≤ lowerCentralSeries G (nilpotencyClass G)

Next tactic:
exact lowerCentralSeries_antitone h
theorem lowerCentralSeries_map_subtype_le (H : Subgroup G) (n : ℕ) :
    (lowerCentralSeries H n).map H.subtype ≤ lowerCentralSeries G n := by
  

Proof state:
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
n : ℕ
⊢ Subgroup.map (Subgroup.subtype H) (lowerCentralSeries (↥H) n) ≤ lowerCentralSeries G n

Next tactic:
induction' n with d hd
theorem lowerCentralSeries_map_subtype_le (H : Subgroup G) (n : ℕ) :
    (lowerCentralSeries H n).map H.subtype ≤ lowerCentralSeries G n := by
  induction' n with d hd
  · 

Proof state:
case zero
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
⊢ Subgroup.map (Subgroup.subtype H) (lowerCentralSeries (↥H) Nat.zero) ≤ lowerCentralSeries G Nat.zero

Next tactic:
simp
theorem lowerCentralSeries_map_subtype_le (H : Subgroup G) (n : ℕ) :
    (lowerCentralSeries H n).map H.subtype ≤ lowerCentralSeries G n := by
  induction' n with d hd
  · simp
  · 

Proof state:
case succ
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
d : ℕ
hd : Subgroup.map (Subgroup.subtype H) (lowerCentralSeries (↥H) d) ≤ lowerCentralSeries G d
⊢ Subgroup.map (Subgroup.subtype H) (lowerCentralSeries (↥H) (Nat.succ d)) ≤ lowerCentralSeries G (Nat.succ d)

Next tactic:
rw [lowerCentralSeries_succ, lowerCentralSeries_succ, MonoidHom.map_closure]
theorem lowerCentralSeries_map_subtype_le (H : Subgroup G) (n : ℕ) :
    (lowerCentralSeries H n).map H.subtype ≤ lowerCentralSeries G n := by
  induction' n with d hd
  · simp
  · rw [lowerCentralSeries_succ, lowerCentralSeries_succ, MonoidHom.map_closure]
    

Proof state:
case succ
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
d : ℕ
hd : Subgroup.map (Subgroup.subtype H) (lowerCentralSeries (↥H) d) ≤ lowerCentralSeries G d
⊢ closure (⇑(Subgroup.subtype H) '' {x | ∃ p ∈ lowerCentralSeries (↥H) d, ∃ q ∈ ⊤, p * q * p⁻¹ * q⁻¹ = x}) ≤
    closure {x | ∃ p ∈ lowerCentralSeries G d, ∃ q ∈ ⊤, p * q * p⁻¹ * q⁻¹ = x}

Next tactic:
apply Subgroup.closure_mono
theorem lowerCentralSeries_map_subtype_le (H : Subgroup G) (n : ℕ) :
    (lowerCentralSeries H n).map H.subtype ≤ lowerCentralSeries G n := by
  induction' n with d hd
  · simp
  · rw [lowerCentralSeries_succ, lowerCentralSeries_succ, MonoidHom.map_closure]
    apply Subgroup.closure_mono
    

Proof state:
case succ.h'
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
d : ℕ
hd : Subgroup.map (Subgroup.subtype H) (lowerCentralSeries (↥H) d) ≤ lowerCentralSeries G d
⊢ ⇑(Subgroup.subtype H) '' {x | ∃ p ∈ lowerCentralSeries (↥H) d, ∃ q ∈ ⊤, p * q * p⁻¹ * q⁻¹ = x} ⊆
    {x | ∃ p ∈ lowerCentralSeries G d, ∃ q ∈ ⊤, p * q * p⁻¹ * q⁻¹ = x}

Next tactic:
rintro x1 ⟨x2, ⟨x3, hx3, x4, _hx4, rfl⟩, rfl⟩
theorem lowerCentralSeries_map_subtype_le (H : Subgroup G) (n : ℕ) :
    (lowerCentralSeries H n).map H.subtype ≤ lowerCentralSeries G n := by
  induction' n with d hd
  · simp
  · rw [lowerCentralSeries_succ, lowerCentralSeries_succ, MonoidHom.map_closure]
    apply Subgroup.closure_mono
    rintro x1 ⟨x2, ⟨x3, hx3, x4, _hx4, rfl⟩, rfl⟩
    

Proof state:
case succ.h'.intro.intro.intro.intro.intro.intro
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
d : ℕ
hd : Subgroup.map (Subgroup.subtype H) (lowerCentralSeries (↥H) d) ≤ lowerCentralSeries G d
x3 : ↥H
hx3 : x3 ∈ lowerCentralSeries (↥H) d
x4 : ↥H
_hx4 : x4 ∈ ⊤
⊢ (Subgroup.subtype H) (x3 * x4 * x3⁻¹ * x4⁻¹) ∈ {x | ∃ p ∈ lowerCentralSeries G d, ∃ q ∈ ⊤, p * q * p⁻¹ * q⁻¹ = x}

Next tactic:
exact ⟨x3, hd (mem_map.mpr ⟨x3, hx3, rfl⟩), x4, by simp⟩
theorem lowerCentralSeries_map_subtype_le (H : Subgroup G) (n : ℕ) :
    (lowerCentralSeries H n).map H.subtype ≤ lowerCentralSeries G n := by
  induction' n with d hd
  · simp
  · rw [lowerCentralSeries_succ, lowerCentralSeries_succ, MonoidHom.map_closure]
    apply Subgroup.closure_mono
    rintro x1 ⟨x2, ⟨x3, hx3, x4, _hx4, rfl⟩, rfl⟩
    exact ⟨x3, hd (mem_map.mpr ⟨x3, hx3, rfl⟩), x4, by 

Proof state:
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
d : ℕ
hd : Subgroup.map (Subgroup.subtype H) (lowerCentralSeries (↥H) d) ≤ lowerCentralSeries G d
x3 : ↥H
hx3 : x3 ∈ lowerCentralSeries (↥H) d
x4 : ↥H
_hx4 : x4 ∈ ⊤
⊢ ↑x4 ∈ ⊤ ∧ ↑x3 * ↑x4 * (↑x3)⁻¹ * (↑x4)⁻¹ = (Subgroup.subtype H) (x3 * x4 * x3⁻¹ * x4⁻¹)

Next tactic:
simp
/-- A subgroup of a nilpotent group is nilpotent -/
instance Subgroup.isNilpotent (H : Subgroup G) [hG : IsNilpotent G] : IsNilpotent H := by
  

Proof state:
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
hG : Group.IsNilpotent G
⊢ Group.IsNilpotent ↥H

Next tactic:
rw [nilpotent_iff_lowerCentralSeries] at *
/-- A subgroup of a nilpotent group is nilpotent -/
instance Subgroup.isNilpotent (H : Subgroup G) [hG : IsNilpotent G] : IsNilpotent H := by
  rw [nilpotent_iff_lowerCentralSeries] at *
  

Proof state:
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
hG : ∃ n, lowerCentralSeries G n = ⊥
⊢ ∃ n, lowerCentralSeries (↥H) n = ⊥

Next tactic:
rcases hG with ⟨n, hG⟩
/-- A subgroup of a nilpotent group is nilpotent -/
instance Subgroup.isNilpotent (H : Subgroup G) [hG : IsNilpotent G] : IsNilpotent H := by
  rw [nilpotent_iff_lowerCentralSeries] at *
  rcases hG with ⟨n, hG⟩
  

Proof state:
case intro
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
n : ℕ
hG : lowerCentralSeries G n = ⊥
⊢ ∃ n, lowerCentralSeries (↥H) n = ⊥

Next tactic:
use n
/-- A subgroup of a nilpotent group is nilpotent -/
instance Subgroup.isNilpotent (H : Subgroup G) [hG : IsNilpotent G] : IsNilpotent H := by
  rw [nilpotent_iff_lowerCentralSeries] at *
  rcases hG with ⟨n, hG⟩
  use n
  

Proof state:
case h
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
n : ℕ
hG : lowerCentralSeries G n = ⊥
⊢ lowerCentralSeries (↥H) n = ⊥

Next tactic:
have := lowerCentralSeries_map_subtype_le H n
/-- A subgroup of a nilpotent group is nilpotent -/
instance Subgroup.isNilpotent (H : Subgroup G) [hG : IsNilpotent G] : IsNilpotent H := by
  rw [nilpotent_iff_lowerCentralSeries] at *
  rcases hG with ⟨n, hG⟩
  use n
  have := lowerCentralSeries_map_subtype_le H n
  

Proof state:
case h
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
n : ℕ
hG : lowerCentralSeries G n = ⊥
this : map (Subgroup.subtype H) (lowerCentralSeries (↥H) n) ≤ lowerCentralSeries G n
⊢ lowerCentralSeries (↥H) n = ⊥

Next tactic:
simp only [hG, SetLike.le_def, mem_map, forall_apply_eq_imp_iff₂, exists_imp] at this
/-- A subgroup of a nilpotent group is nilpotent -/
instance Subgroup.isNilpotent (H : Subgroup G) [hG : IsNilpotent G] : IsNilpotent H := by
  rw [nilpotent_iff_lowerCentralSeries] at *
  rcases hG with ⟨n, hG⟩
  use n
  have := lowerCentralSeries_map_subtype_le H n
  simp only [hG, SetLike.le_def, mem_map, forall_apply_eq_imp_iff₂, exists_imp] at this
  

Proof state:
case h
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
n : ℕ
hG : lowerCentralSeries G n = ⊥
this : ∀ ⦃x : G⦄ (x_1 : ↥H), x_1 ∈ lowerCentralSeries (↥H) n ∧ (Subgroup.subtype H) x_1 = x → x ∈ ⊥
⊢ lowerCentralSeries (↥H) n = ⊥

Next tactic:
exact eq_bot_iff.mpr fun x hx => Subtype.ext (this x ⟨hx, rfl⟩)
/-- The nilpotency class of a subgroup is less or equal to the nilpotency class of the group -/
theorem Subgroup.nilpotencyClass_le (H : Subgroup G) [hG : IsNilpotent G] :
    Group.nilpotencyClass H ≤ Group.nilpotencyClass G := by
  

Proof state:
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
hG : Group.IsNilpotent G
⊢ nilpotencyClass ↥H ≤ nilpotencyClass G

Next tactic:
repeat rw [← lowerCentralSeries_length_eq_nilpotencyClass]
/-- The nilpotency class of a subgroup is less or equal to the nilpotency class of the group -/
theorem Subgroup.nilpotencyClass_le (H : Subgroup G) [hG : IsNilpotent G] :
    Group.nilpotencyClass H ≤ Group.nilpotencyClass G := by
  repeat 

Proof state:
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
hG : Group.IsNilpotent G
⊢ nilpotencyClass ↥H ≤ nilpotencyClass G

Next tactic:
rw [← lowerCentralSeries_length_eq_nilpotencyClass]
/-- The nilpotency class of a subgroup is less or equal to the nilpotency class of the group -/
theorem Subgroup.nilpotencyClass_le (H : Subgroup G) [hG : IsNilpotent G] :
    Group.nilpotencyClass H ≤ Group.nilpotencyClass G := by
  repeat 

Proof state:
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
hG : Group.IsNilpotent G
⊢ Nat.find (_ : ∃ n, lowerCentralSeries (↥H) n = ⊥) ≤ nilpotencyClass G

Next tactic:
rw [← lowerCentralSeries_length_eq_nilpotencyClass]
/-- The nilpotency class of a subgroup is less or equal to the nilpotency class of the group -/
theorem Subgroup.nilpotencyClass_le (H : Subgroup G) [hG : IsNilpotent G] :
    Group.nilpotencyClass H ≤ Group.nilpotencyClass G := by
  repeat 

Proof state:
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
hG : Group.IsNilpotent G
⊢ Nat.find (_ : ∃ n, lowerCentralSeries (↥H) n = ⊥) ≤ Nat.find (_ : ∃ n, lowerCentralSeries G n = ⊥)

Next tactic:
rw [← lowerCentralSeries_length_eq_nilpotencyClass]
/-- The nilpotency class of a subgroup is less or equal to the nilpotency class of the group -/
theorem Subgroup.nilpotencyClass_le (H : Subgroup G) [hG : IsNilpotent G] :
    Group.nilpotencyClass H ≤ Group.nilpotencyClass G := by
  repeat rw [← lowerCentralSeries_length_eq_nilpotencyClass]
  --- Porting note : Lean needs to be told that predicates are decidable
  

Proof state:
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
hG : Group.IsNilpotent G
⊢ Nat.find (_ : ∃ n, lowerCentralSeries (↥H) n = ⊥) ≤ Nat.find (_ : ∃ n, lowerCentralSeries G n = ⊥)

Next tactic:
refine @Nat.find_mono _ _ (Classical.decPred _) (Classical.decPred _) ?_ _ _
/-- The nilpotency class of a subgroup is less or equal to the nilpotency class of the group -/
theorem Subgroup.nilpotencyClass_le (H : Subgroup G) [hG : IsNilpotent G] :
    Group.nilpotencyClass H ≤ Group.nilpotencyClass G := by
  repeat rw [← lowerCentralSeries_length_eq_nilpotencyClass]
  --- Porting note : Lean needs to be told that predicates are decidable
  refine @Nat.find_mono _ _ (Classical.decPred _) (Classical.decPred _) ?_ _ _
  

Proof state:
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
hG : Group.IsNilpotent G
⊢ ∀ (n : ℕ), lowerCentralSeries G n = ⊥ → lowerCentralSeries (↥H) n = ⊥

Next tactic:
intro n hG
/-- The nilpotency class of a subgroup is less or equal to the nilpotency class of the group -/
theorem Subgroup.nilpotencyClass_le (H : Subgroup G) [hG : IsNilpotent G] :
    Group.nilpotencyClass H ≤ Group.nilpotencyClass G := by
  repeat rw [← lowerCentralSeries_length_eq_nilpotencyClass]
  --- Porting note : Lean needs to be told that predicates are decidable
  refine @Nat.find_mono _ _ (Classical.decPred _) (Classical.decPred _) ?_ _ _
  intro n hG
  

Proof state:
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
hG✝ : Group.IsNilpotent G
n : ℕ
hG : lowerCentralSeries G n = ⊥
⊢ lowerCentralSeries (↥H) n = ⊥

Next tactic:
have := lowerCentralSeries_map_subtype_le H n
/-- The nilpotency class of a subgroup is less or equal to the nilpotency class of the group -/
theorem Subgroup.nilpotencyClass_le (H : Subgroup G) [hG : IsNilpotent G] :
    Group.nilpotencyClass H ≤ Group.nilpotencyClass G := by
  repeat rw [← lowerCentralSeries_length_eq_nilpotencyClass]
  --- Porting note : Lean needs to be told that predicates are decidable
  refine @Nat.find_mono _ _ (Classical.decPred _) (Classical.decPred _) ?_ _ _
  intro n hG
  have := lowerCentralSeries_map_subtype_le H n
  

Proof state:
G : Type u_1
inst✝¹ : Group G
H✝ : Subgroup G
inst✝ : Normal H✝
H : Subgroup G
hG✝ : Group.IsNilpotent G
n : ℕ
hG : lowerCentralSeries G n = ⊥
this : map (Subgroup.subtype H) (lowerCentralSeries (↥H) n) ≤ lowerCentralSeries G n
⊢ lowerCentralSeries (↥H) n = ⊥

Next tactic:
simp only [hG, SetLike.le_def, mem_map, forall_apply_eq_imp_iff₂, exists_imp] at this