Metamath Proof Explorer


Theorem limsup10ex

Description: The superior limit of a function that alternates between two values. (Contributed by Glauco Siliprandi, 2-Jan-2022)

Ref Expression
Hypothesis limsup10ex.1 F = n if 2 n 0 1
Assertion limsup10ex lim sup F = 1

Proof

Step Hyp Ref Expression
1 limsup10ex.1 F = n if 2 n 0 1
2 nftru k
3 nnex V
4 3 a1i V
5 0xr 0 *
6 5 a1i n 0 *
7 1xr 1 *
8 7 a1i n 1 *
9 6 8 ifcld n if 2 n 0 1 *
10 1 9 fmpti F : *
11 10 a1i F : *
12 eqid k sup F k +∞ * < = k sup F k +∞ * <
13 2 4 11 12 limsupval3 lim sup F = sup ran k sup F k +∞ * < * <
14 13 mptru lim sup F = sup ran k sup F k +∞ * < * <
15 id k k
16 1 15 limsup10exlem k F k +∞ = 0 1
17 16 supeq1d k sup F k +∞ * < = sup 0 1 * <
18 xrltso < Or *
19 suppr < Or * 0 * 1 * sup 0 1 * < = if 1 < 0 0 1
20 18 5 7 19 mp3an sup 0 1 * < = if 1 < 0 0 1
21 0le1 0 1
22 0re 0
23 1re 1
24 22 23 lenlti 0 1 ¬ 1 < 0
25 21 24 mpbi ¬ 1 < 0
26 25 iffalsei if 1 < 0 0 1 = 1
27 20 26 eqtri sup 0 1 * < = 1
28 17 27 eqtrdi k sup F k +∞ * < = 1
29 28 mpteq2ia k sup F k +∞ * < = k 1
30 29 rneqi ran k sup F k +∞ * < = ran k 1
31 eqid k 1 = k 1
32 ren0
33 32 a1i
34 31 33 rnmptc ran k 1 = 1
35 34 mptru ran k 1 = 1
36 30 35 eqtri ran k sup F k +∞ * < = 1
37 36 infeq1i sup ran k sup F k +∞ * < * < = sup 1 * <
38 infsn < Or * 1 * sup 1 * < = 1
39 18 7 38 mp2an sup 1 * < = 1
40 14 37 39 3eqtri lim sup F = 1