Skip to content

Commit 73295cb

Browse files
committed
feat(Normed/Group): add norm_abs_zsmul and norm_neg_one_pow_zsmul (#19541)
1 parent 53a5bce commit 73295cb

File tree

1 file changed

+34
-7
lines changed

1 file changed

+34
-7
lines changed

Mathlib/Analysis/Normed/Group/Basic.lean

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ normed group
4747
variable {𝓕 α ι κ E F G : Type*}
4848

4949
open Filter Function Metric Bornology
50-
5150
open ENNReal Filter NNReal Uniformity Pointwise Topology
5251

5352
/-- Auxiliary class, endowing a type `E` with a function `norm : E → ℝ` with notation `‖x‖`. This
@@ -65,7 +64,6 @@ class NNNorm (E : Type*) where
6564
nnnorm : E → ℝ≥0
6665

6766
export Norm (norm)
68-
6967
export NNNorm (nnnorm)
7068

7169
@[inherit_doc]
@@ -375,6 +373,22 @@ theorem norm_div_rev (a b : E) : ‖a / b‖ = ‖b / a‖ := by
375373
@[to_additive (attr := simp) norm_neg]
376374
theorem norm_inv' (a : E) : ‖a⁻¹‖ = ‖a‖ := by simpa using norm_div_rev 1 a
377375

376+
@[to_additive (attr := simp) norm_abs_zsmul]
377+
theorem norm_zpow_abs (a : E) (n : ℤ) : ‖a ^ |n|‖ = ‖a ^ n‖ := by
378+
rcases le_total 0 n with hn | hn <;> simp [hn, abs_of_nonneg, abs_of_nonpos]
379+
380+
@[to_additive (attr := simp) norm_natAbs_smul]
381+
theorem norm_pow_natAbs (a : E) (n : ℤ) : ‖a ^ n.natAbs‖ = ‖a ^ n‖ := by
382+
rw [← zpow_natCast, ← Int.abs_eq_natAbs, norm_zpow_abs]
383+
384+
@[to_additive norm_isUnit_zsmul]
385+
theorem norm_zpow_isUnit (a : E) {n : ℤ} (hn : IsUnit n) : ‖a ^ n‖ = ‖a‖ := by
386+
rw [← norm_pow_natAbs, Int.isUnit_iff_natAbs_eq.mp hn, pow_one]
387+
388+
@[simp]
389+
theorem norm_units_zsmul {E : Type*} [SeminormedAddGroup E] (n : ℤˣ) (a : E) : ‖n • a‖ = ‖a‖ :=
390+
norm_isUnit_zsmul a n.isUnit
391+
378392
open scoped symmDiff in
379393
@[to_additive]
380394
theorem dist_mulIndicator (s t : Set α) (f : α → E) (x : α) :
@@ -492,7 +506,6 @@ theorem norm_le_norm_add_norm_div (u v : E) : ‖v‖ ≤ ‖u‖ + ‖u / v‖
492506
exact norm_le_norm_add_norm_div' v u
493507

494508
alias norm_le_insert' := norm_le_norm_add_norm_sub'
495-
496509
alias norm_le_insert := norm_le_norm_add_norm_sub
497510

498511
@[to_additive]
@@ -650,8 +663,7 @@ instance (priority := 100) SeminormedGroup.toNNNorm : NNNorm E :=
650663
fun a => ⟨‖a‖, norm_nonneg' a⟩⟩
651664

652665
@[to_additive (attr := simp, norm_cast) coe_nnnorm]
653-
theorem coe_nnnorm' (a : E) : (‖a‖₊ : ℝ) = ‖a‖ :=
654-
rfl
666+
theorem coe_nnnorm' (a : E) : (‖a‖₊ : ℝ) = ‖a‖ := rfl
655667

656668
@[to_additive (attr := simp) coe_comp_nnnorm]
657669
theorem coe_comp_nnnorm' : (toReal : ℝ≥0 → ℝ) ∘ (nnnorm : E → ℝ≥0) = norm :=
@@ -675,8 +687,7 @@ theorem edist_one_right (a : E) : edist a 1 = ‖a‖₊ := by
675687
rw [edist_nndist, nndist_one_right]
676688

677689
@[to_additive (attr := simp) nnnorm_zero]
678-
theorem nnnorm_one' : ‖(1 : E)‖₊ = 0 :=
679-
NNReal.eq norm_one'
690+
theorem nnnorm_one' : ‖(1 : E)‖₊ = 0 := NNReal.eq norm_one'
680691

681692
@[to_additive]
682693
theorem ne_one_of_nnnorm_ne_zero {a : E} : ‖a‖₊ ≠ 0 → a ≠ 1 :=
@@ -692,6 +703,22 @@ theorem nnnorm_mul_le' (a b : E) : ‖a * b‖₊ ≤ ‖a‖₊ + ‖b‖₊ :=
692703
theorem nnnorm_inv' (a : E) : ‖a⁻¹‖₊ = ‖a‖₊ :=
693704
NNReal.eq <| norm_inv' a
694705

706+
@[to_additive (attr := simp) nnnorm_abs_zsmul]
707+
theorem nnnorm_zpow_abs (a : E) (n : ℤ) : ‖a ^ |n|‖₊ = ‖a ^ n‖₊ :=
708+
NNReal.eq <| norm_zpow_abs a n
709+
710+
@[to_additive (attr := simp) nnnorm_natAbs_smul]
711+
theorem nnnorm_pow_natAbs (a : E) (n : ℤ) : ‖a ^ n.natAbs‖₊ = ‖a ^ n‖₊ :=
712+
NNReal.eq <| norm_pow_natAbs a n
713+
714+
@[to_additive nnnorm_isUnit_zsmul]
715+
theorem nnnorm_zpow_isUnit (a : E) {n : ℤ} (hn : IsUnit n) : ‖a ^ n‖₊ = ‖a‖₊ :=
716+
NNReal.eq <| norm_zpow_isUnit a hn
717+
718+
@[simp]
719+
theorem nnnorm_units_zsmul {E : Type*} [SeminormedAddGroup E] (n : ℤˣ) (a : E) : ‖n • a‖₊ = ‖a‖₊ :=
720+
NNReal.eq <| norm_isUnit_zsmul a n.isUnit
721+
695722
@[to_additive (attr := simp)]
696723
theorem nndist_one_left (a : E) : nndist 1 a = ‖a‖₊ := by simp [nndist_eq_nnnorm_div]
697724

0 commit comments

Comments
 (0)