lemmacTransform_add_const {v : M→ℝ} (hv : Continuous v) (a : ℝ) :
cTransform (fun x => v x + a) = fun x => cTransform v x - a :=by
proof · 10
lines
funext x
apply le_antisymm
· rw [cTransform_le_iff (v :=fun x => v x + a) (hv.add continuous_const)]
intro y
have hh := ((cTransform_le_iff hv x (cTransform v x)).mp le_rfl) y
linarith
· obtain ⟨y, hy, _⟩ := exists_cTransform_contact hv x
have hh := cTransform_gap_nonneg (v :=fun x => v x + a) (hv.add continuous_const) x y
dsimp [contactGap] at hh
linarith
funext x
apply le_antisymm
· rw [cTransform_le_iff continuous_const]
intro y
linarith [cost_nonneg x y]
· have h := cTransform_gap_nonneg (v :=fun_ : M=> (0 : ℝ)) continuous_const x x
simpa [contactGap, cost] using h
apply LipschitzWith.of_dist_le_mul
intro v w
simp only [NNReal.coe_one, one_mul]
apply (BoundedContinuousFunction.dist_le dist_nonneg).mpr
intro x
rw [Real.dist_eq, abs_le]
have hbound (a b : M→ᵇ ℝ) : cTransform a x - cTransform b x ≤ dist a b :=by
rw [sub_le_iff_le_add, cTransform_le_iff a.continuous]
intro y
have hg := cTransform_gap_nonneg b.continuous x y
have hd :=BoundedContinuousFunction.dist_coe_le_dist (f := a) (g := b) y
rw [Real.dist_eq, abs_le] at hd
dsimp [contactGap] at hg
linarith [hd.1]
constructor
· have hh := hbound w v
rw [dist_comm w v] at hh
change -dist v w ≤ cTransform v x - cTransform w x
linarith
· exact hbound v w
lemmaintegral_boundedContinuous_lipschitz (mu : MeasureM) [IsProbabilityMeasure mu] :
LipschitzWith1 (funf : M→ᵇ ℝ=>∫ x, f x ∂mu) :=by
proof · 7
lines
apply LipschitzWith.of_dist_le_mul
intro f g
simp only [NNReal.coe_one, one_mul, dist_eq_norm]
haveheq : (∫ x, f x ∂mu) - (∫ x, g x ∂mu) = ∫ x, (f - g) x ∂mu :=
(integral_sub (f.integrable mu) (g.integrable mu)).symm
rw [heq]
exact (f - g).norm_integral_le_norm mu
lemmanormalizeDualPair_mem (x0 : M) (v : M→ᵇ ℝ) :
normalizeDualPair x0 v ∈ normalizedDualPairs x0 :=by
proof · 15
lines
let a := boundedCTransform v
change (a x0 + -a x0 = 0) ∧ _ ∧ _
refine ⟨add_neg_cancel _, ?_, ?_⟩
· apply BoundedContinuousFunction.ext
intro x
change cTransform (fun y => cTransform a y + a x0) x = a x + -a x0
rw [cTransform_add_const (continuous_cTransform a.continuous)]
have hh := congrFun (cTransform_triple v.continuous) x
change cTransform (cTransform a) x = a x at hh
exact (congrArg (funt : ℝ=> t - a x0) hh).trans (by ring)
· apply BoundedContinuousFunction.ext
intro x
change cTransform (fun y => a y + -a x0) x = cTransform a x + a x0
rw [cTransform_add_const a.continuous]
ring
lemmadualObjective_add_constants (mu nu : MeasureM) [IsProbabilityMeasure mu]
[IsProbabilityMeasure nu] (a b : M→ᵇ ℝ) (k : ℝ) :
dualObjective mu nu (a + BoundedContinuousFunction.const M (-k),
b + BoundedContinuousFunction.const M k) = dualObjective mu nu (a,b) :=by
proof · 6
lines
change (∫ x, (a x + -k) ∂mu) + (∫ y, (b y + k) ∂nu) = _
rw [integral_add (a.integrable mu) (integrable_const _),
integral_add (b.integrable nu) (integrable_const _)]
simp only [integral_const, Measure.real, measure_univ, ENNReal.toReal_one, one_smul]
dsimp [dualObjective]
ring
lemmadualObjective_normalize_le (mu nu : MeasureM) [IsProbabilityMeasure mu]
[IsProbabilityMeasure nu] (x0 : M) (u v : M→ᵇ ℝ)
(h : ∀ x y, 0≤ contactGap u v x y) :
dualObjective mu nu (normalizeDualPair x0 v) ≤ dualObjective mu nu (u,v) :=by
proof · 12
lines
rw [normalizeDualPair, dualObjective_add_constants]
apply add_le_add
· apply integral_mono (boundedCTransform v |>.integrable mu) (u.integrable mu)
intro x
rw [boundedCTransform_apply, cTransform_le_iff v.continuous]
intro y
have hh := h x y
dsimp [contactGap] at hh
linarith
· apply integral_mono (boundedCTransform (boundedCTransform v) |>.integrable nu)
(v.integrable nu)
exact cTransform_cTransform_le v.continuous