l3lab/ntp-mathlib huggingface dataset:
theorem equiv_fst_eq_self_iff_mem {g : G} (h1 : 1 ∈ T) :
    ((hST.equiv g).fst : G) = g ↔ g ∈ S := by
  constructor
  · 

Proof state:
case mp
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hST : IsComplement S T
hHT : IsComplement (↑H) T
hSK : IsComplement S ↑K
g : G
h1 : 1 ∈ T
⊢ ↑((equiv hST) g).1 = g → g ∈ S

Next tactic:
intro h
theorem equiv_fst_eq_self_iff_mem {g : G} (h1 : 1 ∈ T) :
    ((hST.equiv g).fst : G) = g ↔ g ∈ S := by
  constructor
  · intro h
    

Proof state:
case mp
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hST : IsComplement S T
hHT : IsComplement (↑H) T
hSK : IsComplement S ↑K
g : G
h1 : 1 ∈ T
h : ↑((equiv hST) g).1 = g
⊢ g ∈ S

Next tactic:
rw [← h]
theorem equiv_fst_eq_self_iff_mem {g : G} (h1 : 1 ∈ T) :
    ((hST.equiv g).fst : G) = g ↔ g ∈ S := by
  constructor
  · intro h
    rw [← h]
    

Proof state:
case mp
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hST : IsComplement S T
hHT : IsComplement (↑H) T
hSK : IsComplement S ↑K
g : G
h1 : 1 ∈ T
h : ↑((equiv hST) g).1 = g
⊢ ↑((equiv hST) g).1 ∈ S

Next tactic:
exact Subtype.prop _
theorem equiv_fst_eq_self_iff_mem {g : G} (h1 : 1 ∈ T) :
    ((hST.equiv g).fst : G) = g ↔ g ∈ S := by
  constructor
  · intro h
    rw [← h]
    exact Subtype.prop _
  · 

Proof state:
case mpr
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hST : IsComplement S T
hHT : IsComplement (↑H) T
hSK : IsComplement S ↑K
g : G
h1 : 1 ∈ T
⊢ g ∈ S → ↑((equiv hST) g).1 = g

Next tactic:
intro h
theorem equiv_fst_eq_self_iff_mem {g : G} (h1 : 1 ∈ T) :
    ((hST.equiv g).fst : G) = g ↔ g ∈ S := by
  constructor
  · intro h
    rw [← h]
    exact Subtype.prop _
  · intro h
    

Proof state:
case mpr
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hST : IsComplement S T
hHT : IsComplement (↑H) T
hSK : IsComplement S ↑K
g : G
h1 : 1 ∈ T
h : g ∈ S
⊢ ↑((equiv hST) g).1 = g

Next tactic:
rw [hST.equiv_fst_eq_self_of_mem_of_one_mem h1 h]
theorem equiv_snd_eq_self_iff_mem {g : G} (h1 : 1 ∈ S) :
    ((hST.equiv g).snd : G) = g ↔ g ∈ T := by
  

Proof state:
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hST : IsComplement S T
hHT : IsComplement (↑H) T
hSK : IsComplement S ↑K
g : G
h1 : 1 ∈ S
⊢ ↑((equiv hST) g).2 = g ↔ g ∈ T

Next tactic:
constructor
theorem equiv_snd_eq_self_iff_mem {g : G} (h1 : 1 ∈ S) :
    ((hST.equiv g).snd : G) = g ↔ g ∈ T := by
  constructor
  · 

Proof state:
case mp
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hST : IsComplement S T
hHT : IsComplement (↑H) T
hSK : IsComplement S ↑K
g : G
h1 : 1 ∈ S
⊢ ↑((equiv hST) g).2 = g → g ∈ T

Next tactic:
intro h
theorem equiv_snd_eq_self_iff_mem {g : G} (h1 : 1 ∈ S) :
    ((hST.equiv g).snd : G) = g ↔ g ∈ T := by
  constructor
  · intro h
    

Proof state:
case mp
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hST : IsComplement S T
hHT : IsComplement (↑H) T
hSK : IsComplement S ↑K
g : G
h1 : 1 ∈ S
h : ↑((equiv hST) g).2 = g
⊢ g ∈ T

Next tactic:
rw [← h]
theorem equiv_snd_eq_self_iff_mem {g : G} (h1 : 1 ∈ S) :
    ((hST.equiv g).snd : G) = g ↔ g ∈ T := by
  constructor
  · intro h
    rw [← h]
    

Proof state:
case mp
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hST : IsComplement S T
hHT : IsComplement (↑H) T
hSK : IsComplement S ↑K
g : G
h1 : 1 ∈ S
h : ↑((equiv hST) g).2 = g
⊢ ↑((equiv hST) g).2 ∈ T

Next tactic:
exact Subtype.prop _
theorem equiv_snd_eq_self_iff_mem {g : G} (h1 : 1 ∈ S) :
    ((hST.equiv g).snd : G) = g ↔ g ∈ T := by
  constructor
  · intro h
    rw [← h]
    exact Subtype.prop _
  · 

Proof state:
case mpr
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hST : IsComplement S T
hHT : IsComplement (↑H) T
hSK : IsComplement S ↑K
g : G
h1 : 1 ∈ S
⊢ g ∈ T → ↑((equiv hST) g).2 = g

Next tactic:
intro h
theorem equiv_snd_eq_self_iff_mem {g : G} (h1 : 1 ∈ S) :
    ((hST.equiv g).snd : G) = g ↔ g ∈ T := by
  constructor
  · intro h
    rw [← h]
    exact Subtype.prop _
  · intro h
    

Proof state:
case mpr
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hST : IsComplement S T
hHT : IsComplement (↑H) T
hSK : IsComplement S ↑K
g : G
h1 : 1 ∈ S
h : g ∈ T
⊢ ↑((equiv hST) g).2 = g

Next tactic:
rw [hST.equiv_snd_eq_self_of_mem_of_one_mem h1 h]
theorem coe_equiv_fst_eq_one_iff_mem {g : G} (h1 : 1 ∈ S) :
    ((hST.equiv g).fst : G) = 1 ↔ g ∈ T := by
  

Proof state:
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hST : IsComplement S T
hHT : IsComplement (↑H) T
hSK : IsComplement S ↑K
g : G
h1 : 1 ∈ S
⊢ ↑((equiv hST) g).1 = 1 ↔ g ∈ T

Next tactic:
rw [equiv_fst_eq_mul_inv, mul_inv_eq_one, eq_comm, equiv_snd_eq_self_iff_mem _ h1]
theorem coe_equiv_snd_eq_one_iff_mem {g : G} (h1 : 1 ∈ T) :
    ((hST.equiv g).snd : G) = 1 ↔ g ∈ S := by
  

Proof state:
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hST : IsComplement S T
hHT : IsComplement (↑H) T
hSK : IsComplement S ↑K
g : G
h1 : 1 ∈ T
⊢ ↑((equiv hST) g).2 = 1 ↔ g ∈ S

Next tactic:
rw [equiv_snd_eq_inv_mul, inv_mul_eq_one, equiv_fst_eq_self_iff_mem _ h1]
@[to_additive]
theorem toEquiv_apply {f : G ⧸ H → G} (hf : ∀ q, (f q : G ⧸ H) = q) (q : G ⧸ H) :
    (toEquiv (range_mem_leftTransversals hf) q : G) = f q := by
  

Proof state:
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
f : G ⧸ H → G
hf : ∀ (q : G ⧸ H), ↑(f q) = q
q : G ⧸ H
⊢ ↑((toEquiv (_ : (range fun q => f q) ∈ leftTransversals ↑H)) q) = f q

Next tactic:
refine' (Subtype.ext_iff.mp _).trans (Subtype.coe_mk (f q) ⟨q, rfl⟩)
@[to_additive]
theorem toEquiv_apply {f : G ⧸ H → G} (hf : ∀ q, (f q : G ⧸ H) = q) (q : G ⧸ H) :
    (toEquiv (range_mem_leftTransversals hf) q : G) = f q := by
  refine' (Subtype.ext_iff.mp _).trans (Subtype.coe_mk (f q) ⟨q, rfl⟩)
  

Proof state:
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
f : G ⧸ H → G
hf : ∀ (q : G ⧸ H), ↑(f q) = q
q : G ⧸ H
⊢ (toEquiv (_ : (range fun q => f q) ∈ leftTransversals ↑H)) q =
    { val := f q, property := (_ : ∃ y, (fun q => f q) y = f q) }

Next tactic:
exact (toEquiv (range_mem_leftTransversals hf)).apply_eq_iff_eq_symm_apply.mpr (hf q).symm
@[to_additive]
theorem inv_mul_toFun_mem (hS : S ∈ Subgroup.leftTransversals (H : Set G)) (g : G) :
    g⁻¹ * toFun hS g ∈ H :=
  (congr_arg (· ∈ H) (by 

Proof state:
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hS : S ∈ leftTransversals ↑H
g : G
⊢ ((↑(toFun hS g))⁻¹ * g)⁻¹ = g⁻¹ * ↑(toFun hS g)

Next tactic:
rw [mul_inv_rev, inv_inv]
@[to_additive]
theorem toEquiv_apply {f : Quotient (QuotientGroup.rightRel H) → G}
    (hf : ∀ q, Quotient.mk'' (f q) = q) (q : Quotient (QuotientGroup.rightRel H)) :
    (toEquiv (range_mem_rightTransversals hf) q : G) = f q := by
  

Proof state:
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
f : Quotient (QuotientGroup.rightRel H) → G
hf : ∀ (q : Quotient (QuotientGroup.rightRel H)), Quotient.mk'' (f q) = q
q : Quotient (QuotientGroup.rightRel H)
⊢ ↑((toEquiv (_ : (range fun q => f q) ∈ rightTransversals ↑H)) q) = f q

Next tactic:
refine' (Subtype.ext_iff.mp _).trans (Subtype.coe_mk (f q) ⟨q, rfl⟩)
@[to_additive]
theorem toEquiv_apply {f : Quotient (QuotientGroup.rightRel H) → G}
    (hf : ∀ q, Quotient.mk'' (f q) = q) (q : Quotient (QuotientGroup.rightRel H)) :
    (toEquiv (range_mem_rightTransversals hf) q : G) = f q := by
  refine' (Subtype.ext_iff.mp _).trans (Subtype.coe_mk (f q) ⟨q, rfl⟩)
  

Proof state:
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
f : Quotient (QuotientGroup.rightRel H) → G
hf : ∀ (q : Quotient (QuotientGroup.rightRel H)), Quotient.mk'' (f q) = q
q : Quotient (QuotientGroup.rightRel H)
⊢ (toEquiv (_ : (range fun q => f q) ∈ rightTransversals ↑H)) q =
    { val := f q, property := (_ : ∃ y, (fun q => f q) y = f q) }

Next tactic:
exact (toEquiv (range_mem_rightTransversals hf)).apply_eq_iff_eq_symm_apply.mpr (hf q).symm
@[to_additive]
theorem toFun_mul_inv_mem (hS : S ∈ Subgroup.rightTransversals (H : Set G)) (g : G) :
    (toFun hS g : G) * g⁻¹ ∈ H :=
  (congr_arg (· ∈ H) (by 

Proof state:
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hS : S ∈ rightTransversals ↑H
g : G
⊢ (g * (↑(toFun hS g))⁻¹)⁻¹ = ↑(toFun hS g) * g⁻¹

Next tactic:
rw [mul_inv_rev, inv_inv]
@[to_additive]
noncomputable instance : MulAction F (leftTransversals (H : Set G)) where
  smul f T :=
    ⟨f • (T : Set G), by
      

Proof state:
G : Type u_1
inst✝³ : Group G
H K : Subgroup G
S T✝ : Set G
F : Type u_2
inst✝² : Group F
inst✝¹ : MulAction F G
inst✝ : QuotientAction F H
f : F
T : ↑(leftTransversals ↑H)
⊢ f • ↑T ∈ leftTransversals ↑H

Next tactic:
refine' mem_leftTransversals_iff_existsUnique_inv_mul_mem.mpr fun g => _
@[to_additive]
noncomputable instance : MulAction F (leftTransversals (H : Set G)) where
  smul f T :=
    ⟨f • (T : Set G), by
      refine' mem_leftTransversals_iff_existsUnique_inv_mul_mem.mpr fun g => _
      

Proof state:
G : Type u_1
inst✝³ : Group G
H K : Subgroup G
S T✝ : Set G
F : Type u_2
inst✝² : Group F
inst✝¹ : MulAction F G
inst✝ : QuotientAction F H
f : F
T : ↑(leftTransversals ↑H)
g : G
⊢ ∃! s, (↑s)⁻¹ * g ∈ ↑H

Next tactic:
obtain ⟨t, ht1, ht2⟩ := mem_leftTransversals_iff_existsUnique_inv_mul_mem.mp T.2 (f⁻¹ • g)
@[to_additive]
noncomputable instance : MulAction F (leftTransversals (H : Set G)) where
  smul f T :=
    ⟨f • (T : Set G), by
      refine' mem_leftTransversals_iff_existsUnique_inv_mul_mem.mpr fun g => _
      obtain ⟨t, ht1, ht2⟩ := mem_leftTransversals_iff_existsUnique_inv_mul_mem.mp T.2 (f⁻¹ • g)
      

Proof state:
case intro.intro
G : Type u_1
inst✝³ : Group G
H K : Subgroup G
S T✝ : Set G
F : Type u_2
inst✝² : Group F
inst✝¹ : MulAction F G
inst✝ : QuotientAction F H
f : F
T : ↑(leftTransversals ↑H)
g : G
t : ↑↑T
ht1 : (↑t)⁻¹ * f⁻¹ • g ∈ ↑H
ht2 : ∀ (y : ↑↑T), (fun s => (↑s)⁻¹ * f⁻¹ • g ∈ ↑H) y → y = t
⊢ ∃! s, (↑s)⁻¹ * g ∈ ↑H

Next tactic:
refine' ⟨⟨f • (t : G), Set.smul_mem_smul_set t.2⟩, _, _⟩
@[to_additive]
noncomputable instance : MulAction F (leftTransversals (H : Set G)) where
  smul f T :=
    ⟨f • (T : Set G), by
      refine' mem_leftTransversals_iff_existsUnique_inv_mul_mem.mpr fun g => _
      obtain ⟨t, ht1, ht2⟩ := mem_leftTransversals_iff_existsUnique_inv_mul_mem.mp T.2 (f⁻¹ • g)
      refine' ⟨⟨f • (t : G), Set.smul_mem_smul_set t.2⟩, _, _⟩
      · 

Proof state:
case intro.intro.refine'_1
G : Type u_1
inst✝³ : Group G
H K : Subgroup G
S T✝ : Set G
F : Type u_2
inst✝² : Group F
inst✝¹ : MulAction F G
inst✝ : QuotientAction F H
f : F
T : ↑(leftTransversals ↑H)
g : G
t : ↑↑T
ht1 : (↑t)⁻¹ * f⁻¹ • g ∈ ↑H
ht2 : ∀ (y : ↑↑T), (fun s => (↑s)⁻¹ * f⁻¹ • g ∈ ↑H) y → y = t
⊢ (fun s => (↑s)⁻¹ * g ∈ ↑H) { val := f • ↑t, property := (_ : f • ↑t ∈ f • ↑T) }

Next tactic:
exact smul_inv_smul f g ▸ QuotientAction.inv_mul_mem f ht1
@[to_additive]
noncomputable instance : MulAction F (leftTransversals (H : Set G)) where
  smul f T :=
    ⟨f • (T : Set G), by
      refine' mem_leftTransversals_iff_existsUnique_inv_mul_mem.mpr fun g => _
      obtain ⟨t, ht1, ht2⟩ := mem_leftTransversals_iff_existsUnique_inv_mul_mem.mp T.2 (f⁻¹ • g)
      refine' ⟨⟨f • (t : G), Set.smul_mem_smul_set t.2⟩, _, _⟩
      · exact smul_inv_smul f g ▸ QuotientAction.inv_mul_mem f ht1
      · 

Proof state:
case intro.intro.refine'_2
G : Type u_1
inst✝³ : Group G
H K : Subgroup G
S T✝ : Set G
F : Type u_2
inst✝² : Group F
inst✝¹ : MulAction F G
inst✝ : QuotientAction F H
f : F
T : ↑(leftTransversals ↑H)
g : G
t : ↑↑T
ht1 : (↑t)⁻¹ * f⁻¹ • g ∈ ↑H
ht2 : ∀ (y : ↑↑T), (fun s => (↑s)⁻¹ * f⁻¹ • g ∈ ↑H) y → y = t
⊢ ∀ (y : ↑(f • ↑T)), (fun s => (↑s)⁻¹ * g ∈ ↑H) y → y = { val := f • ↑t, property := (_ : f • ↑t ∈ f • ↑T) }

Next tactic:
rintro ⟨-, t', ht', rfl⟩ h
@[to_additive]
noncomputable instance : MulAction F (leftTransversals (H : Set G)) where
  smul f T :=
    ⟨f • (T : Set G), by
      refine' mem_leftTransversals_iff_existsUnique_inv_mul_mem.mpr fun g => _
      obtain ⟨t, ht1, ht2⟩ := mem_leftTransversals_iff_existsUnique_inv_mul_mem.mp T.2 (f⁻¹ • g)
      refine' ⟨⟨f • (t : G), Set.smul_mem_smul_set t.2⟩, _, _⟩
      · exact smul_inv_smul f g ▸ QuotientAction.inv_mul_mem f ht1
      · rintro ⟨-, t', ht', rfl⟩ h
        

Proof state:
case intro.intro.refine'_2.mk.intro.intro
G : Type u_1
inst✝³ : Group G
H K : Subgroup G
S T✝ : Set G
F : Type u_2
inst✝² : Group F
inst✝¹ : MulAction F G
inst✝ : QuotientAction F H
f : F
T : ↑(leftTransversals ↑H)
g : G
t : ↑↑T
ht1 : (↑t)⁻¹ * f⁻¹ • g ∈ ↑H
ht2 : ∀ (y : ↑↑T), (fun s => (↑s)⁻¹ * f⁻¹ • g ∈ ↑H) y → y = t
t' : G
ht' : t' ∈ ↑T
h : (↑{ val := (fun x => f • x) t', property := (_ : ∃ a ∈ ↑T, (fun x => f • x) a = (fun x => f • x) t') })⁻¹ * g ∈ ↑H
⊢ { val := (fun x => f • x) t', property := (_ : ∃ a ∈ ↑T, (fun x => f • x) a = (fun x => f • x) t') } =
    { val := f • ↑t, property := (_ : f • ↑t ∈ f • ↑T) }

Next tactic:
replace h := QuotientAction.inv_mul_mem f⁻¹ h
@[to_additive]
noncomputable instance : MulAction F (leftTransversals (H : Set G)) where
  smul f T :=
    ⟨f • (T : Set G), by
      refine' mem_leftTransversals_iff_existsUnique_inv_mul_mem.mpr fun g => _
      obtain ⟨t, ht1, ht2⟩ := mem_leftTransversals_iff_existsUnique_inv_mul_mem.mp T.2 (f⁻¹ • g)
      refine' ⟨⟨f • (t : G), Set.smul_mem_smul_set t.2⟩, _, _⟩
      · exact smul_inv_smul f g ▸ QuotientAction.inv_mul_mem f ht1
      · rintro ⟨-, t', ht', rfl⟩ h
        replace h := QuotientAction.inv_mul_mem f⁻¹ h
        

Proof state:
case intro.intro.refine'_2.mk.intro.intro
G : Type u_1
inst✝³ : Group G
H K : Subgroup G
S T✝ : Set G
F : Type u_2
inst✝² : Group F
inst✝¹ : MulAction F G
inst✝ : QuotientAction F H
f : F
T : ↑(leftTransversals ↑H)
g : G
t : ↑↑T
ht1 : (↑t)⁻¹ * f⁻¹ • g ∈ ↑H
ht2 : ∀ (y : ↑↑T), (fun s => (↑s)⁻¹ * f⁻¹ • g ∈ ↑H) y → y = t
t' : G
ht' : t' ∈ ↑T
h :
  (f⁻¹ • ↑{ val := (fun x => f • x) t', property := (_ : ∃ a ∈ ↑T, (fun x => f • x) a = (fun x => f • x) t') })⁻¹ *
      f⁻¹ • g ∈
    H
⊢ { val := (fun x => f • x) t', property := (_ : ∃ a ∈ ↑T, (fun x => f • x) a = (fun x => f • x) t') } =
    { val := f • ↑t, property := (_ : f • ↑t ∈ f • ↑T) }

Next tactic:
simp only [Subtype.ext_iff, Subtype.coe_mk, smul_left_cancel_iff, inv_smul_smul] at h ⊢
@[to_additive]
noncomputable instance : MulAction F (leftTransversals (H : Set G)) where
  smul f T :=
    ⟨f • (T : Set G), by
      refine' mem_leftTransversals_iff_existsUnique_inv_mul_mem.mpr fun g => _
      obtain ⟨t, ht1, ht2⟩ := mem_leftTransversals_iff_existsUnique_inv_mul_mem.mp T.2 (f⁻¹ • g)
      refine' ⟨⟨f • (t : G), Set.smul_mem_smul_set t.2⟩, _, _⟩
      · exact smul_inv_smul f g ▸ QuotientAction.inv_mul_mem f ht1
      · rintro ⟨-, t', ht', rfl⟩ h
        replace h := QuotientAction.inv_mul_mem f⁻¹ h
        simp only [Subtype.ext_iff, Subtype.coe_mk, smul_left_cancel_iff, inv_smul_smul] at h ⊢
        

Proof state:
case intro.intro.refine'_2.mk.intro.intro
G : Type u_1
inst✝³ : Group G
H K : Subgroup G
S T✝ : Set G
F : Type u_2
inst✝² : Group F
inst✝¹ : MulAction F G
inst✝ : QuotientAction F H
f : F
T : ↑(leftTransversals ↑H)
g : G
t : ↑↑T
ht1 : (↑t)⁻¹ * f⁻¹ • g ∈ ↑H
ht2 : ∀ (y : ↑↑T), (fun s => (↑s)⁻¹ * f⁻¹ • g ∈ ↑H) y → y = t
t' : G
ht' : t' ∈ ↑T
h : t'⁻¹ * f⁻¹ • g ∈ H
⊢ t' = ↑t

Next tactic:
exact Subtype.ext_iff.mp (ht2 ⟨t', ht'⟩ h)
@[to_additive]
theorem smul_apply_eq_smul_apply_inv_smul (f : F) (T : leftTransversals (H : Set G)) (q : G ⧸ H) :
    (toEquiv (f • T).2 q : G) = f • (toEquiv T.2 (f⁻¹ • q) : G) := by
  

Proof state:
G : Type u_1
inst✝³ : Group G
H K : Subgroup G
S T✝ : Set G
F : Type u_2
inst✝² : Group F
inst✝¹ : MulAction F G
inst✝ : QuotientAction F H
f : F
T : ↑(leftTransversals ↑H)
q : G ⧸ H
⊢ ↑((toEquiv (_ : ↑(f • T) ∈ leftTransversals ↑H)) q) = f • ↑((toEquiv (_ : ↑T ∈ leftTransversals ↑H)) (f⁻¹ • q))

Next tactic:
rw [smul_toEquiv, smul_inv_smul]
theorem IsComplement'.isCompl (h : IsComplement' H K) : IsCompl H K := by
  

Proof state:
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : IsComplement' H K
⊢ IsCompl H K

Next tactic:
refine'
    ⟨disjoint_iff_inf_le.mpr fun g ⟨p, q⟩ =>
        let x : H × K := ⟨⟨g, p⟩, 1⟩
        let y : H × K := ⟨1, g, q⟩
        Subtype.ext_iff.mp
          (Prod.ext_iff.mp (show x = y from h.1 ((mul_one g).trans (one_mul g).symm))).1,
      codisjoint_iff_le_sup.mpr fun g _ => _⟩
theorem IsComplement'.isCompl (h : IsComplement' H K) : IsCompl H K := by
  refine'
    ⟨disjoint_iff_inf_le.mpr fun g ⟨p, q⟩ =>
        let x : H × K := ⟨⟨g, p⟩, 1⟩
        let y : H × K := ⟨1, g, q⟩
        Subtype.ext_iff.mp
          (Prod.ext_iff.mp (show x = y from h.1 ((mul_one g).trans (one_mul g).symm))).1,
      codisjoint_iff_le_sup.mpr fun g _ => _⟩
  

Proof state:
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : IsComplement' H K
g : G
x✝ : g ∈ ⊤
⊢ g ∈ H ⊔ K

Next tactic:
obtain ⟨⟨h, k⟩, rfl⟩ := h.2 g
theorem IsComplement'.isCompl (h : IsComplement' H K) : IsCompl H K := by
  refine'
    ⟨disjoint_iff_inf_le.mpr fun g ⟨p, q⟩ =>
        let x : H × K := ⟨⟨g, p⟩, 1⟩
        let y : H × K := ⟨1, g, q⟩
        Subtype.ext_iff.mp
          (Prod.ext_iff.mp (show x = y from h.1 ((mul_one g).trans (one_mul g).symm))).1,
      codisjoint_iff_le_sup.mpr fun g _ => _⟩
  obtain ⟨⟨h, k⟩, rfl⟩ := h.2 g
  

Proof state:
case intro.mk
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h✝ : IsComplement' H K
h : ↑↑H
k : ↑↑K
x✝ : (fun x => ↑x.1 * ↑x.2) (h, k) ∈ ⊤
⊢ (fun x => ↑x.1 * ↑x.2) (h, k) ∈ H ⊔ K

Next tactic:
exact Subgroup.mul_mem_sup h.2 k.2
theorem isComplement'_of_disjoint_and_mul_eq_univ (h1 : Disjoint H K)
    (h2 : ↑H * ↑K = (Set.univ : Set G)) : IsComplement' H K := by
  

Proof state:
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h1 : Disjoint H K
h2 : ↑H * ↑K = univ
⊢ IsComplement' H K

Next tactic:
refine' ⟨mul_injective_of_disjoint h1, fun g => _⟩
theorem isComplement'_of_disjoint_and_mul_eq_univ (h1 : Disjoint H K)
    (h2 : ↑H * ↑K = (Set.univ : Set G)) : IsComplement' H K := by
  refine' ⟨mul_injective_of_disjoint h1, fun g => _⟩
  

Proof state:
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h1 : Disjoint H K
h2 : ↑H * ↑K = univ
g : G
⊢ ∃ a, (fun x => ↑x.1 * ↑x.2) a = g

Next tactic:
obtain ⟨h, k, hh, hk, hg⟩ := Set.eq_univ_iff_forall.mp h2 g
theorem isComplement'_of_disjoint_and_mul_eq_univ (h1 : Disjoint H K)
    (h2 : ↑H * ↑K = (Set.univ : Set G)) : IsComplement' H K := by
  refine' ⟨mul_injective_of_disjoint h1, fun g => _⟩
  obtain ⟨h, k, hh, hk, hg⟩ := Set.eq_univ_iff_forall.mp h2 g
  

Proof state:
case intro.intro.intro.intro
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h1 : Disjoint H K
h2 : ↑H * ↑K = univ
g h k : G
hh : h ∈ ↑H
hk : k ∈ ↑K
hg : (fun x x_1 => x * x_1) h k = g
⊢ ∃ a, (fun x => ↑x.1 * ↑x.2) a = g

Next tactic:
exact ⟨(⟨h, hh⟩, ⟨k, hk⟩), hg⟩
theorem isComplement'_stabilizer {α : Type*} [MulAction G α] (a : α)
    (h1 : ∀ h : H, h • a = a → h = 1) (h2 : ∀ g : G, ∃ h : H, h • g • a = a) :
    IsComplement' H (MulAction.stabilizer G a) := by
  

Proof state:
G : Type u_1
inst✝¹ : Group G
H K : Subgroup G
S T : Set G
α : Type u_2
inst✝ : MulAction G α
a : α
h1 : ∀ (h : ↥H), h • a = a → h = 1
h2 : ∀ (g : G), ∃ h, h • g • a = a
⊢ IsComplement' H (MulAction.stabilizer G a)

Next tactic:
refine' isComplement_iff_existsUnique.mpr fun g => _
theorem isComplement'_stabilizer {α : Type*} [MulAction G α] (a : α)
    (h1 : ∀ h : H, h • a = a → h = 1) (h2 : ∀ g : G, ∃ h : H, h • g • a = a) :
    IsComplement' H (MulAction.stabilizer G a) := by
  refine' isComplement_iff_existsUnique.mpr fun g => _
  

Proof state:
G : Type u_1
inst✝¹ : Group G
H K : Subgroup G
S T : Set G
α : Type u_2
inst✝ : MulAction G α
a : α
h1 : ∀ (h : ↥H), h • a = a → h = 1
h2 : ∀ (g : G), ∃ h, h • g • a = a
g : G
⊢ ∃! x, ↑x.1 * ↑x.2 = g

Next tactic:
obtain ⟨h, hh⟩ := h2 g
theorem isComplement'_stabilizer {α : Type*} [MulAction G α] (a : α)
    (h1 : ∀ h : H, h • a = a → h = 1) (h2 : ∀ g : G, ∃ h : H, h • g • a = a) :
    IsComplement' H (MulAction.stabilizer G a) := by
  refine' isComplement_iff_existsUnique.mpr fun g => _
  obtain ⟨h, hh⟩ := h2 g
  

Proof state:
case intro
G : Type u_1
inst✝¹ : Group G
H K : Subgroup G
S T : Set G
α : Type u_2
inst✝ : MulAction G α
a : α
h1 : ∀ (h : ↥H), h • a = a → h = 1
h2 : ∀ (g : G), ∃ h, h • g • a = a
g : G
h : ↥H
hh : h • g • a = a
⊢ ∃! x, ↑x.1 * ↑x.2 = g

Next tactic:
have hh' : (↑h * g) • a = a := by rwa [mul_smul]
theorem isComplement'_stabilizer {α : Type*} [MulAction G α] (a : α)
    (h1 : ∀ h : H, h • a = a → h = 1) (h2 : ∀ g : G, ∃ h : H, h • g • a = a) :
    IsComplement' H (MulAction.stabilizer G a) := by
  refine' isComplement_iff_existsUnique.mpr fun g => _
  obtain ⟨h, hh⟩ := h2 g
  have hh' : (↑h * g) • a = a := by 

Proof state:
G : Type u_1
inst✝¹ : Group G
H K : Subgroup G
S T : Set G
α : Type u_2
inst✝ : MulAction G α
a : α
h1 : ∀ (h : ↥H), h • a = a → h = 1
h2 : ∀ (g : G), ∃ h, h • g • a = a
g : G
h : ↥H
hh : h • g • a = a
⊢ (↑h * g) • a = a

Next tactic:
rwa [mul_smul]
theorem isComplement'_stabilizer {α : Type*} [MulAction G α] (a : α)
    (h1 : ∀ h : H, h • a = a → h = 1) (h2 : ∀ g : G, ∃ h : H, h • g • a = a) :
    IsComplement' H (MulAction.stabilizer G a) := by
  refine' isComplement_iff_existsUnique.mpr fun g => _
  obtain ⟨h, hh⟩ := h2 g
  have hh' : (↑h * g) • a = a := by rwa [mul_smul]
  

Proof state:
case intro
G : Type u_1
inst✝¹ : Group G
H K : Subgroup G
S T : Set G
α : Type u_2
inst✝ : MulAction G α
a : α
h1 : ∀ (h : ↥H), h • a = a → h = 1
h2 : ∀ (g : G), ∃ h, h • g • a = a
g : G
h : ↥H
hh : h • g • a = a
hh' : (↑h * g) • a = a
⊢ ∃! x, ↑x.1 * ↑x.2 = g

Next tactic:
refine' ⟨⟨h⁻¹, h * g, hh'⟩, inv_mul_cancel_left ↑h g, _⟩
theorem isComplement'_stabilizer {α : Type*} [MulAction G α] (a : α)
    (h1 : ∀ h : H, h • a = a → h = 1) (h2 : ∀ g : G, ∃ h : H, h • g • a = a) :
    IsComplement' H (MulAction.stabilizer G a) := by
  refine' isComplement_iff_existsUnique.mpr fun g => _
  obtain ⟨h, hh⟩ := h2 g
  have hh' : (↑h * g) • a = a := by rwa [mul_smul]
  refine' ⟨⟨h⁻¹, h * g, hh'⟩, inv_mul_cancel_left ↑h g, _⟩
  

Proof state:
case intro
G : Type u_1
inst✝¹ : Group G
H K : Subgroup G
S T : Set G
α : Type u_2
inst✝ : MulAction G α
a : α
h1 : ∀ (h : ↥H), h • a = a → h = 1
h2 : ∀ (g : G), ∃ h, h • g • a = a
g : G
h : ↥H
hh : h • g • a = a
hh' : (↑h * g) • a = a
⊢ ∀ (y : ↑↑H × ↑↑(MulAction.stabilizer G a)),
    (fun x => ↑x.1 * ↑x.2 = g) y → y = (h⁻¹, { val := ↑h * g, property := hh' })

Next tactic:
rintro ⟨h', g, hg : g • a = a⟩ rfl
theorem isComplement'_stabilizer {α : Type*} [MulAction G α] (a : α)
    (h1 : ∀ h : H, h • a = a → h = 1) (h2 : ∀ g : G, ∃ h : H, h • g • a = a) :
    IsComplement' H (MulAction.stabilizer G a) := by
  refine' isComplement_iff_existsUnique.mpr fun g => _
  obtain ⟨h, hh⟩ := h2 g
  have hh' : (↑h * g) • a = a := by rwa [mul_smul]
  refine' ⟨⟨h⁻¹, h * g, hh'⟩, inv_mul_cancel_left ↑h g, _⟩
  rintro ⟨h', g, hg : g • a = a⟩ rfl
  

Proof state:
case intro.mk.mk
G : Type u_1
inst✝¹ : Group G
H K : Subgroup G
S T : Set G
α : Type u_2
inst✝ : MulAction G α
a : α
h1 : ∀ (h : ↥H), h • a = a → h = 1
h2 : ∀ (g : G), ∃ h, h • g • a = a
h : ↥H
h' : ↑↑H
g : G
hg : g • a = a
hh : h • (↑(h', { val := g, property := hg }).1 * ↑(h', { val := g, property := hg }).2) • a = a
hh' : (↑h * (↑(h', { val := g, property := hg }).1 * ↑(h', { val := g, property := hg }).2)) • a = a
⊢ (h', { val := g, property := hg }) =
    (h⁻¹,
      { val := ↑h * (↑(h', { val := g, property := hg }).1 * ↑(h', { val := g, property := hg }).2), property := hh' })

Next tactic:
specialize h1 (h * h') (by rwa [mul_smul, smul_def h', ← hg, ← mul_smul, hg])
theorem isComplement'_stabilizer {α : Type*} [MulAction G α] (a : α)
    (h1 : ∀ h : H, h • a = a → h = 1) (h2 : ∀ g : G, ∃ h : H, h • g • a = a) :
    IsComplement' H (MulAction.stabilizer G a) := by
  refine' isComplement_iff_existsUnique.mpr fun g => _
  obtain ⟨h, hh⟩ := h2 g
  have hh' : (↑h * g) • a = a := by rwa [mul_smul]
  refine' ⟨⟨h⁻¹, h * g, hh'⟩, inv_mul_cancel_left ↑h g, _⟩
  rintro ⟨h', g, hg : g • a = a⟩ rfl
  specialize h1 (h * h') (by 

Proof state:
G : Type u_1
inst✝¹ : Group G
H K : Subgroup G
S T : Set G
α : Type u_2
inst✝ : MulAction G α
a : α
h1 : ∀ (h : ↥H), h • a = a → h = 1
h2 : ∀ (g : G), ∃ h, h • g • a = a
h : ↥H
h' : ↑↑H
g : G
hg : g • a = a
hh : h • (↑(h', { val := g, property := hg }).1 * ↑(h', { val := g, property := hg }).2) • a = a
hh' : (↑h * (↑(h', { val := g, property := hg }).1 * ↑(h', { val := g, property := hg }).2)) • a = a
⊢ (h * h') • a = a

Next tactic:
rwa [mul_smul, smul_def h', ← hg, ← mul_smul, hg]