l3lab/ntp-mathlib huggingface dataset:
/-- If a group has `UniqueProds`, then it actually has `TwoUniqueProds`.
  For an example of a semigroup `G` embeddable into a group that has `UniqueProds`
  but not `TwoUniqueProds`, see Example 10.13 in
  [J. Okniński, *Semigroup Algebras*][Okninski1991]. -/
@[to_additive] theorem toTwoUniqueProds_of_group {G}
    [Group G] [UniqueProds G] : TwoUniqueProds G where
  uniqueMul_of_one_lt_card {A B} hc := by
    simp_rw [Nat.one_lt_mul_iff, card_pos] at hc
    obtain ⟨a, ha, b, hb, hu⟩ := uniqueMul_of_nonempty hc.1 hc.2.1
    let C := A.map ⟨_, mul_right_injective a⁻¹⟩ -- C = a⁻¹A
    let D := B.map ⟨_, mul_left_injective b⁻¹⟩  -- D = Bb⁻¹
    have hcard : 1 < C.card ∨ 1 < D.card; · 

Proof state:
case hcard
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
G : Type u_1
inst✝¹ : Group G
inst✝ : UniqueProds G
A B : Finset G
hc : Finset.Nonempty A ∧ Finset.Nonempty B ∧ (1 < card A ∨ 1 < card B)
a : G
ha : a ∈ A
b : G
hb : b ∈ B
hu : UniqueMul A B a b
C : Finset G := map { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } A
D : Finset G := map { toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } B
⊢ 1 < card C ∨ 1 < card D

Next tactic:
simp_rw [card_map]
/-- If a group has `UniqueProds`, then it actually has `TwoUniqueProds`.
  For an example of a semigroup `G` embeddable into a group that has `UniqueProds`
  but not `TwoUniqueProds`, see Example 10.13 in
  [J. Okniński, *Semigroup Algebras*][Okninski1991]. -/
@[to_additive] theorem toTwoUniqueProds_of_group {G}
    [Group G] [UniqueProds G] : TwoUniqueProds G where
  uniqueMul_of_one_lt_card {A B} hc := by
    simp_rw [Nat.one_lt_mul_iff, card_pos] at hc
    obtain ⟨a, ha, b, hb, hu⟩ := uniqueMul_of_nonempty hc.1 hc.2.1
    let C := A.map ⟨_, mul_right_injective a⁻¹⟩ -- C = a⁻¹A
    let D := B.map ⟨_, mul_left_injective b⁻¹⟩  -- D = Bb⁻¹
    have hcard : 1 < C.card ∨ 1 < D.card; · simp_rw [card_map]; 

Proof state:
case hcard
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
G : Type u_1
inst✝¹ : Group G
inst✝ : UniqueProds G
A B : Finset G
hc : Finset.Nonempty A ∧ Finset.Nonempty B ∧ (1 < card A ∨ 1 < card B)
a : G
ha : a ∈ A
b : G
hb : b ∈ B
hu : UniqueMul A B a b
C : Finset G := map { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } A
D : Finset G := map { toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } B
⊢ 1 < card A ∨ 1 < card B

Next tactic:
exact hc.2.2
/-- If a group has `UniqueProds`, then it actually has `TwoUniqueProds`.
  For an example of a semigroup `G` embeddable into a group that has `UniqueProds`
  but not `TwoUniqueProds`, see Example 10.13 in
  [J. Okniński, *Semigroup Algebras*][Okninski1991]. -/
@[to_additive] theorem toTwoUniqueProds_of_group {G}
    [Group G] [UniqueProds G] : TwoUniqueProds G where
  uniqueMul_of_one_lt_card {A B} hc := by
    simp_rw [Nat.one_lt_mul_iff, card_pos] at hc
    obtain ⟨a, ha, b, hb, hu⟩ := uniqueMul_of_nonempty hc.1 hc.2.1
    let C := A.map ⟨_, mul_right_injective a⁻¹⟩ -- C = a⁻¹A
    let D := B.map ⟨_, mul_left_injective b⁻¹⟩  -- D = Bb⁻¹
    have hcard : 1 < C.card ∨ 1 < D.card; · simp_rw [card_map]; exact hc.2.2
    

Proof state:
case intro.intro.intro.intro
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
G : Type u_1
inst✝¹ : Group G
inst✝ : UniqueProds G
A B : Finset G
hc : Finset.Nonempty A ∧ Finset.Nonempty B ∧ (1 < card A ∨ 1 < card B)
a : G
ha : a ∈ A
b : G
hb : b ∈ B
hu : UniqueMul A B a b
C : Finset G := map { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } A
D : Finset G := map { toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } B
hcard : 1 < card C ∨ 1 < card D
⊢ ∃ p1 ∈ A ×ˢ B, ∃ p2 ∈ A ×ˢ B, p1 ≠ p2 ∧ UniqueMul A B p1.1 p1.2 ∧ UniqueMul A B p2.1 p2.2

Next tactic:
have hC : 1 ∈ C := mem_map.mpr ⟨a, ha, inv_mul_self a⟩
/-- If a group has `UniqueProds`, then it actually has `TwoUniqueProds`.
  For an example of a semigroup `G` embeddable into a group that has `UniqueProds`
  but not `TwoUniqueProds`, see Example 10.13 in
  [J. Okniński, *Semigroup Algebras*][Okninski1991]. -/
@[to_additive] theorem toTwoUniqueProds_of_group {G}
    [Group G] [UniqueProds G] : TwoUniqueProds G where
  uniqueMul_of_one_lt_card {A B} hc := by
    simp_rw [Nat.one_lt_mul_iff, card_pos] at hc
    obtain ⟨a, ha, b, hb, hu⟩ := uniqueMul_of_nonempty hc.1 hc.2.1
    let C := A.map ⟨_, mul_right_injective a⁻¹⟩ -- C = a⁻¹A
    let D := B.map ⟨_, mul_left_injective b⁻¹⟩  -- D = Bb⁻¹
    have hcard : 1 < C.card ∨ 1 < D.card; · simp_rw [card_map]; exact hc.2.2
    have hC : 1 ∈ C := mem_map.mpr ⟨a, ha, inv_mul_self a⟩
    

Proof state:
case intro.intro.intro.intro
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
G : Type u_1
inst✝¹ : Group G
inst✝ : UniqueProds G
A B : Finset G
hc : Finset.Nonempty A ∧ Finset.Nonempty B ∧ (1 < card A ∨ 1 < card B)
a : G
ha : a ∈ A
b : G
hb : b ∈ B
hu : UniqueMul A B a b
C : Finset G := map { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } A
D : Finset G := map { toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } B
hcard : 1 < card C ∨ 1 < card D
hC : 1 ∈ C
⊢ ∃ p1 ∈ A ×ˢ B, ∃ p2 ∈ A ×ˢ B, p1 ≠ p2 ∧ UniqueMul A B p1.1 p1.2 ∧ UniqueMul A B p2.1 p2.2

Next tactic:
have hD : 1 ∈ D := mem_map.mpr ⟨b, hb, mul_inv_self b⟩
/-- If a group has `UniqueProds`, then it actually has `TwoUniqueProds`.
  For an example of a semigroup `G` embeddable into a group that has `UniqueProds`
  but not `TwoUniqueProds`, see Example 10.13 in
  [J. Okniński, *Semigroup Algebras*][Okninski1991]. -/
@[to_additive] theorem toTwoUniqueProds_of_group {G}
    [Group G] [UniqueProds G] : TwoUniqueProds G where
  uniqueMul_of_one_lt_card {A B} hc := by
    simp_rw [Nat.one_lt_mul_iff, card_pos] at hc
    obtain ⟨a, ha, b, hb, hu⟩ := uniqueMul_of_nonempty hc.1 hc.2.1
    let C := A.map ⟨_, mul_right_injective a⁻¹⟩ -- C = a⁻¹A
    let D := B.map ⟨_, mul_left_injective b⁻¹⟩  -- D = Bb⁻¹
    have hcard : 1 < C.card ∨ 1 < D.card; · simp_rw [card_map]; exact hc.2.2
    have hC : 1 ∈ C := mem_map.mpr ⟨a, ha, inv_mul_self a⟩
    have hD : 1 ∈ D := mem_map.mpr ⟨b, hb, mul_inv_self b⟩
    

Proof state:
case intro.intro.intro.intro
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
G : Type u_1
inst✝¹ : Group G
inst✝ : UniqueProds G
A B : Finset G
hc : Finset.Nonempty A ∧ Finset.Nonempty B ∧ (1 < card A ∨ 1 < card B)
a : G
ha : a ∈ A
b : G
hb : b ∈ B
hu : UniqueMul A B a b
C : Finset G := map { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } A
D : Finset G := map { toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } B
hcard : 1 < card C ∨ 1 < card D
hC : 1 ∈ C
hD : 1 ∈ D
⊢ ∃ p1 ∈ A ×ˢ B, ∃ p2 ∈ A ×ˢ B, p1 ≠ p2 ∧ UniqueMul A B p1.1 p1.2 ∧ UniqueMul A B p2.1 p2.2

Next tactic:
suffices : ∃ c ∈ C, ∃ d ∈ D, (c ≠ 1 ∨ d ≠ 1) ∧ UniqueMul C D c d
/-- If a group has `UniqueProds`, then it actually has `TwoUniqueProds`.
  For an example of a semigroup `G` embeddable into a group that has `UniqueProds`
  but not `TwoUniqueProds`, see Example 10.13 in
  [J. Okniński, *Semigroup Algebras*][Okninski1991]. -/
@[to_additive] theorem toTwoUniqueProds_of_group {G}
    [Group G] [UniqueProds G] : TwoUniqueProds G where
  uniqueMul_of_one_lt_card {A B} hc := by
    simp_rw [Nat.one_lt_mul_iff, card_pos] at hc
    obtain ⟨a, ha, b, hb, hu⟩ := uniqueMul_of_nonempty hc.1 hc.2.1
    let C := A.map ⟨_, mul_right_injective a⁻¹⟩ -- C = a⁻¹A
    let D := B.map ⟨_, mul_left_injective b⁻¹⟩  -- D = Bb⁻¹
    have hcard : 1 < C.card ∨ 1 < D.card; · simp_rw [card_map]; exact hc.2.2
    have hC : 1 ∈ C := mem_map.mpr ⟨a, ha, inv_mul_self a⟩
    have hD : 1 ∈ D := mem_map.mpr ⟨b, hb, mul_inv_self b⟩
    suffices : ∃ c ∈ C, ∃ d ∈ D, (c ≠ 1 ∨ d ≠ 1) ∧ UniqueMul C D c d
    · 

Proof state:
case intro.intro.intro.intro
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
G : Type u_1
inst✝¹ : Group G
inst✝ : UniqueProds G
A B : Finset G
hc : Finset.Nonempty A ∧ Finset.Nonempty B ∧ (1 < card A ∨ 1 < card B)
a : G
ha : a ∈ A
b : G
hb : b ∈ B
hu : UniqueMul A B a b
C : Finset G := map { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } A
D : Finset G := map { toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } B
hcard : 1 < card C ∨ 1 < card D
hC : 1 ∈ C
hD : 1 ∈ D
this : ∃ c ∈ C, ∃ d ∈ D, (c ≠ 1 ∨ d ≠ 1) ∧ UniqueMul C D c d
⊢ ∃ p1 ∈ A ×ˢ B, ∃ p2 ∈ A ×ˢ B, p1 ≠ p2 ∧ UniqueMul A B p1.1 p1.2 ∧ UniqueMul A B p2.1 p2.2

Next tactic:
simp_rw [mem_product]
/-- If a group has `UniqueProds`, then it actually has `TwoUniqueProds`.
  For an example of a semigroup `G` embeddable into a group that has `UniqueProds`
  but not `TwoUniqueProds`, see Example 10.13 in
  [J. Okniński, *Semigroup Algebras*][Okninski1991]. -/
@[to_additive] theorem toTwoUniqueProds_of_group {G}
    [Group G] [UniqueProds G] : TwoUniqueProds G where
  uniqueMul_of_one_lt_card {A B} hc := by
    simp_rw [Nat.one_lt_mul_iff, card_pos] at hc
    obtain ⟨a, ha, b, hb, hu⟩ := uniqueMul_of_nonempty hc.1 hc.2.1
    let C := A.map ⟨_, mul_right_injective a⁻¹⟩ -- C = a⁻¹A
    let D := B.map ⟨_, mul_left_injective b⁻¹⟩  -- D = Bb⁻¹
    have hcard : 1 < C.card ∨ 1 < D.card; · simp_rw [card_map]; exact hc.2.2
    have hC : 1 ∈ C := mem_map.mpr ⟨a, ha, inv_mul_self a⟩
    have hD : 1 ∈ D := mem_map.mpr ⟨b, hb, mul_inv_self b⟩
    suffices : ∃ c ∈ C, ∃ d ∈ D, (c ≠ 1 ∨ d ≠ 1) ∧ UniqueMul C D c d
    · simp_rw [mem_product]
      

Proof state:
case intro.intro.intro.intro
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
G : Type u_1
inst✝¹ : Group G
inst✝ : UniqueProds G
A B : Finset G
hc : Finset.Nonempty A ∧ Finset.Nonempty B ∧ (1 < card A ∨ 1 < card B)
a : G
ha : a ∈ A
b : G
hb : b ∈ B
hu : UniqueMul A B a b
C : Finset G := map { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } A
D : Finset G := map { toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } B
hcard : 1 < card C ∨ 1 < card D
hC : 1 ∈ C
hD : 1 ∈ D
this : ∃ c ∈ C, ∃ d ∈ D, (c ≠ 1 ∨ d ≠ 1) ∧ UniqueMul C D c d
⊢ ∃ p1,
    (p1.1 ∈ A ∧ p1.2 ∈ B) ∧ ∃ p2, (p2.1 ∈ A ∧ p2.2 ∈ B) ∧ p1 ≠ p2 ∧ UniqueMul A B p1.1 p1.2 ∧ UniqueMul A B p2.1 p2.2

Next tactic:
obtain ⟨c, hc, d, hd, hne, hu'⟩ := this
/-- If a group has `UniqueProds`, then it actually has `TwoUniqueProds`.
  For an example of a semigroup `G` embeddable into a group that has `UniqueProds`
  but not `TwoUniqueProds`, see Example 10.13 in
  [J. Okniński, *Semigroup Algebras*][Okninski1991]. -/
@[to_additive] theorem toTwoUniqueProds_of_group {G}
    [Group G] [UniqueProds G] : TwoUniqueProds G where
  uniqueMul_of_one_lt_card {A B} hc := by
    simp_rw [Nat.one_lt_mul_iff, card_pos] at hc
    obtain ⟨a, ha, b, hb, hu⟩ := uniqueMul_of_nonempty hc.1 hc.2.1
    let C := A.map ⟨_, mul_right_injective a⁻¹⟩ -- C = a⁻¹A
    let D := B.map ⟨_, mul_left_injective b⁻¹⟩  -- D = Bb⁻¹
    have hcard : 1 < C.card ∨ 1 < D.card; · simp_rw [card_map]; exact hc.2.2
    have hC : 1 ∈ C := mem_map.mpr ⟨a, ha, inv_mul_self a⟩
    have hD : 1 ∈ D := mem_map.mpr ⟨b, hb, mul_inv_self b⟩
    suffices : ∃ c ∈ C, ∃ d ∈ D, (c ≠ 1 ∨ d ≠ 1) ∧ UniqueMul C D c d
    · simp_rw [mem_product]
      obtain ⟨c, hc, d, hd, hne, hu'⟩ := this
      

Proof state:
case intro.intro.intro.intro.intro.intro.intro.intro.intro
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
G : Type u_1
inst✝¹ : Group G
inst✝ : UniqueProds G
A B : Finset G
hc✝ : Finset.Nonempty A ∧ Finset.Nonempty B ∧ (1 < card A ∨ 1 < card B)
a : G
ha : a ∈ A
b : G
hb : b ∈ B
hu : UniqueMul A B a b
C : Finset G := map { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } A
D : Finset G := map { toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } B
hcard : 1 < card C ∨ 1 < card D
hC : 1 ∈ C
hD : 1 ∈ D
c : G
hc : c ∈ C
d : G
hd : d ∈ D
hne : c ≠ 1 ∨ d ≠ 1
hu' : UniqueMul C D c d
⊢ ∃ p1,
    (p1.1 ∈ A ∧ p1.2 ∈ B) ∧ ∃ p2, (p2.1 ∈ A ∧ p2.2 ∈ B) ∧ p1 ≠ p2 ∧ UniqueMul A B p1.1 p1.2 ∧ UniqueMul A B p2.1 p2.2

Next tactic:
obtain ⟨a0, ha0, rfl⟩ := mem_map.mp hc
/-- If a group has `UniqueProds`, then it actually has `TwoUniqueProds`.
  For an example of a semigroup `G` embeddable into a group that has `UniqueProds`
  but not `TwoUniqueProds`, see Example 10.13 in
  [J. Okniński, *Semigroup Algebras*][Okninski1991]. -/
@[to_additive] theorem toTwoUniqueProds_of_group {G}
    [Group G] [UniqueProds G] : TwoUniqueProds G where
  uniqueMul_of_one_lt_card {A B} hc := by
    simp_rw [Nat.one_lt_mul_iff, card_pos] at hc
    obtain ⟨a, ha, b, hb, hu⟩ := uniqueMul_of_nonempty hc.1 hc.2.1
    let C := A.map ⟨_, mul_right_injective a⁻¹⟩ -- C = a⁻¹A
    let D := B.map ⟨_, mul_left_injective b⁻¹⟩  -- D = Bb⁻¹
    have hcard : 1 < C.card ∨ 1 < D.card; · simp_rw [card_map]; exact hc.2.2
    have hC : 1 ∈ C := mem_map.mpr ⟨a, ha, inv_mul_self a⟩
    have hD : 1 ∈ D := mem_map.mpr ⟨b, hb, mul_inv_self b⟩
    suffices : ∃ c ∈ C, ∃ d ∈ D, (c ≠ 1 ∨ d ≠ 1) ∧ UniqueMul C D c d
    · simp_rw [mem_product]
      obtain ⟨c, hc, d, hd, hne, hu'⟩ := this
      obtain ⟨a0, ha0, rfl⟩ := mem_map.mp hc
      

Proof state:
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
G : Type u_1
inst✝¹ : Group G
inst✝ : UniqueProds G
A B : Finset G
hc✝ : Finset.Nonempty A ∧ Finset.Nonempty B ∧ (1 < card A ∨ 1 < card B)
a : G
ha : a ∈ A
b : G
hb : b ∈ B
hu : UniqueMul A B a b
C : Finset G := map { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } A
D : Finset G := map { toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } B
hcard : 1 < card C ∨ 1 < card D
hC : 1 ∈ C
hD : 1 ∈ D
d : G
hd : d ∈ D
a0 : G
ha0 : a0 ∈ A
hc : { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } a0 ∈ C
hne : { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } a0 ≠ 1 ∨ d ≠ 1
hu' : UniqueMul C D ({ toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } a0) d
⊢ ∃ p1,
    (p1.1 ∈ A ∧ p1.2 ∈ B) ∧ ∃ p2, (p2.1 ∈ A ∧ p2.2 ∈ B) ∧ p1 ≠ p2 ∧ UniqueMul A B p1.1 p1.2 ∧ UniqueMul A B p2.1 p2.2

Next tactic:
obtain ⟨b0, hb0, rfl⟩ := mem_map.mp hd
/-- If a group has `UniqueProds`, then it actually has `TwoUniqueProds`.
  For an example of a semigroup `G` embeddable into a group that has `UniqueProds`
  but not `TwoUniqueProds`, see Example 10.13 in
  [J. Okniński, *Semigroup Algebras*][Okninski1991]. -/
@[to_additive] theorem toTwoUniqueProds_of_group {G}
    [Group G] [UniqueProds G] : TwoUniqueProds G where
  uniqueMul_of_one_lt_card {A B} hc := by
    simp_rw [Nat.one_lt_mul_iff, card_pos] at hc
    obtain ⟨a, ha, b, hb, hu⟩ := uniqueMul_of_nonempty hc.1 hc.2.1
    let C := A.map ⟨_, mul_right_injective a⁻¹⟩ -- C = a⁻¹A
    let D := B.map ⟨_, mul_left_injective b⁻¹⟩  -- D = Bb⁻¹
    have hcard : 1 < C.card ∨ 1 < D.card; · simp_rw [card_map]; exact hc.2.2
    have hC : 1 ∈ C := mem_map.mpr ⟨a, ha, inv_mul_self a⟩
    have hD : 1 ∈ D := mem_map.mpr ⟨b, hb, mul_inv_self b⟩
    suffices : ∃ c ∈ C, ∃ d ∈ D, (c ≠ 1 ∨ d ≠ 1) ∧ UniqueMul C D c d
    · simp_rw [mem_product]
      obtain ⟨c, hc, d, hd, hne, hu'⟩ := this
      obtain ⟨a0, ha0, rfl⟩ := mem_map.mp hc
      obtain ⟨b0, hb0, rfl⟩ := mem_map.mp hd
      

Proof state:
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
G✝ : Type u
H : Type v
inst✝³ : Mul G✝
inst✝² : Mul H
G : Type u_1
inst✝¹ : Group G
inst✝ : UniqueProds G
A B : Finset G
hc✝ : Finset.Nonempty A ∧ Finset.Nonempty B ∧ (1 < card A ∨ 1 < card B)
a : G
ha : a ∈ A
b : G
hb : b ∈ B
hu : UniqueMul A B a b
C : Finset G := map { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } A
D : Finset G := map { toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } B
hcard : 1 < card C ∨ 1 < card D
hC : 1 ∈ C
hD : 1 ∈ D
a0 : G
ha0 : a0 ∈ A
hc : { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } a0 ∈ C
b0 : G
hb0 : b0 ∈ B
hd : { toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } b0 ∈ D
hne :
  { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } a0 ≠ 1 ∨
    { toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } b0 ≠ 1
hu' :
  UniqueMul C D ({ toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } a0)
    ({ toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } b0)
⊢ ∃ p1,
    (p1.1 ∈ A ∧ p1.2 ∈ B) ∧ ∃ p2, (p2.1 ∈ A ∧ p2.2 ∈ B) ∧ p1 ≠ p2 ∧ UniqueMul A B p1.1 p1.2 ∧ UniqueMul A B p2.1 p2.2

Next tactic:
refine ⟨(_, _), ⟨ha0, hb0⟩, (a, b), ⟨ha, hb⟩, ?_, fun a' b' ha' hb' he => ?_, hu⟩
/-- If a group has `UniqueProds`, then it actually has `TwoUniqueProds`.
  For an example of a semigroup `G` embeddable into a group that has `UniqueProds`
  but not `TwoUniqueProds`, see Example 10.13 in
  [J. Okniński, *Semigroup Algebras*][Okninski1991]. -/
@[to_additive] theorem toTwoUniqueProds_of_group {G}
    [Group G] [UniqueProds G] : TwoUniqueProds G where
  uniqueMul_of_one_lt_card {A B} hc := by
    simp_rw [Nat.one_lt_mul_iff, card_pos] at hc
    obtain ⟨a, ha, b, hb, hu⟩ := uniqueMul_of_nonempty hc.1 hc.2.1
    let C := A.map ⟨_, mul_right_injective a⁻¹⟩ -- C = a⁻¹A
    let D := B.map ⟨_, mul_left_injective b⁻¹⟩  -- D = Bb⁻¹
    have hcard : 1 < C.card ∨ 1 < D.card; · simp_rw [card_map]; exact hc.2.2
    have hC : 1 ∈ C := mem_map.mpr ⟨a, ha, inv_mul_self a⟩
    have hD : 1 ∈ D := mem_map.mpr ⟨b, hb, mul_inv_self b⟩
    suffices : ∃ c ∈ C, ∃ d ∈ D, (c ≠ 1 ∨ d ≠ 1) ∧ UniqueMul C D c d
    · simp_rw [mem_product]
      obtain ⟨c, hc, d, hd, hne, hu'⟩ := this
      obtain ⟨a0, ha0, rfl⟩ := mem_map.mp hc
      obtain ⟨b0, hb0, rfl⟩ := mem_map.mp hd
      refine ⟨(_, _), ⟨ha0, hb0⟩, (a, b), ⟨ha, hb⟩, ?_, fun a' b' ha' hb' he => ?_, hu⟩
      simp_rw [Function.Embedding.coeFn_mk, Ne, inv_mul_eq_one, mul_inv_eq_one] at hne
      · 

Proof state:
case 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
G : Type u_1
inst✝¹ : Group G
inst✝ : UniqueProds G
A B : Finset G
hc✝ : Finset.Nonempty A ∧ Finset.Nonempty B ∧ (1 < card A ∨ 1 < card B)
a : G
ha : a ∈ A
b : G
hb : b ∈ B
hu : UniqueMul A B a b
C : Finset G := map { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } A
D : Finset G := map { toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } B
hcard : 1 < card C ∨ 1 < card D
hC : 1 ∈ C
hD : 1 ∈ D
a0 : G
ha0 : a0 ∈ A
hc : { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } a0 ∈ C
b0 : G
hb0 : b0 ∈ B
hd : { toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } b0 ∈ D
hu' :
  UniqueMul C D ({ toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } a0)
    ({ toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } b0)
hne : ¬a = a0 ∨ ¬b0 = b
⊢ (a0, b0) ≠ (a, b)

Next tactic:
rwa [Ne, Prod.mk.inj_iff, not_and_or, eq_comm]
/-- If a group has `UniqueProds`, then it actually has `TwoUniqueProds`.
  For an example of a semigroup `G` embeddable into a group that has `UniqueProds`
  but not `TwoUniqueProds`, see Example 10.13 in
  [J. Okniński, *Semigroup Algebras*][Okninski1991]. -/
@[to_additive] theorem toTwoUniqueProds_of_group {G}
    [Group G] [UniqueProds G] : TwoUniqueProds G where
  uniqueMul_of_one_lt_card {A B} hc := by
    simp_rw [Nat.one_lt_mul_iff, card_pos] at hc
    obtain ⟨a, ha, b, hb, hu⟩ := uniqueMul_of_nonempty hc.1 hc.2.1
    let C := A.map ⟨_, mul_right_injective a⁻¹⟩ -- C = a⁻¹A
    let D := B.map ⟨_, mul_left_injective b⁻¹⟩  -- D = Bb⁻¹
    have hcard : 1 < C.card ∨ 1 < D.card; · simp_rw [card_map]; exact hc.2.2
    have hC : 1 ∈ C := mem_map.mpr ⟨a, ha, inv_mul_self a⟩
    have hD : 1 ∈ D := mem_map.mpr ⟨b, hb, mul_inv_self b⟩
    suffices : ∃ c ∈ C, ∃ d ∈ D, (c ≠ 1 ∨ d ≠ 1) ∧ UniqueMul C D c d
    · simp_rw [mem_product]
      obtain ⟨c, hc, d, hd, hne, hu'⟩ := this
      obtain ⟨a0, ha0, rfl⟩ := mem_map.mp hc
      obtain ⟨b0, hb0, rfl⟩ := mem_map.mp hd
      refine ⟨(_, _), ⟨ha0, hb0⟩, (a, b), ⟨ha, hb⟩, ?_, fun a' b' ha' hb' he => ?_, hu⟩
      simp_rw [Function.Embedding.coeFn_mk, Ne, inv_mul_eq_one, mul_inv_eq_one] at hne
      · rwa [Ne, Prod.mk.inj_iff, not_and_or, eq_comm]
      

Proof state:
case 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
G : Type u_1
inst✝¹ : Group G
inst✝ : UniqueProds G
A B : Finset G
hc✝ : Finset.Nonempty A ∧ Finset.Nonempty B ∧ (1 < card A ∨ 1 < card B)
a : G
ha : a ∈ A
b : G
hb : b ∈ B
hu : UniqueMul A B a b
C : Finset G := map { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } A
D : Finset G := map { toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } B
hcard : 1 < card C ∨ 1 < card D
hC : 1 ∈ C
hD : 1 ∈ D
a0 : G
ha0 : a0 ∈ A
hc : { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } a0 ∈ C
b0 : G
hb0 : b0 ∈ B
hd : { toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } b0 ∈ D
hne :
  { toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } a0 ≠ 1 ∨
    { toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } b0 ≠ 1
hu' :
  UniqueMul C D ({ toFun := fun x => a⁻¹ * x, inj' := (_ : Function.Injective fun x => a⁻¹ * x) } a0)
    ({ toFun := fun x => x * b⁻¹, inj' := (_ : Function.Injective fun x => x * b⁻¹) } b0)
a' b' : G
ha' : a' ∈ A
hb' : b' ∈ B
he : a' * b' = (a0, b0).1 * (a0, b0).2
⊢ a' = (a0, b0).1 ∧ b' = (a0, b0).2

Next tactic:
specialize hu' (mem_map_of_mem _ ha') (mem_map_of_mem _ hb')