Documentation

Mathlib.Algebra.Order.Floor.Ring

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 #

LinearOrderedRing can be relaxed to OrderedRing in many lemmas.

Tags #

rounding, floor, ceil

Floor rings #

Floor #

theorem Int.floor_le_iff {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {z : } {a : α} :
a z a < z + 1
theorem Int.lt_floor_iff {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {z : } {a : α} :
z < a z + 1 a
@[simp]
theorem Int.floor_le_sub_one_iff {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {z : } {a : α} :
a z - 1 a < z
@[simp]
theorem Int.floor_le_neg_one_iff {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} :
a -1 a < 0
theorem Int.lt_succ_floor {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
a < a.succ
@[simp]
theorem Int.lt_floor_add_one {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
a < a + 1
@[simp]
theorem Int.sub_one_lt_floor {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
a - 1 < a
@[simp]
theorem Int.floor_intCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (z : ) :
z = z
@[simp]
theorem Int.floor_natCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (n : ) :
n = n
@[simp]
theorem Int.floor_zero {α : Type u_2} [LinearOrderedRing α] [FloorRing α] :
@[simp]
theorem Int.floor_one {α : Type u_2} [LinearOrderedRing α] [FloorRing α] :
theorem Int.floor_le_floor {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a b : α} (hab : a b) :
theorem Int.floor_pos {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} :
0 < a 1 a
@[simp]
theorem Int.floor_add_intCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (z : ) :
a + z = a + z
@[deprecated Int.floor_add_intCast (since := "2025-04-01")]
theorem Int.floor_add_int {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (z : ) :
a + z = a + z

Alias of Int.floor_add_intCast.

@[simp]
theorem Int.floor_add_one {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
a + 1 = a + 1
theorem Int.le_floor_add {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a b : α) :
theorem Int.le_floor_add_floor {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a b : α) :
@[simp]
theorem Int.floor_intCast_add {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (z : ) (a : α) :
z + a = z + a
@[deprecated Int.floor_intCast_add (since := "2025-04-01")]
theorem Int.floor_int_add {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (z : ) (a : α) :
z + a = z + a

Alias of Int.floor_intCast_add.

@[simp]
theorem Int.floor_add_natCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (n : ) :
a + n = a + n
@[deprecated Int.floor_add_natCast (since := "2025-04-01")]
theorem Int.floor_add_nat {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (n : ) :
a + n = a + n

Alias of Int.floor_add_natCast.

@[simp]
theorem Int.floor_add_ofNat {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (n : ) [n.AtLeastTwo] :
@[simp]
theorem Int.floor_natCast_add {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (n : ) (a : α) :
n + a = n + a
@[deprecated Int.floor_natCast_add (since := "2025-04-01")]
theorem Int.floor_nat_add {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (n : ) (a : α) :
n + a = n + a

Alias of Int.floor_natCast_add.

@[simp]
theorem Int.floor_ofNat_add {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (n : ) [n.AtLeastTwo] (a : α) :
@[simp]
theorem Int.floor_sub_intCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (z : ) :
a - z = a - z
@[deprecated Int.floor_sub_intCast (since := "2025-04-01")]
theorem Int.floor_sub_int {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (z : ) :
a - z = a - z

Alias of Int.floor_sub_intCast.

@[simp]
theorem Int.floor_sub_natCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (n : ) :
a - n = a - n
@[deprecated Int.floor_sub_natCast (since := "2025-04-01")]
theorem Int.floor_sub_nat {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (n : ) :
a - n = a - n

Alias of Int.floor_sub_natCast.

@[simp]
theorem Int.floor_sub_one {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
a - 1 = a - 1
@[simp]
theorem Int.floor_sub_ofNat {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (n : ) [n.AtLeastTwo] :
theorem Int.abs_sub_lt_one_of_floor_eq_floor {α : Type u_4} [LinearOrderedCommRing α] [FloorRing α] {a b : α} (h : a = b) :
|a - b| < 1
theorem Int.floor_eq_iff {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {z : } {a : α} :
a = z z a a < z + 1
@[simp]
theorem Int.floor_eq_zero_iff {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} :
theorem Int.floor_eq_on_Ico {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (n : ) (a : α) :
a Set.Ico (↑n) (n + 1)a = n
theorem Int.floor_eq_on_Ico' {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (n : ) (a : α) :
a Set.Ico (↑n) (n + 1)a = n
@[simp]
theorem Int.preimage_floor_singleton {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (m : ) :
floor ⁻¹' {m} = Set.Ico (↑m) (m + 1)

Fractional part #

@[simp]
theorem Int.self_sub_floor {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
a - a = fract a
@[simp]
theorem Int.floor_add_fract {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
a + fract a = a
@[simp]
theorem Int.fract_add_floor {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
fract a + a = a
@[simp]
theorem Int.fract_add_intCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (m : ) :
fract (a + m) = fract a
@[deprecated Int.fract_add_intCast (since := "2025-04-01")]
theorem Int.fract_add_int {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (m : ) :
fract (a + m) = fract a

Alias of Int.fract_add_intCast.

@[simp]
theorem Int.fract_add_natCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (m : ) :
fract (a + m) = fract a
@[deprecated Int.fract_add_natCast (since := "2025-04-01")]
theorem Int.fract_add_nat {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (m : ) :
fract (a + m) = fract a

Alias of Int.fract_add_natCast.

@[simp]
theorem Int.fract_add_one {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
fract (a + 1) = fract a
@[simp]
theorem Int.fract_add_ofNat {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (n : ) [n.AtLeastTwo] :
@[simp]
theorem Int.fract_intCast_add {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (m : ) (a : α) :
fract (m + a) = fract a
@[deprecated Int.fract_intCast_add (since := "2025-04-01")]
theorem Int.fract_int_add {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (m : ) (a : α) :
fract (m + a) = fract a

Alias of Int.fract_intCast_add.

@[simp]
theorem Int.fract_natCast_add {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (n : ) (a : α) :
fract (n + a) = fract a
@[deprecated Int.fract_natCast_add (since := "2025-04-01")]
theorem Int.fract_nat_add {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (n : ) (a : α) :
fract (n + a) = fract a

Alias of Int.fract_natCast_add.

@[simp]
theorem Int.fract_one_add {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
fract (1 + a) = fract a
@[simp]
theorem Int.fract_ofNat_add {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (n : ) [n.AtLeastTwo] (a : α) :
@[simp]
theorem Int.fract_sub_intCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (m : ) :
fract (a - m) = fract a
@[deprecated Int.fract_sub_intCast (since := "2025-04-01")]
theorem Int.fract_sub_int {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (m : ) :
fract (a - m) = fract a

Alias of Int.fract_sub_intCast.

@[simp]
theorem Int.fract_sub_natCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (n : ) :
fract (a - n) = fract a
@[deprecated Int.fract_sub_natCast (since := "2025-04-01")]
theorem Int.fract_sub_nat {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (n : ) :
fract (a - n) = fract a

Alias of Int.fract_sub_natCast.

@[simp]
theorem Int.fract_sub_one {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
fract (a - 1) = fract a
@[simp]
theorem Int.fract_sub_ofNat {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (n : ) [n.AtLeastTwo] :
theorem Int.fract_add_le {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a b : α) :
fract (a + b) fract a + fract b
theorem Int.fract_add_fract_le {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a b : α) :
fract a + fract b fract (a + b) + 1
@[simp]
theorem Int.self_sub_fract {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
a - fract a = a
@[simp]
theorem Int.fract_sub_self {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
fract a - a = -a
@[simp]
theorem Int.fract_nonneg {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
theorem Int.fract_pos {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} :
0 < fract a a a

The fractional part of a is positive if and only if a ≠ ⌊a⌋.

theorem Int.fract_lt_one {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
fract a < 1
@[simp]
theorem Int.fract_zero {α : Type u_2} [LinearOrderedRing α] [FloorRing α] :
fract 0 = 0
@[simp]
theorem Int.fract_one {α : Type u_2} [LinearOrderedRing α] [FloorRing α] :
fract 1 = 0
theorem Int.abs_fract {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} :
@[simp]
theorem Int.abs_one_sub_fract {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} :
|1 - fract a| = 1 - fract a
@[simp]
theorem Int.fract_intCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (z : ) :
fract z = 0
@[simp]
theorem Int.fract_natCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (n : ) :
fract n = 0
@[simp]
theorem Int.fract_ofNat {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (n : ) [n.AtLeastTwo] :
theorem Int.fract_floor {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
fract a = 0
@[simp]
theorem Int.floor_fract {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
theorem Int.fract_eq_iff {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a b : α} :
fract a = b 0 b b < 1 ∃ (z : ), a - b = z
theorem Int.fract_eq_fract {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a b : α} :
fract a = fract b ∃ (z : ), a - b = z
@[simp]
theorem Int.fract_eq_self {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} :
fract a = a 0 a a < 1
@[simp]
theorem Int.fract_fract {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
theorem Int.fract_add {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a b : α) :
∃ (z : ), fract (a + b) - fract a - fract b = z
theorem Int.fract_neg {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {x : α} (hx : fract x 0) :
fract (-x) = 1 - fract x
@[simp]
theorem Int.fract_neg_eq_zero {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {x : α} :
fract (-x) = 0 fract x = 0
theorem Int.fract_mul_natCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (b : ) :
∃ (z : ), fract a * b - fract (a * b) = z
@[deprecated Int.fract_mul_natCast (since := "2025-04-01")]
theorem Int.fract_mul_nat {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (b : ) :
∃ (z : ), fract a * b - fract (a * b) = z

Alias of Int.fract_mul_natCast.

theorem Int.preimage_fract {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (s : Set α) :
fract ⁻¹' s = ⋃ (m : ), (fun (x : α) => x - m) ⁻¹' (s Set.Ico 0 1)
theorem Int.image_fract {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (s : Set α) :
fract '' s = ⋃ (m : ), (fun (x : α) => x - m) '' s Set.Ico 0 1
theorem Int.fract_div_mul_self_mem_Ico {k : Type u_4} [LinearOrderedField k] [FloorRing k] (a b : k) (ha : 0 < a) :
fract (b / a) * a Set.Ico 0 a
theorem Int.fract_div_mul_self_add_zsmul_eq {k : Type u_4} [LinearOrderedField k] [FloorRing k] (a b : k) (ha : a 0) :
fract (b / a) * a + b / a a = b
theorem Int.sub_floor_div_mul_nonneg {k : Type u_4} [LinearOrderedField k] [FloorRing k] {b : k} (a : k) (hb : 0 < b) :
0 a - a / b * b
theorem Int.sub_floor_div_mul_lt {k : Type u_4} [LinearOrderedField k] [FloorRing k] {b : k} (a : k) (hb : 0 < b) :
a - a / b * b < b
theorem Int.fract_div_natCast_eq_div_natCast_mod {k : Type u_4} [LinearOrderedField k] [FloorRing k] {m n : } :
fract (m / n) = ↑(m % n) / n
theorem Int.fract_div_intCast_eq_div_intCast_mod {k : Type u_4} [LinearOrderedField k] [FloorRing k] {m : } {n : } :
fract (m / n) = ↑(m % n) / n

Ceil #

theorem Int.floor_neg {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} :
theorem Int.ceil_neg {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} :
@[simp]
theorem Int.add_one_le_ceil_iff {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {z : } {a : α} :
z + 1 a z < a
@[simp]
theorem Int.one_le_ceil_iff {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} :
1 a 0 < a
theorem Int.le_ceil_iff {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {z : } {a : α} :
z a z - 1 < a
theorem Int.ceil_lt_iff {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {z : } {a : α} :
a < z a z - 1
@[simp]
theorem Int.ceil_intCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (z : ) :
z = z
@[simp]
theorem Int.ceil_natCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (n : ) :
n = n
theorem Int.ceil_le_ceil {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a b : α} (hab : a b) :
@[simp]
theorem Int.ceil_add_intCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (z : ) :
a + z = a + z
@[deprecated Int.ceil_add_intCast (since := "2025-04-01")]
theorem Int.ceil_add_int {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (z : ) :
a + z = a + z

Alias of Int.ceil_add_intCast.

@[simp]
theorem Int.ceil_add_natCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (n : ) :
a + n = a + n
@[deprecated Int.ceil_add_natCast (since := "2025-04-01")]
theorem Int.ceil_add_nat {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (n : ) :
a + n = a + n

Alias of Int.ceil_add_natCast.

@[simp]
theorem Int.ceil_add_one {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
a + 1 = a + 1
@[simp]
theorem Int.ceil_add_ofNat {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (n : ) [n.AtLeastTwo] :
@[simp]
theorem Int.ceil_sub_intCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (z : ) :
a - z = a - z
@[deprecated Int.ceil_sub_intCast (since := "2025-04-01")]
theorem Int.ceil_sub_int {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (z : ) :
a - z = a - z

Alias of Int.ceil_sub_intCast.

@[simp]
theorem Int.ceil_sub_natCast {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (n : ) :
a - n = a - n
@[deprecated Int.ceil_sub_natCast (since := "2025-04-01")]
theorem Int.ceil_sub_nat {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (n : ) :
a - n = a - n

Alias of Int.ceil_sub_natCast.

@[simp]
theorem Int.ceil_sub_one {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
a - 1 = a - 1
@[simp]
theorem Int.ceil_sub_ofNat {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) (n : ) [n.AtLeastTwo] :
theorem Int.ceil_lt_add_one {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
a < a + 1
theorem Int.ceil_add_le {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a b : α) :
theorem Int.ceil_add_ceil_le {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a b : α) :
@[simp]
theorem Int.ceil_zero {α : Type u_2} [LinearOrderedRing α] [FloorRing α] :
@[simp]
theorem Int.ceil_one {α : Type u_2} [LinearOrderedRing α] [FloorRing α] :
theorem Int.ceil_nonneg_of_neg_one_lt {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} (ha : -1 < a) :
theorem Int.ceil_eq_iff {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {z : } {a : α} :
a = z z - 1 < a a z
@[simp]
theorem Int.ceil_eq_zero_iff {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} :
a = 0 a Set.Ioc (-1) 0
theorem Int.ceil_eq_on_Ioc {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (z : ) (a : α) :
a Set.Ioc (z - 1) za = z
theorem Int.ceil_eq_on_Ioc' {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (z : ) (a : α) :
a Set.Ioc (z - 1) za = z
theorem Int.floor_le_ceil {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
theorem Int.floor_lt_ceil_of_lt {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a b : α} (h : a < b) :
@[simp]
theorem Int.preimage_ceil_singleton {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (m : ) :
ceil ⁻¹' {m} = Set.Ioc (m - 1) m
theorem Int.fract_eq_zero_or_add_one_sub_ceil {α : Type u_2} [LinearOrderedRing α] [FloorRing α] (a : α) :
fract a = 0 fract a = a + 1 - a
theorem Int.ceil_eq_add_one_sub_fract {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} (ha : fract a 0) :
a = a + 1 - fract a
theorem Int.ceil_sub_self_eq {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} (ha : fract a 0) :
a - a = 1 - fract a
theorem Int.mul_lt_floor {k : Type u_4} [LinearOrderedField k] [FloorRing k] {a b : k} (hb₀ : 0 < b) (hb : b < 1) (hba : b / (1 - b) a) :
b * a < a
theorem Int.ceil_div_ceil_inv_sub_one {k : Type u_4} [LinearOrderedField k] [FloorRing k] {a : k} (ha : 1 a) :
theorem Int.ceil_lt_mul {k : Type u_4} [LinearOrderedField k] [FloorRing k] {a b : k} (hb : 1 < b) (hba : (b - 1)⁻¹ / b < a) :
a < b * a
theorem Int.ceil_le_mul {k : Type u_4} [LinearOrderedField k] [FloorRing k] {a b : k} (hb : 1 < b) (hba : (b - 1)⁻¹ / b a) :
a b * a
theorem Int.div_two_lt_floor {k : Type u_4} [LinearOrderedField k] [FloorRing k] {a : k} (ha : 1 a) :
a / 2 < a
theorem Int.ceil_lt_two_mul {k : Type u_4} [LinearOrderedField k] [FloorRing k] {a : k} (ha : 2⁻¹ < a) :
a < 2 * a
theorem Int.ceil_le_two_mul {k : Type u_4} [LinearOrderedField k] [FloorRing k] {a : k} (ha : 2⁻¹ a) :
a 2 * a

Intervals #

@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem Int.floor_congr {α : Type u_2} {β : Type u_3} [LinearOrderedRing α] [LinearOrderedRing β] [FloorRing α] [FloorRing β] {a : α} {b : β} (h : ∀ (n : ), n a n b) :
theorem Int.ceil_congr {α : Type u_2} {β : Type u_3} [LinearOrderedRing α] [LinearOrderedRing β] [FloorRing α] [FloorRing β] {a : α} {b : β} (h : ∀ (n : ), a n b n) :
theorem Int.map_floor {F : Type u_1} {α : Type u_2} {β : Type u_3} [LinearOrderedRing α] [LinearOrderedRing β] [FloorRing α] [FloorRing β] [FunLike F α β] [RingHomClass F α β] (f : F) (hf : StrictMono f) (a : α) :
theorem Int.map_ceil {F : Type u_1} {α : Type u_2} {β : Type u_3} [LinearOrderedRing α] [LinearOrderedRing β] [FloorRing α] [FloorRing β] [FunLike F α β] [RingHomClass F α β] (f : F) (hf : StrictMono f) (a : α) :
theorem Int.map_fract {F : Type u_1} {α : Type u_2} {β : Type u_3} [LinearOrderedRing α] [LinearOrderedRing β] [FloorRing α] [FloorRing β] [FunLike F α β] [RingHomClass F α β] (f : F) (hf : StrictMono f) (a : α) :
fract (f a) = f (fract a)

A floor ring as a floor semiring #

theorem Int.natCast_floor_eq_floor {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} (ha : 0 a) :
theorem Int.natCast_ceil_eq_ceil {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} (ha : 0 a) :
theorem Int.natCast_ceil_eq_ceil_of_neg_one_lt {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} (ha : -1 < a) :
theorem natCast_floor_eq_intCast_floor {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} (ha : 0 a) :
theorem natCast_ceil_eq_intCast_ceil {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} (ha : 0 a) :
theorem natCast_ceil_eq_intCast_ceil_of_neg_one_lt {α : Type u_2} [LinearOrderedRing α] [FloorRing α] {a : α} (ha : -1 < a) :

There exists at most one FloorRing structure on a given linear ordered ring.