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 A 0
nn0opth.2 B 0
nn0opth.3 C 0
nn0opth.4 D 0
Assertion nn0opthi A + B A + B + B = C + D C + D + D A = C B = D

Proof

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