LeanMachineLearning

Learning.randomSampling.action_tendsto_any๐Ÿ”—

Theorem

The minimum distance from sampled actions to any point tends to zero.

๐Ÿ”—theorem
Learning.randomSampling.action_tendsto_any.{u_1, u_2, u_3} {๐“ : Type u_1} {๐“จ : Type u_2} {ฮฉ : Type u_3} {m๐“ : MeasurableSpace ๐“} {m๐“จ : MeasurableSpace ๐“จ} {mฮฉ : MeasurableSpace ฮฉ} {ฮผ : MeasureTheory.Measure ๐“} [MeasureTheory.IsProbabilityMeasure ฮผ] {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {f : ๐“ โ†’ ๐“จ} {hf : Measurable f} [PseudoMetricSpace ๐“] [SecondCountableTopology ๐“] [OpensMeasurableSpace ๐“] [MeasureTheory.Measure.IsOpenPosMeasure ฮผ] (h : IsAlgEnvSeq A Y (randomSampling ฮผ) (evalEnv f hf) P) (a : ๐“) {ฮต : โ„} (hฮต : 0 < ฮต) : Filter.Tendsto (fun i => P {x | ฮต โ‰ค Function.min fun j => dist (A (โ†‘j) x) a}) Filter.atTop (nhds 0)
Learning.randomSampling.action_tendsto_any.{u_1, u_2, u_3} {๐“ : Type u_1} {๐“จ : Type u_2} {ฮฉ : Type u_3} {m๐“ : MeasurableSpace ๐“} {m๐“จ : MeasurableSpace ๐“จ} {mฮฉ : MeasurableSpace ฮฉ} {ฮผ : MeasureTheory.Measure ๐“} [MeasureTheory.IsProbabilityMeasure ฮผ] {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {A : โ„• โ†’ ฮฉ โ†’ ๐“} {Y : โ„• โ†’ ฮฉ โ†’ ๐“จ} {f : ๐“ โ†’ ๐“จ} {hf : Measurable f} [PseudoMetricSpace ๐“] [SecondCountableTopology ๐“] [OpensMeasurableSpace ๐“] [MeasureTheory.Measure.IsOpenPosMeasure ฮผ] (h : IsAlgEnvSeq A Y (randomSampling ฮผ) (evalEnv f hf) P) (a : ๐“) {ฮต : โ„} (hฮต : 0 < ฮต) : Filter.Tendsto (fun i => P {x | ฮต โ‰ค Function.min fun j => dist (A (โ†‘j) x) a}) Filter.atTop (nhds 0)

Code

theorem action_tendsto_any (h : IsAlgEnvSeq A Y (randomSampling ฮผ) (evalEnv f hf) P) (a : ๐“)
    {ฮต : โ„} (hฮต : 0 < ฮต) :
    Tendsto (fun i => P {x | ฮต โ‰ค (fun (j : Iic i) โ†ฆ dist (A j.1 x) a).min}) atTop (๐“ 0)
Proof
by
  set randomSampling_alg := randomSampling (๐“จ := ๐“จ) ฮผ
  refine tendsto_zero_of_le (g := fun n โ†ฆ P (โ‹‚ i โˆˆ Iic n, {x | ฮต โ‰ค dist (A i x) a})) ?_ ?_
  ยท have inter_prod (n : โ„•) : P (โ‹‚ j โˆˆ Iic n, {x | ฮต โ‰ค dist (A j x) a}) =
        โˆ j โˆˆ Iic n, P {x | ฮต โ‰ค dist (A j x) a} := by
      refine iIndepSet.meas_biInter ?_ _
      rw [iIndepSet_iff_meas_biInter fun i โ†ฆ ?_]
      ยท intro s
        have iIndep_actions := randomSampling.iIndep_action h
        rw [iIndepFun_iff_measure_inter_preimage_eq_mul] at iIndep_actions
        have meas_dist : โˆ€ i โˆˆ s, MeasurableSet {x | ฮต โ‰ค dist x a} := by
          intro i hs
          measurability
        specialize iIndep_actions s meas_dist
        simpa [Set.preimage] using iIndep_actions
      ยท have hAi := h.measurable_action i
        measurability
    simp_rw [inter_prod]
    have prod_law (n : โ„•) : โˆ j โˆˆ Iic n, P {x | ฮต โ‰ค dist (A j x) a} =
        โˆ j โˆˆ Iic n, ฮผ {x | ฮต โ‰ค dist x a} := by
      refine prod_congr rfl fun j hj โ†ฆ ?_
      have hlaw (n : โ„•) : HasLaw (A n) ฮผ P := randomSampling.hasLaw_action h n
      rw [โ† (hlaw j).map_eq, P.map_apply]
      ยท simp
      ยท exact h.measurable_action j
      ยท measurability
    simp_rw [prod_law]
    simp only [prod_const, Nat.card_Iic]
    refine tendsto_pow_atTop_nhds_zero_of_lt_one ?_ |> Tendsto.comp <| tendsto_add_atTop_nat 1
    have compl : {x | ฮต โ‰ค dist x a} = {x | dist x a < ฮต}แถœ := by
      ext a
      simp
    rw [compl, measure_compl (by measurability) (by simp), measure_univ]
    refine ENNReal.sub_lt_self (by simp) (by simp) ?_
    exact (Metric.measure_ball_pos ฮผ a hฮต).ne'
  ยท intro n
    refine measure_mono ?_
    simp only [mem_Iic, Set.subset_iInter_iff, Set.ofPred_subset_ofPred]
    intro i hi ฯ‰ (hฯ‰ : ฮต โ‰ค (fun (j : Iic n) โ†ฆ dist (A j.1 ฯ‰) a).min)
    simp_all only [univ_eq_attach, le_inf'_iff, mem_attach, forall_const, Subtype.forall, mem_Iic]

Actions: 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, 89 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.