Theorem: Subgroup.exists_left_transversal_of_le
File: Mathlib/GroupTheory/Complement.lean

tactic: let H'' : Subgroup H := H'.comap H.subtype
state_before: G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S T : Set G
H' H : Subgroup G
h : H' ≤ H
⊢ ∃ S, S * ↑H' = ↑H ∧ Nat.card ↑S * Nat.card ↥H' = Nat.card ↥H
state_after: G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
⊢ ∃ S, S * ↑H' = ↑H ∧ Nat.card ↑S * Nat.card ↥H' = Nat.card ↥H

tactic: have : H' = H''.map H.subtype := by simp [H'', h]
state_before: G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
⊢ ∃ S, S * ↑H' = ↑H ∧ Nat.card ↑S * Nat.card ↥H' = Nat.card ↥H
state_after: G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
this : H' = map H.subtype H''
⊢ ∃ S, S * ↑H' = ↑H ∧ Nat.card ↑S * Nat.card ↥H' = Nat.card ↥H

tactic: rw [this]
state_before: G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
this : H' = map H.subtype H''
⊢ ∃ S, S * ↑H' = ↑H ∧ Nat.card ↑S * Nat.card ↥H' = Nat.card ↥H
state_after: G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
this : H' = map H.subtype H''
⊢ ∃ S, S * ↑(map H.subtype H'') = ↑H ∧ Nat.card ↑S * Nat.card ↥(map H.subtype H'') = Nat.card ↥H

tactic: obtain ⟨S, cmem, -⟩ := H''.exists_left_transversal 1
state_before: G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
this : H' = map H.subtype H''
⊢ ∃ S, S * ↑(map H.subtype H'') = ↑H ∧ Nat.card ↑S * Nat.card ↥(map H.subtype H'') = Nat.card ↥H
state_after: case intro.intro
G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S✝ T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
this : H' = map H.subtype H''
S : Set ↥H
cmem : S ∈ leftTransversals ↑H''
⊢ ∃ S, S * ↑(map H.subtype H'') = ↑H ∧ Nat.card ↑S * Nat.card ↥(map H.subtype H'') = Nat.card ↥H

tactic: refine ⟨H.subtype '' S, ?_, ?_⟩
state_before: case intro.intro
G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S✝ T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
this : H' = map H.subtype H''
S : Set ↥H
cmem : S ∈ leftTransversals ↑H''
⊢ ∃ S, S * ↑(map H.subtype H'') = ↑H ∧ Nat.card ↑S * Nat.card ↥(map H.subtype H'') = Nat.card ↥H
state_after: case intro.intro.refine_1
G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S✝ T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
this : H' = map H.subtype H''
S : Set ↥H
cmem : S ∈ leftTransversals ↑H''
⊢ ⇑H.subtype '' S * ↑(map H.subtype H'') = ↑H

case intro.intro.refine_2
G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S✝ T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
this : H' = map H.subtype H''
S : Set ↥H
cmem : S ∈ leftTransversals ↑H''
⊢ Nat.card ↑(⇑H.subtype '' S) * Nat.card ↥(map H.subtype H'') = Nat.card ↥H

tactic: simp [H'', h]
state_before: G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
⊢ H' = map H.subtype H''
state_after: no goals

tactic: have : H.subtype '' (S * H'') = H.subtype '' S * H''.map H.subtype := image_mul H.subtype
state_before: case intro.intro.refine_1
G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S✝ T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
this : H' = map H.subtype H''
S : Set ↥H
cmem : S ∈ leftTransversals ↑H''
⊢ ⇑H.subtype '' S * ↑(map H.subtype H'') = ↑H
state_after: case intro.intro.refine_1
G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S✝ T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
this✝ : H' = map H.subtype H''
S : Set ↥H
cmem : S ∈ leftTransversals ↑H''
this : ⇑H.subtype '' (S * ↑H'') = ⇑H.subtype '' S * ↑(map H.subtype H'')
⊢ ⇑H.subtype '' S * ↑(map H.subtype H'') = ↑H

tactic: rw [← this, cmem.mul_eq]
state_before: case intro.intro.refine_1
G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S✝ T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
this✝ : H' = map H.subtype H''
S : Set ↥H
cmem : S ∈ leftTransversals ↑H''
this : ⇑H.subtype '' (S * ↑H'') = ⇑H.subtype '' S * ↑(map H.subtype H'')
⊢ ⇑H.subtype '' S * ↑(map H.subtype H'') = ↑H
state_after: case intro.intro.refine_1
G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S✝ T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
this✝ : H' = map H.subtype H''
S : Set ↥H
cmem : S ∈ leftTransversals ↑H''
this : ⇑H.subtype '' (S * ↑H'') = ⇑H.subtype '' S * ↑(map H.subtype H'')
⊢ ⇑H.subtype '' univ = ↑H

tactic: simp [Set.ext_iff]
state_before: case intro.intro.refine_1
G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S✝ T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
this✝ : H' = map H.subtype H''
S : Set ↥H
cmem : S ∈ leftTransversals ↑H''
this : ⇑H.subtype '' (S * ↑H'') = ⇑H.subtype '' S * ↑(map H.subtype H'')
⊢ ⇑H.subtype '' univ = ↑H
state_after: no goals

tactic: rw [← cmem.card_mul_card]
state_before: case intro.intro.refine_2
G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S✝ T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
this : H' = map H.subtype H''
S : Set ↥H
cmem : S ∈ leftTransversals ↑H''
⊢ Nat.card ↑(⇑H.subtype '' S) * Nat.card ↥(map H.subtype H'') = Nat.card ↥H
state_after: case intro.intro.refine_2
G : Type u_1
inst✝ : Group G
H✝ K : Subgroup G
S✝ T : Set G
H' H : Subgroup G
h : H' ≤ H
H'' : Subgroup ↥H := comap H.subtype H'
this : H' = map H.subtype H''
S : Set ↥H
cmem : S ∈ leftTransversals ↑H''
⊢ Nat.card ↑(⇑H.subtype '' S) * Nat.card ↥(map H.subtype H'') = Nat.card ↑S * Nat.card ↑↑H''