Metamath Proof Explorer


Theorem flbi

Description: A condition equivalent to floor. (Contributed by NM, 11-Mar-2005) (Revised by Mario Carneiro, 2-Nov-2013)

Ref Expression
Assertion flbi
|- ( ( A e. RR /\ B e. ZZ ) -> ( ( |_ ` A ) = B <-> ( B <_ A /\ A < ( B + 1 ) ) ) )

Proof

Step Hyp Ref Expression
1 flval
 |-  ( A e. RR -> ( |_ ` A ) = ( iota_ x e. ZZ ( x <_ A /\ A < ( x + 1 ) ) ) )
2 1 eqeq1d
 |-  ( A e. RR -> ( ( |_ ` A ) = B <-> ( iota_ x e. ZZ ( x <_ A /\ A < ( x + 1 ) ) ) = B ) )
3 2 adantr
 |-  ( ( A e. RR /\ B e. ZZ ) -> ( ( |_ ` A ) = B <-> ( iota_ x e. ZZ ( x <_ A /\ A < ( x + 1 ) ) ) = B ) )
4 rebtwnz
 |-  ( A e. RR -> E! x e. ZZ ( x <_ A /\ A < ( x + 1 ) ) )
5 breq1
 |-  ( x = B -> ( x <_ A <-> B <_ A ) )
6 oveq1
 |-  ( x = B -> ( x + 1 ) = ( B + 1 ) )
7 6 breq2d
 |-  ( x = B -> ( A < ( x + 1 ) <-> A < ( B + 1 ) ) )
8 5 7 anbi12d
 |-  ( x = B -> ( ( x <_ A /\ A < ( x + 1 ) ) <-> ( B <_ A /\ A < ( B + 1 ) ) ) )
9 8 riota2
 |-  ( ( B e. ZZ /\ E! x e. ZZ ( x <_ A /\ A < ( x + 1 ) ) ) -> ( ( B <_ A /\ A < ( B + 1 ) ) <-> ( iota_ x e. ZZ ( x <_ A /\ A < ( x + 1 ) ) ) = B ) )
10 4 9 sylan2
 |-  ( ( B e. ZZ /\ A e. RR ) -> ( ( B <_ A /\ A < ( B + 1 ) ) <-> ( iota_ x e. ZZ ( x <_ A /\ A < ( x + 1 ) ) ) = B ) )
11 10 ancoms
 |-  ( ( A e. RR /\ B e. ZZ ) -> ( ( B <_ A /\ A < ( B + 1 ) ) <-> ( iota_ x e. ZZ ( x <_ A /\ A < ( x + 1 ) ) ) = B ) )
12 3 11 bitr4d
 |-  ( ( A e. RR /\ B e. ZZ ) -> ( ( |_ ` A ) = B <-> ( B <_ A /\ A < ( B + 1 ) ) ) )