Metamath Proof Explorer


Theorem ex-ceil

Description: Example for df-ceil . (Contributed by AV, 4-Sep-2021)

Ref Expression
Assertion ex-ceil ( ( ⌈ ‘ ( 3 / 2 ) ) = 2 ∧ ( ⌈ ‘ - ( 3 / 2 ) ) = - 1 )

Proof

Step Hyp Ref Expression
1 ex-fl ( ( ⌊ ‘ ( 3 / 2 ) ) = 1 ∧ ( ⌊ ‘ - ( 3 / 2 ) ) = - 2 )
2 3re 3 ∈ ℝ
3 2 rehalfcli ( 3 / 2 ) ∈ ℝ
4 3 renegcli - ( 3 / 2 ) ∈ ℝ
5 ceilval ( - ( 3 / 2 ) ∈ ℝ → ( ⌈ ‘ - ( 3 / 2 ) ) = - ( ⌊ ‘ - - ( 3 / 2 ) ) )
6 4 5 ax-mp ( ⌈ ‘ - ( 3 / 2 ) ) = - ( ⌊ ‘ - - ( 3 / 2 ) )
7 3 recni ( 3 / 2 ) ∈ ℂ
8 7 negnegi - - ( 3 / 2 ) = ( 3 / 2 )
9 8 eqcomi ( 3 / 2 ) = - - ( 3 / 2 )
10 9 fveq2i ( ⌊ ‘ ( 3 / 2 ) ) = ( ⌊ ‘ - - ( 3 / 2 ) )
11 10 eqeq1i ( ( ⌊ ‘ ( 3 / 2 ) ) = 1 ↔ ( ⌊ ‘ - - ( 3 / 2 ) ) = 1 )
12 11 biimpi ( ( ⌊ ‘ ( 3 / 2 ) ) = 1 → ( ⌊ ‘ - - ( 3 / 2 ) ) = 1 )
13 12 negeqd ( ( ⌊ ‘ ( 3 / 2 ) ) = 1 → - ( ⌊ ‘ - - ( 3 / 2 ) ) = - 1 )
14 6 13 syl5eq ( ( ⌊ ‘ ( 3 / 2 ) ) = 1 → ( ⌈ ‘ - ( 3 / 2 ) ) = - 1 )
15 ceilval ( ( 3 / 2 ) ∈ ℝ → ( ⌈ ‘ ( 3 / 2 ) ) = - ( ⌊ ‘ - ( 3 / 2 ) ) )
16 3 15 ax-mp ( ⌈ ‘ ( 3 / 2 ) ) = - ( ⌊ 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