Skip to content

Commit d3153cf

Browse files
committed
feat: the extension of a Lipschitz function is Lipschitz (leanprover-community#34438)
Cherry picked from leanprover-community#34055. Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
1 parent 45edaee commit d3153cf

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

Mathlib/MeasureTheory/Constructions/BorelSpace/Order.lean

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,17 @@ theorem borel_eq_generateFrom_Ioc (α : Type*) [TopologicalSpace α] [SecondCoun
427427
(@dense_univ α _).borel_eq_generateFrom_Ioc_mem_aux (fun _ _ => mem_univ _) fun _ _ _ _ =>
428428
mem_univ _
429429

430+
theorem borel_eq_generateFrom_Ioc_le (α : Type*) [TopologicalSpace α] [SecondCountableTopology α]
431+
[LinearOrder α] [OrderTopology α] :
432+
borel α = .generateFrom { S : Set α | ∃ l u, l ≤ u ∧ Ioc l u = S } := by
433+
apply le_antisymm
434+
· rw [borel_eq_generateFrom_Ioc]
435+
apply generateFrom_mono (by grind)
436+
· apply generateFrom_le
437+
rintro - ⟨u, v, -, rfl⟩
438+
borelize α
439+
exact measurableSet_Ioc
440+
430441
namespace MeasureTheory.Measure
431442

432443
/-- Two finite measures on a Borel space are equal if they agree on all closed-open intervals. If

Mathlib/Topology/Instances/ENNReal/Lemmas.lean

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,3 +910,20 @@ theorem limsup_add_of_left_tendsto_zero {u : Filter ι} {f : ι → ℝ≥0∞}
910910
end LimsupLiminf
911911

912912
end ENNReal -- namespace
913+
914+
lemma Dense.lipschitzWith_extend {α β : Type*}
915+
[PseudoEMetricSpace α] [EMetricSpace β] [CompleteSpace β]
916+
{s : Set α} (hs : Dense s) {f : s → β} {K : ℝ≥0} (hf : LipschitzWith K f) :
917+
LipschitzWith K (hs.extend f) := by
918+
have : IsClosed {p : α × α | edist (hs.extend f p.1) (hs.extend f p.2) ≤ K * edist p.1 p.2} := by
919+
have : Continuous (hs.extend f) := (hs.uniformContinuous_extend hf.uniformContinuous).continuous
920+
apply isClosed_le (by fun_prop)
921+
exact (ENNReal.continuous_const_mul (by simp)).comp (by fun_prop)
922+
have : Dense {p : α × α | edist (hs.extend f p.1) (hs.extend f p.2) ≤ K * edist p.1 p.2} := by
923+
apply (hs.prod hs).mono
924+
rintro ⟨x, y⟩ ⟨hx, hy⟩
925+
have Ax : hs.extend f x = f ⟨x, hx⟩ := hs.extend_eq hf.continuous ⟨x, hx⟩
926+
have Ay : hs.extend f y = f ⟨y, hy⟩ := hs.extend_eq hf.continuous ⟨y, hy⟩
927+
simp only [Set.mem_setOf_eq, Ax, Ay]
928+
exact hf ⟨x, hx⟩ ⟨y, hy⟩
929+
simpa only [Dense, IsClosed.closure_eq, Set.mem_setOf_eq, Prod.forall] using this

0 commit comments

Comments
 (0)