Skip to content

Commit

Permalink
feat(analysis/normed/normed_field): add abs_le_floor_nnreal_iff (#13130)
Browse files Browse the repository at this point in the history
From LTE.
  • Loading branch information
kbuzzard committed Apr 5, 2022
1 parent c7626b7 commit bb4099b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/analysis/normed/normed_field.lean
Expand Up @@ -543,6 +543,13 @@ nnreal.eq $ calc ((n.nat_abs : ℝ≥0) : ℝ)
... = |n| : by simp only [← int.abs_eq_nat_abs, int.cast_abs]
... = ∥n∥ : rfl

lemma int.abs_le_floor_nnreal_iff (z : ℤ) (c : ℝ≥0) : |z| ≤ ⌊c⌋₊ ↔ ∥z∥₊ ≤ c :=
begin
rw [int.abs_eq_nat_abs, int.coe_nat_le, nat.le_floor_iff (zero_le c)],
congr',
exact nnreal.coe_nat_abs z,
end

instance : norm_one_class ℤ :=
by simp [← int.norm_cast_real]⟩

Expand Down

0 comments on commit bb4099b

Please sign in to comment.