Documentation

Mathlib.Algebra.Order.Floor.Semifield

Lemmas on Nat.floor and Nat.ceil for semifields #

This file contains basic results on the natural-valued floor and ceiling functions.

Tags #

rounding, floor, ceil

theorem Nat.floor_div_ofNat {K : Type u_2} [Semifield K] [LinearOrder K] [IsStrictOrderedRing K] [FloorSemiring K] (a : K) (n : โ„•) [n.AtLeastTwo] :
โŒŠa / OfNat.ofNat nโŒ‹โ‚Š = โŒŠaโŒ‹โ‚Š / OfNat.ofNat n
theorem Nat.floor_div_eq_div {K : Type u_2} [Semifield K] [LinearOrder K] [IsStrictOrderedRing K] [FloorSemiring K] (m n : โ„•) :
โŒŠโ†‘m / โ†‘nโŒ‹โ‚Š = m / n

Natural division is the floor of field division.

theorem Nat.mul_lt_floor {K : Type u_2} [Field K] [LinearOrder K] [IsStrictOrderedRing K] [FloorSemiring K] {a b : K} (hbโ‚€ : 0 < b) (hb : b < 1) (hba : โ†‘โŒˆb / (1 - b)โŒ‰โ‚Š โ‰ค a) :
b * a < โ†‘โŒŠaโŒ‹โ‚Š
theorem Nat.ceil_lt_mul {K : Type u_2} [Field K] [LinearOrder K] [IsStrictOrderedRing K] [FloorSemiring K] {a b : K} (hb : 1 < b) (hba : โ†‘โŒˆ(b - 1)โปยนโŒ‰โ‚Š / b < a) :
โ†‘โŒˆaโŒ‰โ‚Š < b * a
theorem Nat.ceil_le_mul {K : Type u_2} [Field K] [LinearOrder K] [IsStrictOrderedRing K] [FloorSemiring K] {a b : K} (hb : 1 < b) (hba : โ†‘โŒˆ(b - 1)โปยนโŒ‰โ‚Š / b โ‰ค a) :

norm_num extension for Nat.floor #

theorem Mathlib.Meta.NormNum.IsInt.natFloor {R : Type u_3} [Ring R] [LinearOrder R] [IsStrictOrderedRing R] [FloorSemiring R] (r : R) (m : โ„•) :
IsInt r (Int.negOfNat m) โ†’ IsNat โŒŠrโŒ‹โ‚Š 0
theorem Mathlib.Meta.NormNum.IsNNRat.natFloor {R : Type u_3} [Semifield R] [LinearOrder R] [IsStrictOrderedRing R] [FloorSemiring R] (r : R) (n d : โ„•) (h : IsNNRat r n d) (res : โ„•) (hres : n / d = res) :
theorem Mathlib.Meta.NormNum.IsRat.natFloor {R : Type u_3} [Field R] [LinearOrder R] [IsStrictOrderedRing R] [FloorSemiring R] (r : R) (n d : โ„•) (h : IsRat r (Int.negOfNat n) d) :