Skip to content

Commit c669fd1

Browse files
committed
refactor(Data/Real/Archimedean): sSup/sInf API cleanup (#16735)
Add a few lemmas, golf the existing ones and update the docstrings to something more precise
1 parent 343c459 commit c669fd1

File tree

9 files changed

+137
-115
lines changed

9 files changed

+137
-115
lines changed

Mathlib/Analysis/Convex/Gauge.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ theorem gauge_of_subset_zero (h : s ⊆ 0) : gauge s = 0 := by
111111

112112
/-- The gauge is always nonnegative. -/
113113
theorem gauge_nonneg (x : E) : 0 ≤ gauge s x :=
114-
Real.sInf_nonneg _ fun _ hx => hx.1.le
114+
Real.sInf_nonneg fun _ hx => hx.1.le
115115

116116
theorem gauge_neg (symmetric : ∀ x ∈ s, -x ∈ s) (x : E) : gauge s (-x) = gauge s x := by
117117
have : ∀ x, -x ∈ s ↔ x ∈ s := fun x => ⟨fun h => by simpa using symmetric _ h, symmetric x⟩

Mathlib/Analysis/Normed/Group/Quotient.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ theorem quotient_norm_mk_eq (S : AddSubgroup M) (m : M) :
156156

157157
/-- The quotient norm is nonnegative. -/
158158
theorem quotient_norm_nonneg (S : AddSubgroup M) (x : M ⧸ S) : 0 ≤ ‖x‖ :=
159-
Real.sInf_nonneg _ <| forall_mem_image.2 fun _ _ ↦ norm_nonneg _
159+
Real.sInf_nonneg <| forall_mem_image.2 fun _ _ ↦ norm_nonneg _
160160

161161
/-- The quotient norm is nonnegative. -/
162162
theorem norm_mk_nonneg (S : AddSubgroup M) (m : M) : 0 ≤ ‖mk' S m‖ :=

Mathlib/Analysis/Normed/Lp/PiLp.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ abbrev pseudoMetricAux : PseudoMetricSpace (PiLp p α) :=
354354
PseudoMetricSpace.edist_dist]
355355
-- Porting note: `le_iSup` needed some help
356356
exact le_iSup (fun k => edist (f k) (g k)) i
357-
· refine ENNReal.toReal_le_of_le_ofReal (Real.sSup_nonneg _ ?_) (iSup_le fun i => ?_)
357+
· refine ENNReal.toReal_le_of_le_ofReal (Real.sSup_nonneg ?_) (iSup_le fun i => ?_)
358358
· rintro - ⟨i, rfl⟩
359359
exact dist_nonneg
360360
· change PseudoMetricSpace.edist _ _ ≤ _

Mathlib/Analysis/NormedSpace/Multilinear/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ theorem isLeast_opNorm : IsLeast {c : ℝ | 0 ≤ c ∧ ∀ m, ‖f m‖ ≤ c *
339339
@[deprecated (since := "2024-02-02")] alias isLeast_op_norm := isLeast_opNorm
340340

341341
theorem opNorm_nonneg : 0 ≤ ‖f‖ :=
342-
Real.sInf_nonneg _ fun _ ⟨hx, _⟩ => hx
342+
Real.sInf_nonneg fun _ ⟨hx, _⟩ => hx
343343

344344
@[deprecated (since := "2024-02-02")] alias op_norm_nonneg := opNorm_nonneg
345345

Mathlib/Analysis/NormedSpace/OperatorNorm/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ theorem opNorm_neg (f : E →SL[σ₁₂] F) : ‖-f‖ = ‖f‖ := by simp onl
174174
@[deprecated (since := "2024-02-02")] alias op_norm_neg := opNorm_neg
175175

176176
theorem opNorm_nonneg (f : E →SL[σ₁₂] F) : 0 ≤ ‖f‖ :=
177-
Real.sInf_nonneg _ fun _ ↦ And.left
177+
Real.sInf_nonneg fun _ ↦ And.left
178178

179179
@[deprecated (since := "2024-02-02")] alias op_norm_nonneg := opNorm_nonneg
180180

Mathlib/Analysis/Seminorm.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ noncomputable instance instSupSet : SupSet (Seminorm 𝕜 E) where
495495
if h : BddAbove ((↑) '' s : Set (E → ℝ)) then
496496
{ toFun := ⨆ p : s, ((p : Seminorm 𝕜 E) : E → ℝ)
497497
map_zero' := by
498-
rw [iSup_apply, ← @Real.ciSup_const_zero s]
498+
rw [iSup_apply, ← @Real.iSup_const_zero s]
499499
congr!
500500
rename_i _ _ _ i
501501
exact map_zero i.1

Mathlib/Data/NNReal/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ theorem iInf_empty [IsEmpty ι] (f : ι → ℝ≥0) : ⨅ i, f i = 0 := by
946946
@[simp]
947947
theorem iInf_const_zero {α : Sort*} : ⨅ _ : α, (0 : ℝ≥0) = 0 := by
948948
rw [← coe_inj, coe_iInf]
949-
exact Real.ciInf_const_zero
949+
exact Real.iInf_const_zero
950950

951951
theorem iInf_mul (f : ι → ℝ≥0) (a : ℝ≥0) : iInf f * a = ⨅ i, f i * a := by
952952
rw [← coe_inj, NNReal.coe_mul, coe_iInf, coe_iInf]

Mathlib/Data/Real/Archimedean.lean

Lines changed: 128 additions & 106 deletions
Large diffs are not rendered by default.

Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,8 +852,8 @@ theorem semiconj_of_group_action_of_forall_translationNumber_eq {G : Type*} [Gro
852852
have hF₁ : ∀ g, ⇑(F₁ g) = f₁ g := fun _ => rfl
853853
have hF₂ : ∀ g, ⇑(F₂ g) = f₂ g := fun _ => rfl
854854
-- Now we apply `csSup_div_semiconj` and go back to `f₁` and `f₂`.
855-
refine ⟨⟨⟨_, fun x y hxy => ?_⟩, fun x => ?_⟩, csSup_div_semiconj F₂ F₁ fun x => ?_⟩ <;>
856-
simp only [hF₁, hF₂, ← map_inv, coe_mk]
855+
refine ⟨⟨⟨fun x ↦ ⨆ g', (F₂ g')⁻¹ (F₁ g' x), fun x y hxy => ?_⟩, fun x => ?_⟩,
856+
csSup_div_semiconj F₂ F₁ fun x => ?_⟩ <;> simp only [hF₁, hF₂, ← map_inv, coe_mk]
857857
· exact ciSup_mono (this y) fun g => mono _ (mono _ hxy)
858858
· simp only [map_add_one]
859859
exact (Monotone.map_ciSup_of_continuousAt (continuousAt_id.add continuousAt_const)

0 commit comments

Comments
 (0)