Metamath Proof Explorer


Theorem evth

Description: The Extreme Value Theorem. A continuous function from a nonempty compact topological space to the reals attains its maximum at some point in the domain. (Contributed by Mario Carneiro, 12-Aug-2014)

Ref Expression
Hypotheses bndth.1 X = J
bndth.2 K = topGen ran .
bndth.3 φ J Comp
bndth.4 φ F J Cn K
evth.5 φ X
Assertion evth φ x X y X F y F x

Proof

Step Hyp Ref Expression
1 bndth.1 X = J
2 bndth.2 K = topGen ran .
3 bndth.3 φ J Comp
4 bndth.4 φ F J Cn K
5 evth.5 φ X
6 3 adantr φ F : X sup ran F < J Comp
7 cmptop J Comp J Top
8 6 7 syl φ F : X sup ran F < J Top
9 1 toptopon J Top J TopOn X
10 8 9 sylib φ F : X sup ran F < J TopOn X
11 eqid TopOpen fld = TopOpen fld
12 11 cnfldtopon TopOpen fld TopOn
13 12 a1i φ F : X sup ran F < TopOpen fld TopOn
14 1cnd φ F : X sup ran F < 1
15 10 13 14 cnmptc φ F : X sup ran F < z X 1 J Cn TopOpen fld
16 uniretop = topGen ran .
17 2 unieqi K = topGen ran .
18 16 17 eqtr4i = K
19 1 18 cnf F J Cn K F : X
20 4 19 syl φ F : X
21 20 frnd φ ran F
22 20 fdmd φ dom F = X
23 22 5 eqnetrd φ dom F
24 dm0rn0 dom F = ran F =
25 24 necon3bii dom F ran F
26 23 25 sylib φ ran F
27 1 2 3 4 bndth φ x y X F y x
28 20 ffnd φ F Fn X
29 breq1 z = F y z x F y x
30 29 ralrn F Fn X z ran F z x y X F y x
31 28 30 syl φ z ran F z x y X F y x
32 31 rexbidv φ x z ran F z x x y X F y x
33 27 32 mpbird φ x z ran F z x
34 21 26 33 3jca φ ran F ran F x z ran F z x
35 suprcl ran F ran F x z ran F z x sup ran F <
36 34 35 syl φ sup ran F <
37 36 recnd φ sup ran F <
38 37 adantr φ F : X sup ran F < sup ran F <
39 10 13 38 cnmptc φ F : X sup ran F < z X sup ran F < J Cn TopOpen fld
40 20 feqmptd φ F = z X F z
41 11 cnfldtop TopOpen fld Top
42 cnrest2r TopOpen fld Top J Cn TopOpen fld 𝑡 J Cn TopOpen fld
43 41 42 ax-mp J Cn TopOpen fld 𝑡 J Cn TopOpen fld
44 11 tgioo2 topGen ran . = TopOpen fld 𝑡
45 2 44 eqtri K = TopOpen fld 𝑡
46 45 oveq2i J Cn K = J Cn TopOpen fld 𝑡
47 4 46 eleqtrdi φ F J Cn TopOpen fld 𝑡
48 43 47 sselid φ F J Cn TopOpen fld
49 40 48 eqeltrrd φ z X F z J Cn TopOpen fld
50 49 adantr φ F : X sup ran F < z X F z J Cn TopOpen fld
51 11 subcn TopOpen fld × t TopOpen fld Cn TopOpen fld
52 51 a1i φ F : X sup ran F < TopOpen fld × t TopOpen fld Cn TopOpen fld
53 10 39 50 52 cnmpt12f φ F : X sup ran F < z X sup ran F < F z J Cn TopOpen fld
54 36 ad2antrr φ F : X sup ran F < z X sup ran F <
55 ffvelrn F : X sup ran F < z X F z sup ran F <
56 55 adantll φ F : X sup ran F < z X F z sup ran F <
57 eldifsn F z sup ran F < F z F z sup ran F <
58 56 57 sylib φ F : X sup ran F < z X F z F z sup ran F <
59 58 simpld φ F : X sup ran F < z X F z
60 54 59 resubcld φ F : X sup ran F < z X sup ran F < F z
61 60 recnd φ F : X sup ran F < z X sup ran F < F z
62 54 recnd φ F : X sup ran F < z X sup ran F <
63 59 recnd φ F : X sup ran F < z X F z
64 58 simprd φ F : X sup ran F < z X F z sup ran F <
65 64 necomd φ F : X sup ran F < z X sup ran F < F z
66 62 63 65 subne0d φ F : X sup ran F < z X sup ran F < F z 0
67 eldifsn sup ran F < F z 0 sup ran F < F z sup ran F < F z 0
68 61 66 67 sylanbrc φ F : X sup ran F < z X sup ran F < F z 0
69 68 fmpttd φ F : X sup ran F < z X sup ran F < F z : X 0
70 69 frnd φ F : X sup ran F < ran z X sup ran F < F z 0
71 difssd φ F : X sup ran F < 0
72 cnrest2 TopOpen fld TopOn ran z X sup ran F < F z 0 0 z X sup ran F < F z J Cn TopOpen fld z X sup ran F < F z J Cn TopOpen fld 𝑡 0
73 13 70 71 72 syl3anc φ F : X sup ran F < z X sup ran F < F z J Cn TopOpen fld z X sup ran F < F z J Cn TopOpen fld 𝑡 0
74 53 73 mpbid φ F : X sup ran F < z X sup ran F < F z J Cn TopOpen fld 𝑡 0
75 eqid TopOpen fld 𝑡 0 = TopOpen fld 𝑡 0
76 11 75 divcn ÷ TopOpen fld × t TopOpen fld 𝑡 0 Cn TopOpen fld
77 76 a1i φ F : X sup ran F < ÷ TopOpen fld × t TopOpen fld 𝑡 0 Cn TopOpen fld
78 10 15 74 77 cnmpt12f φ F : X sup ran F < z X 1 sup ran F < F z J Cn TopOpen fld
79 60 66 rereccld φ F : X sup ran F < z X 1 sup ran F < F z
80 79 fmpttd φ F : X sup ran F < z X 1 sup ran F < F z : X
81 80 frnd φ F : X sup ran F < ran z X 1 sup ran F < F z
82 ax-resscn
83 82 a1i φ F : X sup ran F <
84 cnrest2 TopOpen fld TopOn ran z X 1 sup ran F < F z z X 1 sup ran F < F z J Cn TopOpen fld z X 1 sup ran F < F z J Cn TopOpen fld 𝑡
85 13 81 83 84 syl3anc φ F : X sup ran F < z X 1 sup ran F < F z J Cn TopOpen fld z X 1 sup ran F < F z J Cn TopOpen fld 𝑡
86 78 85 mpbid φ F : X sup ran F < z X 1 sup ran F < F z J Cn TopOpen fld 𝑡
87 86 46 eleqtrrdi φ F : X sup ran F < z X 1 sup ran F < F z J Cn K
88 1 2 6 87 bndth φ F : X sup ran F < x y X z X 1 sup ran F < F z y x
89 36 ad2antrr φ F : X sup ran F < x sup ran F <
90 simpr φ F : X sup ran F < x x
91 1re 1
92 ifcl x 1 if 1 x x 1
93 90 91 92 sylancl φ F : X sup ran F < x if 1 x x 1
94 0red φ F : X sup ran F < x 0
95 91 a1i φ F : X sup ran F < x 1
96 0lt1 0 < 1
97 96 a1i φ F : X sup ran F < x 0 < 1
98 max1 1 x 1 if 1 x x 1
99 91 90 98 sylancr φ F : X sup ran F < x 1 if 1 x x 1
100 94 95 93 97 99 ltletrd φ F : X sup ran F < x 0 < if 1 x x 1
101 100 gt0ne0d φ F : X sup ran F < x if 1 x x 1 0
102 93 101 rereccld φ F : X sup ran F < x 1 if 1 x x 1
103 93 100 recgt0d φ F : X sup ran F < x 0 < 1 if 1 x x 1
104 102 103 elrpd φ F : X sup ran F < x 1 if 1 x x 1 +
105 89 104 ltsubrpd φ F : X sup ran F < x sup ran F < 1 if 1 x x 1 < sup ran F <
106 89 102 resubcld φ F : X sup ran F < x sup ran F < 1 if 1 x x 1
107 106 89 ltnled φ F : X sup ran F < x sup ran F < 1 if 1 x x 1 < sup ran F < ¬ sup ran F < sup ran F < 1 if 1 x x 1
108 105 107 mpbid φ F : X sup ran F < x ¬ sup ran F < sup ran F < 1 if 1 x x 1
109 simprl φ F : X sup ran F < x y X x
110 max2 1 x x if 1 x x 1
111 91 109 110 sylancr φ F : X sup ran F < x y X x if 1 x x 1
112 36 ad2antrr φ F : X sup ran F < x y X sup ran F <
113 ffvelrn F : X sup ran F < y X F y sup ran F <
114 113 ad2ant2l φ F : X sup ran F < x y X F y sup ran F <
115 eldifsn F y sup ran F < F y F y sup ran F <
116 114 115 sylib φ F : X sup ran F < x y X F y F y sup ran F <
117 116 simpld φ F : X sup ran F < x y X F y
118 112 117 resubcld φ F : X sup ran F < x y X sup ran F < F y
119 fnfvelrn F Fn X y X F y ran F
120 28 119 sylan φ y X F y ran F
121 suprub ran F ran F x z ran F z x F y ran F F y sup ran F <
122 34 120 121 syl2an2r φ y X F y sup ran F <
123 122 ad2ant2rl φ F : X sup ran F < x y X F y sup ran F <
124 116 simprd φ F : X sup ran F < x y X F y sup ran F <
125 124 necomd φ F : X sup ran F < x y X sup ran F < F y
126 117 112 123 125 leneltd φ F : X sup ran F < x y X F y < sup ran F <
127 117 112 posdifd φ F : X sup ran F < x y X F y < sup ran F < 0 < sup ran F < F y
128 126 127 mpbid φ F : X sup ran F < x y X 0 < sup ran F < F y
129 128 gt0ne0d φ F : X sup ran F < x y X sup ran F < F y 0
130 118 129 rereccld φ F : X sup ran F < x y X 1 sup ran F < F y
131 109 91 92 sylancl φ F : X sup ran F < x y X if 1 x x 1
132 letr 1 sup ran F < F y x if 1 x x 1 1 sup ran F < F y x x if 1 x x 1 1 sup ran F < F y if 1 x x 1
133 130 109 131 132 syl3anc φ F : X sup ran F < x y X 1 sup ran F < F y x x if 1 x x 1 1 sup ran F < F y if 1 x x 1
134 111 133 mpan2d φ F : X sup ran F < x y X 1 sup ran F < F y x 1 sup ran F < F y if 1 x x 1
135 fveq2 z = y F z = F y
136 135 oveq2d z = y sup ran F < F z = sup ran F < F y
137 136 oveq2d z = y 1 sup ran F < F z = 1 sup ran F < F y
138 eqid z X 1 sup ran F < F z = z X 1 sup ran F < F z
139 ovex 1 sup ran F < F y V
140 137 138 139 fvmpt y X z X 1 sup ran F < F z y = 1 sup ran F < F y
141 140 breq1d y X z X 1 sup ran F < F z y x 1 sup ran F < F y x
142 141 ad2antll φ F : X sup ran F < x y X z X 1 sup ran F < F z y x 1 sup ran F < F y x
143 102 adantrr φ F : X sup ran F < x y X 1 if 1 x x 1
144 100 adantrr φ F : X sup ran F < x y X 0 < if 1 x x 1
145 131 144 recgt0d φ F : X sup ran F < x y X 0 < 1 if 1 x x 1
146 lerec 1 if 1 x x 1 0 < 1 if 1 x x 1 sup ran F < F y 0 < sup ran F < F y 1 if 1 x x 1 sup ran F < F y 1 sup ran F < F y 1 1 if 1 x x 1
147 143 145 118 128 146 syl22anc φ F : X sup ran F < x y X 1 if 1 x x 1 sup ran F < F y 1 sup ran F < F y 1 1 if 1 x x 1
148 lesub 1 if 1 x x 1 sup ran F < F y 1 if 1 x x 1 sup ran F < F y F y sup ran F < 1 if 1 x x 1
149 143 112 117 148 syl3anc φ F : X sup ran F < x y X 1 if 1 x x 1 sup ran F < F y F y sup ran F < 1 if 1 x x 1
150 131 recnd φ F : X sup ran F < x y X if 1 x x 1
151 101 adantrr φ F : X sup ran F < x y X if 1 x x 1 0
152 150 151 recrecd φ F : X sup ran F < x y X 1 1 if 1 x x 1 = if 1 x x 1
153 152 breq2d φ F : X sup ran F < x y X 1 sup ran F < F y 1 1 if 1 x x 1 1 sup ran F < F y if 1 x x 1
154 147 149 153 3bitr3d φ F : X sup ran F < x y X F y sup ran F < 1 if 1 x x 1 1 sup ran F < F y if 1 x x 1
155 134 142 154 3imtr4d φ F : X sup ran F < x y X z X 1 sup ran F < F z y x F y sup ran F < 1 if 1 x x 1
156 155 anassrs φ F : X sup ran F < x y X z X 1 sup ran F < F z y x F y sup ran F < 1 if 1 x x 1
157 156 ralimdva φ F : X sup ran F < x y X z X 1 sup ran F < F z y x y X F y sup ran F < 1 if 1 x x 1
158 34 ad2antrr φ F : X sup ran F < x ran F ran F x z ran F z x
159 suprleub ran F ran F x z ran F z x sup ran F < 1 if 1 x x 1 sup ran F < sup ran F < 1 if 1 x x 1 z ran F z sup ran F < 1 if 1 x x 1
160 158 106 159 syl2anc φ F : X sup ran F < x sup ran F < sup ran F < 1 if 1 x x 1 z ran F z sup ran F < 1 if 1 x x 1
161 28 ad2antrr φ F : X sup ran F < x F Fn X
162 breq1 z = F y z sup ran F < 1 if 1 x x 1 F y sup ran F < 1 if 1 x x 1
163 162 ralrn F Fn X z ran F z sup ran F < 1 if 1 x x 1 y X F y sup ran F < 1 if 1 x x 1
164 161 163 syl φ F : X sup ran F < x z ran F z sup ran F < 1 if 1 x x 1 y X F y sup ran F < 1 if 1 x x 1
165 160 164 bitrd φ F : X sup ran F < x sup ran F < sup ran F < 1 if 1 x x 1 y X F y sup ran F < 1 if 1 x x 1
166 157 165 sylibrd φ F : X sup ran F < x y X z X 1 sup ran F < F z y x sup ran F < sup ran F < 1 if 1 x x 1
167 108 166 mtod φ F : X sup ran F < x ¬ y X z X 1 sup ran F < F z y x
168 167 nrexdv φ F : X sup ran F < ¬ x y X z X 1 sup ran F < F z y x
169 88 168 pm2.65da φ ¬ F : X sup ran F <
170 122 ralrimiva φ y X F y sup ran F <
171 breq2 F x = sup ran F < F y F x F y sup ran F <
172 171 ralbidv F x = sup ran F < y X F y F x y X F y sup ran F <
173 170 172 syl5ibrcom φ F x = sup ran F < y X F y F x
174 173 necon3bd φ ¬ y X F y F x F x sup ran F <
175 174 adantr φ x X ¬ y X F y F x F x sup ran F <
176 20 ffvelrnda φ x X F x
177 eldifsn F x sup ran F < F x F x sup ran F <
178 177 baib F x F x sup ran F < F x sup ran F <
179 176 178 syl φ x X F x sup ran F < F x sup ran F <
180 175 179 sylibrd φ x X ¬ y X F y F x F x sup ran F <
181 180 ralimdva φ x X ¬ y X F y F x x X F x sup ran F <
182 ffnfv F : X sup ran F < F Fn X x X F x sup ran F <
183 182 baib F Fn X F : X sup ran F < x X F x sup ran F <
184 28 183 syl φ F : X sup ran F < x X F x sup ran F <
185 181 184 sylibrd φ x X ¬ y X F y F x F : X sup ran F <
186 169 185 mtod φ ¬ x X ¬ y X F y F x
187 dfrex2 x X y X F y F x ¬ x X ¬ y X F y F x
188 186 187 sylibr φ x X y X F y F x