Metamath Proof Explorer


Theorem hash2prd

Description: A set of size two is an unordered pair if it contains two different elements. (Contributed by Alexander van der Vekens, 9-Dec-2018) (Proof shortened by AV, 16-Jun-2022)

Ref Expression
Assertion hash2prd ⊢ P ∈ V ∧ P = 2 → X ∈ P ∧ Y ∈ P ∧ X ≠ Y → P = X Y

Proof

Step Hyp Ref Expression
1 hash2prb ⊢ P ∈ V → P = 2 ↔ ∃ x ∈ P ∃ y ∈ P x ≠ y ∧ P = x y
2 simpr ⊢ x ∈ P ∧ y ∈ P ∧ x ≠ y ∧ X ∈ P ∧ Y ∈ P ∧ X ≠ Y ∧ P = x y → P = x y
3 3simpa ⊢ X ∈ P ∧ Y ∈ P ∧ X ≠ Y → X ∈ P ∧ Y ∈ P
4 3 ad2antlr ⊢ x ∈ P ∧ y ∈ P ∧ x ≠ y ∧ X ∈ P ∧ Y ∈ P ∧ X ≠ Y ∧ P = x y → X ∈ P ∧ Y ∈ P
5 eleq2 ⊢ P = x y → X ∈ P ↔ X ∈ x y
6 eleq2 ⊢ P = x y → Y ∈ P ↔ Y ∈ x y
7 5 6 anbi12d ⊢ P = x y → X ∈ P ∧ Y ∈ P ↔ X ∈ x y ∧ Y ∈ x y
8 7 adantl ⊢ x ∈ P ∧ y ∈ P ∧ x ≠ y ∧ X ∈ P ∧ Y ∈ P ∧ X ≠ Y ∧ P = x y → X ∈ P ∧ Y ∈ P ↔ X ∈ x y ∧ Y ∈ x y
9 4 8 mpbid ⊢ x ∈ P ∧ y ∈ P ∧ x ≠ y ∧ X ∈ P ∧ Y ∈ P ∧ X ≠ Y ∧ P = x y → X ∈ x y ∧ Y ∈ x y
10 prel12g ⊢ X ∈ P ∧ Y ∈ P ∧ X ≠ Y → X Y = x y ↔ X ∈ x y ∧ Y ∈ x y
11 10 ad2antlr ⊢ x ∈ P ∧ y ∈ P ∧ x ≠ y ∧ X ∈ P ∧ Y ∈ P ∧ X ≠ Y ∧ P = x y → X Y = x y ↔ X ∈ x y ∧ Y ∈ x y
12 9 11 mpbird ⊢ x ∈ P ∧ y ∈ P ∧ x ≠ y ∧ X ∈ P ∧ Y ∈ P ∧ X ≠ Y ∧ P = x y → X Y = x y
13 2 12 eqtr4d ⊢ x ∈ P ∧ y ∈ P ∧ x ≠ y ∧ X ∈ P ∧ Y ∈ P ∧ X ≠ Y ∧ P = x y → P = X Y
14 13 exp31 ⊢ x ∈ P ∧ y ∈ P ∧ x ≠ y → X ∈ P ∧ Y ∈ P ∧ X ≠ Y → P = x y → P = X Y
15 14 com23 ⊢ x ∈ P ∧ y ∈ P ∧ x ≠ y → P = x y → X ∈ P ∧ Y ∈ P ∧ X ≠ Y → P = X Y
16 15 expimpd ⊢ x ∈ P ∧ y ∈ P → x ≠ y ∧ P = x y → X ∈ P ∧ Y ∈ P ∧ X ≠ Y → P = X Y
17 16 rexlimivv ⊢ ∃ x ∈ P ∃ y ∈ P x ≠ y ∧ P = x y → X ∈ P ∧ Y ∈ P ∧ X ≠ Y → P = X Y
18 1 17 biimtrdi ⊢ P ∈ V → P = 2 → X ∈ P ∧ Y ∈ P ∧ X ≠ Y → P = X Y
19 18 imp ⊢ P ∈ V ∧ P = 2 → X ∈ P ∧ Y ∈ P ∧ X ≠ Y → P = X Y