Metamath Proof Explorer


Theorem nn0opthi

Description: An ordered pair theorem for nonnegative integers. Theorem 17.3 of Quine p. 124. We can represent an ordered pair of nonnegative integers A and B by ( ( ( A + B ) x. ( A + B ) ) + B ) . If two such ordered pairs are equal, their first elements are equal and their second elements are equal. Contrast this ordered pair representation with the standard one df-op that works for any set. (Contributed by Raph Levien, 10-Dec-2002) (Proof shortened by Scott Fenton, 8-Sep-2010)

Ref Expression
Hypotheses nn0opth.1 A0
nn0opth.2 B0
nn0opth.3 C0
nn0opth.4 D0
Assertion nn0opthi A+BA+B+B=C+DC+D+DA=CB=D

Proof

Step Hyp Ref Expression
1 nn0opth.1 A0
2 nn0opth.2 B0
3 nn0opth.3 C0
4 nn0opth.4 D0
5 1 2 nn0addcli A+B0
6 5 nn0rei A+B
7 3 4 nn0addcli C+D0
8 7 nn0rei C+D
9 6 8 lttri2i A+BC+DA+B<C+DC+D<A+B
10 1 2 7 4 nn0opthlem2 A+B<C+DC+DC+D+DA+BA+B+B
11 10 necomd A+B<C+DA+BA+B+BC+DC+D+D
12 3 4 5 2 nn0opthlem2 C+D<A+BA+BA+B+BC+DC+D+D
13 11 12 jaoi A+B<C+DC+D<A+BA+BA+B+BC+DC+D+D
14 9 13 sylbi A+BC+DA+BA+B+BC+DC+D+D
15 14 necon4i A+BA+B+B=C+DC+D+DA+B=C+D
16 id A+BA+B+B=C+DC+D+DA+BA+B+B=C+DC+D+D
17 15 15 oveq12d A+BA+B+B=C+DC+D+DA+BA+B=C+DC+D
18 17 oveq1d A+BA+B+B=C+DC+D+DA+BA+B+D=C+DC+D+D
19 16 18 eqtr4d A+BA+B+B=C+DC+D+DA+BA+B+B=A+BA+B+D
20 5 nn0cni A+B
21 20 20 mulcli A+BA+B
22 2 nn0cni B
23 4 nn0cni D
24 21 22 23 addcani A+BA+B+B=A+BA+B+DB=D
25 19 24 sylib A+BA+B+B=C+DC+D+DB=D
26 25 oveq2d A+BA+B+B=C+DC+D+DC+B=C+D
27 15 26 eqtr4d A+BA+B+B=C+DC+D+DA+B=C+B
28 1 nn0cni A
29 3 nn0cni C
30 28 29 22 addcan2i A+B=C+BA=C
31 27 30 sylib A+BA+B+B=C+DC+D+DA=C
32 31 25 jca A+BA+B+B=C+DC+D+DA=CB=D
33 oveq12 A=CB=DA+B=C+D
34 33 33 oveq12d A=CB=DA+BA+B=C+DC+D
35 simpr A=CB=DB=D
36 34 35 oveq12d A=CB=DA+BA+B+B=C+DC+D+D
37 32 36 impbii A+BA+B+B=C+DC+D+DA=CB=D