Theorem: Subgroup.IsComplement'.symm
File: Mathlib/GroupTheory/Complement.lean

tactic: let ϕ : H × K ≃ K × H :=
  Equiv.mk (fun x => ⟨x.2⁻¹, x.1⁻¹⟩) (fun x => ⟨x.2⁻¹, x.1⁻¹⟩)
    (fun x => Prod.ext (inv_inv _) (inv_inv _)) fun x => Prod.ext (inv_inv _) (inv_inv _)
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : H.IsComplement' K
⊢ K.IsComplement' H
state_after: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : H.IsComplement' K
ϕ : ↥H × ↥K ≃ ↥K × ↥H :=
  { toFun := fun x => (x.2⁻¹, x.1⁻¹), invFun := fun x => (x.2⁻¹, x.1⁻¹), left_inv := ⋯, right_inv := ⋯ }
⊢ K.IsComplement' H

tactic: let ψ : G ≃ G := Equiv.mk (fun g : G => g⁻¹) (fun g : G => g⁻¹) inv_inv inv_inv
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : H.IsComplement' K
ϕ : ↥H × ↥K ≃ ↥K × ↥H :=
  { toFun := fun x => (x.2⁻¹, x.1⁻¹), invFun := fun x => (x.2⁻¹, x.1⁻¹), left_inv := ⋯, right_inv := ⋯ }
⊢ K.IsComplement' H
state_after: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : H.IsComplement' K
ϕ : ↥H × ↥K ≃ ↥K × ↥H :=
  { toFun := fun x => (x.2⁻¹, x.1⁻¹), invFun := fun x => (x.2⁻¹, x.1⁻¹), left_inv := ⋯, right_inv := ⋯ }
ψ : G ≃ G := { toFun := fun g => g⁻¹, invFun := fun g => g⁻¹, left_inv := ⋯, right_inv := ⋯ }
⊢ K.IsComplement' H

tactic: suffices hf : (ψ ∘ fun x : H × K => x.1.1 * x.2.1) = (fun x : K × H => x.1.1 * x.2.1) ∘ ϕ by
  rw [isComplement'_def, IsComplement, ← Equiv.bijective_comp ϕ]
  apply (congr_arg Function.Bijective hf).mp rwa [ψ.comp_bijective]
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : H.IsComplement' K
ϕ : ↥H × ↥K ≃ ↥K × ↥H :=
  { toFun := fun x => (x.2⁻¹, x.1⁻¹), invFun := fun x => (x.2⁻¹, x.1⁻¹), left_inv := ⋯, right_inv := ⋯ }
ψ : G ≃ G := { toFun := fun g => g⁻¹, invFun := fun g => g⁻¹, left_inv := ⋯, right_inv := ⋯ }
⊢ K.IsComplement' H
state_after: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : H.IsComplement' K
ϕ : ↥H × ↥K ≃ ↥K × ↥H :=
  { toFun := fun x => (x.2⁻¹, x.1⁻¹), invFun := fun x => (x.2⁻¹, x.1⁻¹), left_inv := ⋯, right_inv := ⋯ }
ψ : G ≃ G := { toFun := fun g => g⁻¹, invFun := fun g => g⁻¹, left_inv := ⋯, right_inv := ⋯ }
⊢ (⇑ψ ∘ fun x => ↑x.1 * ↑x.2) = (fun x => ↑x.1 * ↑x.2) ∘ ⇑ϕ

tactic: exact funext fun x => mul_inv_rev _ _
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : H.IsComplement' K
ϕ : ↥H × ↥K ≃ ↥K × ↥H :=
  { toFun := fun x => (x.2⁻¹, x.1⁻¹), invFun := fun x => (x.2⁻¹, x.1⁻¹), left_inv := ⋯, right_inv := ⋯ }
ψ : G ≃ G := { toFun := fun g => g⁻¹, invFun := fun g => g⁻¹, left_inv := ⋯, right_inv := ⋯ }
⊢ (⇑ψ ∘ fun x => ↑x.1 * ↑x.2) = (fun x => ↑x.1 * ↑x.2) ∘ ⇑ϕ
state_after: no goals

tactic: rw [isComplement'_def, IsComplement, ← Equiv.bijective_comp ϕ]
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : H.IsComplement' K
ϕ : ↥H × ↥K ≃ ↥K × ↥H :=
  { toFun := fun x => (x.2⁻¹, x.1⁻¹), invFun := fun x => (x.2⁻¹, x.1⁻¹), left_inv := ⋯, right_inv := ⋯ }
ψ : G ≃ G := { toFun := fun g => g⁻¹, invFun := fun g => g⁻¹, left_inv := ⋯, right_inv := ⋯ }
hf : (⇑ψ ∘ fun x => ↑x.1 * ↑x.2) = (fun x => ↑x.1 * ↑x.2) ∘ ⇑ϕ
⊢ K.IsComplement' H
state_after: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : H.IsComplement' K
ϕ : ↥H × ↥K ≃ ↥K × ↥H :=
  { toFun := fun x => (x.2⁻¹, x.1⁻¹), invFun := fun x => (x.2⁻¹, x.1⁻¹), left_inv := ⋯, right_inv := ⋯ }
ψ : G ≃ G := { toFun := fun g => g⁻¹, invFun := fun g => g⁻¹, left_inv := ⋯, right_inv := ⋯ }
hf : (⇑ψ ∘ fun x => ↑x.1 * ↑x.2) = (fun x => ↑x.1 * ↑x.2) ∘ ⇑ϕ
⊢ Function.Bijective ((fun x => ↑x.1 * ↑x.2) ∘ ⇑ϕ)

tactic: apply (congr_arg Function.Bijective hf).mp
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : H.IsComplement' K
ϕ : ↥H × ↥K ≃ ↥K × ↥H :=
  { toFun := fun x => (x.2⁻¹, x.1⁻¹), invFun := fun x => (x.2⁻¹, x.1⁻¹), left_inv := ⋯, right_inv := ⋯ }
ψ : G ≃ G := { toFun := fun g => g⁻¹, invFun := fun g => g⁻¹, left_inv := ⋯, right_inv := ⋯ }
hf : (⇑ψ ∘ fun x => ↑x.1 * ↑x.2) = (fun x => ↑x.1 * ↑x.2) ∘ ⇑ϕ
⊢ Function.Bijective ((fun x => ↑x.1 * ↑x.2) ∘ ⇑ϕ)
state_after: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : H.IsComplement' K
ϕ : ↥H × ↥K ≃ ↥K × ↥H :=
  { toFun := fun x => (x.2⁻¹, x.1⁻¹), invFun := fun x => (x.2⁻¹, x.1⁻¹), left_inv := ⋯, right_inv := ⋯ }
ψ : G ≃ G := { toFun := fun g => g⁻¹, invFun := fun g => g⁻¹, left_inv := ⋯, right_inv := ⋯ }
hf : (⇑ψ ∘ fun x => ↑x.1 * ↑x.2) = (fun x => ↑x.1 * ↑x.2) ∘ ⇑ϕ
⊢ Function.Bijective (⇑ψ ∘ fun x => ↑x.1 * ↑x.2)

tactic: rwa [ψ.comp_bijective]
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : H.IsComplement' K
ϕ : ↥H × ↥K ≃ ↥K × ↥H :=
  { toFun := fun x => (x.2⁻¹, x.1⁻¹), invFun := fun x => (x.2⁻¹, x.1⁻¹), left_inv := ⋯, right_inv := ⋯ }
ψ : G ≃ G := { toFun := fun g => g⁻¹, invFun := fun g => g⁻¹, left_inv := ⋯, right_inv := ⋯ }
hf : (⇑ψ ∘ fun x => ↑x.1 * ↑x.2) = (fun x => ↑x.1 * ↑x.2) ∘ ⇑ϕ
⊢ Function.Bijective (⇑ψ ∘ fun x => ↑x.1 * ↑x.2)
state_after: no goals