Learning.randomSampling.tendsto_maxโ
The maximum image action converges to the function's global maximum.
Learning.randomSampling.tendsto_maxโ.{u_1, u_3} {๐ : Type u_1} {ฮฉ : Type u_3} {m๐ : MeasurableSpace ๐} {mฮฉ : MeasurableSpace ฮฉ} {ฮผ : MeasureTheory.Measure ๐} [MeasureTheory.IsProbabilityMeasure ฮผ] {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {A : โ โ ฮฉ โ ๐} [PseudoMetricSpace ๐] [SecondCountableTopology ๐] [OpensMeasurableSpace ๐] [MeasureTheory.Measure.IsOpenPosMeasure ฮผ] {R : โ โ ฮฉ โ โ} {f : ๐ โ โ} (hfc : Continuous f) {a : ๐} (h : IsAlgEnvSeq A R (randomSampling ฮผ) (evalEnv f โฏ) P) (hf_max : โ (x : ๐), f x โค f a) : MeasureTheory.TendstoInMeasure P (fun n ฯ => Function.max fun i => f (A (โi) ฯ)) Filter.atTop fun x => f aLearning.randomSampling.tendsto_maxโ.{u_1, u_3} {๐ : Type u_1} {ฮฉ : Type u_3} {m๐ : MeasurableSpace ๐} {mฮฉ : MeasurableSpace ฮฉ} {ฮผ : MeasureTheory.Measure ๐} [MeasureTheory.IsProbabilityMeasure ฮผ] {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {A : โ โ ฮฉ โ ๐} [PseudoMetricSpace ๐] [SecondCountableTopology ๐] [OpensMeasurableSpace ๐] [MeasureTheory.Measure.IsOpenPosMeasure ฮผ] {R : โ โ ฮฉ โ โ} {f : ๐ โ โ} (hfc : Continuous f) {a : ๐} (h : IsAlgEnvSeq A R (randomSampling ฮผ) (evalEnv f โฏ) P) (hf_max : โ (x : ๐), f x โค f a) : MeasureTheory.TendstoInMeasure P (fun n ฯ => Function.max fun i => f (A (โi) ฯ)) Filter.atTop fun x => f a
Code
lemma tendsto_maxโ (h : IsAlgEnvSeq A R (randomSampling ฮผ) (evalEnv f hfc.measurable) P)
(hf_max : โ x, f x โค f a) :
TendstoInMeasure P (fun n ฯ โฆ (fun (i : Iic n) โฆ f (A i.1 ฯ)).max) atTop (fun _ โฆ f a)Proof
by
rw [tendstoInMeasure_iff_dist]
intro ฮต hฮต
refine image_action_tendsto_any hfc h a hฮต |> tendsto_zero_of_le <| ?_
intro n
refine measure_mono ?_
simp only [Set.ofPred_subset_ofPred]
intro ฯ hฯ
rw [โ argmin_spec]
set j := argmin (fun (i : Iic n) โฆ dist (f (A i ฯ)) (f a))
refine hฯ.trans ?_
rw [โ argmax_spec]
set k := argmax (fun (i : Iic n) โฆ f (A i ฯ))
have := hf_max (A k ฯ)
have : f (A j ฯ) โค f (A k ฯ) :=
isMaxOn_argmax (fun (i : Iic n) โฆ f (A i ฯ)) j
simp [Real.dist_eq]
grindActions: Source ยท Open Issue
Meaning last changed in v4.34.0-rc2-1-g439785b (2026-08-23), the 4th recorded change.
Self-contained, with its dependencies inlined and proofs replaced by sorry: download the raw file ยท open it in the Lean web editor.
Dependency graph
Audit surface: 10 project declarations, 87 external constants
โ Proved: no sorry anywhere in its closure
This is the tool's own reading of one build's recorded axioms, and it is not robust against an author who wants it to pass. Checking meant to be relied on should go through Comparator, which replays the proof through the kernel from an export against an explicit list of permitted axioms.