Skip to content

Commit 5f9aeff

Browse files
committed
feat(Analysis/Seminorm): add more *ball_smul_*ball (#8783)
We had `ball_smul_ball` and `closedBall_smul_closedBall`. Add versions with mixed `ball` and `closedBall`. Also move this lemmas below and golf the proofs. This was already merged in #8724 but accidentally got reverted in #8725 See [Zulip](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/bump.2Fv4.2E4.2E0/near/405505687)
1 parent 9df2cbf commit 5f9aeff

File tree

1 file changed

+31
-25
lines changed

1 file changed

+31
-25
lines changed

β€ŽMathlib/Analysis/Seminorm.leanβ€Ž

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -919,31 +919,6 @@ theorem closedBall_finset_sup (p : ΞΉ β†’ Seminorm π•œ E) (s : Finset ΞΉ) (x :
919919
exact closedBall_finset_sup_eq_iInter _ _ _ hr
920920
#align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup
921921

922-
theorem ball_smul_ball (p : Seminorm π•œ E) (r₁ rβ‚‚ : ℝ) :
923-
Metric.ball (0 : π•œ) r₁ β€’ p.ball 0 rβ‚‚ βŠ† p.ball 0 (r₁ * rβ‚‚) := by
924-
rw [Set.subset_def]
925-
intro x hx
926-
rw [Set.mem_smul] at hx
927-
rcases hx with ⟨a, y, ha, hy, hx⟩
928-
rw [← hx, mem_ball_zero, map_smul_eq_mul]
929-
gcongr
930-
Β· exact mem_ball_zero_iff.mp ha
931-
Β· exact p.mem_ball_zero.mp hy
932-
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
933-
934-
theorem closedBall_smul_closedBall (p : Seminorm π•œ E) (r₁ rβ‚‚ : ℝ) :
935-
Metric.closedBall (0 : π•œ) r₁ β€’ p.closedBall 0 rβ‚‚ βŠ† p.closedBall 0 (r₁ * rβ‚‚) := by
936-
rw [Set.subset_def]
937-
intro x hx
938-
rw [Set.mem_smul] at hx
939-
rcases hx with ⟨a, y, ha, hy, hx⟩
940-
rw [← hx, mem_closedBall_zero, map_smul_eq_mul]
941-
rw [mem_closedBall_zero_iff] at ha
942-
gcongr
943-
Β· exact (norm_nonneg a).trans ha
944-
Β· exact p.mem_closedBall_zero.mp hy
945-
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
946-
947922
@[simp]
948923
theorem ball_eq_emptyset (p : Seminorm π•œ E) {x : E} {r : ℝ} (hr : r ≀ 0) : p.ball x r = βˆ… := by
949924
ext
@@ -959,6 +934,37 @@ theorem closedBall_eq_emptyset (p : Seminorm π•œ E) {x : E} {r : ℝ} (hr : r <
959934
exact hr.trans_le (map_nonneg _ _)
960935
#align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset
961936

937+
theorem closedBall_smul_ball (p : Seminorm π•œ E) {r₁ : ℝ} (hr₁ : r₁ β‰  0) (rβ‚‚ : ℝ) :
938+
Metric.closedBall (0 : π•œ) r₁ β€’ p.ball 0 rβ‚‚ βŠ† p.ball 0 (r₁ * rβ‚‚) := by
939+
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
940+
refine fun a ha b hb ↦ mul_lt_mul' ha hb (map_nonneg _ _) ?_
941+
exact hr₁.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
942+
943+
theorem ball_smul_closedBall (p : Seminorm π•œ E) (r₁ : ℝ) {rβ‚‚ : ℝ} (hrβ‚‚ : rβ‚‚ β‰  0) :
944+
Metric.ball (0 : π•œ) r₁ β€’ p.closedBall 0 rβ‚‚ βŠ† p.ball 0 (r₁ * rβ‚‚) := by
945+
simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
946+
map_smul_eq_mul]
947+
intro a ha b hb
948+
rw [mul_comm, mul_comm r₁]
949+
refine mul_lt_mul' hb ha (norm_nonneg _) (hrβ‚‚.lt_or_lt.resolve_left ?_)
950+
exact ((map_nonneg p b).trans hb).not_lt
951+
952+
theorem ball_smul_ball (p : Seminorm π•œ E) (r₁ rβ‚‚ : ℝ) :
953+
Metric.ball (0 : π•œ) r₁ β€’ p.ball 0 rβ‚‚ βŠ† p.ball 0 (r₁ * rβ‚‚) := by
954+
rcases eq_or_ne rβ‚‚ 0 with rfl | hrβ‚‚
955+
Β· simp
956+
Β· exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
957+
(ball_smul_closedBall _ _ hrβ‚‚)
958+
#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
959+
960+
theorem closedBall_smul_closedBall (p : Seminorm π•œ E) (r₁ rβ‚‚ : ℝ) :
961+
Metric.closedBall (0 : π•œ) r₁ β€’ p.closedBall 0 rβ‚‚ βŠ† p.closedBall 0 (r₁ * rβ‚‚) := by
962+
simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
963+
intro a ha b hb
964+
gcongr
965+
exact (norm_nonneg _).trans ha
966+
#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
967+
962968
-- Porting note: TODO: make that an `iff`
963969
theorem neg_mem_ball_zero (r : ℝ) (hx : x ∈ ball p 0 r) : -x ∈ ball p 0 r := by
964970
simpa only [mem_ball_zero, map_neg_eq_map] using hx

0 commit comments

Comments
Β (0)