Metamath Proof Explorer


Theorem opreuopreu

Description: There is a unique ordered pair fulfilling a wff iff its components fulfil a corresponding wff. (Contributed by AV, 2-Jul-2023)

Ref Expression
Hypothesis opreuopreu.a a = 1 st p b = 2 nd p ψ φ
Assertion opreuopreu ∃! p A × B φ ∃! p A × B a b p = a b ψ

Proof

Step Hyp Ref Expression
1 opreuopreu.a a = 1 st p b = 2 nd p ψ φ
2 elxpi p A × B a b p = a b a A b B
3 simprl φ p = a b a A b B p = a b
4 vex a V
5 vex b V
6 4 5 op1st 1 st a b = a
7 6 eqcomi a = 1 st a b
8 4 5 op2nd 2 nd a b = b
9 8 eqcomi b = 2 nd a b
10 7 9 pm3.2i a = 1 st a b b = 2 nd a b
11 fveq2 p = a b 1 st p = 1 st a b
12 11 eqeq2d p = a b a = 1 st p a = 1 st a b
13 fveq2 p = a b 2 nd p = 2 nd a b
14 13 eqeq2d p = a b b = 2 nd p b = 2 nd a b
15 12 14 anbi12d p = a b a = 1 st p b = 2 nd p a = 1 st a b b = 2 nd a b
16 10 15 mpbiri p = a b a = 1 st p b = 2 nd p
17 16 1 syl p = a b ψ φ
18 17 biimprd p = a b φ ψ
19 18 adantr p = a b a A b B φ ψ
20 19 impcom φ p = a b a A b B ψ
21 3 20 jca φ p = a b a A b B p = a b ψ
22 21 ex φ p = a b a A b B p = a b ψ
23 22 2eximdv φ a b p = a b a A b B a b p = a b ψ
24 2 23 syl5com p A × B φ a b p = a b ψ
25 17 biimpa p = a b ψ φ
26 25 a1i p A × B p = a b ψ φ
27 26 exlimdvv p A × B a b p = a b ψ φ
28 24 27 impbid p A × B φ a b p = a b ψ
29 28 reubiia ∃! p A × B φ ∃! p A × B a b p = a b ψ