The areas / V06. Rings, fields and ordered algebra
Mathlib.Algebra.Order.Floor.Semifield
14 declarations. Mathlib docs · Source
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
norm_num extension for Nat.floor
theorem Nat.floor_div_natCast E1 #
∀ {K : Type u_2} [inst : Semifield K] [inst_1 : LinearOrder K] [IsStrictOrderedRing K] [inst_3 : FloorSemiring K]
(a : K) (n : ℕ), ⌊a / ↑n⌋₊ = ⌊a⌋₊ / n
theorem Nat.floor_div_ofNat E1 #
∀ {K : Type u_2} [inst : Semifield K] [inst_1 : LinearOrder K] [IsStrictOrderedRing K] [inst_3 : FloorSemiring K]
(a : K) (n : ℕ) [inst_4 : n.AtLeastTwo], ⌊a / OfNat.ofNat n⌋₊ = ⌊a⌋₊ / OfNat.ofNat n
theorem Nat.floor_div_eq_div E1 #
∀ {K : Type u_2} [inst : Semifield K] [inst_1 : LinearOrder K] [IsStrictOrderedRing K] [inst_3 : FloorSemiring K]
(m n : ℕ), ⌊↑m / ↑n⌋₊ = m / n
Natural division is the floor of field division.
theorem Nat.mul_lt_floor E1 #
∀ {K : Type u_2} [inst : Field K] [inst_1 : LinearOrder K] [IsOrderedRing K] [inst_3 : FloorSemiring K] {a b : K},
0 < b → b < 1 → ↑⌈b / (1 - b)⌉₊ ≤ a → b * a < ↑⌊a⌋₊
theorem Nat.ceil_lt_mul E1 #
∀ {K : Type u_2} [inst : Field K] [inst_1 : LinearOrder K] [IsOrderedRing K] [inst_3 : FloorSemiring K] {a b : K},
1 < b → ↑⌈(b - 1)⁻¹⌉₊ / b < a → ↑⌈a⌉₊ < b * a
theorem Nat.ceil_le_mul E1 #
∀ {K : Type u_2} [inst : Field K] [inst_1 : LinearOrder K] [IsOrderedRing K] [inst_3 : FloorSemiring K] {a b : K},
1 < b → ↑⌈(b - 1)⁻¹⌉₊ / b ≤ a → ↑⌈a⌉₊ ≤ b * a
theorem Nat.div_two_lt_floor E1 #
∀ {K : Type u_2} [inst : Field K] [inst_1 : LinearOrder K] [IsOrderedRing K] [inst_3 : FloorSemiring K] {a : K},
1 ≤ a → a / 2 < ↑⌊a⌋₊
theorem Nat.ceil_lt_two_mul E1 #
∀ {K : Type u_2} [inst : Field K] [inst_1 : LinearOrder K] [IsOrderedRing K] [inst_3 : FloorSemiring K] {a : K},
2⁻¹ < a → ↑⌈a⌉₊ < 2 * a
theorem Nat.ceil_le_two_mul E1 #
∀ {K : Type u_2} [inst : Field K] [inst_1 : LinearOrder K] [IsOrderedRing K] [inst_3 : FloorSemiring K] {a : K},
2⁻¹ ≤ a → ↑⌈a⌉₊ ≤ 2 * a
theorem Mathlib.Meta.NormNum.IsNat.natFloor E1 #
∀ {R : Type u_3} [inst : Semiring R] [inst_1 : LinearOrder R] [inst_2 : FloorSemiring R] (r : R) (m : ℕ),
Mathlib.Meta.NormNum.IsNat r m → Mathlib.Meta.NormNum.IsNat ⌊r⌋₊ m
theorem Mathlib.Meta.NormNum.IsInt.natFloor E1 #
∀ {R : Type u_3} [inst : Ring R] [inst_1 : LinearOrder R] [IsStrictOrderedRing R] [inst_3 : FloorSemiring R] (r : R)
(m : ℕ), Mathlib.Meta.NormNum.IsInt r (Int.negOfNat m) → Mathlib.Meta.NormNum.IsNat ⌊r⌋₊ 0
theorem Mathlib.Meta.NormNum.IsNNRat.natFloor E1 #
∀ {R : Type u_3} [inst : Semifield R] [inst_1 : LinearOrder R] [IsStrictOrderedRing R] [inst_3 : FloorSemiring R]
(r : R) (n d : ℕ), Mathlib.Meta.NormNum.IsNNRat r n d → ∀ (res : ℕ), n / d = res → Mathlib.Meta.NormNum.IsNat ⌊r⌋₊ res
theorem Mathlib.Meta.NormNum.IsRat.natFloor E1 #
∀ {R : Type u_3} [inst : Field R] [inst_1 : LinearOrder R] [IsStrictOrderedRing R] [inst_3 : FloorSemiring R] (r : R)
(n d : ℕ), Mathlib.Meta.NormNum.IsRat r (Int.negOfNat n) d → Mathlib.Meta.NormNum.IsNat ⌊r⌋₊ 0
def Mathlib.Meta.NormNum.evalNatFloor E1 #
Mathlib.Meta.NormNum.NormNumExt
norm_num extension for Nat.floor