Skip to content

Commit f10b8a1

Browse files
committed
feat(Analysis/Convex/TotallyBounded): strengthen to an iff (leanprover-community#41226)
... and golf the existing proof using the fancy new `grw`. From MeanFourier
1 parent a687226 commit f10b8a1

3 files changed

Lines changed: 27 additions & 29 deletions

File tree

Mathlib/Analysis/Convex/TotallyBounded.lean

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,23 @@ public section
3030

3131
open Set Pointwise
3232

33-
variable (E : Type*) {s : Set E}
33+
variable {E : Type*} {s : Set E}
3434
variable [AddCommGroup E] [Module ℝ E]
35-
variable [UniformSpace E] [IsUniformAddGroup E] [lcs : LocallyConvexSpace ℝ E] [ContinuousSMul ℝ E]
35+
variable [UniformSpace E] [IsUniformAddGroup E] [LocallyConvexSpace ℝ E] [ContinuousSMul ℝ E]
3636

37-
theorem totallyBounded_convexHull (hs : TotallyBounded s) :
37+
protected lemma TotallyBounded.convexHull (hs : TotallyBounded s) :
3838
TotallyBounded (convexHull ℝ s) := by
39-
rw [totallyBounded_iff_subset_finite_iUnion_nhds_zero]
39+
rw [totallyBounded_iff_subset_finite_iUnion_nhds_zero] at ⊢ hs
4040
intro U hU
4141
obtain ⟨W, hW₁, hW₂⟩ := exists_nhds_zero_half hU
42-
obtain ⟨V, hV₁, hV₂, hV₃⟩ := (locallyConvexSpace_iff_exists_convex_subset_zero ℝ E).mp lcs W hW₁
43-
obtain ⟨t, htf, hts⟩ := (totallyBounded_iff_subset_finite_iUnion_nhds_zero.mp hs) _ hV₁
44-
obtain ⟨t', htf', hts'⟩ := (totallyBounded_iff_subset_finite_iUnion_nhds_zero.mp
45-
(IsCompact.totallyBounded (Finite.isCompact_convexHull ℝ htf)) _ hV₁)
42+
obtain ⟨V, hV₁,hV₂, hV₃⟩ := (locallyConvexSpace_iff_exists_convex_subset_zero ℝ E).mp ‹_› W hW₁
43+
obtain ⟨t, htf, hts⟩ := hs _ hV₁
44+
obtain ⟨t', htf', hts'⟩ := totallyBounded_iff_subset_finite_iUnion_nhds_zero.mp
45+
(htf.isCompact_convexHull ℝ).totallyBounded _ hV₁
4646
use t', htf'
4747
simp only [iUnion_vadd_set, vadd_eq_add] at hts hts' ⊢
48-
calc convexHull ℝ s
49-
_ ⊆ convexHull ℝ (t + V) := convexHull_mono hts
50-
_ ⊆ convexHull ℝ t + convexHull ℝ V := convexHull_add_subset
51-
_ = convexHull ℝ t + V := by rw [hV₂.convexHull_eq]
52-
_ ⊆ t' + V + V := add_subset_add_right hts'
53-
_ = t' + (V + V) := by rw [add_assoc]
54-
_ ⊆ t' + (W + W) := add_subset_add_left (add_subset_add hV₃ hV₃)
55-
_ ⊆ t' + U := add_subset_add_left (add_subset_iff.mpr hW₂)
48+
grw [hts, convexHull_add_subset, hV₂.convexHull_eq, hts', add_assoc, hV₃, add_subset_iff.mpr hW₂]
49+
50+
@[simp] lemma totallyBounded_convexHull : TotallyBounded (convexHull ℝ s) ↔ TotallyBounded s where
51+
mp := .subset <| subset_convexHull ..
52+
mpr := .convexHull

Mathlib/Analysis/LocallyConvex/AbsConvex.lean

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -343,17 +343,15 @@ theorem convexHull_union_neg_eq_absConvexHull {s : Set E} :
343343
rw [← Convex.convexHull_eq (convex_convexHull ℝ (s ∪ -s))]
344344
exact convexHull_mono balancedHull_subset_convexHull_union_neg)
345345

346-
variable (E 𝕜) {s : Set E}
346+
variable (𝕜) {s : Set E}
347347
variable [NontriviallyNormedField 𝕜] [PartialOrder 𝕜] [Module 𝕜 E] [SMulCommClass ℝ 𝕜 E]
348348
variable [UniformSpace E] [IsUniformAddGroup E] [lcs : LocallyConvexSpace ℝ E] [ContinuousSMul ℝ E]
349349

350-
-- TVS II.25 Prop3
351-
theorem totallyBounded_absConvexHull (hs : TotallyBounded s) :
352-
TotallyBounded (absConvexHull ℝ s) := by
353-
rw [← convexHull_union_neg_eq_absConvexHull]
354-
apply totallyBounded_convexHull
355-
rw [totallyBounded_union]
356-
exact ⟨hs, totallyBounded_neg hs⟩
350+
@[simp]
351+
lemma totallyBounded_absConvexHull : TotallyBounded (absConvexHull ℝ s) ↔ TotallyBounded s := by
352+
simp [← convexHull_union_neg_eq_absConvexHull]
353+
354+
protected alias ⟨_, TotallyBounded.absConvexHull⟩ := totallyBounded_absConvexHull
357355

358356
end
359357

@@ -367,5 +365,4 @@ theorem isCompact_closedAbsConvexHull_of_totallyBounded {E : Type*} [AddCommGrou
367365
[QuasiCompleteSpace ℝ E] {s : Set E} (ht : TotallyBounded s) :
368366
IsCompact (closedAbsConvexHull ℝ s) := by
369367
rw [closedAbsConvexHull_eq_closure_absConvexHull]
370-
exact isCompact_closure_of_totallyBounded_quasiComplete (𝕜 := ℝ)
371-
(totallyBounded_absConvexHull E ht)
368+
exact isCompact_closure_of_totallyBounded_quasiComplete (𝕜 := ℝ) ht.absConvexHull

Mathlib/Topology/Algebra/IsUniformGroup/Basic.lean

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,13 @@ theorem totallyBounded_iff_subset_finite_iUnion_nhds_one {s : Set α} :
137137
simp [← preimage_smul_inv, preimage]
138138

139139
@[to_additive]
140-
theorem totallyBounded_inv {s : Set α} (hs : TotallyBounded s) : TotallyBounded (s⁻¹) := by
141-
convert! TotallyBounded.image hs uniformContinuous_inv
142-
aesop
140+
protected lemma TotallyBounded.inv {s : Set α} (hs : TotallyBounded s) : TotallyBounded s⁻¹ := by
141+
simpa using hs.image uniformContinuous_inv
142+
143+
@[to_additive (attr := simp)]
144+
lemma totallyBounded_inv {s : Set α} : TotallyBounded s⁻¹ ↔ TotallyBounded s where
145+
mp hs := by simpa using hs.inv
146+
mpr := .inv
143147

144148
section UniformConvergence
145149

0 commit comments

Comments
 (0)