Metamath Proof Explorer


Theorem nnawordex

Description: Equivalence for weak ordering of natural numbers. (Contributed by NM, 8-Nov-2002) (Revised by Mario Carneiro, 15-Nov-2014)

Ref Expression
Assertion nnawordex A ω B ω A B x ω A + 𝑜 x = B

Proof

Step Hyp Ref Expression
1 oveq2 y = B A + 𝑜 y = A + 𝑜 B
2 1 sseq2d y = B B A + 𝑜 y B A + 𝑜 B
3 simplr A ω B ω A B B ω
4 nnon B ω B On
5 3 4 syl A ω B ω A B B On
6 simpll A ω B ω A B A ω
7 nnaword2 B ω A ω B A + 𝑜 B
8 3 6 7 syl2anc A ω B ω A B B A + 𝑜 B
9 2 5 8 elrabd A ω B ω A B B y On | B A + 𝑜 y
10 intss1 B y On | B A + 𝑜 y y On | B A + 𝑜 y B
11 9 10 syl A ω B ω A B y On | B A + 𝑜 y B
12 ssrab2 y On | B A + 𝑜 y On
13 9 ne0d A ω B ω A B y On | B A + 𝑜 y
14 oninton y On | B A + 𝑜 y On y On | B A + 𝑜 y y On | B A + 𝑜 y On
15 12 13 14 sylancr A ω B ω A B y On | B A + 𝑜 y On
16 eloni y On | B A + 𝑜 y On Ord y On | B A + 𝑜 y
17 15 16 syl A ω B ω A B Ord y On | B A + 𝑜 y
18 ordom Ord ω
19 ordtr2 Ord y On | B A + 𝑜 y Ord ω y On | B A + 𝑜 y B B ω y On | B A + 𝑜 y ω
20 17 18 19 sylancl A ω B ω A B y On | B A + 𝑜 y B B ω y On | B A + 𝑜 y ω
21 11 3 20 mp2and A ω B ω A B y On | B A + 𝑜 y ω
22 nna0 A ω A + 𝑜 = A
23 22 ad2antrr A ω B ω A B A + 𝑜 = A
24 simpr A ω B ω A B A B
25 23 24 eqsstrd A ω B ω A B A + 𝑜 B
26 oveq2 y On | B A + 𝑜 y = A + 𝑜 y On | B A + 𝑜 y = A + 𝑜
27 26 sseq1d y On | B A + 𝑜 y = A + 𝑜 y On | B A + 𝑜 y B A + 𝑜 B
28 25 27 syl5ibrcom A ω B ω A B y On | B A + 𝑜 y = A + 𝑜 y On | B A + 𝑜 y B
29 simprr A ω B ω A B x ω y On | B A + 𝑜 y = suc x y On | B A + 𝑜 y = suc x
30 29 oveq2d A ω B ω A B x ω y On | B A + 𝑜 y = suc x A + 𝑜 y On | B A + 𝑜 y = A + 𝑜 suc x
31 6 adantr A ω B ω A B x ω y On | B A + 𝑜 y = suc x A ω
32 simprl A ω B ω A B x ω y On | B A + 𝑜 y = suc x x ω
33 nnasuc A ω x ω A + 𝑜 suc x = suc A + 𝑜 x
34 31 32 33 syl2anc A ω B ω A B x ω y On | B A + 𝑜 y = suc x A + 𝑜 suc x = suc A + 𝑜 x
35 30 34 eqtrd A ω B ω A B x ω y On | B A + 𝑜 y = suc x A + 𝑜 y On | B A + 𝑜 y = suc A + 𝑜 x
36 nnord B ω Ord B
37 3 36 syl A ω B ω A B Ord B
38 37 adantr A ω B ω A B x ω y On | B A + 𝑜 y = suc x Ord B
39 nnon x ω x On
40 39 adantr x ω y On | B A + 𝑜 y = suc x x On
41 vex x V
42 41 sucid x suc x
43 simpr x ω y On | B A + 𝑜 y = suc x y On | B A + 𝑜 y = suc x
44 42 43 eleqtrrid x ω y On | B A + 𝑜 y = suc x x y On | B A + 𝑜 y
45 oveq2 y = x A + 𝑜 y = A + 𝑜 x
46 45 sseq2d y = x B A + 𝑜 y B A + 𝑜 x
47 46 onnminsb x On x y On | B A + 𝑜 y ¬ B A + 𝑜 x
48 40 44 47 sylc x ω y On | B A + 𝑜 y = suc x ¬ B A + 𝑜 x
49 48 adantl A ω B ω A B x ω y On | B A + 𝑜 y = suc x ¬ B A + 𝑜 x
50 nnacl A ω x ω A + 𝑜 x ω
51 31 32 50 syl2anc A ω B ω A B x ω y On | B A + 𝑜 y = suc x A + 𝑜 x ω
52 nnord A + 𝑜 x ω Ord A + 𝑜 x
53 51 52 syl A ω B ω A B x ω y On | B A + 𝑜 y = suc x Ord A + 𝑜 x
54 ordtri1 Ord B Ord A + 𝑜 x B A + 𝑜 x ¬ A + 𝑜 x B
55 38 53 54 syl2anc A ω B ω A B x ω y On | B A + 𝑜 y = suc x B A + 𝑜 x ¬ A + 𝑜 x B
56 55 con2bid A ω B ω A B x ω y On | B A + 𝑜 y = suc x A + 𝑜 x B ¬ B A + 𝑜 x
57 49 56 mpbird A ω B ω A B x ω y On | B A + 𝑜 y = suc x A + 𝑜 x B
58 ordsucss Ord B A + 𝑜 x B suc A + 𝑜 x B
59 38 57 58 sylc A ω B ω A B x ω y On | B A + 𝑜 y = suc x suc A + 𝑜 x B
60 35 59 eqsstrd A ω B ω A B x ω y On | B A + 𝑜 y = suc x A + 𝑜 y On | B A + 𝑜 y B
61 60 rexlimdvaa A ω B ω A B x ω y On | B A + 𝑜 y = suc x A + 𝑜 y On | B A + 𝑜 y B
62 nn0suc y On | B A + 𝑜 y ω y On | B A + 𝑜 y = x ω y On | B A + 𝑜 y = suc x
63 21 62 syl A ω B ω A B y On | B A + 𝑜 y = x ω y On | B A + 𝑜 y = suc x
64 28 61 63 mpjaod A ω B ω A B A + 𝑜 y On | B A + 𝑜 y B
65 onint y On | B A + 𝑜 y On y On | B A + 𝑜 y y On | B A + 𝑜 y y On | B A + 𝑜 y
66 12 13 65 sylancr A ω B ω A B y On | B A + 𝑜 y y On | B A + 𝑜 y
67 nfrab1 _ y y On | B A + 𝑜 y
68 67 nfint _ y y On | B A + 𝑜 y
69 nfcv _ y On
70 nfcv _ y B
71 nfcv _ y A
72 nfcv _ y + 𝑜
73 71 72 68 nfov _ y A + 𝑜 y On | B A + 𝑜 y
74 70 73 nfss y B A + 𝑜 y On | B A + 𝑜 y
75 oveq2 y = y On | B A + 𝑜 y A + 𝑜 y = A + 𝑜 y On | B A + 𝑜 y
76 75 sseq2d y = y On | B A + 𝑜 y B A + 𝑜 y B A + 𝑜 y On | B A + 𝑜 y
77 68 69 74 76 elrabf y On | B A + 𝑜 y y On | B A + 𝑜 y y On | B A + 𝑜 y On B A + 𝑜 y On | B A + 𝑜 y
78 77 simprbi y On | B A + 𝑜 y y On | B A + 𝑜 y B A + 𝑜 y On | B A + 𝑜 y
79 66 78 syl A ω B ω A B B A + 𝑜 y On | B A + 𝑜 y
80 64 79 eqssd A ω B ω A B A + 𝑜 y On | B A + 𝑜 y = B
81 oveq2 x = y On | B A + 𝑜 y A + 𝑜 x = A + 𝑜 y On | B A + 𝑜 y
82 81 eqeq1d x = y On | B A + 𝑜 y A + 𝑜 x = B A + 𝑜 y On | B A + 𝑜 y = B
83 82 rspcev y On | B A + 𝑜 y ω A + 𝑜 y On | B A + 𝑜 y = B x ω A + 𝑜 x = B
84 21 80 83 syl2anc A ω B ω A B x ω A + 𝑜 x = B
85 84 ex A ω B ω A B x ω A + 𝑜 x = B
86 nnaword1 A ω x ω A A + 𝑜 x
87 86 adantlr A ω B ω x ω A A + 𝑜 x
88 sseq2 A + 𝑜 x = B A A + 𝑜 x A B
89 87 88 syl5ibcom A ω B ω x ω A + 𝑜 x = B A B
90 89 rexlimdva A ω B ω x ω A + 𝑜 x = B A B
91 85 90 impbid A ω B ω A B x ω A + 𝑜 x = B