Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit bb4099b

Browse files
committed
feat(analysis/normed/normed_field): add abs_le_floor_nnreal_iff (#13130)
From LTE.
1 parent c7626b7 commit bb4099b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/analysis/normed/normed_field.lean

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,13 @@ nnreal.eq $ calc ((n.nat_abs : ℝ≥0) : ℝ)
543543
... = |n| : by simp only [← int.abs_eq_nat_abs, int.cast_abs]
544544
... = ∥n∥ : rfl
545545

546+
lemma int.abs_le_floor_nnreal_iff (z : ℤ) (c : ℝ≥0) : |z| ≤ ⌊c⌋₊ ↔ ∥z∥₊ ≤ c :=
547+
begin
548+
rw [int.abs_eq_nat_abs, int.coe_nat_le, nat.le_floor_iff (zero_le c)],
549+
congr',
550+
exact nnreal.coe_nat_abs z,
551+
end
552+
546553
instance : norm_one_class ℤ :=
547554
by simp [← int.norm_cast_real]⟩
548555

0 commit comments

Comments
 (0)