File tree Expand file tree Collapse file tree
Mathlib/Algebra/Order/Floor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -256,6 +256,9 @@ theorem abs_sub_lt_one_of_floor_eq_floor {R : Type*}
256256lemma floor_eq_self_iff_mem (a : R) : ⌊a⌋ = a ↔ a ∈ Set.range Int.cast := by
257257 aesop
258258
259+ theorem floor_lt_self_iff {a : R} : ⌊a⌋ < a ↔ a ∉ range Int.cast :=
260+ (floor_le a).lt_iff_ne.trans <| (floor_eq_self_iff_mem _).not
261+
259262section LinearOrderedRing
260263variable {R : Type *} [Ring R] [LinearOrder R] [IsStrictOrderedRing R] [FloorRing R] {a b : R}
261264
@@ -452,6 +455,12 @@ theorem fract_eq_self {a : R} : fract a = a ↔ 0 ≤ a ∧ a < 1 :=
452455theorem fract_fract (a : R) : fract (fract a) = fract a :=
453456 fract_eq_self.2 ⟨fract_nonneg _, fract_lt_one _⟩
454457
458+ theorem fract_eq_zero_iff {a : R} : fract a = 0 ↔ a ∈ range Int.cast := by
459+ simp [fract_eq_iff, eq_comm]
460+
461+ theorem fract_ne_zero_iff {a : R} : fract a ≠ 0 ↔ a ∉ range Int.cast :=
462+ fract_eq_zero_iff.not
463+
455464theorem fract_neg {x : R} (hx : fract x ≠ 0 ) : fract (-x) = 1 - fract x := by
456465 rw [fract_eq_iff]
457466 constructor
You can’t perform that action at this time.
0 commit comments