Metamath Proof Explorer


Theorem dfceil2

Description: Alternative definition of the ceiling function using restricted iota. (Contributed by AV, 1-Dec-2018)

Ref Expression
Assertion dfceil2 . = x ι y | x y y < x + 1

Proof

Step Hyp Ref Expression
1 df-ceil . = x x
2 zre z z
3 lenegcon2 x z x z z x
4 peano2re x x + 1
5 4 anim1ci x z z x + 1
6 ltnegcon1 z x + 1 z < x + 1 x + 1 < z
7 5 6 syl x z z < x + 1 x + 1 < z
8 recn x x
9 1cnd x 1
10 8 9 negdid x x + 1 = - x + -1
11 10 adantr x z x + 1 = - x + -1
12 11 breq1d x z x + 1 < z - x + -1 < z
13 renegcl x x
14 13 adantr x z x
15 neg1rr 1
16 15 a1i x z 1
17 simpr x z z
18 14 16 17 ltaddsubd x z - x + -1 < z x < z -1
19 recn z z
20 1cnd z 1
21 19 20 subnegd z z -1 = z + 1
22 21 adantl x z z -1 = z + 1
23 22 breq2d x z x < z -1 x < z + 1
24 18 23 bitrd x z - x + -1 < z x < z + 1
25 7 12 24 3bitrd x z z < x + 1 x < z + 1
26 3 25 anbi12d x z x z z < x + 1 z x x < z + 1
27 2 26 sylan2 x z x z z < x + 1 z x x < z + 1
28 27 riotabidva x ι z | x z z < x + 1 = ι z | z x x < z + 1
29 28 negeqd x ι z | x z z < x + 1 = ι z | z x x < z + 1
30 zbtwnre x ∃! y x y y < x + 1
31 breq2 y = z x y x z
32 breq1 y = z y < x + 1 z < x + 1
33 31 32 anbi12d y = z x y y < x + 1 x z z < x + 1
34 33 zriotaneg ∃! y x y y < x + 1 ι y | x y y < x + 1 = ι z | x z z < x + 1
35 30 34 syl x ι y | x y y < x + 1 = ι z | x z z < x + 1
36 flval x x = ι z | z x x < z + 1
37 13 36 syl x x = ι z | z x x < z + 1
38 37 negeqd x x = ι z | z x x < z + 1
39 29 35 38 3eqtr4rd x x = ι y | x y y < x + 1
40 39 mpteq2ia x x = x ι y | x y y < x + 1
41 1 40 eqtri . = x ι y | x y y < x + 1