awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
inst_1 : DecidableEq (Subgroup G)
n : ℕ
ih :
  ∀ m < n,
    ∀ {ι : Type u_2} {H : ι → Subgroup G} {g : ι → G} {s : Finset ι}
      (hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ) (j : ι) (hj : j ∈ s)
      (hcovers' : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ)
      (hn : m = (Finset.image H s).card), ∃ i ∈ s, H i ≠ H j ∧ (H i).FiniteIndex
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
j : ι
hj : j ∈ s
hcovers'_1 : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ
hn : n = (Finset.image H s).card
x : G
hx : ∀ (y : G), y • (↑(H j) : Set G) ⊆ ⋃ i ∈ {x ∈ s | H x ≠ H j}, (y * x⁻¹ * g i) • (↑(H i) : Set G)
κ : Type u_2 := ↥({x ∈ s | H x ≠ H j}) × Option ↥({x ∈ s | H x = H j})
f : κ → G :=
  fun (x_1 : κ) ↦
    match (motive := κ → G) x_1 with
    | (k₁, some k₂) => g (↑k₂ : ι) * x⁻¹ * g (↑k₁ : ι)
    | (k₁, none) => g (↑k₁ : ι)
K : (k : κ) → Subgroup G := fun (k : κ) ↦ H (↑k.1 : ι)
hK' : ∀ (k : κ), K k ∈ (Finset.image H s).erase (H j)
hK : ∀ (k : κ), K k ≠ H j
hcovers :
  Eq.{u_1 + 1} (α := Set G) (⋃ (k : κ), ⋃ (_ : Membership.mem (γ := Finset κ) Finset.univ k), f k • (↑(K k) : Set G))
    Set.univ
k : κ
hcovers' :
  ¬Eq.{u_1 + 1} (α := Set G)
      (⋃ (i : κ), ⋃ (_ : Membership.mem (γ := Finset κ) {x : κ | K x = K k} i), f i • (↑(K i) : Set G)) Set.univ
⊢ (Finset.image K Finset.univ).card < (Finset.image H s).card

Tactic:
((Finset.card_le_card fun x => ?_).trans_lt <|
        Finset.card_erase_lt_of_mem (Finset.mem_image_of_mem H hj))

Premises used: Finset.card_erase_lt_of_mem, Finset.card_le_card, Finset.mem_image_of_mem, LE.le.trans_lt
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
inst_1 : DecidableEq (Subgroup G)
n : ℕ
ih :
  ∀ m < n,
    ∀ {ι : Type u_2} {H : ι → Subgroup G} {g : ι → G} {s : Finset ι}
      (hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ) (j : ι) (hj : j ∈ s)
      (hcovers' : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ)
      (hn : m = (Finset.image H s).card), ∃ i ∈ s, H i ≠ H j ∧ (H i).FiniteIndex
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
j : ι
hj : j ∈ s
hcovers'_1 : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ
hn : n = (Finset.image H s).card
x : G
hx : ∀ (y : G), y • (↑(H j) : Set G) ⊆ ⋃ i ∈ {x ∈ s | H x ≠ H j}, (y * x⁻¹ * g i) • (↑(H i) : Set G)
κ : Type u_2 := ↥({x ∈ s | H x ≠ H j}) × Option ↥({x ∈ s | H x = H j})
f : κ → G :=
  fun (x_1 : κ) ↦
    match (motive := κ → G) x_1 with
    | (k₁, some k₂) => g (↑k₂ : ι) * x⁻¹ * g (↑k₁ : ι)
    | (k₁, none) => g (↑k₁ : ι)
K : (k : κ) → Subgroup G := fun (k : κ) ↦ H (↑k.1 : ι)
hK' : ∀ (k : κ), K k ∈ (Finset.image H s).erase (H j)
hK : ∀ (k : κ), K k ≠ H j
hcovers :
  Eq.{u_1 + 1} (α := Set G) (⋃ (k : κ), ⋃ (_ : Membership.mem (γ := Finset κ) Finset.univ k), f k • (↑(K k) : Set G))
    Set.univ
k : κ
hcovers' :
  ¬Eq.{u_1 + 1} (α := Set G)
      (⋃ (i : κ), ⋃ (_ : Membership.mem (γ := Finset κ) {x : κ | K x = K k} i), f i • (↑(K i) : Set G)) Set.univ
refine : ∀ x ∈ Finset.image K Finset.univ, x ∈ (Finset.image H s).erase (H j)
⊢ (Finset.image K Finset.univ).card < (Finset.image H s).card

Tactic:
refine ((Finset.card_le_card fun x => ?_).trans_lt <|
        Finset.card_erase_lt_of_mem (Finset.mem_image_of_mem H hj))

Premises used: Finset.card_erase_lt_of_mem, Finset.card_le_card, Finset.mem_image_of_mem, LE.le.trans_lt
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
inst_1 : DecidableEq (Subgroup G)
n : ℕ
ih :
  ∀ m < n,
    ∀ {ι : Type u_2} {H : ι → Subgroup G} {g : ι → G} {s : Finset ι}
      (hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ) (j : ι) (hj : j ∈ s)
      (hcovers' : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ)
      (hn : m = (Finset.image H s).card), ∃ i ∈ s, H i ≠ H j ∧ (H i).FiniteIndex
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
j : ι
hj : j ∈ s
hcovers'_1 : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ
hn : n = (Finset.image H s).card
x_1 : G
hx : ∀ (y : G), y • (↑(H j) : Set G) ⊆ ⋃ i ∈ {x ∈ s | H x ≠ H j}, (y * x_1⁻¹ * g i) • (↑(H i) : Set G)
κ : Type u_2 := ↥({x ∈ s | H x ≠ H j}) × Option ↥({x ∈ s | H x = H j})
f : κ → G :=
  fun (x : κ) ↦
    match (motive := κ → G) x with
    | (k₁, some k₂) => g (↑k₂ : ι) * x_1⁻¹ * g (↑k₁ : ι)
    | (k₁, none) => g (↑k₁ : ι)
K : (k : κ) → Subgroup G := fun (k : κ) ↦ H (↑k.1 : ι)
hK' : ∀ (k : κ), K k ∈ (Finset.image H s).erase (H j)
hK : ∀ (k : κ), K k ≠ H j
hcovers :
  Eq.{u_1 + 1} (α := Set G) (⋃ (k : κ), ⋃ (_ : Membership.mem (γ := Finset κ) Finset.univ k), f k • (↑(K k) : Set G))
    Set.univ
k : κ
hcovers' :
  ¬Eq.{u_1 + 1} (α := Set G)
      (⋃ (i : κ), ⋃ (_ : Membership.mem (γ := Finset κ) {x : κ | K x = K k} i), f i • (↑(K i) : Set G)) Set.univ
x : Subgroup G
rw : (∃ (y : κ), K y = x) → x ∈ (Finset.image H s).erase (H j)
⊢ x ∈ Finset.image K Finset.univ → x ∈ (Finset.image H s).erase (H j)

Tactic:
rw [mem_image_univ_iff_mem_range, Set.mem_range]

Premises used: Set.mem_range, mem_image_univ_iff_mem_range
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
inst_1 : DecidableEq (Subgroup G)
n : ℕ
ih :
  ∀ m < n,
    ∀ {ι : Type u_2} {H : ι → Subgroup G} {g : ι → G} {s : Finset ι}
      (hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ) (j : ι) (hj : j ∈ s)
      (hcovers' : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ)
      (hn : m = (Finset.image H s).card), ∃ i ∈ s, H i ≠ H j ∧ (H i).FiniteIndex
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
j : ι
hj : j ∈ s
hcovers'_1 : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ
hn : n = (Finset.image H s).card
x_1 : G
hx : ∀ (y : G), y • (↑(H j) : Set G) ⊆ ⋃ i ∈ {x ∈ s | H x ≠ H j}, (y * x_1⁻¹ * g i) • (↑(H i) : Set G)
κ : Type u_2 := ↥({x ∈ s | H x ≠ H j}) × Option ↥({x ∈ s | H x = H j})
f : κ → G :=
  fun (x : κ) ↦
    match (motive := κ → G) x with
    | (k₁, some k₂) => g (↑k₂ : ι) * x_1⁻¹ * g (↑k₁ : ι)
    | (k₁, none) => g (↑k₁ : ι)
K : (k : κ) → Subgroup G := fun (k : κ) ↦ H (↑k.1 : ι)
hK' : ∀ (k : κ), K k ∈ (Finset.image H s).erase (H j)
hK : ∀ (k : κ), K k ≠ H j
hcovers :
  Eq.{u_1 + 1} (α := Set G) (⋃ (k : κ), ⋃ (_ : Membership.mem (γ := Finset κ) Finset.univ k), f k • (↑(K k) : Set G))
    Set.univ
k : κ
hcovers' :
  ¬Eq.{u_1 + 1} (α := Set G)
      (⋃ (i : κ), ⋃ (_ : Membership.mem (γ := Finset κ) {x : κ | K x = K k} i), f i • (↑(K i) : Set G)) Set.univ
x : Subgroup G
⊢ (∃ (y : κ), K y = x) → x ∈ (Finset.image H s).erase (H j)

Tactic:
fun ⟨k, hk⟩ => hk ▸ hK' k

Premises used: Membership.mem, Eq.rec, _private.0.Subgroup.exists_finiteIndex_of_leftCoset_cover_aux.match_10, Finset.erase, Finset.image
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
inst_1 : DecidableEq (Subgroup G)
n : ℕ
ih :
  ∀ m < n,
    ∀ {ι : Type u_2} {H : ι → Subgroup G} {g : ι → G} {s : Finset ι}
      (hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ) (j : ι) (hj : j ∈ s)
      (hcovers' : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ)
      (hn : m = (Finset.image H s).card), ∃ i ∈ s, H i ≠ H j ∧ (H i).FiniteIndex
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
j : ι
hj : j ∈ s
hcovers'_1 : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ
hn : n = (Finset.image H s).card
x_1 : G
hx : ∀ (y : G), y • (↑(H j) : Set G) ⊆ ⋃ i ∈ {x ∈ s | H x ≠ H j}, (y * x_1⁻¹ * g i) • (↑(H i) : Set G)
κ : Type u_2 := ↥({x ∈ s | H x ≠ H j}) × Option ↥({x ∈ s | H x = H j})
f : κ → G :=
  fun (x : κ) ↦
    match (motive := κ → G) x with
    | (k₁, some k₂) => g (↑k₂ : ι) * x_1⁻¹ * g (↑k₁ : ι)
    | (k₁, none) => g (↑k₁ : ι)
K : (k : κ) → Subgroup G := fun (k : κ) ↦ H (↑k.1 : ι)
hK' : ∀ (k : κ), K k ∈ (Finset.image H s).erase (H j)
hK : ∀ (k : κ), K k ≠ H j
hcovers :
  Eq.{u_1 + 1} (α := Set G) (⋃ (k : κ), ⋃ (_ : Membership.mem (γ := Finset κ) Finset.univ k), f k • (↑(K k) : Set G))
    Set.univ
k : κ
hcovers' :
  ¬Eq.{u_1 + 1} (α := Set G)
      (⋃ (i : κ), ⋃ (_ : Membership.mem (γ := Finset κ) {x : κ | K x = K k} i), f i • (↑(K i) : Set G)) Set.univ
x : Subgroup G
⊢ (∃ (y : κ), K y = x) → x ∈ (Finset.image H s).erase (H j)

Tactic:
exact fun ⟨k, hk⟩ => hk ▸ hK' k
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
inst_1 : DecidableEq (Subgroup G)
n : ℕ
ih :
  ∀ m < n,
    ∀ {ι : Type u_2} {H : ι → Subgroup G} {g : ι → G} {s : Finset ι}
      (hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ) (j : ι) (hj : j ∈ s)
      (hcovers' : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ)
      (hn : m = (Finset.image H s).card), ∃ i ∈ s, H i ≠ H j ∧ (H i).FiniteIndex
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
j : ι
hj : j ∈ s
hcovers'_1 : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ
hn : n = (Finset.image H s).card
x : G
hx : ∀ (y : G), y • (↑(H j) : Set G) ⊆ ⋃ i ∈ {x ∈ s | H x ≠ H j}, (y * x⁻¹ * g i) • (↑(H i) : Set G)
κ : Type u_2 := ↥({x ∈ s | H x ≠ H j}) × Option ↥({x ∈ s | H x = H j})
f : κ → G :=
  fun (x_1 : κ) ↦
    match (motive := κ → G) x_1 with
    | (k₁, some k₂) => g (↑k₂ : ι) * x⁻¹ * g (↑k₁ : ι)
    | (k₁, none) => g (↑k₁ : ι)
K : (k : κ) → Subgroup G := fun (k : κ) ↦ H (↑k.1 : ι)
hK' : ∀ (k : κ), K k ∈ (Finset.image H s).erase (H j)
hK : ∀ (k : κ), K k ≠ H j
hcovers :
  Eq.{u_1 + 1} (α := Set G) (⋃ (k : κ), ⋃ (_ : Membership.mem (γ := Finset κ) Finset.univ k), f k • (↑(K k) : Set G))
    Set.univ
k : κ
hcovers' :
  ¬Eq.{u_1 + 1} (α := Set G)
      (⋃ (i : κ), ⋃ (_ : Membership.mem (γ := Finset κ) {x : κ | K x = K k} i), f i • (↑(K i) : Set G)) Set.univ
⊢ (Finset.image K Finset.univ).card < n

Tactic:
have hn' : (Finset.univ.image K).card < n := hn ▸ by
      refine ((Finset.card_le_card fun x => ?_).trans_lt <|
        Finset.card_erase_lt_of_mem (Finset.mem_image_of_mem H hj))
      rw [mem_image_univ_iff_mem_range, Set.mem_range]
      exact fun ⟨k, hk⟩ => hk ▸ hK' k
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
inst_1 : DecidableEq (Subgroup G)
n : ℕ
ih :
  ∀ m < n,
    ∀ {ι : Type u_2} {H : ι → Subgroup G} {g : ι → G} {s : Finset ι}
      (hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ) (j : ι) (hj : j ∈ s)
      (hcovers' : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ)
      (hn : m = (Finset.image H s).card), ∃ i ∈ s, H i ≠ H j ∧ (H i).FiniteIndex
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
j : ι
hj : j ∈ s
hcovers'_1 : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ
hn : n = (Finset.image H s).card
x : G
hx : ∀ (y : G), y • (↑(H j) : Set G) ⊆ ⋃ i ∈ {x ∈ s | H x ≠ H j}, (y * x⁻¹ * g i) • (↑(H i) : Set G)
κ : Type u_2 := ↥({x ∈ s | H x ≠ H j}) × Option ↥({x ∈ s | H x = H j})
f : κ → G :=
  fun (x_1 : κ) ↦
    match (motive := κ → G) x_1 with
    | (k₁, some k₂) => g (↑k₂ : ι) * x⁻¹ * g (↑k₁ : ι)
    | (k₁, none) => g (↑k₁ : ι)
K : (k : κ) → Subgroup G := fun (k : κ) ↦ H (↑k.1 : ι)
hK' : ∀ (k : κ), K k ∈ (Finset.image H s).erase (H j)
hK : ∀ (k : κ), K k ≠ H j
hcovers :
  Eq.{u_1 + 1} (α := Set G) (⋃ (k : κ), ⋃ (_ : Membership.mem (γ := Finset κ) Finset.univ k), f k • (↑(K k) : Set G))
    Set.univ
k : κ
hcovers' :
  ¬Eq.{u_1 + 1} (α := Set G)
      (⋃ (i : κ), ⋃ (_ : Membership.mem (γ := Finset κ) {x : κ | K x = K k} i), f i • (↑(K i) : Set G)) Set.univ
hn' : (Finset.image K Finset.univ).card < n
neg :
  ∀ (k' : κ) (hk' : Membership.mem (γ := Finset κ) Finset.univ k' ∧ K k' ≠ K k ∧ (K k').FiniteIndex),
    ∃ i ∈ s, H i ≠ H j ∧ (H i).FiniteIndex
⊢ ∃ i ∈ s, H i ≠ H j ∧ (H i).FiniteIndex

Tactic:
have ⟨k', hk'⟩ := ih _ hn' hcovers k (Finset.mem_univ k) hcovers' rfl
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
inst_1 : DecidableEq (Subgroup G)
n : ℕ
ih :
  ∀ m < n,
    ∀ {ι : Type u_2} {H : ι → Subgroup G} {g : ι → G} {s : Finset ι}
      (hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ) (j : ι) (hj : j ∈ s)
      (hcovers' : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ)
      (hn : m = (Finset.image H s).card), ∃ i ∈ s, H i ≠ H j ∧ (H i).FiniteIndex
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
j : ι
hj : j ∈ s
hcovers'_1 : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ
hn : n = (Finset.image H s).card
x : G
hx : ∀ (y : G), y • (↑(H j) : Set G) ⊆ ⋃ i ∈ {x ∈ s | H x ≠ H j}, (y * x⁻¹ * g i) • (↑(H i) : Set G)
κ : Type u_2 := ↥({x ∈ s | H x ≠ H j}) × Option ↥({x ∈ s | H x = H j})
f : κ → G :=
  fun (x_1 : κ) ↦
    match (motive := κ → G) x_1 with
    | (k₁, some k₂) => g (↑k₂ : ι) * x⁻¹ * g (↑k₁ : ι)
    | (k₁, none) => g (↑k₁ : ι)
K : (k : κ) → Subgroup G := fun (k : κ) ↦ H (↑k.1 : ι)
hK' : ∀ (k : κ), K k ∈ (Finset.image H s).erase (H j)
hK : ∀ (k : κ), K k ≠ H j
hcovers :
  Eq.{u_1 + 1} (α := Set G) (⋃ (k : κ), ⋃ (_ : Membership.mem (γ := Finset κ) Finset.univ k), f k • (↑(K k) : Set G))
    Set.univ
k : κ
hcovers' :
  ¬Eq.{u_1 + 1} (α := Set G)
      (⋃ (i : κ), ⋃ (_ : Membership.mem (γ := Finset κ) {x : κ | K x = K k} i), f i • (↑(K i) : Set G)) Set.univ
hn' : (Finset.image K Finset.univ).card < n
k' : κ
hk' : Membership.mem (γ := Finset κ) Finset.univ k' ∧ K k' ≠ K k ∧ (K k').FiniteIndex
⊢ ∃ i ∈ s, H i ≠ H j ∧ (H i).FiniteIndex

Tactic:
⟨k'.1.1, Finset.mem_of_mem_filter k'.1.1 k'.1.2, hK k', hk'.2.2⟩

Premises used: Prod.fst, And.right, Finset.mem_of_mem_filter, And.intro, Exists.intro, Subtype.val, Subtype.property
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
inst_1 : DecidableEq (Subgroup G)
n : ℕ
ih :
  ∀ m < n,
    ∀ {ι : Type u_2} {H : ι → Subgroup G} {g : ι → G} {s : Finset ι}
      (hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ) (j : ι) (hj : j ∈ s)
      (hcovers' : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ)
      (hn : m = (Finset.image H s).card), ∃ i ∈ s, H i ≠ H j ∧ (H i).FiniteIndex
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
j : ι
hj : j ∈ s
hcovers'_1 : Ne.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ
hn : n = (Finset.image H s).card
x : G
hx : ∀ (y : G), y • (↑(H j) : Set G) ⊆ ⋃ i ∈ {x ∈ s | H x ≠ H j}, (y * x⁻¹ * g i) • (↑(H i) : Set G)
κ : Type u_2 := ↥({x ∈ s | H x ≠ H j}) × Option ↥({x ∈ s | H x = H j})
f : κ → G :=
  fun (x_1 : κ) ↦
    match (motive := κ → G) x_1 with
    | (k₁, some k₂) => g (↑k₂ : ι) * x⁻¹ * g (↑k₁ : ι)
    | (k₁, none) => g (↑k₁ : ι)
K : (k : κ) → Subgroup G := fun (k : κ) ↦ H (↑k.1 : ι)
hK' : ∀ (k : κ), K k ∈ (Finset.image H s).erase (H j)
hK : ∀ (k : κ), K k ≠ H j
hcovers :
  Eq.{u_1 + 1} (α := Set G) (⋃ (k : κ), ⋃ (_ : Membership.mem (γ := Finset κ) Finset.univ k), f k • (↑(K k) : Set G))
    Set.univ
k : κ
hcovers' :
  ¬Eq.{u_1 + 1} (α := Set G)
      (⋃ (i : κ), ⋃ (_ : Membership.mem (γ := Finset κ) {x : κ | K x = K k} i), f i • (↑(K i) : Set G)) Set.univ
hn' : (Finset.image K Finset.univ).card < n
k' : κ
hk' : Membership.mem (γ := Finset κ) Finset.univ k' ∧ K k' ≠ K k ∧ (K k').FiniteIndex
⊢ ∃ i ∈ s, H i ≠ H j ∧ (H i).FiniteIndex

Tactic:
exact ⟨k'.1.1, Finset.mem_of_mem_filter k'.1.1 k'.1.2, hK k', hk'.2.2⟩
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ
by_contra! :
  ∀
    (hcovers :
      Eq.{u_1 + 1} (α := Set G) (⋃ (i : ι), ⋃ (_ : Membership.mem (γ := Finset ι) ∅ i), g i • (↑(H i) : Set G))
        Set.univ),
    False
⊢ s.Nonempty

Tactic:
by_contra! rfl

Premises used: rfl
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
ι : Type u_2
H : ι → Subgroup G
g : ι → G
hcovers :
  Eq.{u_1 + 1} (α := Set G) (⋃ (i : ι), ⋃ (_ : Membership.mem (γ := Finset ι) ∅ i), g i • (↑(H i) : Set G)) Set.univ
⊢ Eq.{u_1 + 1} (α := Set G) ∅ Set.univ

Tactic:
rw [← Finset.set_biUnion_coe, Finset.coe_empty, Set.biUnion_empty] at hcovers

Premises used: Finset.coe_empty, Finset.set_biUnion_coe, Set.biUnion_empty
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
ι : Type u_2
H : ι → Subgroup G
g : ι → G
hcovers : Eq.{u_1 + 1} (α := Set G) ∅ Set.univ
⊢ False

Tactic:
Set.empty_ne_univ hcovers

Premises used: Set.empty_ne_univ
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
ι : Type u_2
H : ι → Subgroup G
g : ι → G
hcovers : Eq.{u_1 + 1} (α := Set G) ∅ Set.univ
⊢ False

Tactic:
exact Set.empty_ne_univ hcovers

Premises used: Set.empty_ne_univ
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ
have : ∀ (j : ι) (hj : j ∈ s), ∃ k ∈ s, (H k).FiniteIndex
⊢ ∃ k ∈ s, (H k).FiniteIndex

Tactic:
have ⟨j, hj⟩ : s.Nonempty := by
    by_contra! rfl
    rw [← Finset.set_biUnion_coe, Finset.coe_empty, Set.biUnion_empty] at hcovers
    exact Set.empty_ne_univ hcovers
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ
j : ι
hj : j ∈ s
pos :
  ∀ (hcovers' : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ),
    ∃ k ∈ s, (H k).FiniteIndex
neg :
  ∀ (hcovers' : ¬Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ),
    ∃ k ∈ s, (H k).FiniteIndex
⊢ ∃ k ∈ s, (H k).FiniteIndex

Tactic:
by_cases hcovers' : ⋃ i ∈ s.filter (H · = H j), g i • (H i : Set G) = Set.univ

Premises used: Set.univ, Finset.filter, Eq
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ
j : ι
hj : j ∈ s
hcovers' : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ
i : ι
hi : i ∈ {x ∈ s | H x = H j}
rw rw₁ : g i • (↑(H j) : Set G) = g i • (↑(H j) : Set G)
⊢ g i • (↑(H i) : Set G) = g i • (↑(H j) : Set G)

Tactic:
rw [(Finset.mem_filter.mp hi).right]

Premises used: And.right, Iff.mp, Finset.mem_filter
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ
j : ι
hj : j ∈ s
hcovers' : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ
⊢ Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H j) : Set G)) Set.univ

Tactic:
rw [Set.iUnion₂_congr fun i hi => by rw [(Finset.mem_filter.mp hi).right]] at hcovers'

Premises used: Set.iUnion₂_congr
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ
j : ι
hj : j ∈ s
hcovers' : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H j) : Set G)) Set.univ
⊢ ∃ k ∈ s, (H k).FiniteIndex

Tactic:
⟨j, hj, finiteIndex_of_leftCoset_cover_const hcovers'⟩

Premises used: Subgroup.finiteIndex_of_leftCoset_cover_const, And.intro, Exists.intro
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ
j : ι
hj : j ∈ s
hcovers' : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H j) : Set G)) Set.univ
⊢ ∃ k ∈ s, (H k).FiniteIndex

Tactic:
exact ⟨j, hj, finiteIndex_of_leftCoset_cover_const hcovers'⟩
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ
j : ι
hj : j ∈ s
hcovers' : ¬Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ
neg : ∀ (i : ι) (hi : i ∈ s), H i ≠ H j → ∀ (hfi : (H i).FiniteIndex), ∃ k ∈ s, (H k).FiniteIndex
⊢ ∃ k ∈ s, (H k).FiniteIndex

Tactic:
have ⟨i, hi, _, hfi⟩ :=
      exists_finiteIndex_of_leftCoset_cover_aux hcovers j hj hcovers'
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ
j : ι
hj : j ∈ s
hcovers' : ¬Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ
i : ι
hi : i ∈ s
left : H i ≠ H j
hfi : (H i).FiniteIndex
⊢ ∃ k ∈ s, (H k).FiniteIndex

Tactic:
⟨i, hi, hfi⟩

Premises used: And.intro, Exists.intro
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ
j : ι
hj : j ∈ s
hcovers' : ¬Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ
i : ι
hi : i ∈ s
left : H i ≠ H j
hfi : (H i).FiniteIndex
⊢ ∃ k ∈ s, (H k).FiniteIndex

Tactic:
exact ⟨i, hi, hfi⟩
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ
have have₁ have₂ : ∀ (j : ι) (hj : j ∈ s), ∃ k ∈ s, (H k).FiniteIndex
pos :
  ∀ (j : ι) (hj : j ∈ s)
    (hcovers' : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ),
    ∃ k ∈ s, (H k).FiniteIndex
neg neg₁ :
  ∀ (j : ι) (hj : j ∈ s)
    (hcovers' : ¬Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ {x ∈ s | H x = H j}, g i • (↑(H i) : Set G)) Set.univ),
    ∃ k ∈ s, (H k).FiniteIndex
⊢ ∃ k ∈ s, (H k).FiniteIndex

Tactic:
classical
  have ⟨j, hj⟩ : s.Nonempty := by
    by_contra! rfl
    rw [← Finset.set_biUnion_coe, Finset.coe_empty, Set.biUnion_empty] at hcovers
    exact Set.empty_ne_univ hcovers
  by_cases hcovers' : ⋃ i ∈ s.filter (H · = H j), g i • (H i : Set G) = Set.univ
  · rw [Set.iUnion₂_congr fun i hi => by rw [(Finset.mem_filter.mp hi).right]] at hcovers'
    exact ⟨j, hj, finiteIndex_of_leftCoset_cover_const hcovers'⟩
  · have ⟨i, hi, _, hfi⟩ :=
      exists_finiteIndex_of_leftCoset_cover_aux hcovers j hj hcovers'
    exact ⟨i, hi, hfi⟩

Premises used: Set.univ, Set.iUnion₂_congr
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ
inst_1 : DecidablePred (α := Subgroup G) FiniteIndex
D : Subgroup G := ⨅ k ∈ {i ∈ s | (H i).FiniteIndex}, H k
⊢ ∀ i ∈ {i ∈ s | (H i).FiniteIndex}, (H i).FiniteIndex

Tactic:
simp
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ
inst_1 : DecidablePred (α := Subgroup G) FiniteIndex
D : Subgroup G := ⨅ k ∈ {i ∈ s | (H i).FiniteIndex}, H k
⊢ D.FiniteIndex

Tactic:
have hD : D.FiniteIndex := finiteIndex_iInf' _ <| by simp
-- Module: Mathlib.GroupTheory.CosetCover
Goal:
G : Type u_1
inst : Group G
ι : Type u_2
H : ι → Subgroup G
g : ι → G
s : Finset ι
hcovers : Eq.{u_1 + 1} (α := Set G) (⋃ i ∈ s, g i • (↑(H i) : Set G)) Set.univ
inst_1 : DecidablePred (α := Subgroup G) FiniteIndex
D : Subgroup G := ⨅ k ∈ {i ∈ s | (H i).FiniteIndex}, H k
hD : D.FiniteIndex
⊢ ∀ {i : ι} (hi : i ∈ s) (hfi : (H i).FiniteIndex), D ≤ H i

Tactic:
have hD_le {i} (hi : i ∈ s) (hfi : (H i).FiniteIndex) : D ≤ H i :=
    iInf₂_le i (Finset.mem_filter.mpr ⟨hi, hfi⟩)