Theorem: Submonoid.leftInvEquiv_apply
File: Mathlib/GroupTheory/Submonoid/Inverses.lean

Proof steps:
state_before: M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ ↥S.leftInv
state_after: M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
x' : Mˣ
hx : ↑x' = ↑x
⊢ ↥S.leftInv
tactic: choose x' hx using hS x.prop
state_before: M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
x' : Mˣ
hx : ↑x' = ↑x
⊢ ↥S.leftInv
state_after: no goals
tactic: exact ⟨x'.inv, x, hx ▸ x'.inv_val⟩
state_before: M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S.leftInv
⊢ ↑((fun x => (fun x' hx => ⟨x'.inv, ⋯⟩) (Classical.choose ⋯) ⋯) ((↑__src✝).toFun x)) = ↑x
state_after: M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S.leftInv
⊢ (Classical.choose ⋯).inv = ↑x
tactic: dsimp only
state_before: M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S.leftInv
⊢ (Classical.choose ⋯).inv = ↑x
state_after: M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S.leftInv
h : ∃ u, ↑u = ↑((↑S.fromCommLeftInv).toFun x)
⊢ (Classical.choose h).inv = ↑x
tactic: generalize_proofs h
state_before: M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S.leftInv
h : ∃ u, ↑u = ↑((↑S.fromCommLeftInv).toFun x)
⊢ (Classical.choose h).inv = ↑x
state_after: M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S.leftInv
h : ∃ u, ↑u = ↑((↑S.fromCommLeftInv).toFun x)
⊢ (Classical.choose h).inv * ↑h.choose = ↑x * ↑h.choose
tactic: rw [← h.choose.mul_left_inj]
state_before: M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S.leftInv
h : ∃ u, ↑u = ↑((↑S.fromCommLeftInv).toFun x)
⊢ (Classical.choose h).inv * ↑h.choose = ↑x * ↑h.choose
state_after: M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S.leftInv
h : ∃ u, ↑u = ↑((↑S.fromCommLeftInv).toFun x)
⊢ (Classical.choose h).inv * ↑h.choose = ↑x * ↑((↑S.fromCommLeftInv).toFun x)
tactic: conv => rhs; rw [h.choose_spec]
state_before: M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S.leftInv
h : ∃ u, ↑u = ↑((↑S.fromCommLeftInv).toFun x)
⊢ (Classical.choose h).inv * ↑h.choose = ↑x * ↑((↑S.fromCommLeftInv).toFun x)
state_after: no goals
tactic: exact h.choose.inv_val.trans (S.mul_fromLeftInv x).symm
state_before: M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ (↑__src✝).toFun ((fun x => (fun x' hx => ⟨x'.inv, ⋯⟩) (Classical.choose ⋯) ⋯) x) = x
state_after: M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ S.fromLeftInv ⟨(Classical.choose ⋯).inv, ⋯⟩ = x
tactic: dsimp only [fromCommLeftInv]
state_before: M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ S.fromLeftInv ⟨(Classical.choose ⋯).inv, ⋯⟩ = x
state_after: case a
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ ↑(S.fromLeftInv ⟨(Classical.choose ⋯).inv, ⋯⟩) = ↑x
tactic: ext
state_before: case a
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ ↑(S.fromLeftInv ⟨(Classical.choose ⋯).inv, ⋯⟩) = ↑x
state_after: case a
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ ↑⟨(Classical.choose ⋯).inv, ⋯⟩ * ↑x = 1
tactic: rw [fromLeftInv_eq_iff]
state_before: case a
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ ↑⟨(Classical.choose ⋯).inv, ⋯⟩ * ↑x = 1
state_after: case h.e'_2.h.e'_6
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ ↑x = ↑(Exists.choose ⋯)
tactic: convert (hS x.prop).choose.inv_val
state_before: case h.e'_2.h.e'_6
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ ↑x = ↑(Exists.choose ⋯)
state_after: no goals
tactic: exact (hS x.prop).choose_spec.symm