l3lab/ntp-mathlib huggingface dataset:
theorem toNat_le_toNat {b₀ b₁ : Bool} (h : b₀ ≤ b₁) : toNat b₀ ≤ toNat b₁ := by
  

Proof state:
b₀ b₁ : Bool
h : b₀ ≤ b₁
⊢ toNat b₀ ≤ toNat b₁

Next tactic:
cases b₀
theorem toNat_le_toNat {b₀ b₁ : Bool} (h : b₀ ≤ b₁) : toNat b₀ ≤ toNat b₁ := by
  cases b₀ <;> 

Proof state:
case false
b₁ : Bool
h : false ≤ b₁
⊢ toNat false ≤ toNat b₁

Next tactic:
cases b₁
theorem toNat_le_toNat {b₀ b₁ : Bool} (h : b₀ ≤ b₁) : toNat b₀ ≤ toNat b₁ := by
  cases b₀ <;> 

Proof state:
case true
b₁ : Bool
h : true ≤ b₁
⊢ toNat true ≤ toNat b₁

Next tactic:
cases b₁
theorem toNat_le_toNat {b₀ b₁ : Bool} (h : b₀ ≤ b₁) : toNat b₀ ≤ toNat b₁ := by
  cases b₀ <;> cases b₁ <;> 

Proof state:
case false.false
h : false ≤ false
⊢ toNat false ≤ toNat false

Next tactic:
simp_all (config := { decide := true })
theorem toNat_le_toNat {b₀ b₁ : Bool} (h : b₀ ≤ b₁) : toNat b₀ ≤ toNat b₁ := by
  cases b₀ <;> cases b₁ <;> 

Proof state:
case false.true
h : false ≤ true
⊢ toNat false ≤ toNat true

Next tactic:
simp_all (config := { decide := true })
theorem toNat_le_toNat {b₀ b₁ : Bool} (h : b₀ ≤ b₁) : toNat b₀ ≤ toNat b₁ := by
  cases b₀ <;> cases b₁ <;> 

Proof state:
case true.false
h : true ≤ false
⊢ toNat true ≤ toNat false

Next tactic:
simp_all (config := { decide := true })
theorem toNat_le_toNat {b₀ b₁ : Bool} (h : b₀ ≤ b₁) : toNat b₀ ≤ toNat b₁ := by
  cases b₀ <;> cases b₁ <;> 

Proof state:
case true.true
h : true ≤ true
⊢ toNat true ≤ toNat true

Next tactic:
simp_all (config := { decide := true })
theorem ofNat_toNat (b : Bool) : ofNat (toNat b) = b := by
  

Proof state:
b : Bool
⊢ ofNat (toNat b) = b

Next tactic:
cases b
theorem ofNat_toNat (b : Bool) : ofNat (toNat b) = b := by
  cases b <;> 

Proof state:
case false
⊢ ofNat (toNat false) = false

Next tactic:
rfl
theorem ofNat_toNat (b : Bool) : ofNat (toNat b) = b := by
  cases b <;> 

Proof state:
case true
⊢ ofNat (toNat true) = true

Next tactic:
rfl
@[simp]
theorem injective_iff {α : Sort*} {f : Bool → α} : Function.Injective f ↔ f false ≠ f true :=
  ⟨fun Hinj Heq ↦ false_ne_true (Hinj Heq), fun H x y hxy ↦ by
    

Proof state:
α : Sort u_1
f : Bool → α
H : f false ≠ f true
x y : Bool
hxy : f x = f y
⊢ x = y

Next tactic:
cases x
@[simp]
theorem injective_iff {α : Sort*} {f : Bool → α} : Function.Injective f ↔ f false ≠ f true :=
  ⟨fun Hinj Heq ↦ false_ne_true (Hinj Heq), fun H x y hxy ↦ by
    cases x <;> 

Proof state:
case false
α : Sort u_1
f : Bool → α
H : f false ≠ f true
y : Bool
hxy : f false = f y
⊢ false = y

Next tactic:
cases y
@[simp]
theorem injective_iff {α : Sort*} {f : Bool → α} : Function.Injective f ↔ f false ≠ f true :=
  ⟨fun Hinj Heq ↦ false_ne_true (Hinj Heq), fun H x y hxy ↦ by
    cases x <;> 

Proof state:
case true
α : Sort u_1
f : Bool → α
H : f false ≠ f true
y : Bool
hxy : f true = f y
⊢ true = y

Next tactic:
cases y
@[simp]
theorem injective_iff {α : Sort*} {f : Bool → α} : Function.Injective f ↔ f false ≠ f true :=
  ⟨fun Hinj Heq ↦ false_ne_true (Hinj Heq), fun H x y hxy ↦ by
    cases x <;> cases y
    

Proof state:
case false.false
α : Sort u_1
f : Bool → α
H : f false ≠ f true
hxy : f false = f false
⊢ false = false
case false.true
α : Sort u_1
f : Bool → α
H : f false ≠ f true
hxy : f false = f true
⊢ false = true
case true.false
α : Sort u_1
f : Bool → α
H : f false ≠ f true
hxy : f true = f false
⊢ true = false
case true.true α : Sort u_1 f : Bool → α H : f false ≠ f true hxy : f true = f true ⊢ true = true

Next tactic:
exacts [rfl, (H hxy).elim, (H hxy.symm).elim, rfl]
/-- **Kaminski's Equation** -/
theorem apply_apply_apply (f : Bool → Bool) (x : Bool) : f (f (f x)) = f x := by
  

Proof state:
f : Bool → Bool
x : Bool
⊢ f (f (f x)) = f x

Next tactic:
cases x
/-- **Kaminski's Equation** -/
theorem apply_apply_apply (f : Bool → Bool) (x : Bool) : f (f (f x)) = f x := by
  cases x <;> 

Proof state:
case false
f : Bool → Bool
⊢ f (f (f false)) = f false

Next tactic:
cases h₁ : f true
/-- **Kaminski's Equation** -/
theorem apply_apply_apply (f : Bool → Bool) (x : Bool) : f (f (f x)) = f x := by
  cases x <;> 

Proof state:
case true
f : Bool → Bool
⊢ f (f (f true)) = f true

Next tactic:
cases h₁ : f true
/-- **Kaminski's Equation** -/
theorem apply_apply_apply (f : Bool → Bool) (x : Bool) : f (f (f x)) = f x := by
  cases x <;> cases h₁ : f true <;> 

Proof state:
case false.false
f : Bool → Bool
h₁ : f true = false
⊢ f (f (f false)) = f false

Next tactic:
cases h₂ : f false
/-- **Kaminski's Equation** -/
theorem apply_apply_apply (f : Bool → Bool) (x : Bool) : f (f (f x)) = f x := by
  cases x <;> cases h₁ : f true <;> 

Proof state:
case false.true
f : Bool → Bool
h₁ : f true = true
⊢ f (f (f false)) = f false

Next tactic:
cases h₂ : f false
/-- **Kaminski's Equation** -/
theorem apply_apply_apply (f : Bool → Bool) (x : Bool) : f (f (f x)) = f x := by
  cases x <;> cases h₁ : f true <;> 

Proof state:
case true.false
f : Bool → Bool
h₁ : f true = false
⊢ f (f false) = false

Next tactic:
cases h₂ : f false
/-- **Kaminski's Equation** -/
theorem apply_apply_apply (f : Bool → Bool) (x : Bool) : f (f (f x)) = f x := by
  cases x <;> cases h₁ : f true <;> 

Proof state:
case true.true
f : Bool → Bool
h₁ : f true = true
⊢ f (f true) = true

Next tactic:
cases h₂ : f false
/-- **Kaminski's Equation** -/
theorem apply_apply_apply (f : Bool → Bool) (x : Bool) : f (f (f x)) = f x := by
  cases x <;> cases h₁ : f true <;> cases h₂ : f false <;> 

Proof state:
case false.false.false
f : Bool → Bool
h₁ : f true = false
h₂ : f false = false
⊢ f (f false) = false

Next tactic:
simp only [h₁, h₂]
/-- **Kaminski's Equation** -/
theorem apply_apply_apply (f : Bool → Bool) (x : Bool) : f (f (f x)) = f x := by
  cases x <;> cases h₁ : f true <;> cases h₂ : f false <;> 

Proof state:
case false.false.true
f : Bool → Bool
h₁ : f true = false
h₂ : f false = true
⊢ f (f true) = true

Next tactic:
simp only [h₁, h₂]
/-- **Kaminski's Equation** -/
theorem apply_apply_apply (f : Bool → Bool) (x : Bool) : f (f (f x)) = f x := by
  cases x <;> cases h₁ : f true <;> cases h₂ : f false <;> 

Proof state:
case false.true.false
f : Bool → Bool
h₁ : f true = true
h₂ : f false = false
⊢ f (f false) = false

Next tactic:
simp only [h₁, h₂]
/-- **Kaminski's Equation** -/
theorem apply_apply_apply (f : Bool → Bool) (x : Bool) : f (f (f x)) = f x := by
  cases x <;> cases h₁ : f true <;> cases h₂ : f false <;> 

Proof state:
case false.true.true
f : Bool → Bool
h₁ : f true = true
h₂ : f false = true
⊢ f (f true) = true

Next tactic:
simp only [h₁, h₂]
/-- **Kaminski's Equation** -/
theorem apply_apply_apply (f : Bool → Bool) (x : Bool) : f (f (f x)) = f x := by
  cases x <;> cases h₁ : f true <;> cases h₂ : f false <;> 

Proof state:
case true.false.false
f : Bool → Bool
h₁ : f true = false
h₂ : f false = false
⊢ f false = false

Next tactic:
simp only [h₁, h₂]
/-- **Kaminski's Equation** -/
theorem apply_apply_apply (f : Bool → Bool) (x : Bool) : f (f (f x)) = f x := by
  cases x <;> cases h₁ : f true <;> cases h₂ : f false <;> 

Proof state:
case true.false.true
f : Bool → Bool
h₁ : f true = false
h₂ : f false = true
⊢ f true = false

Next tactic:
simp only [h₁, h₂]
/-- **Kaminski's Equation** -/
theorem apply_apply_apply (f : Bool → Bool) (x : Bool) : f (f (f x)) = f x := by
  cases x <;> cases h₁ : f true <;> cases h₂ : f false <;> 

Proof state:
case true.true.false
f : Bool → Bool
h₁ : f true = true
h₂ : f false = false
⊢ f (f true) = true

Next tactic:
simp only [h₁, h₂]
/-- **Kaminski's Equation** -/
theorem apply_apply_apply (f : Bool → Bool) (x : Bool) : f (f (f x)) = f x := by
  cases x <;> cases h₁ : f true <;> cases h₂ : f false <;> 

Proof state:
case true.true.true
f : Bool → Bool
h₁ : f true = true
h₂ : f false = true
⊢ f (f true) = true

Next tactic:
simp only [h₁, h₂]
@[simp] theorem abs_mem_iff {S G} [InvolutiveNeg G] [LinearOrder G] {_ : SetLike S G}
    [NegMemClass S G] {H : S} {x : G} : |x| ∈ H ↔ x ∈ H := by
  

Proof state:
G✝ : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁶ : Group G✝
inst✝⁵ : Group G'
inst✝⁴ : Group G''
A : Type u_4
inst✝³ : AddGroup A
S : Type u_5
G : Type u_6
inst✝² : InvolutiveNeg G
inst✝¹ : LinearOrder G
x✝ : SetLike S G
inst✝ : NegMemClass S G
H : S
x : G
⊢ |x| ∈ H ↔ x ∈ H

Next tactic:
cases abs_choice x
@[simp] theorem abs_mem_iff {S G} [InvolutiveNeg G] [LinearOrder G] {_ : SetLike S G}
    [NegMemClass S G] {H : S} {x : G} : |x| ∈ H ↔ x ∈ H := by
  cases abs_choice x <;> 

Proof state:
case inl
G✝ : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁶ : Group G✝
inst✝⁵ : Group G'
inst✝⁴ : Group G''
A : Type u_4
inst✝³ : AddGroup A
S : Type u_5
G : Type u_6
inst✝² : InvolutiveNeg G
inst✝¹ : LinearOrder G
x✝ : SetLike S G
inst✝ : NegMemClass S G
H : S
x : G
h✝ : |x| = x
⊢ |x| ∈ H ↔ x ∈ H

Next tactic:
simp [*]
@[simp] theorem abs_mem_iff {S G} [InvolutiveNeg G] [LinearOrder G] {_ : SetLike S G}
    [NegMemClass S G] {H : S} {x : G} : |x| ∈ H ↔ x ∈ H := by
  cases abs_choice x <;> 

Proof state:
case inr
G✝ : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁶ : Group G✝
inst✝⁵ : Group G'
inst✝⁴ : Group G''
A : Type u_4
inst✝³ : AddGroup A
S : Type u_5
G : Type u_6
inst✝² : InvolutiveNeg G
inst✝¹ : LinearOrder G
x✝ : SetLike S G
inst✝ : NegMemClass S G
H : S
x : G
h✝ : |x| = -x
⊢ |x| ∈ H ↔ x ∈ H

Next tactic:
simp [*]
/-- A subgroup is closed under division. -/
@[to_additive (attr := aesop safe apply (rule_sets [SetLike]))
  "An additive subgroup is closed under subtraction."]
theorem div_mem {x y : M} (hx : x ∈ H) (hy : y ∈ H) : x / y ∈ H := by
  

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
M : Type u_5
S : Type u_6
inst✝¹ : DivInvMonoid M
inst✝ : SetLike S M
hSM : SubgroupClass S M
H K : S
x y : M
hx : x ∈ H
hy : y ∈ H
⊢ x / y ∈ H

Next tactic:
rw [div_eq_mul_inv]
/-- A subgroup is closed under division. -/
@[to_additive (attr := aesop safe apply (rule_sets [SetLike]))
  "An additive subgroup is closed under subtraction."]
theorem div_mem {x y : M} (hx : x ∈ H) (hy : y ∈ H) : x / y ∈ H := by
  rw [div_eq_mul_inv]; 

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
M : Type u_5
S : Type u_6
inst✝¹ : DivInvMonoid M
inst✝ : SetLike S M
hSM : SubgroupClass S M
H K : S
x y : M
hx : x ∈ H
hy : y ∈ H
⊢ x * y⁻¹ ∈ H

Next tactic:
exact mul_mem hx (inv_mem hy)
@[to_additive (attr := aesop safe apply (rule_sets [SetLike]))]
theorem zpow_mem {x : M} (hx : x ∈ K) : ∀ n : ℤ, x ^ n ∈ K
  | (n : ℕ) => by
    

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
M : Type u_5
S : Type u_6
inst✝¹ : DivInvMonoid M
inst✝ : SetLike S M
hSM : SubgroupClass S M
H K : S
x : M
hx : x ∈ K
n : ℕ
⊢ x ^ ↑n ∈ K

Next tactic:
rw [zpow_ofNat]
@[to_additive (attr := aesop safe apply (rule_sets [SetLike]))]
theorem zpow_mem {x : M} (hx : x ∈ K) : ∀ n : ℤ, x ^ n ∈ K
  | (n : ℕ) => by
    rw [zpow_ofNat]
    

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
M : Type u_5
S : Type u_6
inst✝¹ : DivInvMonoid M
inst✝ : SetLike S M
hSM : SubgroupClass S M
H K : S
x : M
hx : x ∈ K
n : ℕ
⊢ x ^ n ∈ K

Next tactic:
exact pow_mem hx n
@[to_additive (attr := aesop safe apply (rule_sets [SetLike]))]
theorem zpow_mem {x : M} (hx : x ∈ K) : ∀ n : ℤ, x ^ n ∈ K
  | (n : ℕ) => by
    rw [zpow_ofNat]
    exact pow_mem hx n
  | -[n+1] => by
    

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
M : Type u_5
S : Type u_6
inst✝¹ : DivInvMonoid M
inst✝ : SetLike S M
hSM : SubgroupClass S M
H K : S
x : M
hx : x ∈ K
n : ℕ
⊢ x ^ -[n+1] ∈ K

Next tactic:
rw [zpow_negSucc]
@[to_additive (attr := aesop safe apply (rule_sets [SetLike]))]
theorem zpow_mem {x : M} (hx : x ∈ K) : ∀ n : ℤ, x ^ n ∈ K
  | (n : ℕ) => by
    rw [zpow_ofNat]
    exact pow_mem hx n
  | -[n+1] => by
    rw [zpow_negSucc]
    

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
M : Type u_5
S : Type u_6
inst✝¹ : DivInvMonoid M
inst✝ : SetLike S M
hSM : SubgroupClass S M
H K : S
x : M
hx : x ∈ K
n : ℕ
⊢ (x ^ (n + 1))⁻¹ ∈ K

Next tactic:
exact inv_mem (pow_mem hx n.succ)
@[to_additive /-(attr := simp)-/] -- porting note: `simp` cannot simplify LHS
theorem exists_inv_mem_iff_exists_mem {P : G → Prop} :
    (∃ x : G, x ∈ H ∧ P x⁻¹) ↔ ∃ x ∈ H, P x := by
  

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
P : G → Prop
⊢ (∃ x ∈ H, P x⁻¹) ↔ ∃ x ∈ H, P x

Next tactic:
constructor
@[to_additive /-(attr := simp)-/] -- porting note: `simp` cannot simplify LHS
theorem exists_inv_mem_iff_exists_mem {P : G → Prop} :
    (∃ x : G, x ∈ H ∧ P x⁻¹) ↔ ∃ x ∈ H, P x := by
  constructor <;>
    · 

Proof state:
case mp
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
P : G → Prop
⊢ (∃ x ∈ H, P x⁻¹) → ∃ x ∈ H, P x

Next tactic:
rintro ⟨x, x_in, hx⟩
@[to_additive /-(attr := simp)-/] -- porting note: `simp` cannot simplify LHS
theorem exists_inv_mem_iff_exists_mem {P : G → Prop} :
    (∃ x : G, x ∈ H ∧ P x⁻¹) ↔ ∃ x ∈ H, P x := by
  constructor <;>
    · rintro ⟨x, x_in, hx⟩
      

Proof state:
case mp.intro.intro
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
P : G → Prop
x : G
x_in : x ∈ H
hx : P x⁻¹
⊢ ∃ x ∈ H, P x

Next tactic:
exact ⟨x⁻¹, inv_mem x_in, by simp [hx]⟩
@[to_additive /-(attr := simp)-/] -- porting note: `simp` cannot simplify LHS
theorem exists_inv_mem_iff_exists_mem {P : G → Prop} :
    (∃ x : G, x ∈ H ∧ P x⁻¹) ↔ ∃ x ∈ H, P x := by
  constructor <;>
    · rintro ⟨x, x_in, hx⟩
      exact ⟨x⁻¹, inv_mem x_in, by 

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
P : G → Prop
x : G
x_in : x ∈ H
hx : P x⁻¹
⊢ P x⁻¹

Next tactic:
simp [hx]
@[to_additive /-(attr := simp)-/] -- porting note: `simp` cannot simplify LHS
theorem exists_inv_mem_iff_exists_mem {P : G → Prop} :
    (∃ x : G, x ∈ H ∧ P x⁻¹) ↔ ∃ x ∈ H, P x := by
  constructor <;>
    · 

Proof state:
case mpr
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
P : G → Prop
⊢ (∃ x ∈ H, P x) → ∃ x ∈ H, P x⁻¹

Next tactic:
rintro ⟨x, x_in, hx⟩
@[to_additive /-(attr := simp)-/] -- porting note: `simp` cannot simplify LHS
theorem exists_inv_mem_iff_exists_mem {P : G → Prop} :
    (∃ x : G, x ∈ H ∧ P x⁻¹) ↔ ∃ x ∈ H, P x := by
  constructor <;>
    · rintro ⟨x, x_in, hx⟩
      

Proof state:
case mpr.intro.intro
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
P : G → Prop
x : G
x_in : x ∈ H
hx : P x
⊢ ∃ x ∈ H, P x⁻¹

Next tactic:
exact ⟨x⁻¹, inv_mem x_in, by simp [hx]⟩
@[to_additive /-(attr := simp)-/] -- porting note: `simp` cannot simplify LHS
theorem exists_inv_mem_iff_exists_mem {P : G → Prop} :
    (∃ x : G, x ∈ H ∧ P x⁻¹) ↔ ∃ x ∈ H, P x := by
  constructor <;>
    · rintro ⟨x, x_in, hx⟩
      exact ⟨x⁻¹, inv_mem x_in, by 

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
P : G → Prop
x : G
x_in : x ∈ H
hx : P x
⊢ P x⁻¹⁻¹

Next tactic:
simp [hx]
@[to_additive]
theorem mul_mem_cancel_right {x y : G} (h : x ∈ H) : y * x ∈ H ↔ y ∈ H :=
  ⟨fun hba => by 

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
x y : G
h : x ∈ H
hba : y * x ∈ H
⊢ y ∈ H

Next tactic:
simpa using mul_mem hba (inv_mem h)
@[to_additive]
theorem mul_mem_cancel_left {x y : G} (h : x ∈ H) : x * y ∈ H ↔ y ∈ H :=
  ⟨fun hab => by 

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
x y : G
h : x ∈ H
hab : x * y ∈ H
⊢ y ∈ H

Next tactic:
simpa using mul_mem (inv_mem h) hab
@[to_additive]
theorem subset_union {H K L : S} : (H : Set G) ⊆ K ∪ L ↔ H ≤ K ∨ H ≤ L := by
  

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H✝ K✝ : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
H K L : S
⊢ ↑H ⊆ ↑K ∪ ↑L ↔ H ≤ K ∨ H ≤ L

Next tactic:
refine ⟨fun h ↦ ?_, fun h x xH ↦ h.imp (· xH) (· xH)⟩
@[to_additive]
theorem subset_union {H K L : S} : (H : Set G) ⊆ K ∪ L ↔ H ≤ K ∨ H ≤ L := by
  refine ⟨fun h ↦ ?_, fun h x xH ↦ h.imp (· xH) (· xH)⟩
  

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H✝ K✝ : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
H K L : S
h : ↑H ⊆ ↑K ∪ ↑L
⊢ H ≤ K ∨ H ≤ L

Next tactic:
rw [or_iff_not_imp_left, SetLike.not_le_iff_exists]
@[to_additive]
theorem subset_union {H K L : S} : (H : Set G) ⊆ K ∪ L ↔ H ≤ K ∨ H ≤ L := by
  refine ⟨fun h ↦ ?_, fun h x xH ↦ h.imp (· xH) (· xH)⟩
  rw [or_iff_not_imp_left, SetLike.not_le_iff_exists]
  

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H✝ K✝ : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
H K L : S
h : ↑H ⊆ ↑K ∪ ↑L
⊢ (∃ x ∈ H, x ∉ K) → H ≤ L

Next tactic:
exact fun ⟨x, xH, xK⟩ y yH ↦ (h <| mul_mem xH yH).elim
    ((h yH).resolve_left fun yK ↦ xK <| (mul_mem_cancel_right yK).mp ·)
    (mul_mem_cancel_left <| (h xH).resolve_left xK).mp
@[to_additive (attr := simp)]
theorem coeSubtype : (SubgroupClass.subtype H : H → G) = ((↑) : H → G) := by
  

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
⊢ ⇑↑H = Subtype.val

Next tactic:
rfl
@[to_additive (attr := simp)]
theorem inclusion_self (x : H) : inclusion le_rfl x = x := by
  

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
x : ↥H
⊢ (inclusion (_ : H ≤ H)) x = x

Next tactic:
cases x
@[to_additive (attr := simp)]
theorem inclusion_self (x : H) : inclusion le_rfl x = x := by
  cases x
  

Proof state:
case mk
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
val✝ : G
property✝ : val✝ ∈ H
⊢ (inclusion (_ : H ≤ H)) { val := val✝, property := property✝ } = { val := val✝, property := property✝ }

Next tactic:
rfl
@[to_additive]
theorem inclusion_right (h : H ≤ K) (x : K) (hx : (x : G) ∈ H) : inclusion h ⟨x, hx⟩ = x := by
  

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
h : H ≤ K
x : ↥K
hx : ↑x ∈ H
⊢ (inclusion h) { val := ↑x, property := hx } = x

Next tactic:
cases x
@[to_additive]
theorem inclusion_right (h : H ≤ K) (x : K) (hx : (x : G) ∈ H) : inclusion h ⟨x, hx⟩ = x := by
  cases x
  

Proof state:
case mk
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
h : H ≤ K
val✝ : G
property✝ : val✝ ∈ K
hx : ↑{ val := val✝, property := property✝ } ∈ H
⊢ (inclusion h) { val := ↑{ val := val✝, property := property✝ }, property := hx } =
    { val := val✝, property := property✝ }

Next tactic:
rfl
@[simp]
theorem inclusion_inclusion {L : S} (hHK : H ≤ K) (hKL : K ≤ L) (x : H) :
    inclusion hKL (inclusion hHK x) = inclusion (hHK.trans hKL) x := by
  

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
L : S
hHK : H ≤ K
hKL : K ≤ L
x : ↥H
⊢ (inclusion hKL) ((inclusion hHK) x) = (inclusion (_ : H ≤ L)) x

Next tactic:
cases x
@[simp]
theorem inclusion_inclusion {L : S} (hHK : H ≤ K) (hKL : K ≤ L) (x : H) :
    inclusion hKL (inclusion hHK x) = inclusion (hHK.trans hKL) x := by
  cases x
  

Proof state:
case mk
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
L : S
hHK : H ≤ K
hKL : K ≤ L
val✝ : G
property✝ : val✝ ∈ H
⊢ (inclusion hKL) ((inclusion hHK) { val := val✝, property := property✝ }) =
    (inclusion (_ : H ≤ L)) { val := val✝, property := property✝ }

Next tactic:
rfl
@[to_additive (attr := simp)]
theorem coe_inclusion {H K : S} {h : H ≤ K} (a : H) : (inclusion h a : G) = a := by
  

Proof state:
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁷ : Group G
inst✝⁶ : Group G'
inst✝⁵ : Group G''
A : Type u_4
inst✝⁴ : AddGroup A
M : Type u_5
S : Type u_6
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H✝ K✝ : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
H K : S
h : H ≤ K
a : ↥H
⊢ ↑((inclusion h) a) = ↑a

Next tactic:
cases a