Metamath Proof Explorer


Theorem dyadmax

Description: Any nonempty set of dyadic rational intervals has a maximal element. (Contributed by Mario Carneiro, 26-Mar-2015)

Ref Expression
Hypothesis dyadmbl.1 F = x , y 0 x 2 y x + 1 2 y
Assertion dyadmax A ran F A z A w A . z . w z = w

Proof

Step Hyp Ref Expression
1 dyadmbl.1 F = x , y 0 x 2 y x + 1 2 y
2 ltweuz < We 0
3 2 a1i A ran F A < We 0
4 nn0ex 0 V
5 4 rabex n 0 | z A a z = a F n V
6 5 a1i A ran F A n 0 | z A a z = a F n V
7 ssrab2 n 0 | z A a z = a F n 0
8 nn0uz 0 = 0
9 7 8 sseqtri n 0 | z A a z = a F n 0
10 9 a1i A ran F A n 0 | z A a z = a F n 0
11 id A A
12 1 dyadf F : × 0 2
13 ffn F : × 0 2 F Fn × 0
14 ovelrn F Fn × 0 z ran F a n 0 z = a F n
15 12 13 14 mp2b z ran F a n 0 z = a F n
16 rexcom a n 0 z = a F n n 0 a z = a F n
17 15 16 sylbb z ran F n 0 a z = a F n
18 17 rgen z ran F n 0 a z = a F n
19 ssralv A ran F z ran F n 0 a z = a F n z A n 0 a z = a F n
20 18 19 mpi A ran F z A n 0 a z = a F n
21 r19.2z A z A n 0 a z = a F n z A n 0 a z = a F n
22 11 20 21 syl2anr A ran F A z A n 0 a z = a F n
23 rexcom z A n 0 a z = a F n n 0 z A a z = a F n
24 22 23 sylib A ran F A n 0 z A a z = a F n
25 rabn0 n 0 | z A a z = a F n n 0 z A a z = a F n
26 24 25 sylibr A ran F A n 0 | z A a z = a F n
27 wereu < We 0 n 0 | z A a z = a F n V n 0 | z A a z = a F n 0 n 0 | z A a z = a F n ∃! c n 0 | z A a z = a F n d n 0 | z A a z = a F n ¬ d < c
28 3 6 10 26 27 syl13anc A ran F A ∃! c n 0 | z A a z = a F n d n 0 | z A a z = a F n ¬ d < c
29 reurex ∃! c n 0 | z A a z = a F n d n 0 | z A a z = a F n ¬ d < c c n 0 | z A a z = a F n d n 0 | z A a z = a F n ¬ d < c
30 28 29 syl A ran F A c n 0 | z A a z = a F n d n 0 | z A a z = a F n ¬ d < c
31 oveq2 n = c a F n = a F c
32 31 eqeq2d n = c z = a F n z = a F c
33 32 2rexbidv n = c z A a z = a F n z A a z = a F c
34 33 elrab c n 0 | z A a z = a F n c 0 z A a z = a F c
35 eqeq1 z = w z = a F n w = a F n
36 oveq1 a = b a F n = b F n
37 36 eqeq2d a = b w = a F n w = b F n
38 35 37 cbvrex2vw z A a z = a F n w A b w = b F n
39 oveq2 n = d b F n = b F d
40 39 eqeq2d n = d w = b F n w = b F d
41 40 2rexbidv n = d w A b w = b F n w A b w = b F d
42 38 41 syl5bb n = d z A a z = a F n w A b w = b F d
43 42 ralrab d n 0 | z A a z = a F n ¬ d < c d 0 w A b w = b F d ¬ d < c
44 r19.23v w A b w = b F d ¬ d < c w A b w = b F d ¬ d < c
45 44 ralbii d 0 w A b w = b F d ¬ d < c d 0 w A b w = b F d ¬ d < c
46 ralcom d 0 w A b w = b F d ¬ d < c w A d 0 b w = b F d ¬ d < c
47 45 46 bitr3i d 0 w A b w = b F d ¬ d < c w A d 0 b w = b F d ¬ d < c
48 simplll A ran F A c 0 z A a A ran F
49 48 sselda A ran F A c 0 z A a w A w ran F
50 ovelrn F Fn × 0 w ran F b d 0 w = b F d
51 12 13 50 mp2b w ran F b d 0 w = b F d
52 49 51 sylib A ran F A c 0 z A a w A b d 0 w = b F d
53 rexcom b d 0 w = b F d d 0 b w = b F d
54 r19.29 d 0 b w = b F d ¬ d < c d 0 b w = b F d d 0 b w = b F d ¬ d < c b w = b F d
55 54 expcom d 0 b w = b F d d 0 b w = b F d ¬ d < c d 0 b w = b F d ¬ d < c b w = b F d
56 53 55 sylbi b d 0 w = b F d d 0 b w = b F d ¬ d < c d 0 b w = b F d ¬ d < c b w = b F d
57 52 56 syl A ran F A c 0 z A a w A d 0 b w = b F d ¬ d < c d 0 b w = b F d ¬ d < c b w = b F d
58 simplrr A ran F A c 0 z A a w A a
59 58 ad2antrr A ran F A c 0 z A a w A d 0 b ¬ d < c . a F c . b F d a
60 simplrr A ran F A c 0 z A a w A d 0 b ¬ d < c . a F c . b F d b
61 simp-5r A ran F A c 0 z A a w A d 0 b ¬ d < c . a F c . b F d c 0
62 simplrl A ran F A c 0 z A a w A d 0 b ¬ d < c . a F c . b F d d 0
63 simprl A ran F A c 0 z A a w A d 0 b ¬ d < c . a F c . b F d ¬ d < c
64 simprr A ran F A c 0 z A a w A d 0 b ¬ d < c . a F c . b F d . a F c . b F d
65 1 59 60 61 62 63 64 dyadmaxlem A ran F A c 0 z A a w A d 0 b ¬ d < c . a F c . b F d a = b c = d
66 oveq12 a = b c = d a F c = b F d
67 65 66 syl A ran F A c 0 z A a w A d 0 b ¬ d < c . a F c . b F d a F c = b F d
68 67 exp32 A ran F A c 0 z A a w A d 0 b ¬ d < c . a F c . b F d a F c = b F d
69 fveq2 w = b F d . w = . b F d
70 69 sseq2d w = b F d . a F c . w . a F c . b F d
71 eqeq2 w = b F d a F c = w a F c = b F d
72 70 71 imbi12d w = b F d . a F c . w a F c = w . a F c . b F d a F c = b F d
73 72 imbi2d w = b F d ¬ d < c . a F c . w a F c = w ¬ d < c . a F c . b F d a F c = b F d
74 68 73 syl5ibrcom A ran F A c 0 z A a w A d 0 b w = b F d ¬ d < c . a F c . w a F c = w
75 74 anassrs A ran F A c 0 z A a w A d 0 b w = b F d ¬ d < c . a F c . w a F c = w
76 75 rexlimdva A ran F A c 0 z A a w A d 0 b w = b F d ¬ d < c . a F c . w a F c = w
77 76 a2d A ran F A c 0 z A a w A d 0 b w = b F d ¬ d < c b w = b F d . a F c . w a F c = w
78 77 impd A ran F A c 0 z A a w A d 0 b w = b F d ¬ d < c b w = b F d . a F c . w a F c = w
79 78 rexlimdva A ran F A c 0 z A a w A d 0 b w = b F d ¬ d < c b w = b F d . a F c . w a F c = w
80 57 79 syld A ran F A c 0 z A a w A d 0 b w = b F d ¬ d < c . a F c . w a F c = w
81 80 ralimdva A ran F A c 0 z A a w A d 0 b w = b F d ¬ d < c w A . a F c . w a F c = w
82 47 81 syl5bi A ran F A c 0 z A a d 0 w A b w = b F d ¬ d < c w A . a F c . w a F c = w
83 82 imp A ran F A c 0 z A a d 0 w A b w = b F d ¬ d < c w A . a F c . w a F c = w
84 83 an32s A ran F A c 0 d 0 w A b w = b F d ¬ d < c z A a w A . a F c . w a F c = w
85 fveq2 z = a F c . z = . a F c
86 85 sseq1d z = a F c . z . w . a F c . w
87 eqeq1 z = a F c z = w a F c = w
88 86 87 imbi12d z = a F c . z . w z = w . a F c . w a F c = w
89 88 ralbidv z = a F c w A . z . w z = w w A . a F c . w a F c = w
90 84 89 syl5ibrcom A ran F A c 0 d 0 w A b w = b F d ¬ d < c z A a z = a F c w A . z . w z = w
91 90 anassrs A ran F A c 0 d 0 w A b w = b F d ¬ d < c z A a z = a F c w A . z . w z = w
92 91 rexlimdva A ran F A c 0 d 0 w A b w = b F d ¬ d < c z A a z = a F c w A . z . w z = w
93 92 reximdva A ran F A c 0 d 0 w A b w = b F d ¬ d < c z A a z = a F c z A w A . z . w z = w
94 93 ex A ran F A c 0 d 0 w A b w = b F d ¬ d < c z A a z = a F c z A w A . z . w z = w
95 43 94 syl5bi A ran F A c 0 d n 0 | z A a z = a F n ¬ d < c z A a z = a F c z A w A . z . w z = w
96 95 com23 A ran F A c 0 z A a z = a F c d n 0 | z A a z = a F n ¬ d < c z A w A . z . w z = w
97 96 expimpd A ran F A c 0 z A a z = a F c d n 0 | z A a z = a F n ¬ d < c z A w A . z . w z = w
98 34 97 syl5bi A ran F A c n 0 | z A a z = a F n d n 0 | z A a z = a F n ¬ d < c z A w A . z . w z = w
99 98 rexlimdv A ran F A c n 0 | z A a z = a F n d n 0 | z A a z = a F n ¬ d < c z A w A . z . w z = w
100 30 99 mpd A ran F A z A w A . z . w z = w