src/HOL/Real/RComplete.thy
changeset 27435 b3f8e9bdf9a7
parent 25162 ad4d5365d9d8
child 28091 50f2d6ba024c
equal deleted inserted replaced
27434:8a7100d33960 27435:b3f8e9bdf9a7
   432 
   432 
   433 subsection{*Floor and Ceiling Functions from the Reals to the Integers*}
   433 subsection{*Floor and Ceiling Functions from the Reals to the Integers*}
   434 
   434 
   435 definition
   435 definition
   436   floor :: "real => int" where
   436   floor :: "real => int" where
   437   "floor r = (LEAST n::int. r < real (n+1))"
   437   [code func del]: "floor r = (LEAST n::int. r < real (n+1))"
   438 
   438 
   439 definition
   439 definition
   440   ceiling :: "real => int" where
   440   ceiling :: "real => int" where
   441   "ceiling r = - floor (- r)"
   441   "ceiling r = - floor (- r)"
   442 
   442