Samplinglib
Lean gate not recorded for this source state main · 0e31a3cda412
production module

AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleCore

11 named declarations scanned from AutoSamplingTheory/TechnicalLemmas/Measure/WassersteinTriangleCore.lean.

Imports
Imported by
Placeholder scan
0 declaration(s) flagged
Gate status
Partial

Declarations

def AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleCore.edgeLength12 Partial Not mapped

- First edge length on a triple encoded as `((x,y),z)`.

def edgeLength12
    {E : Type*} [NormedAddCommGroup E] : ((E × E) × E) → ℝ≥0∞ :=
  fun p => ENNReal.ofReal ‖p.1.1 - p.1.2‖

/-- Second edge length on a triple encoded as `((x,y),z)`. -/
def AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleCore.edgeLength23 Partial Not mapped

- Second edge length on a triple encoded as `((x,y),z)`.

def edgeLength23
    {E : Type*} [NormedAddCommGroup E] : ((E × E) × E) → ℝ≥0∞ :=
  fun p => ENNReal.ofReal ‖p.1.2 - p.2‖

/-- Endpoint edge length on a triple encoded as `((x,y),z)`. -/
def AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleCore.edgeLength13 Partial Not mapped

- Endpoint edge length on a triple encoded as `((x,y),z)`.

def edgeLength13
    {E : Type*} [NormedAddCommGroup E] : ((E × E) × E) → ℝ≥0∞ :=
  fun p => ENNReal.ofReal ‖p.1.1 - p.2‖

/-- The extended-nonnegative first edge length is measurable on a Borel normed
space. -/
theorem AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleCore.edgeLength12_measurable Partial Not mapped

- The extended-nonnegative first edge length is measurable on a Borel normed space.

theorem edgeLength12_measurable
    {E : Type*} [NormedAddCommGroup E] [MeasurableSpace E] [BorelSpace E]
    [SecondCountableTopology E] :
    Measurable (edgeLength12 (E := E)) := by
  have hpair : Measurable (fun p : ((E × E) × E) => (p.1.1, p.1.2)) :=
    (measurable_fst.comp measurable_fst).prodMk (measurable_snd.comp measurable_fst)
  have hdist : Measurable (fun p : ((E × E) × E) => dist p.1.1 p.1.2) :=
    measurable_dist.comp hpair
  change Measurable (fun p : ((E × E) × E) => ENNReal.ofReal ‖p.1.1 - p.1.2‖)
  simpa only [dist_eq_norm] using hdist.ennreal_ofReal

/-- Measurability of the middle-to-last edge. -/
theorem AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleCore.edgeLength23_measurable Partial Not mapped

- Measurability of the middle-to-last edge.

theorem edgeLength23_measurable
    {E : Type*} [NormedAddCommGroup E] [MeasurableSpace E] [BorelSpace E]
    [SecondCountableTopology E] :
    Measurable (edgeLength23 (E := E)) := by
  have hpair : Measurable (fun p : ((E × E) × E) => (p.1.2, p.2)) :=
    (measurable_snd.comp measurable_fst).prodMk measurable_snd
  have hdist : Measurable (fun p : ((E × E) × E) => dist p.1.2 p.2) :=
    measurable_dist.comp hpair
  change Measurable (fun p : ((E × E) × E) => ENNReal.ofReal ‖p.1.2 - p.2‖)
  simpa only [dist_eq_norm] using hdist.ennreal_ofReal

/-- Measurability of the endpoint edge. -/
theorem AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleCore.edgeLength13_measurable Partial Not mapped

- Measurability of the endpoint edge.

theorem edgeLength13_measurable
    {E : Type*} [NormedAddCommGroup E] [MeasurableSpace E] [BorelSpace E]
    [SecondCountableTopology E] :
    Measurable (edgeLength13 (E := E)) := by
  have hpair : Measurable (fun p : ((E × E) × E) => (p.1.1, p.2)) :=
    (measurable_fst.comp measurable_fst).prodMk measurable_snd
  have hdist : Measurable (fun p : ((E × E) × E) => dist p.1.1 p.2) :=
    measurable_dist.comp hpair
  change Measurable (fun p : ((E × E) × E) => ENNReal.ofReal ‖p.1.1 - p.2‖)
  simpa only [dist_eq_norm] using hdist.ennreal_ofReal

/-- Pointwise triangle inequality for the three edge lengths. -/
theorem AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleCore.edgeLength13_le_add Partial Not mapped

- Pointwise triangle inequality for the three edge lengths.

theorem edgeLength13_le_add
    {E : Type*} [NormedAddCommGroup E] (p : ((E × E) × E)) :
    edgeLength13 p ≤ edgeLength12 p + edgeLength23 p := by
  have hreal : ‖p.1.1 - p.2‖ ≤ ‖p.1.1 - p.1.2‖ + ‖p.1.2 - p.2‖ := by
    simpa only [dist_eq_norm] using dist_triangle p.1.1 p.1.2 p.2
  calc
    ENNReal.ofReal ‖p.1.1 - p.2‖ ≤
        ENNReal.ofReal (‖p.1.1 - p.1.2‖ + ‖p.1.2 - p.2‖) :=
      ENNReal.ofReal_le_ofReal hreal
    _ = ENNReal.ofReal ‖p.1.1 - p.1.2‖ + ENNReal.ofReal ‖p.1.2 - p.2‖ :=
      ENNReal.ofReal_add (norm_nonneg _) (norm_nonneg _)

/-- The ENNReal `L2` seminorm used by the transport proof. The exponent is a
real `rpow`, matching Mathlib's Minkowski theorem. -/
def AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleCore.l2Seminorm Partial Not mapped

- The ENNReal `L2` seminorm used by the transport proof. The exponent is a real `rpow`, matching Mathlib's Minkowski theorem.

noncomputable def l2Seminorm
    {Ω : Type*} [MeasurableSpace Ω]
    (μ : Measure Ω) (f : Ω → ℝ≥0∞) : ℝ≥0∞ :=
  (∫⁻ x, f x ^ (2 : ℝ) ∂μ) ^ (1 / (2 : ℝ))

/-- Monotonicity of the ENNReal `L2` seminorm. -/
theorem AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleCore.l2Seminorm_mono Partial Not mapped

- Monotonicity of the ENNReal `L2` seminorm.

theorem l2Seminorm_mono
    {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω)
    {f g : Ω → ℝ≥0∞} (hfg : ∀ x, f x ≤ g x) :
    l2Seminorm μ f ≤ l2Seminorm μ g := by
  unfold l2Seminorm
  gcongr with x
  exact hfg x

/-- Minkowski's inequality in the exact `p=2` form used below. -/
theorem AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleCore.l2Seminorm_add_le Partial Not mapped

- Minkowski's inequality in the exact `p=2` form used below.

theorem l2Seminorm_add_le
    {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω)
    {f g : Ω → ℝ≥0∞}
    (hf : AEMeasurable f μ) (hg : AEMeasurable g μ) :
    l2Seminorm μ (f + g) ≤ l2Seminorm μ f + l2Seminorm μ g := by
  unfold l2Seminorm
  simpa only [Pi.add_apply] using
    (ENNReal.lintegral_Lp_add_le (μ := μ) (p := (2 : ℝ)) hf hg (by norm_num))

/-- The `L2` endpoint displacement of any triple joint law is bounded by the
sum of its two adjacent `L2` displacements. -/
theorem AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleCore.l2_edge_triangle Partial Not mapped

- The `L2` endpoint displacement of any triple joint law is bounded by the sum of its two adjacent `L2` displacements.

theorem l2_edge_triangle
    {E : Type*} [NormedAddCommGroup E] [MeasurableSpace E] [BorelSpace E]
    [SecondCountableTopology E]
    (γ : Measure ((E × E) × E)) :
    l2Seminorm γ (edgeLength13 (E := E)) ≤
      l2Seminorm γ (edgeLength12 (E := E)) +
        l2Seminorm γ (edgeLength23 (E := E)) := by
  calc
    l2Seminorm γ (edgeLength13 (E := E)) ≤
        l2Seminorm γ (edgeLength12 (E := E) + edgeLength23 (E := E)) :=
      l2Seminorm_mono γ edgeLength13_le_add
    _ ≤ l2Seminorm γ (edgeLength12 (E := E)) +
          l2Seminorm γ (edgeLength23 (E := E)) :=
      l2Seminorm_add_le γ edgeLength12_measurable.aemeasurable
        edgeLength23_measurable.aemeasurable

end WassersteinTriangleCore
end Measure
end TechnicalLemmas
end AutoSamplingTheory