HomeHome Metamath Proof Explorer < Previous   Next >
Related theorems
Unicode version

Theorem nn0opth2t 6598
Description: An ordered pair theorem for nonnegative integers. Theorem 17.3 of [Quine] p. 124. See nn0opth 6596.
Assertion
Ref Expression
nn0opth2t |- (((A e. NN0 /\ B e. NN0) /\ (C e. NN0 /\ D e. NN0)) -> ((((A + B)^2) + B) = (((C + D)^2) + D) <-> (A = C /\ B = D)))

Proof of Theorem nn0opth2t
StepHypRef Expression
1 opreq1 3953 . . . . . 6 |- (A = if(A e. NN0, A, 0) -> (A + B) = (if(A e. NN0, A, 0) + B))
21opreq1d 3960 . . . . 5 |- (A = if(A e. NN0, A, 0) -> ((A + B)^2) = ((if(A e. NN0, A, 0) + B)^2))
32opreq1d 3960 . . . 4 |- (A = if(A e. NN0, A, 0) -> (((A + B)^2) + B) = (((if(A e. NN0, A, 0) + B)^2) + B))
43eqeq1d 1475 . . 3 |- (A = if(A e. NN0, A, 0) -> ((((A + B)^2) + B) = (((C + D)^2) + D) <-> (((if(A e. NN0, A, 0) + B)^2) + B) = (((C + D)^2) + D)))
5 eqeq1 1473 . . . 4 |- (A = if(A e. NN0, A, 0) -> (A = C <-> if(A e. NN0, A, 0) = C))
65anbi1d 615 . . 3 |- (A = if(A e. NN0, A, 0) -> ((A = C /\ B = D) <-> (if(A e. NN0, A, 0) = C /\ B = D)))
74, 6bibi12d 627 . 2 |- (A = if(A e. NN0, A, 0) -> (((((A + B)^2) + B) = (((C + D)^2) + D) <-> (A = C /\ B = D)) <-> ((((if(A e. NN0, A, 0) + B)^2) + B) = (((C + D)^2) + D) <-> (if(A e. NN0, A, 0) = C /\ B = D))))
8 opreq2 3954 . . . . . 6 |- (B = if(B e. NN0, B, 0) -> (if(A e. NN0, A, 0) + B) = (if(A e. NN0, A, 0) + if(B e. NN0, B, 0)))
98opreq1d 3960 . . . . 5 |- (B = if(B e. NN0, B, 0) -> ((if(A e. NN0, A, 0) + B)^2) = ((if(A e. NN0, A, 0) + if(B e. NN0, B, 0))^2))
10 id 59 . . . . 5 |- (B = if(B e. NN0, B, 0) -> B = if(B e. NN0, B, 0))
119, 10opreq12d 3963 . . . 4 |- (B = if(B e. NN0, B, 0) -> (((if(A e. NN0, A, 0) + B)^2) + B) = (((if(A e. NN0, A, 0) + if(B e. NN0, B, 0))^2) + if(B e. NN0, B, 0)))
1211eqeq1d 1475 . . 3 |- (B = if(B e. NN0, B, 0) -> ((((if(A e. NN0, A, 0) + B)^2) + B) = (((C + D)^2) + D) <-> (((if(A e. NN0, A, 0) + if(B e. NN0, B, 0))^2) + if(B e. NN0, B, 0)) = (((C + D)^2) + D)))
13 eqeq1 1473 . . . 4 |- (B = if(B e. NN0, B, 0) -> (B = D <-> if(B e. NN0, B, 0) = D))
1413anbi2d 614 . . 3 |- (B = if(B e. NN0, B, 0) -> ((if(A e. NN0, A, 0) = C /\ B = D) <-> (if(A e. NN0, A, 0) = C /\ if(B e. NN0, B, 0) = D)))
1512, 14bibi12d 627 . 2 |- (B = if(B e. NN0, B, 0) -> (((((if(A e. NN0, A, 0) + B)^2) + B) = (((C + D)^2) + D) <-> (if(A e. NN0, A, 0) = C /\ B = D)) <-> ((((if(A e. NN0, A, 0) + if(B e. NN0, B, 0))^2) + if(B e. NN0, B, 0)) = (((C + D)^2) + D) <-> (if(A e. NN0, A, 0) = C /\ if(B e. NN0, B, 0) = D))))
16 opreq1 3953 . . . . . 6 |- (C = if(C e. NN0, C, 0) -> (C + D) = (if(C e. NN0, C, 0) + D))
1716opreq1d 3960 . . . . 5 |- (C = if(C e. NN0, C, 0) -> ((C + D)^2) = ((if(C e. NN0, C, 0) + D)^2))
1817opreq1d 3960 . . . 4 |- (C = if(C e. NN0, C, 0) -> (((C + D)^2) + D) = (((if(C e. NN0, C, 0) + D)^2) + D))
1918eqeq2d 1478 . . 3 |- (C = if(C e. NN0, C, 0) -> ((((if(A e. NN0, A, 0) + if(B e. NN0, B, 0))^2) + if(B e. NN0, B, 0)) = (((C + D)^2) + D) <-> (((if(A e. NN0, A, 0) + if(B e. NN0, B, 0))^2) + if(B e. NN0, B, 0)) = (((if(C e. NN0, C, 0) + D)^2) + D)))
20 eqeq2 1476 . . . 4 |- (C = if(C e. NN0, C, 0) -> (if(A e. NN0, A, 0) = C <-> if(A e. NN0, A, 0) = if(C e. NN0, C, 0)))
2120anbi1d 615 . . 3 |- (C = if(C e. NN0, C, 0) -> ((if(A e. NN0, A, 0) = C /\ if(B e. NN0, B, 0) = D) <-> (if(A e. NN0, A, 0) = if(C e. NN0, C, 0) /\ if(B e. NN0, B, 0) = D)))
2219, 21bibi12d 627 . 2 |- (C = if(C e. NN0, C, 0) -> (((((if(A e. NN0, A, 0) + if(B e. NN0, B, 0))^2) + if(B e. NN0, B, 0)) = (((C + D)^2) + D) <-> (if(A e. NN0, A, 0) = C /\ if(B e. NN0, B, 0) = D)) <-> ((((if(A e. NN0, A, 0) + if(B e. NN0, B, 0))^2) + if(B e. NN0, B, 0)) = (((if(C e. NN0, C, 0) + D)^2) + D) <-> (if(A e. NN0, A, 0) = if(C e. NN0, C, 0) /\ if(B e. NN0, B, 0) = D))))
23 opreq2 3954 . . . . . 6 |- (D = if(D e. NN0, D, 0) -> (if(C e. NN0, C, 0) + D) = (if(C e. NN0, C, 0) + if(D e. NN0, D, 0)))
2423opreq1d 3960 . . . . 5 |- (D = if(D e. NN0, D, 0) -> ((if(C e. NN0, C, 0) + D)^2) = ((if(C e. NN0, C, 0) + if(D e. NN0, D, 0))^2))
25 id 59 . . . . 5 |- (D = if(D e. NN0, D, 0) -> D = if(D e. NN0, D, 0))
2624, 25opreq12d 3963 . . . 4 |- (D = if(D e. NN0, D, 0) -> (((if(C e. NN0, C, 0) + D)^2) + D) = (((if(C e. NN0, C, 0) + if(D e. NN0, D, 0))^2) + if(D e. NN0, D, 0)))
2726eqeq2d 1478 . . 3 |- (D = if(D e. NN0, D, 0) -> ((((if(A e. NN0, A, 0) + if(B e. NN0, B, 0))^2) + if(B e. NN0, B, 0)) = (((if(C e. NN0, C, 0) + D)^2) + D) <-> (((if(A e. NN0, A, 0) + if(B e. NN0, B, 0))^2) + if(B e. NN0, B, 0)) = (((if(C e. NN0, C, 0) + if(D e. NN0, D, 0))^2) + if(D e. NN0, D, 0))))
28 eqeq2 1476 . . . 4 |- (D = if(D e. NN0, D, 0) -> (if(B e. NN0, B, 0) = D <-> if(B e. NN0, B, 0) = if(D e. NN0, D, 0)))
2928anbi2d 614 . . 3 |- (D = if(D e. NN0, D, 0) -> ((if(A e. NN0, A, 0) = if(C e. NN0, C, 0) /\ if(B e. NN0, B, 0)