Module docstring
{"# ℚ as a normed group "}
{"# ℚ as a normed group "}
Rat.instNormedAddCommGroup
instance
: NormedAddCommGroup ℚ
instance instNormedAddCommGroup : NormedAddCommGroup ℚ where
norm r := ‖(r : ℝ)‖
dist_eq r₁ r₂ := by simp only [Rat.dist_eq, norm, Rat.cast_sub]
Rat.norm_cast_real
theorem
(r : ℚ) : ‖(r : ℝ)‖ = ‖r‖
@[norm_cast, simp 1001]
-- Porting note: increase priority to prevent the left-hand side from simplifying
theorem norm_cast_real (r : ℚ) : ‖(r : ℝ)‖ = ‖r‖ :=
rfl
Int.norm_cast_rat
theorem
(m : ℤ) : ‖(m : ℚ)‖ = ‖m‖
@[norm_cast, simp]
theorem _root_.Int.norm_cast_rat (m : ℤ) : ‖(m : ℚ)‖ = ‖m‖ := by
rw [← Rat.norm_cast_real, ← Int.norm_cast_real]; congr 1