l3lab/ntp-mathlib huggingface dataset:
@[to_additive addIndex_mono]
theorem index_mono {K K' V : Set G} (hK' : IsCompact K') (h : K ⊆ K') (hV : (interior V).Nonempty) :
    index K V ≤ index K' V := by
  rcases index_elim hK' hV with ⟨s, h1s, h2s⟩
  apply Nat.sInf_le; 

Proof state:
case intro.intro.hm
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K K' V : Set G
hK' : IsCompact K'
h : K ⊆ K'
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K' ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K' V
⊢ index K' V ∈ Finset.card '' {t | K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V}

Next tactic:
rw [mem_image]
@[to_additive addIndex_mono]
theorem index_mono {K K' V : Set G} (hK' : IsCompact K') (h : K ⊆ K') (hV : (interior V).Nonempty) :
    index K V ≤ index K' V := by
  rcases index_elim hK' hV with ⟨s, h1s, h2s⟩
  apply Nat.sInf_le; rw [mem_image]; 

Proof state:
case intro.intro.hm
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K K' V : Set G
hK' : IsCompact K'
h : K ⊆ K'
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K' ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K' V
⊢ ∃ x ∈ {t | K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V}, Finset.card x = index K' V

Next tactic:
refine' ⟨s, Subset.trans h h1s, h2s⟩
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  

Proof state:
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
⊢ index (K₁.carrier ∪ K₂.carrier) V ≤ index K₁.carrier V + index K₂.carrier V

Next tactic:
rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  

Proof state:
case intro.intro
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
⊢ index (K₁.carrier ∪ K₂.carrier) V ≤ index K₁.carrier V + index K₂.carrier V

Next tactic:
rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  

Proof state:
case intro.intro.intro.intro
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
⊢ index (K₁.carrier ∪ K₂.carrier) V ≤ index K₁.carrier V + index K₂.carrier V

Next tactic:
rw [← h2s, ← h2t]
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  rw [← h2s, ← h2t]
  

Proof state:
case intro.intro.intro.intro
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
⊢ index (K₁.carrier ∪ K₂.carrier) V ≤ Finset.card s + Finset.card t

Next tactic:
refine' le_trans _ (Finset.card_union_le _ _)
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  rw [← h2s, ← h2t]
  refine' le_trans _ (Finset.card_union_le _ _)
  

Proof state:
case intro.intro.intro.intro
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
⊢ index (K₁.carrier ∪ K₂.carrier) V ≤ Finset.card (s ∪ t)

Next tactic:
apply Nat.sInf_le
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  rw [← h2s, ← h2t]
  refine' le_trans _ (Finset.card_union_le _ _)
  apply Nat.sInf_le; 

Proof state:
case intro.intro.intro.intro.hm
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
⊢ Finset.card (s ∪ t) ∈ Finset.card '' {t | K₁.carrier ∪ K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V}

Next tactic:
refine' ⟨_, _, rfl⟩
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  rw [← h2s, ← h2t]
  refine' le_trans _ (Finset.card_union_le _ _)
  apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; 

Proof state:
case intro.intro.intro.intro.hm
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
⊢ s ∪ t ∈ {t | K₁.carrier ∪ K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V}

Next tactic:
rw [mem_setOf_eq]
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  rw [← h2s, ← h2t]
  refine' le_trans _ (Finset.card_union_le _ _)
  apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_setOf_eq]
  

Proof state:
case intro.intro.intro.intro.hm
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
⊢ K₁.carrier ∪ K₂.carrier ⊆ ⋃ g ∈ s ∪ t, (fun h => g * h) ⁻¹' V

Next tactic:
apply union_subset
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  rw [← h2s, ← h2t]
  refine' le_trans _ (Finset.card_union_le _ _)
  apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_setOf_eq]
  apply union_subset <;> 

Proof state:
case intro.intro.intro.intro.hm.sr
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
⊢ K₁.carrier ⊆ ⋃ g ∈ s ∪ t, (fun h => g * h) ⁻¹' V

Next tactic:
refine' Subset.trans (by assumption) _
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  rw [← h2s, ← h2t]
  refine' le_trans _ (Finset.card_union_le _ _)
  apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_setOf_eq]
  apply union_subset <;> refine' Subset.trans (by 

Proof state:
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
⊢ K₁.carrier ⊆ ?m.58034

Next tactic:
assumption
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  rw [← h2s, ← h2t]
  refine' le_trans _ (Finset.card_union_le _ _)
  apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_setOf_eq]
  apply union_subset <;> 

Proof state:
case intro.intro.intro.intro.hm.tr
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
⊢ K₂.carrier ⊆ ⋃ g ∈ s ∪ t, (fun h => g * h) ⁻¹' V

Next tactic:
refine' Subset.trans (by assumption) _
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  rw [← h2s, ← h2t]
  refine' le_trans _ (Finset.card_union_le _ _)
  apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_setOf_eq]
  apply union_subset <;> refine' Subset.trans (by 

Proof state:
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
⊢ K₂.carrier ⊆ ?m.58069

Next tactic:
assumption
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  rw [← h2s, ← h2t]
  refine' le_trans _ (Finset.card_union_le _ _)
  apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_setOf_eq]
  apply union_subset <;> refine' Subset.trans (by assumption) _ <;>
    

Proof state:
case intro.intro.intro.intro.hm.sr
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
⊢ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V ⊆ ⋃ g ∈ s ∪ t, (fun h => g * h) ⁻¹' V

Next tactic:
apply biUnion_subset_biUnion_left
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  rw [← h2s, ← h2t]
  refine' le_trans _ (Finset.card_union_le _ _)
  apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_setOf_eq]
  apply union_subset <;> refine' Subset.trans (by assumption) _ <;>
    

Proof state:
case intro.intro.intro.intro.hm.tr
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
⊢ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V ⊆ ⋃ g ∈ s ∪ t, (fun h => g * h) ⁻¹' V

Next tactic:
apply biUnion_subset_biUnion_left
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  rw [← h2s, ← h2t]
  refine' le_trans _ (Finset.card_union_le _ _)
  apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_setOf_eq]
  apply union_subset <;> refine' Subset.trans (by assumption) _ <;>
    apply biUnion_subset_biUnion_left <;> 

Proof state:
case intro.intro.intro.intro.hm.sr.h
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
⊢ (fun x => x ∈ s.val) ⊆ fun x => x ∈ (s ∪ t).val

Next tactic:
intro g hg
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  rw [← h2s, ← h2t]
  refine' le_trans _ (Finset.card_union_le _ _)
  apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_setOf_eq]
  apply union_subset <;> refine' Subset.trans (by assumption) _ <;>
    apply biUnion_subset_biUnion_left <;> 

Proof state:
case intro.intro.intro.intro.hm.tr.h
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
⊢ (fun x => x ∈ t.val) ⊆ fun x => x ∈ (s ∪ t).val

Next tactic:
intro g hg
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  rw [← h2s, ← h2t]
  refine' le_trans _ (Finset.card_union_le _ _)
  apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_setOf_eq]
  apply union_subset <;> refine' Subset.trans (by assumption) _ <;>
    apply biUnion_subset_biUnion_left <;> intro g hg <;> 

Proof state:
case intro.intro.intro.intro.hm.sr.h
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
g : G
hg : g ∈ fun x => x ∈ s.val
⊢ g ∈ fun x => x ∈ (s ∪ t).val

Next tactic:
simp only [mem_def] at hg
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  rw [← h2s, ← h2t]
  refine' le_trans _ (Finset.card_union_le _ _)
  apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_setOf_eq]
  apply union_subset <;> refine' Subset.trans (by assumption) _ <;>
    apply biUnion_subset_biUnion_left <;> intro g hg <;> 

Proof state:
case intro.intro.intro.intro.hm.tr.h
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
g : G
hg : g ∈ fun x => x ∈ t.val
⊢ g ∈ fun x => x ∈ (s ∪ t).val

Next tactic:
simp only [mem_def] at hg
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  rw [← h2s, ← h2t]
  refine' le_trans _ (Finset.card_union_le _ _)
  apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_setOf_eq]
  apply union_subset <;> refine' Subset.trans (by assumption) _ <;>
    apply biUnion_subset_biUnion_left <;> intro g hg <;> simp only [mem_def] at hg <;>
    

Proof state:
case intro.intro.intro.intro.hm.sr.h
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
g : G
hg : g ∈ s.val
⊢ g ∈ fun x => x ∈ (s ∪ t).val

Next tactic:
simp only [mem_def, Multiset.mem_union, Finset.union_val, hg, or_true_iff, true_or_iff]
@[to_additive addIndex_union_le]
theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
    index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V := by
  rcases index_elim K₁.2 hV with ⟨s, h1s, h2s⟩
  rcases index_elim K₂.2 hV with ⟨t, h1t, h2t⟩
  rw [← h2s, ← h2t]
  refine' le_trans _ (Finset.card_union_le _ _)
  apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_setOf_eq]
  apply union_subset <;> refine' Subset.trans (by assumption) _ <;>
    apply biUnion_subset_biUnion_left <;> intro g hg <;> simp only [mem_def] at hg <;>
    

Proof state:
case intro.intro.intro.intro.hm.tr.h
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
s : Finset G
h1s : K₁.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index K₁.carrier V
t : Finset G
h1t : K₂.carrier ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V
h2t : Finset.card t = index K₂.carrier V
g : G
hg : g ∈ t.val
⊢ g ∈ fun x => x ∈ (s ∪ t).val

Next tactic:
simp only [mem_def, Multiset.mem_union, Finset.union_val, hg, or_true_iff, true_or_iff]
@[to_additive addIndex_union_eq]
theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty)
    (h : Disjoint (K₁.1 * V⁻¹) (K₂.1 * V⁻¹)) :
    index (K₁.1 ∪ K₂.1) V = index K₁.1 V + index K₂.1 V := by
  

Proof state:
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
h : Disjoint (K₁.carrier * V⁻¹) (K₂.carrier * V⁻¹)
⊢ index (K₁.carrier ∪ K₂.carrier) V = index K₁.carrier V + index K₂.carrier V

Next tactic:
apply le_antisymm (index_union_le K₁ K₂ hV)
@[to_additive addIndex_union_eq]
theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty)
    (h : Disjoint (K₁.1 * V⁻¹) (K₂.1 * V⁻¹)) :
    index (K₁.1 ∪ K₂.1) V = index K₁.1 V + index K₂.1 V := by
  apply le_antisymm (index_union_le K₁ K₂ hV)
  

Proof state:
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
h : Disjoint (K₁.carrier * V⁻¹) (K₂.carrier * V⁻¹)
⊢ index K₁.carrier V + index K₂.carrier V ≤ index (K₁.carrier ∪ K₂.carrier) V

Next tactic:
rcases index_elim (K₁.2.union K₂.2) hV with ⟨s, h1s, h2s⟩
@[to_additive addIndex_union_eq]
theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty)
    (h : Disjoint (K₁.1 * V⁻¹) (K₂.1 * V⁻¹)) :
    index (K₁.1 ∪ K₂.1) V = index K₁.1 V + index K₂.1 V := by
  apply le_antisymm (index_union_le K₁ K₂ hV)
  rcases index_elim (K₁.2.union K₂.2) hV with ⟨s, h1s, h2s⟩; 

Proof state:
case intro.intro
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
h : Disjoint (K₁.carrier * V⁻¹) (K₂.carrier * V⁻¹)
s : Finset G
h1s : K₁.carrier ∪ K₂.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index (K₁.carrier ∪ K₂.carrier) V
⊢ index K₁.carrier V + index K₂.carrier V ≤ index (K₁.carrier ∪ K₂.carrier) V

Next tactic:
rw [← h2s]
@[to_additive addIndex_union_eq]
theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty)
    (h : Disjoint (K₁.1 * V⁻¹) (K₂.1 * V⁻¹)) :
    index (K₁.1 ∪ K₂.1) V = index K₁.1 V + index K₂.1 V := by
  apply le_antisymm (index_union_le K₁ K₂ hV)
  rcases index_elim (K₁.2.union K₂.2) hV with ⟨s, h1s, h2s⟩; rw [← h2s]
  

Proof state:
case intro.intro
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
h : Disjoint (K₁.carrier * V⁻¹) (K₂.carrier * V⁻¹)
s : Finset G
h1s : K₁.carrier ∪ K₂.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index (K₁.carrier ∪ K₂.carrier) V
⊢ index K₁.carrier V + index K₂.carrier V ≤ Finset.card s

Next tactic:
have :
    ∀ K : Set G,
      (K ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V) →
        index K V ≤ (s.filter fun g => ((fun h : G => g * h) ⁻¹' V ∩ K).Nonempty).card := by
    intro K hK; apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_setOf_eq]
    intro g hg; rcases hK hg with ⟨_, ⟨g₀, rfl⟩, _, ⟨h1g₀, rfl⟩, h2g₀⟩
    simp only [mem_preimage] at h2g₀
    simp only [mem_iUnion]; use g₀; constructor; swap
    · simp only [Finset.mem_filter, h1g₀, true_and_iff]; use g
      simp only [hg, h2g₀, mem_inter_iff, mem_preimage, and_self_iff]
    exact h2g₀
@[to_additive addIndex_union_eq]
theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty)
    (h : Disjoint (K₁.1 * V⁻¹) (K₂.1 * V⁻¹)) :
    index (K₁.1 ∪ K₂.1) V = index K₁.1 V + index K₂.1 V := by
  apply le_antisymm (index_union_le K₁ K₂ hV)
  rcases index_elim (K₁.2.union K₂.2) hV with ⟨s, h1s, h2s⟩; rw [← h2s]
  have :
    ∀ K : Set G,
      (K ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V) →
        index K V ≤ (s.filter fun g => ((fun h : G => g * h) ⁻¹' V ∩ K).Nonempty).card := by
    

Proof state:
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
K₁ K₂ : Compacts G
V : Set G
hV : Set.Nonempty (interior V)
h : Disjoint (K₁.carrier * V⁻¹) (K₂.carrier * V⁻¹)
s : Finset G
h1s : K₁.carrier ∪ K₂.carrier ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V
h2s : Finset.card s = index (K₁.carrier ∪ K₂.carrier) V
⊢ ∀ K ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V,
    index K V ≤ Finset.card (Finset.filter (fun g => Set.Nonempty ((fun h => g * h) ⁻¹' V ∩ K)) s)

Next tactic:
intro K hK