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

tactic: let f : G → R := fun g => toFun 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 = ⊤
⊢ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))) * R = ⊤

tactic: let U : Set G := (R * S).image fun g => g * (f g : 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 = ⊤
f : G → ↑R := fun g => toFun hR g
⊢ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))) * R = ⊤

tactic: change (closure U : Set G) * R = ⊤
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 = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
⊢ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))) * R = ⊤

tactic: refine' top_le_iff.mp fun 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 = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
⊢ ↑(closure U) * R = ⊤

tactic: apply closure_induction_right (eq_top_iff.mp hS (mem_top 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 = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
g : G
x✝ : g ∈ ⊤
⊢ g ∈ ↑(closure U) * R

tactic: exact ⟨1, 1, (closure U).one_mem, hR1, one_mul 1⟩
state_before: case H1
G : Type u_1
inst✝ : Group G
H : Subgroup G
R S : Set G
hR : R ∈ rightTransversals ↑H
hR1 : 1 ∈ R
hS : closure S = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
g : G
x✝ : g ∈ ⊤
⊢ 1 ∈ ↑(closure U) * R

tactic: rintro - s hs ⟨u, r, hu, hr, rfl⟩
state_before: case Hmul
G : Type u_1
inst✝ : Group G
H : Subgroup G
R S : Set G
hR : R ∈ rightTransversals ↑H
hR1 : 1 ∈ R
hS : closure S = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
g : G
x✝ : g ∈ ⊤
⊢ ∀ (x y : G), y ∈ S → x ∈ ↑(closure U) * R → x * y ∈ ↑(closure U) * R

tactic: rw [show u * r * s = u * (r * s * (f (r * s) : G)⁻¹) * f (r * s) by group]
state_before: case Hmul.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 = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
g : G
x✝ : g ∈ ⊤
s : G
hs : s ∈ S
u r : G
hu : u ∈ ↑(closure U)
hr : r ∈ R
⊢ (fun x x_1 => x * x_1) u r * s ∈ ↑(closure U) * R

tactic: refine' Set.mul_mem_mul ((closure U).mul_mem hu _) (f (r * s)).coe_prop
state_before: case Hmul.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 = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
g : G
x✝ : g ∈ ⊤
s : G
hs : s ∈ S
u r : G
hu : u ∈ ↑(closure U)
hr : r ∈ R
⊢ u * (r * s * (↑(f (r * s)))⁻¹) * ↑(f (r * s)) ∈ ↑(closure U) * R

tactic: exact subset_closure ⟨r * s, Set.mul_mem_mul hr hs, rfl⟩
state_before: case Hmul.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 = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
g : G
x✝ : g ∈ ⊤
s : G
hs : s ∈ S
u r : G
hu : u ∈ ↑(closure U)
hr : r ∈ R
⊢ r * s * (↑(f (r * s)))⁻¹ ∈ closure U

tactic: group
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 = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
g : G
x✝ : g ∈ ⊤
s : G
hs : s ∈ S
u r : G
hu : u ∈ ↑(closure U)
hr : r ∈ R
⊢ u * r * s = u * (r * s * (↑(f (r * s)))⁻¹) * ↑(f (r * s))

tactic: rintro - s hs ⟨u, r, hu, hr, rfl⟩
state_before: case Hinv
G : Type u_1
inst✝ : Group G
H : Subgroup G
R S : Set G
hR : R ∈ rightTransversals ↑H
hR1 : 1 ∈ R
hS : closure S = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
g : G
x✝ : g ∈ ⊤
⊢ ∀ (x y : G), y ∈ S → x ∈ ↑(closure U) * R → x * y⁻¹ ∈ ↑(closure U) * R

tactic: rw [show u * r * s⁻¹ = u * (f (r * s⁻¹) * s * r⁻¹)⁻¹ * f (r * s⁻¹) by group]
state_before: case Hinv.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 = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
g : G
x✝ : g ∈ ⊤
s : G
hs : s ∈ S
u r : G
hu : u ∈ ↑(closure U)
hr : r ∈ R
⊢ (fun x x_1 => x * x_1) u r * s⁻¹ ∈ ↑(closure U) * R

tactic: refine' Set.mul_mem_mul ((closure U).mul_mem hu ((closure U).inv_mem _)) (f (r * s⁻¹)).2
state_before: case Hinv.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 = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
g : G
x✝ : g ∈ ⊤
s : G
hs : s ∈ S
u r : G
hu : u ∈ ↑(closure U)
hr : r ∈ R
⊢ u * (↑(f (r * s⁻¹)) * s * r⁻¹)⁻¹ * ↑(f (r * s⁻¹)) ∈ ↑(closure U) * R

tactic: refine' subset_closure ⟨f (r * s⁻¹) * s, Set.mul_mem_mul (f (r * s⁻¹)).2 hs, _⟩
state_before: case Hinv.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 = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
g : G
x✝ : g ∈ ⊤
s : G
hs : s ∈ S
u r : G
hu : u ∈ ↑(closure U)
hr : r ∈ R
⊢ ↑(f (r * s⁻¹)) * s * r⁻¹ ∈ closure U

tactic: rw [mul_right_inj, inv_inj, ← Subtype.coe_mk r hr, ← Subtype.ext_iff, Subtype.coe_mk]
state_before: case Hinv.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 = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
g : G
x✝ : g ∈ ⊤
s : G
hs : s ∈ S
u r : G
hu : u ∈ ↑(closure U)
hr : r ∈ R
⊢ (fun g => g * (↑(f g))⁻¹) (↑(f (r * s⁻¹)) * s) = ↑(f (r * s⁻¹)) * s * r⁻¹

tactic: apply (mem_rightTransversals_iff_existsUnique_mul_inv_mem.mp hR (f (r * s⁻¹) * s)).unique
  (mul_inv_toFun_mem hR (f (r * s⁻¹) * s))
state_before: case Hinv.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 = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
g : G
x✝ : g ∈ ⊤
s : G
hs : s ∈ S
u r : G
hu : u ∈ ↑(closure U)
hr : r ∈ R
⊢ f (↑(toFun hR (↑{ val := r, property := hr } * s⁻¹)) * s) = { val := r, property := hr }

tactic: rw [mul_assoc, ← inv_inv s, ← mul_inv_rev, inv_inv]
state_before: case Hinv.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 = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
g : G
x✝ : g ∈ ⊤
s : G
hs : s ∈ S
u r : G
hu : u ∈ ↑(closure U)
hr : r ∈ R
⊢ ↑(f (r * s⁻¹)) * s * (↑{ val := r, property := hr })⁻¹ ∈ ↑H

tactic: exact toFun_mul_inv_mem hR (r * s⁻¹)
state_before: case Hinv.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 = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
g : G
x✝ : g ∈ ⊤
s : G
hs : s ∈ S
u r : G
hu : u ∈ ↑(closure U)
hr : r ∈ R
⊢ ↑(f (r * s⁻¹)) * (↑{ val := r, property := hr } * s⁻¹)⁻¹ ∈ ↑H

tactic: group
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 = ⊤
f : G → ↑R := fun g => toFun hR g
U : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)
g : G
x✝ : g ∈ ⊤
s : G
hs : s ∈ S
u r : G
hu : u ∈ ↑(closure U)
hr : r ∈ R
⊢ u * r * s⁻¹ = u * (↑(f (r * s⁻¹)) * s * r⁻¹)⁻¹ * ↑(f (r * s⁻¹))