l3lab/ntp-mathlib huggingface dataset:
@[to_additive]
theorem mulHom_image_of_injective (f : H →ₙ* G) (hf : Function.Injective f)
    (uG : TwoUniqueProds G) : TwoUniqueProds H where
  uniqueMul_of_one_lt_card {A B} hc := by
    classical
    simp_rw [← card_map ⟨f, hf⟩] at hc
    obtain ⟨⟨a1, b1⟩, h1, ⟨a2, b2⟩, h2, hne, hu1, hu2⟩ := uG.uniqueMul_of_one_lt_card hc
    simp only [mem_product, mem_map] at h1 h2 ⊢
    obtain ⟨⟨a1, ha1, rfl⟩, ⟨b1, hb1, rfl⟩⟩ := h1
    obtain ⟨⟨a2, ha2, rfl⟩, ⟨b2, hb2, rfl⟩⟩ := h2
    refine ⟨(a1, b1), ⟨ha1, hb1⟩, (a2, b2), ⟨ha2, hb2⟩, ?_, ?_, ?_⟩
    · 

Proof state:
case intro.mk.intro.intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine_1
G : Type u
H : Type v
inst✝¹ : Mul G
inst✝ : Mul H
f : H →ₙ* G
hf : Function.Injective ⇑f
uG : TwoUniqueProds G
A B : Finset H
hc : 1 < card (map { toFun := ⇑f, inj' := hf } A) * card (map { toFun := ⇑f, inj' := hf } B)
a1 : H
ha1 : a1 ∈ A
b1 : H
hb1 : b1 ∈ B
hu1 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).1
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).2
a2 : H
ha2 : a2 ∈ A
b2 : H
hb2 : b2 ∈ B
hu2 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).1
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).2
hne :
  ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1) ≠
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2)
⊢ (a1, b1) ≠ (a2, b2)

Next tactic:
rw [Ne, Prod.ext_iff] at hne ⊢
@[to_additive]
theorem mulHom_image_of_injective (f : H →ₙ* G) (hf : Function.Injective f)
    (uG : TwoUniqueProds G) : TwoUniqueProds H where
  uniqueMul_of_one_lt_card {A B} hc := by
    classical
    simp_rw [← card_map ⟨f, hf⟩] at hc
    obtain ⟨⟨a1, b1⟩, h1, ⟨a2, b2⟩, h2, hne, hu1, hu2⟩ := uG.uniqueMul_of_one_lt_card hc
    simp only [mem_product, mem_map] at h1 h2 ⊢
    obtain ⟨⟨a1, ha1, rfl⟩, ⟨b1, hb1, rfl⟩⟩ := h1
    obtain ⟨⟨a2, ha2, rfl⟩, ⟨b2, hb2, rfl⟩⟩ := h2
    refine ⟨(a1, b1), ⟨ha1, hb1⟩, (a2, b2), ⟨ha2, hb2⟩, ?_, ?_, ?_⟩
    · rw [Ne, Prod.ext_iff] at hne ⊢; 

Proof state:
case intro.mk.intro.intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine_1
G : Type u
H : Type v
inst✝¹ : Mul G
inst✝ : Mul H
f : H →ₙ* G
hf : Function.Injective ⇑f
uG : TwoUniqueProds G
A B : Finset H
hc : 1 < card (map { toFun := ⇑f, inj' := hf } A) * card (map { toFun := ⇑f, inj' := hf } B)
a1 : H
ha1 : a1 ∈ A
b1 : H
hb1 : b1 ∈ B
hu1 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).1
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).2
a2 : H
ha2 : a2 ∈ A
b2 : H
hb2 : b2 ∈ B
hu2 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).1
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).2
hne :
  ¬(({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).1 =
        ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).1 ∧
      ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).2 =
        ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).2)
⊢ ¬((a1, b1).1 = (a2, b2).1 ∧ (a1, b1).2 = (a2, b2).2)

Next tactic:
simp_rw [← hf.eq_iff]
@[to_additive]
theorem mulHom_image_of_injective (f : H →ₙ* G) (hf : Function.Injective f)
    (uG : TwoUniqueProds G) : TwoUniqueProds H where
  uniqueMul_of_one_lt_card {A B} hc := by
    classical
    simp_rw [← card_map ⟨f, hf⟩] at hc
    obtain ⟨⟨a1, b1⟩, h1, ⟨a2, b2⟩, h2, hne, hu1, hu2⟩ := uG.uniqueMul_of_one_lt_card hc
    simp only [mem_product, mem_map] at h1 h2 ⊢
    obtain ⟨⟨a1, ha1, rfl⟩, ⟨b1, hb1, rfl⟩⟩ := h1
    obtain ⟨⟨a2, ha2, rfl⟩, ⟨b2, hb2, rfl⟩⟩ := h2
    refine ⟨(a1, b1), ⟨ha1, hb1⟩, (a2, b2), ⟨ha2, hb2⟩, ?_, ?_, ?_⟩
    · rw [Ne, Prod.ext_iff] at hne ⊢; simp_rw [← hf.eq_iff]; 

Proof state:
case intro.mk.intro.intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine_1
G : Type u
H : Type v
inst✝¹ : Mul G
inst✝ : Mul H
f : H →ₙ* G
hf : Function.Injective ⇑f
uG : TwoUniqueProds G
A B : Finset H
hc : 1 < card (map { toFun := ⇑f, inj' := hf } A) * card (map { toFun := ⇑f, inj' := hf } B)
a1 : H
ha1 : a1 ∈ A
b1 : H
hb1 : b1 ∈ B
hu1 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).1
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).2
a2 : H
ha2 : a2 ∈ A
b2 : H
hb2 : b2 ∈ B
hu2 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).1
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).2
hne :
  ¬(({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).1 =
        ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).1 ∧
      ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).2 =
        ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).2)
⊢ ¬(f a1 = f a2 ∧ f b1 = f b2)

Next tactic:
exact hne
@[to_additive]
theorem mulHom_image_of_injective (f : H →ₙ* G) (hf : Function.Injective f)
    (uG : TwoUniqueProds G) : TwoUniqueProds H where
  uniqueMul_of_one_lt_card {A B} hc := by
    classical
    simp_rw [← card_map ⟨f, hf⟩] at hc
    obtain ⟨⟨a1, b1⟩, h1, ⟨a2, b2⟩, h2, hne, hu1, hu2⟩ := uG.uniqueMul_of_one_lt_card hc
    simp only [mem_product, mem_map] at h1 h2 ⊢
    obtain ⟨⟨a1, ha1, rfl⟩, ⟨b1, hb1, rfl⟩⟩ := h1
    obtain ⟨⟨a2, ha2, rfl⟩, ⟨b2, hb2, rfl⟩⟩ := h2
    refine ⟨(a1, b1), ⟨ha1, hb1⟩, (a2, b2), ⟨ha2, hb2⟩, ?_, ?_, ?_⟩
    · rw [Ne, Prod.ext_iff] at hne ⊢; simp_rw [← hf.eq_iff]; exact hne
    

Proof state:
case intro.mk.intro.intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine_2
G : Type u
H : Type v
inst✝¹ : Mul G
inst✝ : Mul H
f : H →ₙ* G
hf : Function.Injective ⇑f
uG : TwoUniqueProds G
A B : Finset H
hc : 1 < card (map { toFun := ⇑f, inj' := hf } A) * card (map { toFun := ⇑f, inj' := hf } B)
a1 : H
ha1 : a1 ∈ A
b1 : H
hb1 : b1 ∈ B
hu1 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).1
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).2
a2 : H
ha2 : a2 ∈ A
b2 : H
hb2 : b2 ∈ B
hu2 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).1
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).2
hne :
  ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1) ≠
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2)
⊢ UniqueMul A B (a1, b1).1 (a1, b1).2
case intro.mk.intro.intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine_3
G : Type u
H : Type v
inst✝¹ : Mul G
inst✝ : Mul H
f : H →ₙ* G
hf : Function.Injective ⇑f
uG : TwoUniqueProds G
A B : Finset H
hc : 1 < card (map { toFun := ⇑f, inj' := hf } A) * card (map { toFun := ⇑f, inj' := hf } B)
a1 : H
ha1 : a1 ∈ A
b1 : H
hb1 : b1 ∈ B
hu1 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).1
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).2
a2 : H
ha2 : a2 ∈ A
b2 : H
hb2 : b2 ∈ B
hu2 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).1
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).2
hne :
  ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1) ≠
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2)
⊢ UniqueMul A B (a2, b2).1 (a2, b2).2

Next tactic:
all_goals apply (UniqueMul.mulHom_map_iff ⟨f, hf⟩ f.2).mp
@[to_additive]
theorem mulHom_image_of_injective (f : H →ₙ* G) (hf : Function.Injective f)
    (uG : TwoUniqueProds G) : TwoUniqueProds H where
  uniqueMul_of_one_lt_card {A B} hc := by
    classical
    simp_rw [← card_map ⟨f, hf⟩] at hc
    obtain ⟨⟨a1, b1⟩, h1, ⟨a2, b2⟩, h2, hne, hu1, hu2⟩ := uG.uniqueMul_of_one_lt_card hc
    simp only [mem_product, mem_map] at h1 h2 ⊢
    obtain ⟨⟨a1, ha1, rfl⟩, ⟨b1, hb1, rfl⟩⟩ := h1
    obtain ⟨⟨a2, ha2, rfl⟩, ⟨b2, hb2, rfl⟩⟩ := h2
    refine ⟨(a1, b1), ⟨ha1, hb1⟩, (a2, b2), ⟨ha2, hb2⟩, ?_, ?_, ?_⟩
    · rw [Ne, Prod.ext_iff] at hne ⊢; simp_rw [← hf.eq_iff]; exact hne
    all_goals 

Proof state:
case intro.mk.intro.intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine_2
G : Type u
H : Type v
inst✝¹ : Mul G
inst✝ : Mul H
f : H →ₙ* G
hf : Function.Injective ⇑f
uG : TwoUniqueProds G
A B : Finset H
hc : 1 < card (map { toFun := ⇑f, inj' := hf } A) * card (map { toFun := ⇑f, inj' := hf } B)
a1 : H
ha1 : a1 ∈ A
b1 : H
hb1 : b1 ∈ B
hu1 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).1
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).2
a2 : H
ha2 : a2 ∈ A
b2 : H
hb2 : b2 ∈ B
hu2 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).1
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).2
hne :
  ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1) ≠
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2)
⊢ UniqueMul A B (a1, b1).1 (a1, b1).2

Next tactic:
apply (UniqueMul.mulHom_map_iff ⟨f, hf⟩ f.2).mp
@[to_additive]
theorem mulHom_image_of_injective (f : H →ₙ* G) (hf : Function.Injective f)
    (uG : TwoUniqueProds G) : TwoUniqueProds H where
  uniqueMul_of_one_lt_card {A B} hc := by
    classical
    simp_rw [← card_map ⟨f, hf⟩] at hc
    obtain ⟨⟨a1, b1⟩, h1, ⟨a2, b2⟩, h2, hne, hu1, hu2⟩ := uG.uniqueMul_of_one_lt_card hc
    simp only [mem_product, mem_map] at h1 h2 ⊢
    obtain ⟨⟨a1, ha1, rfl⟩, ⟨b1, hb1, rfl⟩⟩ := h1
    obtain ⟨⟨a2, ha2, rfl⟩, ⟨b2, hb2, rfl⟩⟩ := h2
    refine ⟨(a1, b1), ⟨ha1, hb1⟩, (a2, b2), ⟨ha2, hb2⟩, ?_, ?_, ?_⟩
    · rw [Ne, Prod.ext_iff] at hne ⊢; simp_rw [← hf.eq_iff]; exact hne
    all_goals 

Proof state:
case intro.mk.intro.intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine_3
G : Type u
H : Type v
inst✝¹ : Mul G
inst✝ : Mul H
f : H →ₙ* G
hf : Function.Injective ⇑f
uG : TwoUniqueProds G
A B : Finset H
hc : 1 < card (map { toFun := ⇑f, inj' := hf } A) * card (map { toFun := ⇑f, inj' := hf } B)
a1 : H
ha1 : a1 ∈ A
b1 : H
hb1 : b1 ∈ B
hu1 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).1
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).2
a2 : H
ha2 : a2 ∈ A
b2 : H
hb2 : b2 ∈ B
hu2 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).1
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).2
hne :
  ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1) ≠
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2)
⊢ UniqueMul A B (a2, b2).1 (a2, b2).2

Next tactic:
apply (UniqueMul.mulHom_map_iff ⟨f, hf⟩ f.2).mp
@[to_additive]
theorem mulHom_image_of_injective (f : H →ₙ* G) (hf : Function.Injective f)
    (uG : TwoUniqueProds G) : TwoUniqueProds H where
  uniqueMul_of_one_lt_card {A B} hc := by
    classical
    simp_rw [← card_map ⟨f, hf⟩] at hc
    obtain ⟨⟨a1, b1⟩, h1, ⟨a2, b2⟩, h2, hne, hu1, hu2⟩ := uG.uniqueMul_of_one_lt_card hc
    simp only [mem_product, mem_map] at h1 h2 ⊢
    obtain ⟨⟨a1, ha1, rfl⟩, ⟨b1, hb1, rfl⟩⟩ := h1
    obtain ⟨⟨a2, ha2, rfl⟩, ⟨b2, hb2, rfl⟩⟩ := h2
    refine ⟨(a1, b1), ⟨ha1, hb1⟩, (a2, b2), ⟨ha2, hb2⟩, ?_, ?_, ?_⟩
    · rw [Ne, Prod.ext_iff] at hne ⊢; simp_rw [← hf.eq_iff]; exact hne
    all_goals apply (UniqueMul.mulHom_map_iff ⟨f, hf⟩ f.2).mp
    

Proof state:
case intro.mk.intro.intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine_2
G : Type u
H : Type v
inst✝¹ : Mul G
inst✝ : Mul H
f : H →ₙ* G
hf : Function.Injective ⇑f
uG : TwoUniqueProds G
A B : Finset H
hc : 1 < card (map { toFun := ⇑f, inj' := hf } A) * card (map { toFun := ⇑f, inj' := hf } B)
a1 : H
ha1 : a1 ∈ A
b1 : H
hb1 : b1 ∈ B
hu1 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).1
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).2
a2 : H
ha2 : a2 ∈ A
b2 : H
hb2 : b2 ∈ B
hu2 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).1
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).2
hne :
  ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1) ≠
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2)
⊢ UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } (a1, b1).1) ({ toFun := ⇑f, inj' := hf } (a1, b1).2)
case intro.mk.intro.intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine_3
G : Type u
H : Type v
inst✝¹ : Mul G
inst✝ : Mul H
f : H →ₙ* G
hf : Function.Injective ⇑f
uG : TwoUniqueProds G
A B : Finset H
hc : 1 < card (map { toFun := ⇑f, inj' := hf } A) * card (map { toFun := ⇑f, inj' := hf } B)
a1 : H
ha1 : a1 ∈ A
b1 : H
hb1 : b1 ∈ B
hu1 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).1
    ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1).2
a2 : H
ha2 : a2 ∈ A
b2 : H
hb2 : b2 ∈ B
hu2 :
  UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).1
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2).2
hne :
  ({ toFun := ⇑f, inj' := hf } a1, { toFun := ⇑f, inj' := hf } b1) ≠
    ({ toFun := ⇑f, inj' := hf } a2, { toFun := ⇑f, inj' := hf } b2)
⊢ UniqueMul (map { toFun := ⇑f, inj' := hf } A) (map { toFun := ⇑f, inj' := hf } B)
    ({ toFun := ⇑f, inj' := hf } (a2, b2).1) ({ toFun := ⇑f, inj' := hf } (a2, b2).2)

Next tactic:
exacts [hu1, hu2]
@[to_additive] instance {ι} (G : ι → Type*) [∀ i, Mul (G i)] [∀ i, TwoUniqueProds (G i)] :
    TwoUniqueProds (∀ i, G i) where
  uniqueMul_of_one_lt_card {A} := by
    

Proof state:
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
ι : Type ?u.450063
G : ι → Type u_1
inst✝¹ : (i : ι) → Mul (G i)
inst✝ : ∀ (i : ι), TwoUniqueProds (G i)
A : Finset ((i : ι) → G i)
⊢ ∀ {B : Finset ((i : ι) → G i)},
    1 < card A * card B → ∃ p1 ∈ A ×ˢ B, ∃ p2 ∈ A ×ˢ B, p1 ≠ p2 ∧ UniqueMul A B p1.1 p1.2 ∧ UniqueMul A B p2.1 p2.2

Next tactic:
classical
    let _ := isWellFounded_ssubset (α := ∀ i, G i) -- why need this?
    apply IsWellFounded.induction (· ⊂ ·) A; intro A ihA B
    apply IsWellFounded.induction (· ⊂ ·) B; intro B ihB hc
    obtain ⟨hA, hB, hc⟩ := Nat.one_lt_mul_iff.mp hc
    rw [card_pos] at hA hB
    obtain ⟨i, hc⟩ := exists_or.mpr (hc.imp exists_of_one_lt_card_pi exists_of_one_lt_card_pi)
    obtain ⟨p1, h1, p2, h2, hne, hi1, hi2⟩ := uniqueMul_of_one_lt_card (Nat.one_lt_mul_iff.mpr
      ⟨card_pos.2 (hA.image _), card_pos.2 (hB.image _), hc.imp And.left And.left⟩)
    simp_rw [mem_product, mem_image, ← filter_nonempty_iff] at h1 h2
    replace h1 := uniqueMul_of_twoUniqueMul ?_ h1.1 h1.2
    replace h2 := uniqueMul_of_twoUniqueMul ?_ h2.1 h2.2
    · obtain ⟨a1, ha1, b1, hb1, hu1⟩ := h1
      obtain ⟨a2, ha2, b2, hb2, hu2⟩ := h2
      rw [mem_filter] at ha1 hb1 ha2 hb2
      simp_rw [mem_product]
      refine ⟨(a1, b1), ⟨ha1.1, hb1.1⟩, (a2, b2), ⟨ha2.1, hb2.1⟩, ?_,
        UniqueMul.of_image_filter (Pi.evalMulHom G i) ha1.2 hb1.2 hi1 hu1,
        UniqueMul.of_image_filter (Pi.evalMulHom G i) ha2.2 hb2.2 hi2 hu2⟩
      contrapose! hne; rw [Prod.mk.inj_iff] at hne ⊢
      rw [← ha1.2, ← hb1.2, ← ha2.2, ← hb2.2, hne.1, hne.2]; exact ⟨rfl, rfl⟩
    all_goals
      rcases hc with hc | hc; · exact ihA _ (hc.2 _)
      by_cases hA : A.filter (· i = _) = A; rw [hA]
      exacts [ihB _ (hc.2 _), ihA _ ((A.filter_subset _).ssubset_of_ne hA)]
@[to_additive] instance {ι} (G : ι → Type*) [∀ i, Mul (G i)] [∀ i, TwoUniqueProds (G i)] :
    TwoUniqueProds (∀ i, G i) where
  uniqueMul_of_one_lt_card {A} := by
    classical
    

Proof state:
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
ι : Type ?u.450063
G : ι → Type u_1
inst✝¹ : (i : ι) → Mul (G i)
inst✝ : ∀ (i : ι), TwoUniqueProds (G i)
A : Finset ((i : ι) → G i)
⊢ ∀ {B : Finset ((i : ι) → G i)},
    1 < card A * card B → ∃ p1 ∈ A ×ˢ B, ∃ p2 ∈ A ×ˢ B, p1 ≠ p2 ∧ UniqueMul A B p1.1 p1.2 ∧ UniqueMul A B p2.1 p2.2

Next tactic:
let _ := isWellFounded_ssubset (α := ∀ i, G i)
@[to_additive] instance {ι} (G : ι → Type*) [∀ i, Mul (G i)] [∀ i, TwoUniqueProds (G i)] :
    TwoUniqueProds (∀ i, G i) where
  uniqueMul_of_one_lt_card {A} := by
    classical
    let _ := isWellFounded_ssubset (α := ∀ i, G i) -- why need this?
    

Proof state:
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
ι : Type ?u.450063
G : ι → Type u_1
inst✝¹ : (i : ι) → Mul (G i)
inst✝ : ∀ (i : ι), TwoUniqueProds (G i)
A : Finset ((i : ι) → G i)
x✝ : IsWellFounded (Finset ((i : ι) → G i)) fun x x_1 => x ⊂ x_1 := isWellFounded_ssubset
⊢ ∀ {B : Finset ((i : ι) → G i)},
    1 < card A * card B → ∃ p1 ∈ A ×ˢ B, ∃ p2 ∈ A ×ˢ B, p1 ≠ p2 ∧ UniqueMul A B p1.1 p1.2 ∧ UniqueMul A B p2.1 p2.2

Next tactic:
apply IsWellFounded.induction (· ⊂ ·) A
@[to_additive] instance {ι} (G : ι → Type*) [∀ i, Mul (G i)] [∀ i, TwoUniqueProds (G i)] :
    TwoUniqueProds (∀ i, G i) where
  uniqueMul_of_one_lt_card {A} := by
    classical
    let _ := isWellFounded_ssubset (α := ∀ i, G i) -- why need this?
    apply IsWellFounded.induction (· ⊂ ·) A; 

Proof state:
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
ι : Type ?u.450063
G : ι → Type u_1
inst✝¹ : (i : ι) → Mul (G i)
inst✝ : ∀ (i : ι), TwoUniqueProds (G i)
A : Finset ((i : ι) → G i)
x✝ : IsWellFounded (Finset ((i : ι) → G i)) fun x x_1 => x ⊂ x_1 := isWellFounded_ssubset
⊢ ∀ (x : Finset ((i : ι) → G i)),
    (∀ y ⊂ x,
        ∀ {B : Finset ((i : ι) → G i)},
          1 < card y * card B →
            ∃ p1 ∈ y ×ˢ B, ∃ p2 ∈ y ×ˢ B, p1 ≠ p2 ∧ UniqueMul y B p1.1 p1.2 ∧ UniqueMul y B p2.1 p2.2) →
      ∀ {B : Finset ((i : ι) → G i)},
        1 < card x * card B → ∃ p1 ∈ x ×ˢ B, ∃ p2 ∈ x ×ˢ B, p1 ≠ p2 ∧ UniqueMul x B p1.1 p1.2 ∧ UniqueMul x B p2.1 p2.2

Next tactic:
intro A ihA B
@[to_additive] instance {ι} (G : ι → Type*) [∀ i, Mul (G i)] [∀ i, TwoUniqueProds (G i)] :
    TwoUniqueProds (∀ i, G i) where
  uniqueMul_of_one_lt_card {A} := by
    classical
    let _ := isWellFounded_ssubset (α := ∀ i, G i) -- why need this?
    apply IsWellFounded.induction (· ⊂ ·) A; intro A ihA B
    

Proof state:
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
ι : Type ?u.450063
G : ι → Type u_1
inst✝¹ : (i : ι) → Mul (G i)
inst✝ : ∀ (i : ι), TwoUniqueProds (G i)
A✝ : Finset ((i : ι) → G i)
x✝ : IsWellFounded (Finset ((i : ι) → G i)) fun x x_1 => x ⊂ x_1 := isWellFounded_ssubset
A : Finset ((i : ι) → G i)
ihA :
  ∀ y ⊂ A,
    ∀ {B : Finset ((i : ι) → G i)},
      1 < card y * card B → ∃ p1 ∈ y ×ˢ B, ∃ p2 ∈ y ×ˢ B, p1 ≠ p2 ∧ UniqueMul y B p1.1 p1.2 ∧ UniqueMul y B p2.1 p2.2
B : Finset ((i : ι) → G i)
⊢ 1 < card A * card B → ∃ p1 ∈ A ×ˢ B, ∃ p2 ∈ A ×ˢ B, p1 ≠ p2 ∧ UniqueMul A B p1.1 p1.2 ∧ UniqueMul A B p2.1 p2.2

Next tactic:
apply IsWellFounded.induction (· ⊂ ·) B
@[to_additive] instance {ι} (G : ι → Type*) [∀ i, Mul (G i)] [∀ i, TwoUniqueProds (G i)] :
    TwoUniqueProds (∀ i, G i) where
  uniqueMul_of_one_lt_card {A} := by
    classical
    let _ := isWellFounded_ssubset (α := ∀ i, G i) -- why need this?
    apply IsWellFounded.induction (· ⊂ ·) A; intro A ihA B
    apply IsWellFounded.induction (· ⊂ ·) B; 

Proof state:
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
ι : Type ?u.450063
G : ι → Type u_1
inst✝¹ : (i : ι) → Mul (G i)
inst✝ : ∀ (i : ι), TwoUniqueProds (G i)
A✝ : Finset ((i : ι) → G i)
x✝ : IsWellFounded (Finset ((i : ι) → G i)) fun x x_1 => x ⊂ x_1 := isWellFounded_ssubset
A : Finset ((i : ι) → G i)
ihA :
  ∀ y ⊂ A,
    ∀ {B : Finset ((i : ι) → G i)},
      1 < card y * card B → ∃ p1 ∈ y ×ˢ B, ∃ p2 ∈ y ×ˢ B, p1 ≠ p2 ∧ UniqueMul y B p1.1 p1.2 ∧ UniqueMul y B p2.1 p2.2
B : Finset ((i : ι) → G i)
⊢ ∀ (x : Finset ((i : ι) → G i)),
    (∀ y ⊂ x,
        1 < card A * card y →
          ∃ p1 ∈ A ×ˢ y, ∃ p2 ∈ A ×ˢ y, p1 ≠ p2 ∧ UniqueMul A y p1.1 p1.2 ∧ UniqueMul A y p2.1 p2.2) →
      1 < card A * card x → ∃ p1 ∈ A ×ˢ x, ∃ p2 ∈ A ×ˢ x, p1 ≠ p2 ∧ UniqueMul A x p1.1 p1.2 ∧ UniqueMul A x p2.1 p2.2

Next tactic:
intro B ihB hc
@[to_additive] instance {ι} (G : ι → Type*) [∀ i, Mul (G i)] [∀ i, TwoUniqueProds (G i)] :
    TwoUniqueProds (∀ i, G i) where
  uniqueMul_of_one_lt_card {A} := by
    classical
    let _ := isWellFounded_ssubset (α := ∀ i, G i) -- why need this?
    apply IsWellFounded.induction (· ⊂ ·) A; intro A ihA B
    apply IsWellFounded.induction (· ⊂ ·) B; intro B ihB hc
    

Proof state:
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
ι : Type ?u.450063
G : ι → Type u_1
inst✝¹ : (i : ι) → Mul (G i)
inst✝ : ∀ (i : ι), TwoUniqueProds (G i)
A✝ : Finset ((i : ι) → G i)
x✝ : IsWellFounded (Finset ((i : ι) → G i)) fun x x_1 => x ⊂ x_1 := isWellFounded_ssubset
A : Finset ((i : ι) → G i)
ihA :
  ∀ y ⊂ A,
    ∀ {B : Finset ((i : ι) → G i)},
      1 < card y * card B → ∃ p1 ∈ y ×ˢ B, ∃ p2 ∈ y ×ˢ B, p1 ≠ p2 ∧ UniqueMul y B p1.1 p1.2 ∧ UniqueMul y B p2.1 p2.2
B✝ B : Finset ((i : ι) → G i)
ihB :
  ∀ y ⊂ B,
    1 < card A * card y → ∃ p1 ∈ A ×ˢ y, ∃ p2 ∈ A ×ˢ y, p1 ≠ p2 ∧ UniqueMul A y p1.1 p1.2 ∧ UniqueMul A y p2.1 p2.2
hc : 1 < card A * card B
⊢ ∃ p1 ∈ A ×ˢ B, ∃ p2 ∈ A ×ˢ B, p1 ≠ p2 ∧ UniqueMul A B p1.1 p1.2 ∧ UniqueMul A B p2.1 p2.2

Next tactic:
obtain ⟨hA, hB, hc⟩ := Nat.one_lt_mul_iff.mp hc
@[to_additive] instance {ι} (G : ι → Type*) [∀ i, Mul (G i)] [∀ i, TwoUniqueProds (G i)] :
    TwoUniqueProds (∀ i, G i) where
  uniqueMul_of_one_lt_card {A} := by
    classical
    let _ := isWellFounded_ssubset (α := ∀ i, G i) -- why need this?
    apply IsWellFounded.induction (· ⊂ ·) A; intro A ihA B
    apply IsWellFounded.induction (· ⊂ ·) B; intro B ihB hc
    obtain ⟨hA, hB, hc⟩ := Nat.one_lt_mul_iff.mp hc
    

Proof state:
case intro.intro
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
ι : Type ?u.450063
G : ι → Type u_1
inst✝¹ : (i : ι) → Mul (G i)
inst✝ : ∀ (i : ι), TwoUniqueProds (G i)
A✝ : Finset ((i : ι) → G i)
x✝ : IsWellFounded (Finset ((i : ι) → G i)) fun x x_1 => x ⊂ x_1 := isWellFounded_ssubset
A : Finset ((i : ι) → G i)
ihA :
  ∀ y ⊂ A,
    ∀ {B : Finset ((i : ι) → G i)},
      1 < card y * card B → ∃ p1 ∈ y ×ˢ B, ∃ p2 ∈ y ×ˢ B, p1 ≠ p2 ∧ UniqueMul y B p1.1 p1.2 ∧ UniqueMul y B p2.1 p2.2
B✝ B : Finset ((i : ι) → G i)
ihB :
  ∀ y ⊂ B,
    1 < card A * card y → ∃ p1 ∈ A ×ˢ y, ∃ p2 ∈ A ×ˢ y, p1 ≠ p2 ∧ UniqueMul A y p1.1 p1.2 ∧ UniqueMul A y p2.1 p2.2
hc✝ : 1 < card A * card B
hA : 0 < card A
hB : 0 < card B
hc : 1 < card A ∨ 1 < card B
⊢ ∃ p1 ∈ A ×ˢ B, ∃ p2 ∈ A ×ˢ B, p1 ≠ p2 ∧ UniqueMul A B p1.1 p1.2 ∧ UniqueMul A B p2.1 p2.2

Next tactic:
rw [card_pos] at hA hB