Zulip Chat Archive

Stream: mathlib4

Topic: bump/v4.4.0


Scott Morrison (Dec 02 2023 at 00:51):

The following change:

diff --git a/Mathlib/Analysis/Seminorm.lean b/Mathlib/Analysis/Seminorm.lean
index dd23743308..bc2ebe4899 100644
--- a/Mathlib/Analysis/Seminorm.lean
+++ b/Mathlib/Analysis/Seminorm.lean
@@ -919,31 +919,6 @@ theorem closedBall_finset_sup (p : ฮน โ†’ Seminorm ๐•œ E) (s : Finset ฮน) (x :
   exact closedBall_finset_sup_eq_iInter _ _ _ hr
 #align seminorm.closed_ball_finset_sup Seminorm.closedBall_finset_sup

-theorem ball_smul_ball (p : Seminorm ๐•œ E) (rโ‚ rโ‚‚ : โ„) :
-    Metric.ball (0 : ๐•œ) rโ‚ โ€ข p.ball 0 rโ‚‚ โŠ† p.ball 0 (rโ‚ * rโ‚‚) := by
-  rw [Set.subset_def]
-  intro x hx
-  rw [Set.mem_smul] at hx
-  rcases hx with โŸจa, y, ha, hy, hxโŸฉ
-  rw [โ† hx, mem_ball_zero, map_smul_eq_mul]
-  gcongr
-  ยท exact mem_ball_zero_iff.mp ha
-  ยท exact p.mem_ball_zero.mp hy
-#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
-
-theorem closedBall_smul_closedBall (p : Seminorm ๐•œ E) (rโ‚ rโ‚‚ : โ„) :
-    Metric.closedBall (0 : ๐•œ) rโ‚ โ€ข p.closedBall 0 rโ‚‚ โŠ† p.closedBall 0 (rโ‚ * rโ‚‚) := by
-  rw [Set.subset_def]
-  intro x hx
-  rw [Set.mem_smul] at hx
-  rcases hx with โŸจa, y, ha, hy, hxโŸฉ
-  rw [โ† hx, mem_closedBall_zero, map_smul_eq_mul]
-  rw [mem_closedBall_zero_iff] at ha
-  gcongr
-  ยท exact (norm_nonneg a).trans ha
-  ยท exact p.mem_closedBall_zero.mp hy
-#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
-
 @[simp]
 theorem ball_eq_emptyset (p : Seminorm ๐•œ E) {x : E} {r : โ„} (hr : r โ‰ค 0) : p.ball x r = โˆ… := by
   ext
@@ -959,6 +934,37 @@ theorem closedBall_eq_emptyset (p : Seminorm ๐•œ E) {x : E} {r : โ„} (hr : r <
   exact hr.trans_le (map_nonneg _ _)
 #align seminorm.closed_ball_eq_emptyset Seminorm.closedBall_eq_emptyset

+theorem closedBall_smul_ball (p : Seminorm ๐•œ E) {rโ‚ : โ„} (hrโ‚ : rโ‚ โ‰  0) (rโ‚‚ : โ„) :
+    Metric.closedBall (0 : ๐•œ) rโ‚ โ€ข p.ball 0 rโ‚‚ โŠ† p.ball 0 (rโ‚ * rโ‚‚) := by
+  simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
+  refine fun a ha b hb โ†ฆ mul_lt_mul' ha hb (map_nonneg _ _) ?_
+  exact hrโ‚.lt_or_lt.resolve_left <| ((norm_nonneg a).trans ha).not_lt
+
+theorem ball_smul_closedBall (p : Seminorm ๐•œ E) (rโ‚ : โ„) {rโ‚‚ : โ„} (hrโ‚‚ : rโ‚‚ โ‰  0) :
+    Metric.ball (0 : ๐•œ) rโ‚ โ€ข p.closedBall 0 rโ‚‚ โŠ† p.ball 0 (rโ‚ * rโ‚‚) := by
+  simp only [smul_subset_iff, mem_ball_zero, mem_closedBall_zero, mem_ball_zero_iff,
+    map_smul_eq_mul]
+  intro a ha b hb
+  rw [mul_comm, mul_comm rโ‚]
+  refine mul_lt_mul' hb ha (norm_nonneg _) (hrโ‚‚.lt_or_lt.resolve_left ?_)
+  exact ((map_nonneg p b).trans hb).not_lt
+
+theorem ball_smul_ball (p : Seminorm ๐•œ E) (rโ‚ rโ‚‚ : โ„) :
+    Metric.ball (0 : ๐•œ) rโ‚ โ€ข p.ball 0 rโ‚‚ โŠ† p.ball 0 (rโ‚ * rโ‚‚) := by
+  rcases eq_or_ne rโ‚‚ 0 with rfl | hrโ‚‚
+  ยท simp
+  ยท exact (smul_subset_smul_left (ball_subset_closedBall _ _ _)).trans
+      (ball_smul_closedBall _ _ hrโ‚‚)
+#align seminorm.ball_smul_ball Seminorm.ball_smul_ball
+
+theorem closedBall_smul_closedBall (p : Seminorm ๐•œ E) (rโ‚ rโ‚‚ : โ„) :
+    Metric.closedBall (0 : ๐•œ) rโ‚ โ€ข p.closedBall 0 rโ‚‚ โŠ† p.closedBall 0 (rโ‚ * rโ‚‚) := by
+  simp only [smul_subset_iff, mem_closedBall_zero, mem_closedBall_zero_iff, map_smul_eq_mul]
+  intro a ha b hb
+  gcongr
+  exact (norm_nonneg _).trans ha
+#align seminorm.closed_ball_smul_closed_ball Seminorm.closedBall_smul_closedBall
+
 -- Porting note: TODO: make that an `iff`
 theorem neg_mem_ball_zero (r : โ„) (hx : x โˆˆ ball p 0 r) : -x โˆˆ ball p 0 r := by
   simpa only [mem_ball_zero, map_neg_eq_map] using hx

Scott Morrison (Dec 02 2023 at 00:52):

has ended up on the bump/v4.4.0 branch, relative to master. It looks like a postive change to me (adds some lemmas), but I can't work out how it ended up on bump/v4.4.0.

Scott Morrison (Dec 02 2023 at 00:52):

Does anyone recognise this?

Scott Morrison (Dec 02 2023 at 00:53):

I am going to remove it from bump/v4.4.0 now, and then merge that to master. If anyone wants to preserve this diff, this stream will be the only record of it!

Eric Wieser (Dec 02 2023 at 07:11):

#8724 is the PR that added these to master

Ruben Van de Velde (Dec 02 2023 at 07:17):

#8725 moved the two theorems and removed the recently added ones, possibly accidentally

Ruben Van de Velde (Dec 02 2023 at 07:20):

Cc @Yury G. Kudryashov

Yury G. Kudryashov (Dec 02 2023 at 08:43):

@Ruben Van de Velde Thank you! It's a git rebase went wrong: #8724 used to be a part of #8725, then I moved it to a new branch and reverted in #8725. Then I git rebased...

Yury G. Kudryashov (Dec 02 2023 at 08:43):

I'll fix it now

Yury G. Kudryashov (Dec 02 2023 at 08:46):

#8783


Last updated: Dec 20 2023 at 11:08 UTC