Theorem: Subgroup.saturated_iff_zpow
File: Mathlib/GroupTheory/Subgroup/Saturated.lean

tactic: constructor
state_before: G : Type u_1
inst✝ : Group G
H : Subgroup G
⊢ H.Saturated ↔ ∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H
state_after: case mp
G : Type u_1
inst✝ : Group G
H : Subgroup G
⊢ H.Saturated → ∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H

case mpr
G : Type u_1
inst✝ : Group G
H : Subgroup G
⊢ (∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H) → H.Saturated

tactic: intros hH n g hgn
state_before: case mp
G : Type u_1
inst✝ : Group G
H : Subgroup G
⊢ H.Saturated → ∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H
state_after: case mp
G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : H.Saturated
n : ℤ
g : G
hgn : g ^ n ∈ H
⊢ n = 0 ∨ g ∈ H

tactic: induction' n with n n
state_before: case mp
G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : H.Saturated
n : ℤ
g : G
hgn : g ^ n ∈ H
⊢ n = 0 ∨ g ∈ H
state_after: case mp.ofNat
G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : H.Saturated
g : G
n : ℕ
hgn : g ^ Int.ofNat n ∈ H
⊢ Int.ofNat n = 0 ∨ g ∈ H

case mp.negSucc
G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : H.Saturated
g : G
n : ℕ
hgn : g ^ Int.negSucc n ∈ H
⊢ Int.negSucc n = 0 ∨ g ∈ H

tactic: simp only [Int.natCast_eq_zero, Int.ofNat_eq_coe, zpow_natCast] at hgn ⊢
state_before: case mp.ofNat
G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : H.Saturated
g : G
n : ℕ
hgn : g ^ Int.ofNat n ∈ H
⊢ Int.ofNat n = 0 ∨ g ∈ H
state_after: case mp.ofNat
G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : H.Saturated
g : G
n : ℕ
hgn : g ^ n ∈ H
⊢ n = 0 ∨ g ∈ H

tactic: exact hH hgn
state_before: case mp.ofNat
G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : H.Saturated
g : G
n : ℕ
hgn : g ^ n ∈ H
⊢ n = 0 ∨ g ∈ H
state_after: no goals

tactic: suffices g ^ (n + 1) ∈ H by
  refine (hH this).imp ?_ id
  simp only [IsEmpty.forall_iff, Nat.succ_ne_zero]
state_before: case mp.negSucc
G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : H.Saturated
g : G
n : ℕ
hgn : g ^ Int.negSucc n ∈ H
⊢ Int.negSucc n = 0 ∨ g ∈ H
state_after: case mp.negSucc
G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : H.Saturated
g : G
n : ℕ
hgn : g ^ Int.negSucc n ∈ H
⊢ g ^ (n + 1) ∈ H

tactic: simpa only [inv_mem_iff, zpow_negSucc] using hgn
state_before: case mp.negSucc
G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : H.Saturated
g : G
n : ℕ
hgn : g ^ Int.negSucc n ∈ H
⊢ g ^ (n + 1) ∈ H
state_after: no goals

tactic: refine (hH this).imp ?_ id
state_before: G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : H.Saturated
g : G
n : ℕ
hgn : g ^ Int.negSucc n ∈ H
this : g ^ (n + 1) ∈ H
⊢ Int.negSucc n = 0 ∨ g ∈ H
state_after: G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : H.Saturated
g : G
n : ℕ
hgn : g ^ Int.negSucc n ∈ H
this : g ^ (n + 1) ∈ H
⊢ n + 1 = 0 → Int.negSucc n = 0

tactic: simp only [IsEmpty.forall_iff, Nat.succ_ne_zero]
state_before: G : Type u_1
inst✝ : Group G
H : Subgroup G
hH : H.Saturated
g : G
n : ℕ
hgn : g ^ Int.negSucc n ∈ H
this : g ^ (n + 1) ∈ H
⊢ n + 1 = 0 → Int.negSucc n = 0
state_after: no goals

tactic: intro h n g hgn
state_before: case mpr
G : Type u_1
inst✝ : Group G
H : Subgroup G
⊢ (∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H) → H.Saturated
state_after: case mpr
G : Type u_1
inst✝ : Group G
H : Subgroup G
h : ∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H
n : ℕ
g : G
hgn : g ^ n ∈ H
⊢ n = 0 ∨ g ∈ H

tactic: specialize h n g
state_before: case mpr
G : Type u_1
inst✝ : Group G
H : Subgroup G
h : ∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H
n : ℕ
g : G
hgn : g ^ n ∈ H
⊢ n = 0 ∨ g ∈ H
state_after: case mpr
G : Type u_1
inst✝ : Group G
H : Subgroup G
n : ℕ
g : G
hgn : g ^ n ∈ H
h : g ^ ↑n ∈ H → ↑n = 0 ∨ g ∈ H
⊢ n = 0 ∨ g ∈ H

tactic: simp only [Int.natCast_eq_zero, zpow_natCast] at h
state_before: case mpr
G : Type u_1
inst✝ : Group G
H : Subgroup G
n : ℕ
g : G
hgn : g ^ n ∈ H
h : g ^ ↑n ∈ H → ↑n = 0 ∨ g ∈ H
⊢ n = 0 ∨ g ∈ H
state_after: case mpr
G : Type u_1
inst✝ : Group G
H : Subgroup G
n : ℕ
g : G
hgn : g ^ n ∈ H
h : g ^ n ∈ H → n = 0 ∨ g ∈ H
⊢ n = 0 ∨ g ∈ H

tactic: apply h hgn
state_before: case mpr
G : Type u_1
inst✝ : Group G
H : Subgroup G
n : ℕ
g : G
hgn : g ^ n ∈ H
h : g ^ n ∈ H → n = 0 ∨ g ∈ H
⊢ n = 0 ∨ g ∈ H
state_after: no goals