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

Proof steps:
state_before: G : Type u_1
inst✝ : Group G
H : Subgroup G
R S : Set G
hR : R ∈ rightTransversals ↑H
hR1 : 1 ∈ R
hS : closure S = ⊤
⊢ closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) = H
state_after: G : Type u_1
inst✝ : Group G
H : Subgroup G
R S : Set G
hR : R ∈ rightTransversals ↑H
hR1 : 1 ∈ R
hS : closure S = ⊤
hU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H
⊢ closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) = H
tactic: have hU : closure ((R * S).image fun g => g * (toFun hR g : G)⁻¹) ≤ H := by
    rw [closure_le]
    rintro - ⟨g, -, rfl⟩
    exact mul_inv_toFun_mem hR g
state_before: G : Type u_1
inst✝ : Group G
H : Subgroup G
R S : Set G
hR : R ∈ rightTransversals ↑H
hR1 : 1 ∈ R
hS : closure S = ⊤
hU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H
⊢ closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) = H
state_after: G : Type u_1
inst✝ : Group G
H : Subgroup G
R S : Set G
hR : R ∈ rightTransversals ↑H
hR1 : 1 ∈ R
hS : closure S = ⊤
hU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H
h : G
hh : h ∈ H
⊢ h ∈ closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))
tactic: refine le_antisymm hU fun h hh => ?_
state_before: G : Type u_1
inst✝ : Group G
H : Subgroup G
R S : Set G
hR : R ∈ rightTransversals ↑H
hR1 : 1 ∈ R
hS : closure S = ⊤
hU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H
h : G
hh : h ∈ H
⊢ h ∈ closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))
state_after: case intro.intro.intro.intro
G : Type u_1
inst✝ : Group G
H : Subgroup G
R S : Set G
hR : R ∈ rightTransversals ↑H
hR1 : 1 ∈ R
hS : closure S = ⊤
hU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H
g : G
hg : g ∈ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)))
r : G
hr : r ∈ R
hh : (fun x x_1 => x * x_1) g r ∈ H
⊢ (fun x x_1 => x * x_1) g r ∈ closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))
tactic: obtain ⟨g, hg, r, hr, rfl⟩ :=
    show h ∈ _ from eq_top_iff.mp (closure_mul_image_mul_eq_top hR hR1 hS) (mem_top h)
state_before: case intro.intro.intro.intro
G : Type u_1
inst✝ : Group G
H : Subgroup G
R S : Set G
hR : R ∈ rightTransversals ↑H
hR1 : 1 ∈ R
hS : closure S = ⊤
hU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H
g : G
hg : g ∈ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)))
r : G
hr : r ∈ R
hh : (fun x x_1 => x * x_1) g r ∈ H
⊢ (fun x x_1 => x * x_1) g r ∈ closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))
state_after: case intro.intro.intro.intro
G : Type u_1
inst✝ : Group G
H : Subgroup G
R S : Set G
hR : R ∈ rightTransversals ↑H
hR1 : 1 ∈ R
hS : closure S = ⊤
hU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H
g : G
hg : g ∈ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)))
r : G
hr : r ∈ R
hh : (fun x x_1 => x * x_1) g r ∈ H
⊢ ⟨r, hr⟩ = ⟨1, hR1⟩
tactic: suffices (⟨r, hr⟩ : R) = (⟨1, hR1⟩ : R) by
    simpa only [show r = 1 from Subtype.ext_iff.mp this, mul_one]
state_before: case intro.intro.intro.intro
G : Type u_1
inst✝ : Group G
H : Subgroup G
R S : Set G
hR : R ∈ rightTransversals ↑H
hR1 : 1 ∈ R
hS : closure S = ⊤
hU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H
g : G
hg : g ∈ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)))
r : G
hr : r ∈ R
hh : (fun x x_1 => x * x_1) g r ∈ H
⊢ ⟨r, hr⟩ = ⟨1, hR1⟩
state_after: case intro.intro.intro.intro.py₁
G : Type u_1
inst✝ : Group G
H : Subgroup G
R S : Set G
hR : R ∈ rightTransversals ↑H
hR1 : 1 ∈ R
hS : closure S = ⊤
hU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H
g : G
hg : g ∈ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)))
r : G
hr : r ∈ R
hh : (fun x x_1 => x * x_1) g r ∈ H
⊢ r * (↑⟨r, hr⟩)⁻¹ ∈ ↑H

case intro.intro.intro.intro.py₂
G : Type u_1
inst✝ : Group G
H : Subgroup G
R S : Set G
hR : R ∈ rightTransversals ↑H
hR1 : 1 ∈ R
hS : closure S = ⊤
hU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H
g : G
hg : g ∈ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)))
r : G
hr : r ∈ R
hh : (fun x x_1 => x * x_1) g r ∈ H
⊢ r * (↑⟨1, hR1⟩)⁻¹ ∈ ↑H
tactic: apply (mem_rightTransversals_iff_existsUnique_mul_inv_mem.mp hR r).unique