The areas / V06. Rings, fields and ordered algebra
Mathlib.Algebra.Order.Floor.Ring
178 declarations. Mathlib docs · Source
Lemmas on Int.floor, Int.ceil and Int.fract
This file contains basic results on the integer-valued floor and ceiling functions, as well as the fractional part operator.
TODO
LinearOrder can be relaxed to PartialOrder in many lemmas.
Tags
rounding, floor, ceil
Floor rings
Floor
Fractional part
Ceil
Intervals
A floor ring as a floor semiring
theorem Mathlib.Meta.Positivity.int_floor_nonneg E1 #
∀ {α : Type u_1} [inst : Ring α] [inst_1 : LinearOrder α] [inst_2 : FloorRing α] {a : α}, 0 ≤ a → 0 ≤ ⌊a⌋
theorem Mathlib.Meta.Positivity.int_floor_nonneg_of_pos E1 #
∀ {α : Type u_1} [inst : Ring α] [inst_1 : LinearOrder α] [inst_2 : FloorRing α] {a : α}, 0 < a → 0 ≤ ⌊a⌋
def Mathlib.Meta.Positivity.evalIntFloor E1 #
Mathlib.Meta.Positivity.PositivityExt
Extension for the positivity tactic: Int.floor is nonnegative if its input is.
theorem Mathlib.Meta.Positivity.nat_ceil_pos E1 #
∀ {α : Type u_1} [inst : Semiring α] [inst_1 : LinearOrder α] [inst_2 : FloorSemiring α] {a : α}, 0 < a → 0 < ⌈a⌉₊
def Mathlib.Meta.Positivity.evalNatCeil E1 #
Mathlib.Meta.Positivity.PositivityExt
Extension for the positivity tactic: Nat.ceil is positive if its input is.
theorem Mathlib.Meta.Positivity.int_ceil_pos E1 #
∀ {α : Type u_1} [inst : Ring α] [inst_1 : LinearOrder α] [inst_2 : FloorRing α] {a : α}, 0 < a → 0 < ⌈a⌉
def Mathlib.Meta.Positivity.evalIntCeil E1 #
Mathlib.Meta.Positivity.PositivityExt
Extension for the positivity tactic: Int.ceil is positive/nonnegative if its input is.
theorem Int.floor_le_neg_one_iff E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R}, ⌊a⌋ ≤ -1 ↔ a < 0
theorem Int.lt_succ_floor E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (a : R), a < ↑⌊a⌋.succ
theorem Int.lt_floor_add_one E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (a : R), a < ↑⌊a⌋ + 1
theorem Int.floor_mono E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R], Monotone Int.floor
theorem Int.floor_le_floor E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a b : R}, a ≤ b → ⌊a⌋ ≤ ⌊b⌋
theorem Int.floor_pos E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R}, 0 < ⌊a⌋ ↔ 1 ≤ a
theorem Int.floor_eq_iff E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {z : ℤ} {a : R},
⌊a⌋ = z ↔ ↑z ≤ a ∧ a < ↑z + 1
theorem Int.floor_eq_zero_iff E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R}, ⌊a⌋ = 0 ↔ a ∈ Set.Ico 0 1
theorem Int.floor_eq_on_Ico E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (n : ℤ),
∀ a ∈ Set.Ico (↑n) (↑n + 1), ⌊a⌋ = n
theorem Int.floor_eq_on_Ico' E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (n : ℤ),
∀ a ∈ Set.Ico (↑n) (↑n + 1), ↑⌊a⌋ = ↑n
theorem Int.preimage_floor_singleton E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (m : ℤ),
Int.floor ⁻¹' {m} = Set.Ico (↑m) (↑m + 1)
theorem Int.floor_intCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (z : ℤ), ⌊↑z⌋ = z
theorem Int.floor_natCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (n : ℕ), ⌊↑n⌋ = ↑n
theorem Int.floor_zero E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R], ⌊0⌋ = 0
theorem Int.floor_one E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R], ⌊1⌋ = 1
theorem Int.floor_ofNat E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (n : ℕ) [inst_3 : n.AtLeastTwo],
⌊OfNat.ofNat n⌋ = OfNat.ofNat n
theorem Int.floor_eq_self_iff_mem E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (a : R),
↑⌊a⌋ = a ↔ a ∈ Set.range Int.cast
theorem Int.floor_lt_self_iff E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R},
↑⌊a⌋ < a ↔ a ∉ Set.range Int.cast
theorem Int.sub_one_lt_floor E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R),
a - 1 < ↑⌊a⌋
theorem Int.floor_add_intCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (z : ℤ),
⌊a + ↑z⌋ = ⌊a⌋ + z
theorem Int.floor_add_one E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R),
⌊a + 1⌋ = ⌊a⌋ + 1
theorem Int.le_floor_add E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a b : R),
⌊a⌋ + ⌊b⌋ ≤ ⌊a + b⌋
theorem Int.le_floor_add_floor E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a b : R),
⌊a + b⌋ - 1 ≤ ⌊a⌋ + ⌊b⌋
theorem Int.floor_intCast_add E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (z : ℤ) (a : R),
⌊↑z + a⌋ = z + ⌊a⌋
theorem Int.floor_add_natCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (n : ℕ),
⌊a + ↑n⌋ = ⌊a⌋ + ↑n
theorem Int.floor_add_ofNat E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (n : ℕ)
[inst_4 : n.AtLeastTwo], ⌊a + OfNat.ofNat n⌋ = ⌊a⌋ + OfNat.ofNat n
theorem Int.floor_natCast_add E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (n : ℕ) (a : R),
⌊↑n + a⌋ = ↑n + ⌊a⌋
theorem Int.floor_ofNat_add E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (n : ℕ)
[inst_4 : n.AtLeastTwo] (a : R), ⌊OfNat.ofNat n + a⌋ = OfNat.ofNat n + ⌊a⌋
theorem Int.floor_sub_intCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (z : ℤ),
⌊a - ↑z⌋ = ⌊a⌋ - z
theorem Int.floor_sub_natCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (n : ℕ),
⌊a - ↑n⌋ = ⌊a⌋ - ↑n
theorem Int.floor_sub_one E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R),
⌊a - 1⌋ = ⌊a⌋ - 1
theorem Int.floor_sub_ofNat E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (n : ℕ)
[inst_4 : n.AtLeastTwo], ⌊a - OfNat.ofNat n⌋ = ⌊a⌋ - OfNat.ofNat n
theorem Int.abs_sub_lt_one_of_floor_eq_floor E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] {a b : R},
⌊a⌋ = ⌊b⌋ → |a - b| < 1
theorem Int.mul_cast_floor_div_cancel_of_pos E1 #
∀ {R : Type u_4} [inst : Ring R] [inst_1 : LinearOrder R] [IsOrderedAddMonoid R] [inst_3 : FloorRing R] {n : ℤ},
0 < n → ∀ (a : R), ⌊a * ↑n⌋ / n = ⌊a⌋
theorem Int.mul_natCast_floor_div_cancel E1 #
∀ {R : Type u_4} [inst : Ring R] [inst_1 : LinearOrder R] [IsOrderedAddMonoid R] [inst_3 : FloorRing R] {n : ℕ},
n ≠ 0 → ∀ (a : R), ⌊a * ↑n⌋ / ↑n = ⌊a⌋
theorem Int.cast_mul_floor_div_cancel_of_pos E1 #
∀ {R : Type u_4} [inst : Ring R] [inst_1 : LinearOrder R] [IsOrderedAddMonoid R] [inst_3 : FloorRing R] {n : ℤ},
0 < n → ∀ (a : R), ⌊↑n * a⌋ / n = ⌊a⌋
theorem Int.natCast_mul_floor_div_cancel E1 #
∀ {R : Type u_4} [inst : Ring R] [inst_1 : LinearOrder R] [IsOrderedAddMonoid R] [inst_3 : FloorRing R] {n : ℕ},
n ≠ 0 → ∀ (a : R), ⌊↑n * a⌋ / ↑n = ⌊a⌋
theorem Int.mul_fract_eq_one_iff_exists_int E1 #
∀ {R : Type u_5} [inst : Ring R] [inst_1 : LinearOrder R] [IsOrderedRing R] [inst_3 : FloorRing R] {x k : R},
1 < k → (k * Int.fract x = 1 ↔ ∃ n, k * x = k * ↑n + 1)
theorem Int.floor_div_cast_of_nonneg E1 #
∀ {k : Type u_4} [inst : Field k] [inst_1 : LinearOrder k] [IsOrderedRing k] [inst_3 : FloorRing k] {n : ℤ},
0 ≤ n → ∀ (a : k), ⌊a / ↑n⌋ = ⌊a⌋ / n
theorem Int.floor_div_natCast E1 #
∀ {k : Type u_4} [inst : Field k] [inst_1 : LinearOrder k] [IsOrderedRing k] [inst_3 : FloorRing k] (a : k) (n : ℕ),
⌊a / ↑n⌋ = ⌊a⌋ / ↑n
theorem Int.self_sub_floor E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (a : R), a - ↑⌊a⌋ = Int.fract a
theorem Int.floor_add_fract E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (a : R), ↑⌊a⌋ + Int.fract a = a
theorem Int.fract_add_floor E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (a : R), Int.fract a + ↑⌊a⌋ = a
theorem Int.self_sub_fract E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (a : R), a - Int.fract a = ↑⌊a⌋
theorem Int.fract_sub_self E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (a : R), Int.fract a - a = -↑⌊a⌋
theorem Int.fract_add E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (a b : R),
∃ z, Int.fract (a + b) - Int.fract a - Int.fract b = ↑z
theorem Int.fract_zero E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R], Int.fract 0 = 0
theorem Int.fract_one E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R], Int.fract 1 = 0
theorem Int.fract_intCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (z : ℤ), Int.fract ↑z = 0
theorem Int.fract_natCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (n : ℕ), Int.fract ↑n = 0
theorem Int.fract_ofNat E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (n : ℕ) [inst_3 : n.AtLeastTwo],
Int.fract (OfNat.ofNat n) = 0
theorem Int.fract_floor E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (a : R), Int.fract ↑⌊a⌋ = 0
theorem Int.fract_eq_self E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R},
Int.fract a = a ↔ 0 ≤ a ∧ a < 1
theorem Int.fract_eq_zero_iff E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R},
Int.fract a = 0 ↔ a ∈ Set.range Int.cast
theorem Int.fract_ne_zero_iff E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R},
Int.fract a ≠ 0 ↔ a ∉ Set.range Int.cast
theorem Int.fract_neg_eq_zero E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {x : R},
Int.fract (-x) = 0 ↔ Int.fract x = 0
theorem Int.fract_mul_natCast E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (a : R) (b : ℕ),
∃ z, Int.fract a * ↑b - Int.fract (a * ↑b) = ↑z
theorem Int.fract_add_intCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (m : ℤ),
Int.fract (a + ↑m) = Int.fract a
theorem Int.fract_add_natCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (m : ℕ),
Int.fract (a + ↑m) = Int.fract a
theorem Int.fract_add_one E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R),
Int.fract (a + 1) = Int.fract a
theorem Int.fract_add_ofNat E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (n : ℕ)
[inst_4 : n.AtLeastTwo], Int.fract (a + OfNat.ofNat n) = Int.fract a
theorem Int.fract_intCast_add E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (m : ℤ) (a : R),
Int.fract (↑m + a) = Int.fract a
theorem Int.fract_natCast_add E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (n : ℕ) (a : R),
Int.fract (↑n + a) = Int.fract a
theorem Int.fract_one_add E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R),
Int.fract (1 + a) = Int.fract a
theorem Int.fract_ofNat_add E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (n : ℕ)
[inst_4 : n.AtLeastTwo] (a : R), Int.fract (OfNat.ofNat n + a) = Int.fract a
theorem Int.fract_sub_intCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (m : ℤ),
Int.fract (a - ↑m) = Int.fract a
theorem Int.fract_sub_natCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (n : ℕ),
Int.fract (a - ↑n) = Int.fract a
theorem Int.fract_sub_one E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R),
Int.fract (a - 1) = Int.fract a
theorem Int.fract_sub_ofNat E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (n : ℕ)
[inst_4 : n.AtLeastTwo], Int.fract (a - OfNat.ofNat n) = Int.fract a
theorem Int.fract_add_le E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a b : R),
Int.fract (a + b) ≤ Int.fract a + Int.fract b
theorem Int.fract_add_fract_le E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a b : R),
Int.fract a + Int.fract b ≤ Int.fract (a + b) + 1
theorem Int.fract_nonneg E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R),
0 ≤ Int.fract a
theorem Int.fract_pos E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R} [IsOrderedAddMonoid R],
0 < Int.fract a ↔ a ≠ ↑⌊a⌋
The fractional part of a is positive if and only if a ≠ ⌊a⌋.
theorem Int.fract_lt_one E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R),
Int.fract a < 1
theorem Int.floor_add_eq E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a b : R),
⌊a + b⌋ = ⌊a⌋ + ⌊b⌋ + ⌊Int.fract a + Int.fract b⌋
Decomposition of the floor of a sum: ⌊a + b⌋ = ⌊a⌋ + ⌊b⌋ + ⌊fract a + fract b⌋.
theorem Int.floor_add_eq_add_iff E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a b : R} [IsOrderedAddMonoid R],
⌊a + b⌋ = ⌊a⌋ + ⌊b⌋ ↔ Int.fract a + Int.fract b < 1
The floors add exactly when the fractional parts sum to less than one.
theorem Int.floor_add_eq_add_add_one_iff E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a b : R} [IsOrderedAddMonoid R],
⌊a + b⌋ = ⌊a⌋ + ⌊b⌋ + 1 ↔ 1 ≤ Int.fract a + Int.fract b
The floor of a sum overshoots by one exactly when the fractional parts sum to at least one.
theorem Int.floor_add_eq_or E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a b : R),
⌊a + b⌋ = ⌊a⌋ + ⌊b⌋ ∨ ⌊a + b⌋ = ⌊a⌋ + ⌊b⌋ + 1
Floor-additivity dichotomy: ⌊a + b⌋ is either ⌊a⌋ + ⌊b⌋ or ⌊a⌋ + ⌊b⌋ + 1.
theorem Int.abs_fract E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R} [IsOrderedAddMonoid R],
|Int.fract a| = Int.fract a
theorem Int.abs_one_sub_fract E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R} [IsOrderedAddMonoid R],
|1 - Int.fract a| = 1 - Int.fract a
theorem Int.floor_fract E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R),
⌊Int.fract a⌋ = 0
theorem Int.fract_eq_iff E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] {a b : R},
Int.fract a = b ↔ 0 ≤ b ∧ b < 1 ∧ ∃ z, a - b = ↑z
theorem Int.fract_eq_fract E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] {a b : R},
Int.fract a = Int.fract b ↔ ∃ z, a - b = ↑z
theorem Int.fract_fract E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R),
Int.fract (Int.fract a) = Int.fract a
theorem Int.fract_fract_add E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a b : R),
Int.fract (Int.fract a + b) = Int.fract (a + b)
theorem Int.fract_add_fract E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a b : R),
Int.fract (a + Int.fract b) = Int.fract (a + b)
theorem Int.fract_fract_sub E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a b : R),
Int.fract (Int.fract a - b) = Int.fract (a - b)
theorem Int.fract_sub_fract E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a b : R),
Int.fract (a - Int.fract b) = Int.fract (a - b)
theorem Int.fract_fract_add_fract E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a b : R),
Int.fract (Int.fract a + Int.fract b) = Int.fract (a + b)
theorem Int.fract_fract_sub_fract E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a b : R),
Int.fract (Int.fract a - Int.fract b) = Int.fract (a - b)
theorem Int.fract_add_eq E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a b : R),
Int.fract (a + b) = Int.fract a + Int.fract b - ↑⌊Int.fract a + Int.fract b⌋
Decomposition of the fractional part of a sum:
fract (a + b) = fract a + fract b - ⌊fract a + fract b⌋.
theorem Int.fract_add_eq_add_iff E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a b : R} [IsOrderedAddMonoid R],
Int.fract (a + b) = Int.fract a + Int.fract b ↔ Int.fract a + Int.fract b < 1
The fractional parts add exactly when they sum to less than one.
theorem Int.fract_add_eq_add_sub_one_iff E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a b : R} [IsOrderedAddMonoid R],
Int.fract (a + b) = Int.fract a + Int.fract b - 1 ↔ 1 ≤ Int.fract a + Int.fract b
The fractional part of a sum drops by one exactly when the fractional parts sum to at least one.
theorem Int.fract_add_eq_or E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a b : R),
Int.fract (a + b) = Int.fract a + Int.fract b ∨ Int.fract (a + b) = Int.fract a + Int.fract b - 1
Fractional-part dichotomy: fract (a + b) is either fract a + fract b
or fract a + fract b - 1.
theorem Int.fract_neg E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] {x : R},
Int.fract x ≠ 0 → Int.fract (-x) = 1 - Int.fract x
theorem Int.preimage_fract E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (s : Set R),
Int.fract ⁻¹' s = ⋃ m, (fun x ↦ x - ↑m) ⁻¹' (s ∩ Set.Ico 0 1)
theorem Int.image_fract E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (s : Set R),
Int.fract '' s = ⋃ m, (fun x ↦ x - ↑m) '' s ∩ Set.Ico 0 1
theorem Int.fract_div_mul_self_mem_Ico E1 #
∀ {k : Type u_4} [inst : Field k] [inst_1 : LinearOrder k] [IsOrderedRing k] [inst_3 : FloorRing k] (a b : k),
0 < a → Int.fract (b / a) * a ∈ Set.Ico 0 a
theorem Int.fract_div_mul_self_add_zsmul_eq E0 #
∀ {k : Type u_4} [inst : Field k] [inst_1 : LinearOrder k] [inst_2 : FloorRing k] (a b : k),
a ≠ 0 → Int.fract (b / a) * a + ⌊b / a⌋ • a = b
theorem Int.sub_floor_div_mul_nonneg E1 #
∀ {k : Type u_4} [inst : Field k] [inst_1 : LinearOrder k] [IsOrderedRing k] [inst_3 : FloorRing k] {b : k} (a : k),
0 < b → 0 ≤ a - ↑⌊a / b⌋ * b
theorem Int.sub_floor_div_mul_lt E1 #
∀ {k : Type u_4} [inst : Field k] [inst_1 : LinearOrder k] [IsOrderedRing k] [inst_3 : FloorRing k] {b : k} (a : k),
0 < b → a - ↑⌊a / b⌋ * b < b
theorem Int.fract_div_natCast_eq_div_natCast_mod E1 #
∀ {k : Type u_4} [inst : Field k] [inst_1 : LinearOrder k] [IsOrderedRing k] [inst_3 : FloorRing k] {m n : ℕ},
Int.fract (↑m / ↑n) = ↑(m % n) / ↑n
theorem Int.fract_div_intCast_eq_div_intCast_mod E1 #
∀ {k : Type u_4} [inst : Field k] [inst_1 : LinearOrder k] [IsOrderedRing k] [inst_3 : FloorRing k] {m : ℤ} {n : ℕ},
Int.fract (↑m / ↑n) = ↑(m % ↑n) / ↑n
theorem Int.one_le_ceil_iff E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R}, 1 ≤ ⌈a⌉ ↔ 0 < a
theorem Int.ceil_le_floor_add_one E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (a : R), ⌈a⌉ ≤ ⌊a⌋ + 1
theorem Int.ceil_mono E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R], Monotone Int.ceil
theorem Int.ceil_le_ceil E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a b : R}, a ≤ b → ⌈a⌉ ≤ ⌈b⌉
theorem Int.ceil_nonneg_of_neg_one_lt E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R}, -1 < a → 0 ≤ ⌈a⌉
theorem Int.ceil_eq_iff E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {z : ℤ} {a : R},
⌈a⌉ = z ↔ ↑z - 1 < a ∧ a ≤ ↑z
theorem Int.ceil_eq_zero_iff E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R}, ⌈a⌉ = 0 ↔ a ∈ Set.Ioc (-1) 0
theorem Int.ceil_eq_on_Ioc E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (z : ℤ),
∀ a ∈ Set.Ioc (↑z - 1) ↑z, ⌈a⌉ = z
theorem Int.preimage_ceil_singleton E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (m : ℤ),
Int.ceil ⁻¹' {m} = Set.Ioc (↑m - 1) ↑m
theorem Int.ceil_intCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (z : ℤ), ⌈↑z⌉ = z
theorem Int.ceil_natCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (n : ℕ), ⌈↑n⌉ = ↑n
theorem Int.ceil_ofNat E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (n : ℕ) [inst_3 : n.AtLeastTwo],
⌈OfNat.ofNat n⌉ = OfNat.ofNat n
theorem Int.ceil_zero E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R], ⌈0⌉ = 0
theorem Int.ceil_one E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R], ⌈1⌉ = 1
theorem Int.ceil_eq_on_Ioc' E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (z : ℤ),
∀ a ∈ Set.Ioc (↑z - 1) ↑z, ↑⌈a⌉ = ↑z
theorem Int.ceil_eq_self_iff_mem E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (a : R),
↑⌈a⌉ = a ↔ a ∈ Set.range Int.cast
theorem Int.floor_le_ceil E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (a : R), ⌊a⌋ ≤ ⌈a⌉
theorem Int.floor_lt_ceil_of_lt E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a b : R}, a < b → ⌊a⌋ < ⌈b⌉
theorem Int.ceil_eq_floor_add_one_iff_notMem E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (a : R),
⌈a⌉ = ⌊a⌋ + 1 ↔ a ∉ Set.range Int.cast
theorem Int.fract_eq_zero_or_add_one_sub_ceil E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] (a : R),
Int.fract a = 0 ∨ Int.fract a = a + 1 - ↑⌈a⌉
theorem Int.ceil_eq_add_one_sub_fract E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R},
Int.fract a ≠ 0 → ↑⌈a⌉ = a + 1 - Int.fract a
theorem Int.ceil_sub_self_eq E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R},
Int.fract a ≠ 0 → ↑⌈a⌉ - a = 1 - Int.fract a
theorem Int.floor_neg E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R} [IsOrderedAddMonoid R],
⌊-a⌋ = -⌈a⌉
theorem Int.ceil_neg E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R} [IsOrderedAddMonoid R],
⌈-a⌉ = -⌊a⌋
theorem Int.ceil_add_intCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (z : ℤ),
⌈a + ↑z⌉ = ⌈a⌉ + z
theorem Int.ceil_intCast_add E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (z : ℤ) (a : R),
⌈↑z + a⌉ = z + ⌈a⌉
theorem Int.ceil_add_natCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (n : ℕ),
⌈a + ↑n⌉ = ⌈a⌉ + ↑n
theorem Int.ceil_natCast_add E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (n : ℕ) (a : R),
⌈↑n + a⌉ = ↑n + ⌈a⌉
theorem Int.ceil_add_one E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R),
⌈a + 1⌉ = ⌈a⌉ + 1
theorem Int.ceil_one_add E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R),
⌈1 + a⌉ = 1 + ⌈a⌉
theorem Int.ceil_add_ofNat E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (n : ℕ)
[inst_4 : n.AtLeastTwo], ⌈a + OfNat.ofNat n⌉ = ⌈a⌉ + OfNat.ofNat n
theorem Int.ceil_ofNat_add E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (n : ℕ)
[inst_4 : n.AtLeastTwo] (a : R), ⌈OfNat.ofNat n + a⌉ = OfNat.ofNat n + ⌈a⌉
theorem Int.ceil_sub_intCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (z : ℤ),
⌈a - ↑z⌉ = ⌈a⌉ - z
theorem Int.ceil_sub_natCast E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (n : ℕ),
⌈a - ↑n⌉ = ⌈a⌉ - ↑n
theorem Int.ceil_sub_one E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R),
⌈a - 1⌉ = ⌈a⌉ - 1
theorem Int.ceil_sub_ofNat E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R) (n : ℕ)
[inst_4 : n.AtLeastTwo], ⌈a - OfNat.ofNat n⌉ = ⌈a⌉ - OfNat.ofNat n
theorem Int.ceil_lt_add_one E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a : R),
↑⌈a⌉ < a + 1
theorem Int.ceil_add_le E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a b : R),
⌈a + b⌉ ≤ ⌈a⌉ + ⌈b⌉
theorem Int.ceil_add_ceil_le E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] (a b : R),
⌈a⌉ + ⌈b⌉ ≤ ⌈a + b⌉ + 1
theorem Int.mul_lt_floor E1 #
∀ {k : Type u_4} [inst : Field k] [inst_1 : LinearOrder k] [IsOrderedRing k] [inst_3 : FloorRing k] {a b : k},
0 < b → b < 1 → ↑⌈b / (1 - b)⌉ ≤ a → b * a < ↑⌊a⌋
theorem Int.ceil_div_ceil_inv_sub_one E1 #
∀ {k : Type u_4} [inst : Field k] [inst_1 : LinearOrder k] [IsOrderedRing k] [inst_3 : FloorRing k] {a : k},
1 ≤ a → ⌈↑⌈(a - 1)⁻¹⌉ / a⌉ = ⌈(a - 1)⁻¹⌉
theorem Int.ceil_lt_mul E1 #
∀ {k : Type u_4} [inst : Field k] [inst_1 : LinearOrder k] [IsOrderedRing k] [inst_3 : FloorRing k] {a b : k},
1 < b → ↑⌈(b - 1)⁻¹⌉ / b < a → ↑⌈a⌉ < b * a
theorem Int.ceil_le_mul E1 #
∀ {k : Type u_4} [inst : Field k] [inst_1 : LinearOrder k] [IsOrderedRing k] [inst_3 : FloorRing k] {a b : k},
1 < b → ↑⌈(b - 1)⁻¹⌉ / b ≤ a → ↑⌈a⌉ ≤ b * a
theorem Int.div_two_lt_floor E1 #
∀ {k : Type u_4} [inst : Field k] [inst_1 : LinearOrder k] [IsOrderedRing k] [inst_3 : FloorRing k] {a : k},
1 ≤ a → a / 2 < ↑⌊a⌋
theorem Int.ceil_lt_two_mul E1 #
∀ {k : Type u_4} [inst : Field k] [inst_1 : LinearOrder k] [IsOrderedRing k] [inst_3 : FloorRing k] {a : k},
2⁻¹ < a → ↑⌈a⌉ < 2 * a
theorem Int.ceil_le_two_mul E1 #
∀ {k : Type u_4} [inst : Field k] [inst_1 : LinearOrder k] [IsOrderedRing k] [inst_3 : FloorRing k] {a : k},
2⁻¹ ≤ a → ↑⌈a⌉ ≤ 2 * a
theorem Int.preimage_Ioo E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a b : R},
Int.cast ⁻¹' Set.Ioo a b = Set.Ioo ⌊a⌋ ⌈b⌉
theorem Int.preimage_Ico E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a b : R},
Int.cast ⁻¹' Set.Ico a b = Set.Ico ⌈a⌉ ⌈b⌉
theorem Int.preimage_Ioc E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a b : R},
Int.cast ⁻¹' Set.Ioc a b = Set.Ioc ⌊a⌋ ⌊b⌋
theorem Int.preimage_Icc E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a b : R},
Int.cast ⁻¹' Set.Icc a b = Set.Icc ⌈a⌉ ⌊b⌋
theorem Int.preimage_Ioi E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R},
Int.cast ⁻¹' Set.Ioi a = Set.Ioi ⌊a⌋
theorem Int.preimage_Ici E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R},
Int.cast ⁻¹' Set.Ici a = Set.Ici ⌈a⌉
theorem Int.preimage_Iio E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R},
Int.cast ⁻¹' Set.Iio a = Set.Iio ⌈a⌉
theorem Int.preimage_Iic E0 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R},
Int.cast ⁻¹' Set.Iic a = Set.Iic ⌊a⌋
theorem Int.floor_congr E1 #
∀ {R : Type u_2} {S : Type u_3} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : Ring S] [inst_3 : LinearOrder S]
[inst_4 : FloorRing R] [inst_5 : FloorRing S] {a : R} {b : S}, (∀ (n : ℤ), ↑n ≤ a ↔ ↑n ≤ b) → ⌊a⌋ = ⌊b⌋
theorem Int.ceil_congr E1 #
∀ {R : Type u_2} {S : Type u_3} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : Ring S] [inst_3 : LinearOrder S]
[inst_4 : FloorRing R] [inst_5 : FloorRing S] {a : R} {b : S}, (∀ (n : ℤ), a ≤ ↑n ↔ b ≤ ↑n) → ⌈a⌉ = ⌈b⌉
theorem Int.map_floor E0 #
∀ {F : Type u_1} {R : Type u_2} {S : Type u_3} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : Ring S]
[inst_3 : LinearOrder S] [inst_4 : FloorRing R] [inst_5 : FloorRing S] [inst_6 : FunLike F R S] [RingHomClass F R S]
(f : F), StrictMono ⇑f → ∀ (a : R), ⌊f a⌋ = ⌊a⌋
theorem Int.map_ceil E0 #
∀ {F : Type u_1} {R : Type u_2} {S : Type u_3} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : Ring S]
[inst_3 : LinearOrder S] [inst_4 : FloorRing R] [inst_5 : FloorRing S] [inst_6 : FunLike F R S] [RingHomClass F R S]
(f : F), StrictMono ⇑f → ∀ (a : R), ⌈f a⌉ = ⌈a⌉
theorem Int.map_fract E0 #
∀ {F : Type u_1} {R : Type u_2} {S : Type u_3} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : Ring S]
[inst_3 : LinearOrder S] [inst_4 : FloorRing R] [inst_5 : FloorRing S] [inst_6 : FunLike F R S] [RingHomClass F R S]
(f : F), StrictMono ⇑f → ∀ (a : R), Int.fract (f a) = f (Int.fract a)
theorem Nat.ceil_lt_add_one_of_gt_neg_one E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] [IsOrderedAddMonoid R] {a : R},
-1 < a → ↑⌈a⌉₊ < a + 1
a variant of Nat.ceil_lt_add_one with its condition 0 ≤ a generalized to -1 < a
theorem Int.natCast_floor_eq_floor E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R}, 0 ≤ a → ↑⌊a⌋₊ = ⌊a⌋
theorem Int.natCast_ceil_eq_ceil E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R}, 0 ≤ a → ↑⌈a⌉₊ = ⌈a⌉
theorem Int.natCast_ceil_eq_ceil_of_neg_one_lt E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R}, -1 < a → ↑⌈a⌉₊ = ⌈a⌉
theorem natCast_floor_eq_intCast_floor E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R}, 0 ≤ a → ↑⌊a⌋₊ = ↑⌊a⌋
theorem natCast_ceil_eq_intCast_ceil E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R}, 0 ≤ a → ↑⌈a⌉₊ = ↑⌈a⌉
theorem natCast_ceil_eq_intCast_ceil_of_neg_one_lt E1 #
∀ {R : Type u_2} [inst : Ring R] [inst_1 : LinearOrder R] [inst_2 : FloorRing R] {a : R}, -1 < a → ↑⌈a⌉₊ = ↑⌈a⌉
theorem subsingleton_floorRing E1 #
∀ {R : Type u_4} [inst : Ring R] [inst_1 : LinearOrder R], Subsingleton (FloorRing R)
There exists at most one FloorRing structure on a given linear ordered ring.
def Mathlib.Meta.Positivity.evalIntFract E1 #
Mathlib.Meta.Positivity.PositivityExt
Extension for the positivity tactic: Int.fract is always nonnegative.