/-
Copyright (c) 2018 Patrick Massot. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Patrick Massot, Johannes Hölzl, Yaël Dillies
-/
module
public import Mathlib.Analysis.Normed.Group.Real
public import Mathlib.Topology.Instances.Int
/-! # ℤ as a normed group -/
public section
open NNReal
variable {α : Type*}
namespace Int
instance instNormedAddCommGroup : NormedAddCommGroup ℤ where
norm n := ‖(n : ℝ)‖
dist_eq m n := by
simp only [dist_eq, norm, cast_add, cast_neg]
rw [abs_sub_comm, neg_add_eq_sub]
@[norm_cast]
theorem norm_cast_real (m : ℤ) : ‖(m : ℝ)‖ = ‖m‖ :=
rfl
theorem norm_eq_abs (n : ℤ) : ‖n‖ = |(n : ℝ)| :=
rfl
theorem norm_natCast (n : ℕ) : ‖(n : ℤ)‖ = n := by simp [Int.norm_eq_abs]
theorem _root_.NNReal.natCast_natAbs (n : ℤ) : (n.natAbs : ℝ≥0) = ‖n‖₊ :=
NNReal.eq <|
calc
((n.natAbs : ℝ≥0) : ℝ) = (n.natAbs : ℤ) := by simp only [Int.cast_natCast, NNReal.coe_natCast]
_ = |(n : ℝ)| := by simp only [Int.natCast_natAbs, Int.cast_abs]
_ = ‖n‖ := (norm_eq_abs n).symm
theorem abs_le_floor_nnreal_iff (z : ℤ) (c : ℝ≥0) : |z| ≤ ⌊c⌋₊ ↔ ‖z‖₊ ≤ c := by
rw [Int.abs_eq_natAbs, Int.ofNat_le, Nat.le_floor_iff zero_le, NNReal.natCast_natAbs z]
end Int
-- Now that we've installed the norm on `ℤ`,
-- we can state some lemmas about `zsmul`.
section
variable [SeminormedCommGroup α]
@[to_additive norm_zsmul_le]
theorem norm_zpow_le_mul_norm (n : ℤ) (a : α) : ‖a ^ n‖ ≤ ‖n‖ * ‖a‖ := by
rcases n.eq_nat_or_neg with ⟨n, rfl | rfl⟩ <;> simpa [Int.norm_natCast] using norm_pow_le_mul_norm
@[to_additive nnNorm_zsmul_le]
theorem nnNorm_zpow_le_mul_norm (n : ℤ) (a : α) : ‖a ^ n‖₊ ≤ ‖n‖₊ * ‖a‖₊ := by
simpa only [← NNReal.coe_le_coe, NNReal.coe_mul] using! norm_zpow_le_mul_norm n a
@[to_additive (attr := deprecated (since := "2026-10-31")) nnnorm_zsmul_le]
alias nnnorm_zpow_le_mul_norm := nnNorm_zpow_le_mul_norm
end
¤ Dauer der Verarbeitung: 0.9 Sekunden
¤
*© Formatika GbR, Deutschland