Samplinglib
Lean gate not recorded for this source state main · 9bb7a7394ab0

ActualFiniteHistoryTailLaw: mathematical reading route

Read the statements and derivations in source order. Every result has its own optional Lean statement and proof. Source assumptions, library reuse and unproved boundaries are kept explicit.

  1. Actual PBPS finite history and unused-clock tail law
Samplinglib mathematical lesson

Actual PBPS finite history and unused-clock tail law

AutoSamplingTheory.ExampleCases.ProximalBPS.ActualFiniteHistoryTailLaw.actual_finite_history_tail_law · theorem · Teaching coverage

Read this first

Mathematical statement

Let E be any finite-dimensional real inner-product Borel space, including dimension zero. Let V:E→ℝ be C², α,β≥0 and η∈ℝ with α>0, α≤β, α‖v‖²≤D²V(x)[v,v]≤β‖v‖² for every x,v∈E, η>0 and βη≤1. Fix any deterministic y,r∈E and initial phase z₀∈E×E. Put c=y−η∇V(r), Φ_t(x,p)=(c+cos(t)(x−c)+√η sin(t)p, −sin(t)(x−c)/√η+cos(t)p), g_r(x)=∇V(x)−∇V(r), S_r(x,p)=(x,p−2〈p,g_r(x)〉g_r(x)/‖g_r(x)‖²), λ_r(x,p)=√η max{0,〈p,g_r(x)〉}, Λ_z(t)=∫₀ᵗλ_r(Φ_s(z))ds and τ_z(e)=inf{t≥0:Λ_z(t)≥e}∈[0,∞], with inf empty=∞. Total real division makes S_r the identity at g_r(x)=0. The record space is D=([0,∞)×(E×E))⊕{stopped}, with Borel sum structure. Define next(e,stopped)=stopped; for a live record (T,z), next(e,(T,z))=stopped if τ_z(e)=∞, and otherwise next(e,(T,z))=(T+τ_z(e),S_rΦ_(τ_z(e))(z)). In the Lean definition untopD0 is used only in this non-top branch. Define R₀(e)=live(0,z₀) and R_(j+1)(e)=next(e_j,R_j(e)). Let Ω=ℝ^ℕ with its product Borel structure and P=⊗_(k≥0)Exp(1). Let ε(w)_k=max{w_k,0}; this is an ambient coordinate extension on a P-null nonpositive-clock set, not new source dynamics for negative clocks. For every deterministic n≥0 define H_n(w)=(R_j(ε(w)))_(0≤j≤n)∈D^(Fin(n+1)), Y_n(w)_k=w_(n+k), and F_n=σ(w↦w_k:k<n). Then H_n and Y_n are measurable for the ambient product Borel structures. If w,w′ agree for all k<n, then H_n(w)=H_n(w′), for all real sequences w,w′, including the ambient extension. Moreover H_n is F_n-measurable. The entire countable unused raw tail has law (Y_n)_*P=P and is independent of H_n. Its joint law is (H_n,Y_n)_*P=(H_n)_*P⊗P. For every measurable A⊆D^(Fin(n+1)), (Y_n)_*(P restricted to H_n⁻¹(A))=P(H_n⁻¹(A))·P. All conclusions hold for every y,r,z₀,n with the standing analytic parameters fixed. The last identity is unnormalized and includes P(H_n⁻¹(A))=0; no division by a point-history probability or regular conditional distribution is claimed. At n=0 the history is constant and Y₀ is the identity. Tagged stopped histories are retained without assigning a phase at infinity. The tail starts at raw coordinate n, which represents the source E_(n+1). No measurability, causality, independence or law provider is assumed. This is an attributed ASTIS completion of the deterministic-depth unused-input probability bridge implicit in AppendixA.1(A.7), using the authors actual recursion and independent clock model. Conditional random-hazard next-wait survival, conditional finite-event densities/final survival/iteration, full(A.7), physical-time residual memorylessness, random stopping/restart/Markovness, reversal, invariance, all-L² contraction, implementation error/cost, main results and actual-input composition remain separate obligations.

\[(Y_n)_*(P|_{H_n^{-1}(A)})=P(H_n^{-1}(A))\,P.\]
Lean statement · actual_finite_history_tail_law

Let E be any finite-dimensional real inner-product Borel space, including dimension zero. Let V:E→ℝ be C², α,β≥0 and η∈ℝ with α>0, α≤β, α‖v‖²≤D²V(x)[v,v]≤β‖v‖² for every x,v∈E, η>0 and βη≤1. Fix any deterministic y,r∈E and initial phase z₀∈E×E. Put c=y−η∇V(r), Φ_t(x,p)=(c+cos(t)(x−c)+√η sin(t)p, −sin(t)(x−c)/√η+cos(t)p), g_r(x)=∇V(x)−∇V(r), S_r(x,p)=(x,p−2〈p,g_r(x)〉g_r(x)/‖g_r(x)‖²), λ_r(x,p)=√η max{0,〈p,g_r(x)〉}, Λ_z(t)=∫₀ᵗλ_r(Φ_s(z))ds and τ_z(e)=inf{t≥0:Λ_z(t)≥e}∈[0,∞], with inf empty=∞. Total real division makes S_r the identity at g_r(x)=0. The record space is D=([0,∞)×(E×E))⊕{stopped}, with Borel sum structure. Define next(e,stopped)=stopped; for a live record (T,z), next(e,(T,z))=stopped if τ_z(e)=∞, and otherwise next(e,(T,z))=(T+τ_z(e),S_rΦ_(τ_z(e))(z)). In the Lean definition untopD0 is used only in this non-top branch. Define R₀(e)=live(0,z₀) and R_(j+1)(e)=next(e_j,R_j(e)). Let Ω=ℝ^ℕ with its product Borel structure and P=⊗_(k≥0)Exp(1). Let ε(w)_k=max{w_k,0}; this is an ambient coordinate extension on a P-null nonpositive-clock set, not new source dynamics for negative clocks. For every deterministic n≥0 define H_n(w)=(R_j(ε(w)))_(0≤j≤n)∈D^(Fin(n+1)), Y_n(w)_k=w_(n+k), and F_n=σ(w↦w_k:k<n). Then H_n and Y_n are measurable for the ambient product Borel structures. If w,w′ agree for all k<n, then H_n(w)=H_n(w′), for all real sequences w,w′, including the ambient extension. Moreover H_n is F_n-measurable. The entire countable unused raw tail has law (Y_n)_*P=P and is independent of H_n. Its joint law is (H_n,Y_n)_*P=(H_n)_*P⊗P. For every measurable A⊆D^(Fin(n+1)), (Y_n)_*(P restricted to H_n⁻¹(A))=P(H_n⁻¹(A))·P. All conclusions hold for every y,r,z₀,n with the standing analytic parameters fixed. The last identity is unnormalized and includes P(H_n⁻¹(A))=0; no division by a point-history probability or regular conditional distribution is claimed. At n=0 the history is constant and Y₀ is the identity. Tagged stopped histories are retained without assigning a phase at infinity. The tail starts at raw coordinate n, which represents the source E_(n+1). No measurability, causality, independence or law provider is assumed. This is an attributed ASTIS completion of the deterministic-depth unused-input probability bridge implicit in AppendixA.1(A.7), using the authors actual recursion and independent clock model. Conditional random-hazard next-wait survival, conditional finite-event densities/final survival/iteration, full(A.7), physical-time residual memorylessness, random stopping/restart/Markovness, reversal, invariance, all-L² contraction, implementation error/cost, main results and actual-input composition remain separate obligations.

Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

theorem actual_finite_history_tail_law
    {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
    [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
    {V : E → ℝ} {α β : ℝ≥0} {η : ℝ}
    (hα : 0 < (α : ℝ)) (hαβ : α ≤ β) (hV : ContDiff ℝ 2 V)
    (hH : ∀ x v : E,
      (α : ℝ) * ‖v‖ ^ 2 ≤ (fderiv ℝ (fderiv ℝ V) x v) v ∧
      (fderiv ℝ (fderiv ℝ V) x v) v ≤ (β : ℝ) * ‖v‖ ^ 2)
    (hη : 0 < η) (hβη : (β : ℝ) * η ≤ 1) :
    actual_finite_history_tail_law_statement hα hαβ hV hH hη hβη

Exact module and namespace context

Full Lean proposition (definition) · actual_finite_history_tail_law_statement

This literal definition stores the complete proposition asserted above. It supplies no mathematical proof or additional hypothesis; the theorem proof must establish its value.

Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

Download module (.lean)
private def actual_finite_history_tail_law_statement
    {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
    [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
    {V : E → ℝ} {α β : ℝ≥0} {η : ℝ}
    (hα : 0 < (α : ℝ)) (hαβ : α ≤ β) (hV : ContDiff ℝ 2 V)
    (hH : ∀ x v : E,
      (α : ℝ) * ‖v‖ ^ 2 ≤ (fderiv ℝ (fderiv ℝ V) x v) v ∧
      (fderiv ℝ (fderiv ℝ V) x v) v ≤ (β : ℝ) * ‖v‖ ^ 2)
    (hη : 0 < η) (hβη : (β : ℝ) * η ≤ 1) : Prop :=
    let c : E → E → E := fun y xRef => y - η • gradient V xRef
    let Φ : E → E → ℝ → (E × E) → (E × E) := fun y xRef t z =>
      (c y xRef + Real.cos t • (z.1 - c y xRef) +
          (Real.sqrt η * Real.sin t) • z.2,
       (-Real.sin t / Real.sqrt η) • (z.1 - c y xRef) + Real.cos t • z.2)
    let S : E → (E × E) → (E × E) := fun xRef z =>
      (z.1, z.2 - (2 * inner ℝ z.2 (gradient V z.1 - gradient V xRef) /
        ‖gradient V z.1 - gradient V xRef‖ ^ 2) • (gradient V z.1 - gradient V xRef))
    let rate : E → (E × E) → ℝ := fun xRef z =>
      Real.sqrt η * max 0 (inner ℝ z.2 (gradient V z.1 - gradient V xRef))
    let Λ : E → E → (E × E) → ℝ≥0 → ℝ := fun y xRef z t =>
      ∫ s in (0 : ℝ)..(t : ℝ), rate xRef (Φ y xRef s z)
    let τ : E → E → (E × E) → ℝ≥0 → WithTop ℝ≥0 := fun y xRef z e =>
      MeasureTheory.hittingAfter
        (fun t : ℝ≥0 => fun a : (E × E) × (E × E) × ℝ≥0 =>
          Λ a.1.1 a.1.2 a.2.1 t - (a.2.2 : ℝ))
        (Set.Ici (0 : ℝ)) 0 ((y, xRef), z, e)
    let next : E → E → ℝ≥0 → ((ℝ≥0 × (E × E)) ⊕ Unit) →
        ((ℝ≥0 × (E × E)) ⊕ Unit) := fun y xRef e r =>
      match r with
      | Sum.inr _ => Sum.inr ()
      | Sum.inl a =>
        if τ y xRef a.2 e = ⊤ then Sum.inr () else
          Sum.inl (a.1 + (τ y xRef a.2 e).untopD 0,
            S xRef (Φ y xRef (((τ y xRef a.2 e).untopD 0 : ℝ≥0) : ℝ) a.2))
    let record : E → E → (E × E) → (ℕ → ℝ≥0) → ℕ →
        ((ℝ≥0 × (E × E)) ⊕ Unit) := fun y xRef z₀ e n =>
      Nat.rec (Sum.inl (0, z₀)) (fun k r => next y xRef (e k) r) n
    let P : Measure (ℕ → ℝ) := Measure.infinitePi (fun _ : ℕ => expMeasure (1 : ℝ))
    let ε : (ℕ → ℝ) → ℕ → ℝ≥0 := fun w k => Real.toNNReal (w k)
    let history : E → E → (E × E) → (n : ℕ) → (ℕ → ℝ) →
        (Fin (n + 1) → ((ℝ≥0 × (E × E)) ⊕ Unit)) :=
      fun y xRef z₀ n w j => record y xRef z₀ (ε w) j.val
    let tail : ℕ → (ℕ → ℝ) → (ℕ → ℝ) := fun n w k => w (n + k)
    let past : ℕ → MeasurableSpace (ℕ → ℝ) := fun n =>
      ⨆ k ∈ Set.Iio n, MeasurableSpace.comap (fun w : ℕ → ℝ => w k) inferInstance
    ∀ y xRef : E, ∀ z₀ : E × E, ∀ n : ℕ,
      Measurable (history y xRef z₀ n) ∧ Measurable (tail n) ∧
      (∀ (w w' : ℕ → ℝ), (∀ k < n, w k = w' k) →
        history y xRef z₀ n w = history y xRef z₀ n w') ∧
      Measurable[past n] (history y xRef z₀ n) ∧
      Measure.map (tail n) P = P ∧
      IndepFun (history y xRef z₀ n) (tail n) P ∧
      Measure.map (fun w => (history y xRef z₀ n w, tail n w)) P =
        (Measure.map (history y xRef z₀ n) P).prod P ∧
      (∀ A : Set (Fin (n + 1) → ((ℝ≥0 × (E × E)) ⊕ Unit)), MeasurableSet A →
        Measure.map (tail n) (P.restrict (history y xRef z₀ n ⁻¹' A)) =
          (P (history y xRef z₀ n ⁻¹' A)) • P)


set_option maxHeartbeats 1600000 in

Exact module and namespace context

Proof roadmap

  1. 1Keep the actual recursion and consume its existing producers

    Retain the literal harmonic flow, reflection, intensity, stopped crossing time and tagged recursion. The already compiled finite-recursion theorem supplies joint Borel measurability of each R_j; the canonical exponential-product theorem supplies probability and mutual independence of raw coordinate clocks. No independence or regularity certificate is requested from the caller.

  2. 2Prove finite-prefix causality and ambient measurability

    Induct on m. R₀ is constant. The step R_(m+1) uses only e_m and R_m, so agreement below m+1 gives agreement at the step and by induction at the previous record. For each j≤n, agreement below n therefore gives the same record and hence the same history. Measurable coordinate clipping composed with the existing joint-measurable recursion gives ambient H_n measurability; coordinate reindexing gives ambient Y_n measurability.

  3. 3Expose the consumed-prefix measurable input

    For this proof only, define ē_k(w)=ε_k(w) when k<n and zero otherwise. Each used coordinate is F_n-measurable by inclusion of its generated sigma algebra into F_n. Clipping is Borel; unused coordinates are constant. Thus the full clipped/truncated sequence is F_n-measurable. This auxiliary sequence proves a factorization of H_n; it does not replace P or alter the actual algorithm.

  4. 4Derive history measurability in the past sigma algebra

    For every j∈Fin(n+1), the two threshold streams ē(w) and ε(w) agree below j. Causality makes the resulting jth records identical. Compose the existing jointly measurable R_j with deterministic parameters and ē, and use this equality. Coordinatewise product measurability now proves H_n is F_n-measurable, including the live/stopped tag. The smaller domain sigma algebra is explicit; ambient measurability alone would not suffice.

  5. 5Separate the independent past and unused future

    Put G_n=σ(w↦w_k:k≥n). Every coordinate of Y_n belongs to this sigma algebra. Mutual independence of all raw coordinate functions, together with their ambient measurability, gives independence of the generated sigma algebras for disjoint index sets [0,n) and [n,∞). The existing Mathlib theorem extends cylinder independence to the whole generated sigma algebras. Independence descends along the inclusions generated by H_n and Y_n. Hence H_n and the full countable tail are independent.

  6. 6Identify the unchanged tail and restricted laws

    The injection k↦n+k reindexes identical Exp(1) factors, so the infinite-product pushforward is P. Independence and measurability identify the joint pushforward with the product of its two marginals. Finally, for any Borel tail event B, evaluate the restricted pushforward as P(Y_n∈B and H_n∈A); independence makes this P(H_n∈A)P(Y_n∈B), and the tail law replaces the last factor by P(B). Equality on every Borel B proves the unnormalized measure identity. No positivity, point-event normalization or conditional kernel existence is used.

Full assumptions and notation

All objects and hypotheses

  • E is finite-dimensional over ℝ with inner product and Borel measurable structure; rank zero is included. V:E→ℝ is C².
  • The six analytic hypotheses are α>0, α≤β, V∈C², the pointwise α/β Hessian bounds for every x,v, η>0, and βη≤1. α,β are nonnegative.
  • y,r,z₀ and n are deterministic and universally quantified. No random initial state or stopping index is included.
  • P, ε, all eight actual recursion definitions, H_n,Y_n and F_n are literal definitions. Measurability, prefix causality, independence and distributional identities are conclusions.
  • A is any Borel history event, with no positive-probability assumption. The restricted law is unnormalized. Zero rates, zero normals, infinite waits and stopped branches are allowed.

Mathematical proof

1. Keep the actual recursion and consume its existing producers

Retain the literal harmonic flow, reflection, intensity, stopped crossing time and tagged recursion. The already compiled finite-recursion theorem supplies joint Borel measurability of each R_j; the canonical exponential-product theorem supplies probability and mutual independence of raw coordinate clocks. No independence or regularity certificate is requested from the caller.

\[R_0=\operatorname{live}(0,z_0),\quad R_{j+1}=\operatorname{next}(\epsilon_j,R_j),\quad H_n=(R_0,\ldots,R_n),\quad Y_n(w)=(w_{n+k})_{k\ge0}.\]
Corresponding Lean step
  classical
  let c : E → E → E := fun y xRef => y - η • gradient V xRef
  let Φ : E → E → ℝ → (E × E) → (E × E) := fun y xRef t z =>
    (c y xRef + Real.cos t • (z.1 - c y xRef) +
        (Real.sqrt η * Real.sin t) • z.2,
     (-Real.sin t / Real.sqrt η) • (z.1 - c y xRef) + Real.cos t • z.2)
  let S : E → (E × E) → (E × E) := fun xRef z =>
    (z.1, z.2 - (2 * inner ℝ z.2 (gradient V z.1 - gradient V xRef) /
      ‖gradient V z.1 - gradient V xRef‖ ^ 2) • (gradient V z.1 - gradient V xRef))
  let rate : E → (E × E) → ℝ := fun xRef z =>
    Real.sqrt η * max 0 (inner ℝ z.2 (gradient V z.1 - gradient V xRef))
  let Λ : E → E → (E × E) → ℝ≥0 → ℝ := fun y xRef z t =>
    ∫ s in (0 : ℝ)..(t : ℝ), rate xRef (Φ y xRef s z)
  let τ : E → E → (E × E) → ℝ≥0 → WithTop ℝ≥0 := fun y xRef z e =>
    MeasureTheory.hittingAfter
      (fun t : ℝ≥0 => fun a : (E × E) × (E × E) × ℝ≥0 =>
        Λ a.1.1 a.1.2 a.2.1 t - (a.2.2 : ℝ))
      (Set.Ici (0 : ℝ)) 0 ((y, xRef), z, e)
  let next : E → E → ℝ≥0 → ((ℝ≥0 × (E × E)) ⊕ Unit) →
      ((ℝ≥0 × (E × E)) ⊕ Unit) := fun y xRef e r =>
    match r with
    | Sum.inr _ => Sum.inr ()
    | Sum.inl a =>
      if τ y xRef a.2 e = ⊤ then Sum.inr () else
        Sum.inl (a.1 + (τ y xRef a.2 e).untopD 0,
          S xRef (Φ y xRef (((τ y xRef a.2 e).untopD 0 : ℝ≥0) : ℝ) a.2))
  let record : E → E → (E × E) → (ℕ → ℝ≥0) → ℕ →
      ((ℝ≥0 × (E × E)) ⊕ Unit) := fun y xRef z₀ e n =>
    Nat.rec (Sum.inl (0, z₀)) (fun k r => next y xRef (e k) r) n
  let P : Measure (ℕ → ℝ) := Measure.infinitePi (fun _ : ℕ => expMeasure (1 : ℝ))
  let ε : (ℕ → ℝ) → ℕ → ℝ≥0 := fun w k => Real.toNNReal (w k)
  let history : E → E → (E × E) → (n : ℕ) → (ℕ → ℝ) →
      (Fin (n + 1) → ((ℝ≥0 × (E × E)) ⊕ Unit)) :=
    fun y xRef z₀ n w j => record y xRef z₀ (ε w) j.val
  let tail : ℕ → (ℕ → ℝ) → (ℕ → ℝ) := fun n w k => w (n + k)
  let past : ℕ → MeasurableSpace (ℕ → ℝ) := fun n =>
    ⨆ k ∈ Set.Iio n, MeasurableSpace.comap (fun w : ℕ → ℝ => w k) inferInstance
  change
  ∀ y xRef : E, ∀ z₀ : E × E, ∀ n : ℕ,
      Measurable (history y xRef z₀ n) ∧ Measurable (tail n) ∧
      (∀ (w w' : ℕ → ℝ), (∀ k < n, w k = w' k) →
        history y xRef z₀ n w = history y xRef z₀ n w') ∧
      Measurable[past n] (history y xRef z₀ n) ∧
      Measure.map (tail n) P = P ∧
      IndepFun (history y xRef z₀ n) (tail n) P ∧
      Measure.map (fun w => (history y xRef z₀ n w, tail n w)) P =
        (Measure.map (history y xRef z₀ n) P).prod P ∧
      (∀ A : Set (Fin (n + 1) → ((ℝ≥0 × (E × E)) ⊕ Unit)), MeasurableSet A →
        Measure.map (tail n) (P.restrict (history y xRef z₀ n ⁻¹' A)) =
          (P (history y xRef z₀ n ⁻¹' A)) • P)

  have hrec := ActualFiniteJumpRecursion.actual_fixed_reference_finite_jump_recursion
    hα hαβ hV hH hη hβη
  have hR (j : ℕ) : Measurable (fun a : (E × E) × (E × E) × (ℕ → ℝ≥0) =>
      record a.1.1 a.1.2 a.2.1 a.2.2 j) := hrec.2.2.2.1 j
  have hinput := AutoSamplingTheory.TechnicalLemmas.Probability.UnitExponentialProduct.unit_exponential_product_laws
  letI : IsProbabilityMeasure P := hinput.1
  letI : IsProbabilityMeasure (expMeasure (1 : ℝ)) :=
    isProbabilityMeasure_expMeasure zero_lt_one
  have hclock : iIndepFun (fun k (w : ℕ → ℝ) => w k) P := hinput.2.2.1
  intro y xRef z₀ n

Exact contiguous compiled region. These proof ingredients are derived internally and are not added source premises.

2. Prove finite-prefix causality and ambient measurability

Induct on m. R₀ is constant. The step R_(m+1) uses only e_m and R_m, so agreement below m+1 gives agreement at the step and by induction at the previous record. For each j≤n, agreement below n therefore gives the same record and hence the same history. Measurable coordinate clipping composed with the existing joint-measurable recursion gives ambient H_n measurability; coordinate reindexing gives ambient Y_n measurability.

\[w|_{[0,n)}=w\prime|_{[0,n)}\Longrightarrow H_n(w)=H_n(w\prime),\quad H_n\text{ and }Y_n\text{ are ambient Borel measurable}.\]
Corresponding Lean step
  -- Deterministic causality: the mth record consumes exactly coordinates below m.
  have hcausal (e e' : ℕ → ℝ≥0) (m : ℕ)
      (he : ∀ k < m, e k = e' k) :
      record y xRef z₀ e m = record y xRef z₀ e' m := by
    induction m with
    | zero => rfl
    | succ m ih =>
      change next y xRef (e m) (record y xRef z₀ e m) =
        next y xRef (e' m) (record y xRef z₀ e' m)
      rw [he m (Nat.lt_succ_self m), ih (fun k hk => he k (Nat.lt_succ_of_lt hk))]
  have hprefix (w w' : ℕ → ℝ) (hw : ∀ k < n, w k = w' k) :
      history y xRef z₀ n w = history y xRef z₀ n w' := by
    funext j
    exact hcausal (ε w) (ε w') j.val (fun k hk =>
      congrArg Real.toNNReal (hw k (lt_of_lt_of_le hk (Nat.le_of_lt_succ j.isLt))))
  have hε : Measurable ε := measurable_pi_lambda _ (fun k =>
    measurable_real_toNNReal.comp (measurable_pi_apply k :
      Measurable (fun w : ℕ → ℝ => w k)))
  have hHmeas : Measurable (history y xRef z₀ n) :=
    measurable_pi_lambda _ (fun j => (hR j.val).comp
      ((measurable_const : Measurable (fun _ : ℕ → ℝ => (y, xRef))).prodMk
        ((measurable_const : Measurable (fun _ : ℕ → ℝ => z₀)).prodMk hε)))
  have hTmeas : Measurable (tail n) :=
    measurable_pi_lambda _ (fun k => measurable_pi_apply (n + k))

Exact contiguous compiled region. These proof ingredients are derived internally and are not added source premises.

3. Expose the consumed-prefix measurable input

For this proof only, define ē_k(w)=ε_k(w) when k<n and zero otherwise. Each used coordinate is F_n-measurable by inclusion of its generated sigma algebra into F_n. Clipping is Borel; unused coordinates are constant. Thus the full clipped/truncated sequence is F_n-measurable. This auxiliary sequence proves a factorization of H_n; it does not replace P or alter the actual algorithm.

\[\bar e_k(w)=\begin{cases}\epsilon_k(w)&k<n,\\0&k\ge n,\end{cases}\qquad\bar e:\mathcal F_n\to\mathcal B([0,\infty)^{\mathbb N}).\]
Corresponding Lean step
  -- Truncation is a proof factorization, never a replacement algorithm/input law.
  let truncated : (ℕ → ℝ) → ℕ → ℝ≥0 :=
    fun w k => if k < n then ε w k else 0
  have htruncated : Measurable[past n] truncated := by
    letI : MeasurableSpace (ℕ → ℝ) := past n
    apply measurable_pi_lambda
    intro k
    by_cases hk : k < n
    · have hx : Measurable[past n] (fun w : ℕ → ℝ => w k) := by
        apply measurable_iff_comap_le.mpr
        exact le_iSup_of_le k (le_iSup_of_le hk le_rfl)
      simpa only [truncated, hk, if_true, ε, Function.comp_def] using
        measurable_real_toNNReal.comp hx
    · simpa only [truncated, hk, if_false] using
        (measurable_const : Measurable[past n] (fun _ : ℕ → ℝ => (0 : ℝ≥0)))

Exact contiguous compiled region. These proof ingredients are derived internally and are not added source premises.

4. Derive history measurability in the past sigma algebra

For every j∈Fin(n+1), the two threshold streams ē(w) and ε(w) agree below j. Causality makes the resulting jth records identical. Compose the existing jointly measurable R_j with deterministic parameters and ē, and use this equality. Coordinatewise product measurability now proves H_n is F_n-measurable, including the live/stopped tag. The smaller domain sigma algebra is explicit; ambient measurability alone would not suffice.

\[R_j(\bar e(w))=R_j(\epsilon(w))\ (j\le n)\quad\Longrightarrow\quad H_n\text{ is }\mathcal F_n\text{-measurable}.\]
Corresponding Lean step
  have hHp : Measurable[past n] (history y xRef z₀ n) := by
    letI : MeasurableSpace (ℕ → ℝ) := past n
    apply measurable_pi_lambda
    intro j
    have hm := (hR j.val).comp
      ((measurable_const : Measurable (fun _ : ℕ → ℝ => (y, xRef))).prodMk
        ((measurable_const : Measurable (fun _ : ℕ → ℝ => z₀)).prodMk htruncated))
    have heq : (fun w => record y xRef z₀ (truncated w) j.val) =
        (fun w => history y xRef z₀ n w j) := by
      funext w
      exact hcausal (truncated w) (ε w) j.val (fun k hk =>
        if_pos (lt_of_lt_of_le hk (Nat.le_of_lt_succ j.isLt)))
    rw [← heq]
    exact hm

Exact contiguous compiled region. These proof ingredients are derived internally and are not added source premises.

5. Separate the independent past and unused future

Put G_n=σ(w↦w_k:k≥n). Every coordinate of Y_n belongs to this sigma algebra. Mutual independence of all raw coordinate functions, together with their ambient measurability, gives independence of the generated sigma algebras for disjoint index sets [0,n) and [n,∞). The existing Mathlib theorem extends cylinder independence to the whole generated sigma algebras. Independence descends along the inclusions generated by H_n and Y_n. Hence H_n and the full countable tail are independent.

\[\mathcal F_n\perp\mathcal G_n,\quad\sigma(H_n)\subseteq\mathcal F_n,\quad\sigma(Y_n)\subseteq\mathcal G_n\quad\Longrightarrow\quad H_n\perp Y_n.\]
Corresponding Lean step
  let future : ℕ → MeasurableSpace (ℕ → ℝ) := fun m =>
    ⨆ k ∈ Set.Ici m, MeasurableSpace.comap (fun w : ℕ → ℝ => w k) inferInstance
  have hTf : Measurable[future n] (tail n) := by
    letI : MeasurableSpace (ℕ → ℝ) := future n
    apply measurable_pi_lambda
    intro k
    apply measurable_iff_comap_le.mpr
    exact le_iSup_of_le (n + k) (le_iSup_of_le (Nat.le_add_right n k) le_rfl)
  have hdis : Disjoint (Set.Iio n) (Set.Ici n) := by
    rw [Set.disjoint_left]
    intro k hk hn
    exact (not_lt_of_ge (show n ≤ k from hn)) (show k < n from hk)
  have hblocks : Indep (past n) (future n) P :=
    indep_iSup_of_disjoint (fun k => (measurable_pi_apply k).comap_le)
      ((iIndepFun_iff_iIndep (fun _ : ℕ => inferInstance)
        (fun k (w : ℕ → ℝ) => w k) P).mp hclock) hdis
  have hindep : IndepFun (history y xRef z₀ n) (tail n) P :=
    indep_of_indep_of_le hblocks hHp.comap_le hTf.comap_le

Exact contiguous compiled region. These proof ingredients are derived internally and are not added source premises.

6. Identify the unchanged tail and restricted laws

The injection k↦n+k reindexes identical Exp(1) factors, so the infinite-product pushforward is P. Independence and measurability identify the joint pushforward with the product of its two marginals. Finally, for any Borel tail event B, evaluate the restricted pushforward as P(Y_n∈B and H_n∈A); independence makes this P(H_n∈A)P(Y_n∈B), and the tail law replaces the last factor by P(B). Equality on every Borel B proves the unnormalized measure identity. No positivity, point-event normalization or conditional kernel existence is used.

\[(Y_n)_*(P|_{H_n^{-1}(A)})=P(H_n^{-1}(A))\,P.\]
Corresponding Lean step
  have htailLaw : Measure.map (tail n) P = P := by
    exact Measure.map_infinitePi_infinitePi_of_inj
      (P := fun _ : ℕ => expMeasure (1 : ℝ)) (f := fun k => n + k)
      (fun _ _ h => Nat.add_left_cancel h)
  have hjoint : Measure.map (fun w => (history y xRef z₀ n w, tail n w)) P =
      (Measure.map (history y xRef z₀ n) P).prod P := by
    rw [hindep.map_prod_eq_prod_map_map hHmeas.aemeasurable hTmeas.aemeasurable,
      htailLaw]
  refine ⟨hHmeas, hTmeas, hprefix, hHp, htailLaw, hindep, hjoint, ?_⟩
  intro A hA
  apply Measure.ext
  intro B hB
  rw [Measure.map_apply hTmeas hB, Measure.restrict_apply (hB.preimage hTmeas),
    Measure.smul_apply, Set.inter_comm,
    hindep.measure_inter_preimage_eq_mul A B hA hB]
  have hBtail : P (tail n ⁻¹' B) = P B := by
    rw [← Measure.map_apply hTmeas hB, htailLaw]
  rw [hBtail]
  rfl

Exact contiguous compiled region. These proof ingredients are derived internally and are not added source premises.

Lean verification

The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

Lean proof · actual_finite_history_tail_law

Keep the actual recursion and consume its existing producers; Prove finite-prefix causality and ambient measurability; Expose the consumed-prefix measurable input; Derive history measurability in the past sigma algebra; Separate the independent past and unused future; Identify the unchanged tail and restricted laws

Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

Download module (.lean)
theorem actual_finite_history_tail_law
    {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
    [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
    {V : E → ℝ} {α β : ℝ≥0} {η : ℝ}
    (hα : 0 < (α : ℝ)) (hαβ : α ≤ β) (hV : ContDiff ℝ 2 V)
    (hH : ∀ x v : E,
      (α : ℝ) * ‖v‖ ^ 2 ≤ (fderiv ℝ (fderiv ℝ V) x v) v ∧
      (fderiv ℝ (fderiv ℝ V) x v) v ≤ (β : ℝ) * ‖v‖ ^ 2)
    (hη : 0 < η) (hβη : (β : ℝ) * η ≤ 1) :
    actual_finite_history_tail_law_statement hα hαβ hV hH hη hβη := by
  classical
  let c : E → E → E := fun y xRef => y - η • gradient V xRef
  let Φ : E → E → ℝ → (E × E) → (E × E) := fun y xRef t z =>
    (c y xRef + Real.cos t • (z.1 - c y xRef) +
        (Real.sqrt η * Real.sin t) • z.2,
     (-Real.sin t / Real.sqrt η) • (z.1 - c y xRef) + Real.cos t • z.2)
  let S : E → (E × E) → (E × E) := fun xRef z =>
    (z.1, z.2 - (2 * inner ℝ z.2 (gradient V z.1 - gradient V xRef) /
      ‖gradient V z.1 - gradient V xRef‖ ^ 2) • (gradient V z.1 - gradient V xRef))
  let rate : E → (E × E) → ℝ := fun xRef z =>
    Real.sqrt η * max 0 (inner ℝ z.2 (gradient V z.1 - gradient V xRef))
  let Λ : E → E → (E × E) → ℝ≥0 → ℝ := fun y xRef z t =>
    ∫ s in (0 : ℝ)..(t : ℝ), rate xRef (Φ y xRef s z)
  let τ : E → E → (E × E) → ℝ≥0 → WithTop ℝ≥0 := fun y xRef z e =>
    MeasureTheory.hittingAfter
      (fun t : ℝ≥0 => fun a : (E × E) × (E × E) × ℝ≥0 =>
        Λ a.1.1 a.1.2 a.2.1 t - (a.2.2 : ℝ))
      (Set.Ici (0 : ℝ)) 0 ((y, xRef), z, e)
  let next : E → E → ℝ≥0 → ((ℝ≥0 × (E × E)) ⊕ Unit) →
      ((ℝ≥0 × (E × E)) ⊕ Unit) := fun y xRef e r =>
    match r with
    | Sum.inr _ => Sum.inr ()
    | Sum.inl a =>
      if τ y xRef a.2 e = ⊤ then Sum.inr () else
        Sum.inl (a.1 + (τ y xRef a.2 e).untopD 0,
          S xRef (Φ y xRef (((τ y xRef a.2 e).untopD 0 : ℝ≥0) : ℝ) a.2))
  let record : E → E → (E × E) → (ℕ → ℝ≥0) → ℕ →
      ((ℝ≥0 × (E × E)) ⊕ Unit) := fun y xRef z₀ e n =>
    Nat.rec (Sum.inl (0, z₀)) (fun k r => next y xRef (e k) r) n
  let P : Measure (ℕ → ℝ) := Measure.infinitePi (fun _ : ℕ => expMeasure (1 : ℝ))
  let ε : (ℕ → ℝ) → ℕ → ℝ≥0 := fun w k => Real.toNNReal (w k)
  let history : E → E → (E × E) → (n : ℕ) → (ℕ → ℝ) →
      (Fin (n + 1) → ((ℝ≥0 × (E × E)) ⊕ Unit)) :=
    fun y xRef z₀ n w j => record y xRef z₀ (ε w) j.val
  let tail : ℕ → (ℕ → ℝ) → (ℕ → ℝ) := fun n w k => w (n + k)
  let past : ℕ → MeasurableSpace (ℕ → ℝ) := fun n =>
    ⨆ k ∈ Set.Iio n, MeasurableSpace.comap (fun w : ℕ → ℝ => w k) inferInstance
  change
  ∀ y xRef : E, ∀ z₀ : E × E, ∀ n : ℕ,
      Measurable (history y xRef z₀ n) ∧ Measurable (tail n) ∧
      (∀ (w w' : ℕ → ℝ), (∀ k < n, w k = w' k) →
        history y xRef z₀ n w = history y xRef z₀ n w') ∧
      Measurable[past n] (history y xRef z₀ n) ∧
      Measure.map (tail n) P = P ∧
      IndepFun (history y xRef z₀ n) (tail n) P ∧
      Measure.map (fun w => (history y xRef z₀ n w, tail n w)) P =
        (Measure.map (history y xRef z₀ n) P).prod P ∧
      (∀ A : Set (Fin (n + 1) → ((ℝ≥0 × (E × E)) ⊕ Unit)), MeasurableSet A →
        Measure.map (tail n) (P.restrict (history y xRef z₀ n ⁻¹' A)) =
          (P (history y xRef z₀ n ⁻¹' A)) • P)

  have hrec := ActualFiniteJumpRecursion.actual_fixed_reference_finite_jump_recursion
    hα hαβ hV hH hη hβη
  have hR (j : ℕ) : Measurable (fun a : (E × E) × (E × E) × (ℕ → ℝ≥0) =>
      record a.1.1 a.1.2 a.2.1 a.2.2 j) := hrec.2.2.2.1 j
  have hinput := AutoSamplingTheory.TechnicalLemmas.Probability.UnitExponentialProduct.unit_exponential_product_laws
  letI : IsProbabilityMeasure P := hinput.1
  letI : IsProbabilityMeasure (expMeasure (1 : ℝ)) :=
    isProbabilityMeasure_expMeasure zero_lt_one
  have hclock : iIndepFun (fun k (w : ℕ → ℝ) => w k) P := hinput.2.2.1
  intro y xRef z₀ n
  -- Deterministic causality: the mth record consumes exactly coordinates below m.
  have hcausal (e e' : ℕ → ℝ≥0) (m : ℕ)
      (he : ∀ k < m, e k = e' k) :
      record y xRef z₀ e m = record y xRef z₀ e' m := by
    induction m with
    | zero => rfl
    | succ m ih =>
      change next y xRef (e m) (record y xRef z₀ e m) =
        next y xRef (e' m) (record y xRef z₀ e' m)
      rw [he m (Nat.lt_succ_self m), ih (fun k hk => he k (Nat.lt_succ_of_lt hk))]
  have hprefix (w w' : ℕ → ℝ) (hw : ∀ k < n, w k = w' k) :
      history y xRef z₀ n w = history y xRef z₀ n w' := by
    funext j
    exact hcausal (ε w) (ε w') j.val (fun k hk =>
      congrArg Real.toNNReal (hw k (lt_of_lt_of_le hk (Nat.le_of_lt_succ j.isLt))))
  have hε : Measurable ε := measurable_pi_lambda _ (fun k =>
    measurable_real_toNNReal.comp (measurable_pi_apply k :
      Measurable (fun w : ℕ → ℝ => w k)))
  have hHmeas : Measurable (history y xRef z₀ n) :=
    measurable_pi_lambda _ (fun j => (hR j.val).comp
      ((measurable_const : Measurable (fun _ : ℕ → ℝ => (y, xRef))).prodMk
        ((measurable_const : Measurable (fun _ : ℕ → ℝ => z₀)).prodMk hε)))
  have hTmeas : Measurable (tail n) :=
    measurable_pi_lambda _ (fun k => measurable_pi_apply (n + k))
  -- Truncation is a proof factorization, never a replacement algorithm/input law.
  let truncated : (ℕ → ℝ) → ℕ → ℝ≥0 :=
    fun w k => if k < n then ε w k else 0
  have htruncated : Measurable[past n] truncated := by
    letI : MeasurableSpace (ℕ → ℝ) := past n
    apply measurable_pi_lambda
    intro k
    by_cases hk : k < n
    · have hx : Measurable[past n] (fun w : ℕ → ℝ => w k) := by
        apply measurable_iff_comap_le.mpr
        exact le_iSup_of_le k (le_iSup_of_le hk le_rfl)
      simpa only [truncated, hk, if_true, ε, Function.comp_def] using
        measurable_real_toNNReal.comp hx
    · simpa only [truncated, hk, if_false] using
        (measurable_const : Measurable[past n] (fun _ : ℕ → ℝ => (0 : ℝ≥0)))
  have hHp : Measurable[past n] (history y xRef z₀ n) := by
    letI : MeasurableSpace (ℕ → ℝ) := past n
    apply measurable_pi_lambda
    intro j
    have hm := (hR j.val).comp
      ((measurable_const : Measurable (fun _ : ℕ → ℝ => (y, xRef))).prodMk
        ((measurable_const : Measurable (fun _ : ℕ → ℝ => z₀)).prodMk htruncated))
    have heq : (fun w => record y xRef z₀ (truncated w) j.val) =
        (fun w => history y xRef z₀ n w j) := by
      funext w
      exact hcausal (truncated w) (ε w) j.val (fun k hk =>
        if_pos (lt_of_lt_of_le hk (Nat.le_of_lt_succ j.isLt)))
    rw [← heq]
    exact hm
  let future : ℕ → MeasurableSpace (ℕ → ℝ) := fun m =>
    ⨆ k ∈ Set.Ici m, MeasurableSpace.comap (fun w : ℕ → ℝ => w k) inferInstance
  have hTf : Measurable[future n] (tail n) := by
    letI : MeasurableSpace (ℕ → ℝ) := future n
    apply measurable_pi_lambda
    intro k
    apply measurable_iff_comap_le.mpr
    exact le_iSup_of_le (n + k) (le_iSup_of_le (Nat.le_add_right n k) le_rfl)
  have hdis : Disjoint (Set.Iio n) (Set.Ici n) := by
    rw [Set.disjoint_left]
    intro k hk hn
    exact (not_lt_of_ge (show n ≤ k from hn)) (show k < n from hk)
  have hblocks : Indep (past n) (future n) P :=
    indep_iSup_of_disjoint (fun k => (measurable_pi_apply k).comap_le)
      ((iIndepFun_iff_iIndep (fun _ : ℕ => inferInstance)
        (fun k (w : ℕ → ℝ) => w k) P).mp hclock) hdis
  have hindep : IndepFun (history y xRef z₀ n) (tail n) P :=
    indep_of_indep_of_le hblocks hHp.comap_le hTf.comap_le
  have htailLaw : Measure.map (tail n) P = P := by
    exact Measure.map_infinitePi_infinitePi_of_inj
      (P := fun _ : ℕ => expMeasure (1 : ℝ)) (f := fun k => n + k)
      (fun _ _ h => Nat.add_left_cancel h)
  have hjoint : Measure.map (fun w => (history y xRef z₀ n w, tail n w)) P =
      (Measure.map (history y xRef z₀ n) P).prod P := by
    rw [hindep.map_prod_eq_prod_map_map hHmeas.aemeasurable hTmeas.aemeasurable,
      htailLaw]
  refine ⟨hHmeas, hTmeas, hprefix, hHp, htailLaw, hindep, hjoint, ?_⟩
  intro A hA
  apply Measure.ext
  intro B hB
  rw [Measure.map_apply hTmeas hB, Measure.restrict_apply (hB.preimage hTmeas),
    Measure.smul_apply, Set.inter_comm,
    hindep.measure_inter_preimage_eq_mul A B hA hB]
  have hBtail : P (tail n ⁻¹' B) = P B := by
    rw [← Measure.map_apply hTmeas hB, htailLaw]
  rw [hBtail]
  rfl

end
end AutoSamplingTheory.ExampleCases.ProximalBPS.ActualFiniteHistoryTailLaw

Exact module and namespace context

Scope and omitted-condition boundaries
  • Retain original six analytic hypotheses and literal actual stopped recursion; deterministic y/reference/initial state and n. History includes records0..n, consumes raw coordinates k<n; raw tail starts at n=source E_(n+1). Full countable product tail, not only finite cylinder events. Prefix measurability/independence/laws are derived, never provider premises. Real.toNNReal extends coordinates on a P-null nonpositive-clock set; guarded infinity carries no fictitious phase state. n0/stopped/zero probability A included via unnormalized restriction identity. Only probability substrate of G86-11 is closed by proposed theorem; conditional random-hazard next-wait survival, finite-event iteration/final survival/fullA7/path reversal/invariance/physical-time residual memorylessness/random stopping/restart/Markovness/allL2/hypocoercivity/implemented errors/unbounded cost/main/composition/wholepaper/Goal remain OPEN. No proof credit at seal.
Sources, dependencies, and reuse

Source and reuse

Samplinglib parents called

Mathlib API called (external library)

  • measurable_pi_lambda
  • measurable_real_toNNReal
  • Measurable.comap_le
  • measurable_iff_comap_le
  • iIndepFun_iff_iIndep
  • indep_iSup_of_disjoint
  • indep_of_indep_of_le
  • Measure.map_infinitePi_infinitePi_of_inj
  • IndepFun.map_prod_eq_prod_map_map
  • IndepFun.measure_inter_preimage_eq_mul
  • Measure.map_apply
  • Measure.restrict_apply
  • Measure.ext

Mathematical sources

Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.