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

Commit cde6e63

Browse files
committed
feat(analysis/seminorm): removed unnecessary norm_one_class arguments (#14614)
1 parent d997baa commit cde6e63

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

src/analysis/seminorm.lean

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -238,37 +238,38 @@ lemma comp_mono {p : seminorm 𝕜 F} {q : seminorm 𝕜 F} (f : E →ₗ[𝕜]
238238
@[simps] def pullback (f : E →ₗ[𝕜] F) : add_monoid_hom (seminorm 𝕜 F) (seminorm 𝕜 E) :=
239239
⟨λ p, p.comp f, zero_comp f, λ p q, add_comp p q f⟩
240240

241-
section norm_one_class
242-
variables [norm_one_class 𝕜] (p : seminorm 𝕜 E) (x y : E) (r : ℝ)
241+
section
242+
variables (p : seminorm 𝕜 E)
243243

244244
@[simp]
245-
protected lemma neg : p (-x) = p x :=
246-
calc p (-x) = p ((-1 : 𝕜) • x) : by rw neg_one_smul
247-
... = p x : by rw [p.smul, norm_neg, norm_one, one_mul]
245+
protected lemma neg (x : E) : p (-x) = p x :=
246+
by rw [←neg_one_smul 𝕜, seminorm.smul, norm_neg, ←seminorm.smul, one_smul]
248247

249-
protected lemma sub_le : p (x - y) ≤ p x + p y :=
248+
protected lemma sub_le (x y : E) : p (x - y) ≤ p x + p y :=
250249
calc
251250
p (x - y)
252251
= p (x + -y) : by rw sub_eq_add_neg
253252
... ≤ p x + p (-y) : p.triangle x (-y)
254253
... = p x + p y : by rw p.neg
255254

256-
lemma nonneg : 0 ≤ p x :=
255+
lemma nonneg (x : E) : 0 ≤ p x :=
257256
have h: 02 * p x, from
258257
calc 0 = p (x + (- x)) : by rw [add_neg_self, map_zero]
259258
... ≤ p x + p (-x) : p.triangle _ _
260259
... = 2 * p x : by rw [p.neg, two_mul],
261260
nonneg_of_mul_nonneg_left h zero_lt_two
262261

263-
lemma sub_rev : p (x - y) = p (y - x) := by rw [←neg_sub, p.neg]
262+
lemma sub_rev (x y : E) : p (x - y) = p (y - x) := by rw [←neg_sub, p.neg]
264263

265264
/-- The direct path from 0 to y is shorter than the path with x "inserted" in between. -/
266-
lemma le_insert : p y ≤ p x + p (x - y) :=
265+
lemma le_insert (x y : E) : p y ≤ p x + p (x - y) :=
267266
calc p y = p (x - (x - y)) : by rw sub_sub_cancel
268267
... ≤ p x + p (x - y) : p.sub_le _ _
269268

270269
/-- The direct path from 0 to x is shorter than the path with y "inserted" in between. -/
271-
lemma le_insert' : p x ≤ p y + p (x - y) := by { rw sub_rev, exact le_insert _ _ _ }
270+
lemma le_insert' (x y : E) : p x ≤ p y + p (x - y) := by { rw sub_rev, exact le_insert _ _ _ }
271+
272+
end
272273

273274
instance : order_bot (seminorm 𝕜 E) := ⟨0, nonneg⟩
274275

@@ -321,7 +322,6 @@ begin
321322
{ exact nnreal.coe_pos.mpr ha },
322323
end
323324

324-
end norm_one_class
325325
end module
326326
end semi_normed_ring
327327

@@ -468,8 +468,7 @@ begin
468468
simp_rw [ball, mem_preimage, comp_apply, set.mem_set_of_eq, map_sub],
469469
end
470470

471-
section norm_one_class
472-
variables [norm_one_class 𝕜] (p : seminorm 𝕜 E)
471+
variables (p : seminorm 𝕜 E)
473472

474473
lemma ball_zero_eq_preimage_ball {r : ℝ} :
475474
p.ball 0 r = p ⁻¹' (metric.ball 0 r) :=
@@ -523,7 +522,6 @@ begin
523522
exact hr.trans (p.nonneg _),
524523
end
525524

526-
end norm_one_class
527525
end module
528526
end add_comm_group
529527
end semi_normed_ring
@@ -662,7 +660,7 @@ lemma absorbent_ball (hx : ∥x∥ < r) : absorbent 𝕜 (metric.ball x r) :=
662660
by { rw ←ball_norm_seminorm 𝕜, exact (norm_seminorm _ _).absorbent_ball hx }
663661

664662
/-- Balls at the origin are balanced. -/
665-
lemma balanced_ball_zero [norm_one_class 𝕜] : balanced 𝕜 (metric.ball (0 : E) r) :=
663+
lemma balanced_ball_zero : balanced 𝕜 (metric.ball (0 : E) r) :=
666664
by { rw ←ball_norm_seminorm 𝕜, exact (norm_seminorm _ _).balanced_ball_zero r }
667665

668666
end norm_seminorm

0 commit comments

Comments
 (0)