Plain-English statement
- Exact source-sealed actual endpoint/time reversal law.
Read the mathematics first, then descend into Lean
You do not need to know Lean before opening this panel. The page keeps the paper-level theorem, rigorous proof obligations, exact Lean declaration, and proof dependencies as separate layers so a first-time reader can move down one layer at a time.
Proof architecture
Start with the tree when learning: prerequisites sit below the theorem and downstream results sit above it. Switch to the network when you want to understand where this declaration lives in the local formal library. Every mapped node is clickable.
Graph rule: only dependencies found by the ASTIS source scan are drawn. Missing tactic indirection is treated as an under-approximation; the site never invents an edge just to make a prettier graph.
How to read the exact Lean declaration
Read a Lean theorem left-to-right exactly as you would unpack a mathematical sentence: name → ambient types → automatically inferred structures → explicit hypotheses → conclusion → proof. Then read the proof top-to-bottom as transformations of the current goal.
- NameWhat reusable mathematical fact is being created?
- ParametersWhich symbols are arbitrary, and which structures are inferred by typeclass search?
- PropositionAfter the colon, translate the Lean expression back into a paper statement.
- Proof actionsAfter
by, ask what each tactic does to the mathematical goal—not only what syntax it uses.
Syntax used on this page
This glossary is filtered to syntax that actually occurs in the declaration above. Open a symbol only when you meet it, rather than memorizing Lean grammar in advance.
Source voice and ASTIS voice stay separate
When Samplinglib shows a short quotation from Chewi, it is labeled as a source excerpt and linked to the canonical book page. Intuition, expanded proof steps, hidden regularity assumptions, and Lean explanations are ASTIS-authored commentary. A quotation never substitutes for a formal proof, and an ASTIS explanation is never attributed to the textbook author.
Lean statement
theorem actual_endpoint_time_reversal_laws
{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_endpoint_time_reversal_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 Rec := (ℝ≥0 × (E × E)) ⊕ Unit
let Hist : ℕ → Type _ := fun n => Fin (n + 1) → Rec
let Δ : (n : ℕ) → ℝ≥0 → Set (Fin n → ℝ) := fun n T =>
{t | StrictMono (Fin.cons (0 : ℝ) t) ∧ ∀ i, t i < (T : ℝ)}
let Prefix : (n : ℕ) → ℝ≥0 → Type := fun n T => {t : Fin n → ℝ // t ∈ Δ n T}
let m : (n : ℕ) → (T : ℝ≥0) → Measure (Prefix n T) := fun n T =>
Measure.comap (fun t : Prefix n T => t.val) (volume : Measure (Fin n → ℝ))
let zAt : E → E → (E × E) → (n : ℕ) → (T : ℝ≥0) →
Prefix n T → Fin (n + 1) → (E × E) := fun y xRef z₀ n T t =>
Fin.induction z₀ (fun i z =>
S xRef (Φ y xRef (t.val i - (Fin.cons (0 : ℝ) (t.val : Fin n → ℝ) : Fin (n + 1) → ℝ) i.castSucc) z))
let K : E → E → (E × E) → (n : ℕ) → (T : ℝ≥0) →
Prefix n T → Hist n := fun y xRef z₀ n T t j =>
Sum.inl (Real.toNNReal ((Fin.cons (0 : ℝ) (t.val : Fin n → ℝ) : Fin (n + 1) → ℝ) j), zAt y xRef z₀ n T t j)
let Path : ℝ≥0 → Type _ := fun T => {s : ℝ≥0 // s ≤ T} → E × E
let Ψ : E → E → (E × E) → (n : ℕ) → (T : ℝ≥0) → Hist n → Path T :=
fun y xRef z₀ n T h s =>
Fin.foldl (n + 1) (fun z j => (h j).elim
(fun a => if a.1 ≤ s.val then Φ y xRef ((s.val - a.1 : ℝ≥0) : ℝ) a.2 else z)
(fun _ => z)) z₀
let Γ : E → E → (E × E) → (n : ℕ) → (T : ℝ≥0) → Prefix n T → Path T :=
fun y xRef z₀ n T t => Ψ y xRef z₀ n T (K y xRef z₀ n T t)
let R : (E × E) → (E × E) := fun z => (z.1, -z.2)
let ell : Measure (E × E) := (volume : Measure E).prod (volume : Measure E)
change
∀ n : ℕ, ∀ T : ℝ≥0, ∃ rho : Prefix n T → Prefix n T,
(∀ t : Prefix n T, ∀ i : Fin n, (rho t).val i = (T : ℝ) - t.val i.rev) ∧
Measurable rho ∧ Function.Involutive rho ∧ MeasurePreserving rho (m n T) (m n T) ∧
let A : E → E → (E × E) → Prefix n T → (E × E) :=
fun y r z t => Γ y r z n T t ⟨T, le_rfl⟩
let Theta : E → E → ((E × E) × Prefix n T) → ((E × E) × Prefix n T) :=
fun y r q => (R (A y r q.1 q.2), rho q.2)
(∀ y r : E, ∀ z : E × E, ∀ t : Prefix n T,
A y r z t = Φ y r ((T : ℝ) -
(Fin.cons (0 : ℝ) (t.val : Fin n → ℝ) : Fin (n + 1) → ℝ) (Fin.last n))
(zAt y r z n T t (Fin.last n))) ∧
Measurable (fun p : ((E × E) × (E × E)) × Prefix n T =>
A p.1.1.1 p.1.1.2 p.1.2 p.2) ∧
(∀ y r : E, ∀ t : Prefix n T,
MeasurePreserving (fun z => A y r z t) ell ell) ∧
(∀ y r : E, ∀ z : E × E, ∀ t : Prefix n T,
A y r (R (A y r z t)) (rho t) = R z) ∧
Measurable (fun p : ((E × E) × (E × E)) × Prefix n T =>
Theta p.1.1.1 p.1.1.2 (p.1.2, p.2)) ∧
(∀ y r : E, Function.Involutive (Theta y r)) ∧
(∀ y r : E, MeasurePreserving (Theta y r) (ell.prod (m n T)) (ell.prod (m n T)))
have hed := endpoint_data hα hαβ hV hH hη hβη
obtain ⟨hΦM, hSM, hRateM, hΦP, hSP, hRP, hΦI, hSI, hRI, hRΦ, hRS, hRate, hInt⟩ :=
AutoSamplingTheory.ExampleCases.ProximalBPS.ActualPhaseReversalVolume.actual_phase_reversal_volume_laws
hα hαβ hV hH hη hβη
intro n T
let rho₀ : Prefix n T → Prefix n T := rho n (T : ℝ)
have hrM : Measurable rho₀ := rho_measurable n (T : ℝ)
have hrI : Function.Involutive rho₀ := rho_involutive n (T : ℝ)
have hrP : MeasurePreserving rho₀ (m n T) (m n T) := rho_volume n (T : ℝ) (hed n T).1
refine ⟨rho₀, (fun t i => rfl), hrM, hrI, hrP, ?_⟩
let A : E → E → (E × E) → Prefix n T → (E × E) :=
fun y r z t => Γ y r z n T t ⟨T, le_rfl⟩
let Theta : E → E → ((E × E) × Prefix n T) → ((E × E) × Prefix n T) :=
fun y r q => (R (A y r q.1 q.2), rho₀ q.2)
change
(∀ y r : E, ∀ z : E × E, ∀ t : Prefix n T,
A y r z t = Φ y r ((T : ℝ) -
(Fin.cons (0 : ℝ) (t.val : Fin n → ℝ) : Fin (n + 1) → ℝ) (Fin.last n))
(zAt y r z n T t (Fin.last n))) ∧
Measurable (fun p : ((E × E) × (E × E)) × Prefix n T =>
A p.1.1.1 p.1.1.2 p.1.2 p.2) ∧
(∀ y r : E, ∀ t : Prefix n T,
MeasurePreserving (fun z => A y r z t) ell ell) ∧
(∀ y r : E, ∀ z : E × E, ∀ t : Prefix n T,
A y r (R (A y r z t)) (rho₀ t) = R z) ∧
Measurable (fun p : ((E × E) × (E × E)) × Prefix n T =>
Theta p.1.1.1 p.1.1.2 (p.1.2, p.2)) ∧
(∀ y r : E, Function.Involutive (Theta y r)) ∧
(∀ y r : E, MeasurePreserving (Theta y r) (ell.prod (m n T)) (ell.prod (m n T)))
have hAm : Measurable (fun p : ((E × E) × (E × E)) × Prefix n T =>
A p.1.1.1 p.1.1.2 p.1.2 p.2) := (hed n T).2.2.1
have hAid (y r : E) (z : E × E) (t : Prefix n T) :
A y r z t = endpoint (Φ y r) (S r) n (T : ℝ) t.val z := (hed n T).2.2.2 y r z t
have hAP (y r : E) (t : Prefix n T) : MeasurePreserving (fun z => A y r z t) ell ell := by
have he : (fun z => A y r z t) = endpoint (Φ y r) (S r) n (T : ℝ) t.val := funext (fun z => hAid y r z t)
rw [he]
exact endpoint_volume ell (Φ y r) (S r) (hSI r) (hSP r) (hΦP y r) n (T : ℝ) t.val
have hAI (y r : E) (z : E × E) (t : Prefix n T) :
A y r (R (A y r z t)) (rho₀ t) = R z := by
rw [hAid, hAid]
exact endpoint_reversed (Φ y r) (S r) R (hSI r) hRI (hRS r)
(fun u z => (hΦI y r u z).2) (hRΦ y r) n (T : ℝ) t.val z
have hThetaM : Measurable (fun p : ((E × E) × (E × E)) × Prefix n T =>
Theta p.1.1.1 p.1.1.2 (p.1.2, p.2)) :=
(hRP.measurable.comp hAm).prodMk (hrM.comp measurable_snd)
refine ⟨(hed n T).2.2.2, hAm, hAP, hAI, hThetaM, ?_, ?_⟩
· intro y r q
apply Prod.ext
· change R (A y r (R (A y r q.1 q.2)) (rho₀ q.2)) = q.1
rw [hAI]
exact hRI q.1
· exact hrI q.2
· intro y r
have hs := (hed n T).1
have hmσ : SigmaFinite ((m n T).map (fun t : Prefix n T => t.val)) := by
change SigmaFinite ((Measure.comap (fun t : Prefix n T => t.val)
(volume : Measure (Fin n → ℝ))).map (fun t : Prefix n T => t.val))
rw [map_comap_subtype_coe hs]
infer_instance
letI : SigmaFinite (m n T) := SigmaFinite.of_map (m n T) measurable_subtype_coe.aemeasurable hmσ
have hm : Measurable (fun q : (E × E) × Prefix n T => R (A y r q.1 q.2)) :=
hRP.measurable.comp (hAm.comp
(((measurable_const : Measurable (fun _ : (E × E) × Prefix n T => (y, r))).prodMk
measurable_fst).prodMk measurable_snd))
have hp := hrP.skew_product (g := fun t z => R (A y r z t)) (hm.comp measurable_swap)
(Filter.Eventually.of_forall fun t => (hRP.comp (hAP y r t)).map_eq)
have hout := (Measure.measurePreserving_swap (μ := m n T) (ν := ell)).comp
(hp.comp (Measure.measurePreserving_swap (μ := ell) (ν := m n T)))
exact hout
end
end AutoSamplingTheory.ExampleCases.ProximalBPS.ActualEndpointTimeReversal
Open AutoSamplingTheory/ExampleCases/ProximalBPS/ActualEndpointTimeReversal.lean:399published source at ed709a7f320d
Proof architecture
Actual finite PBPS endpoint/time change of variables; no SALD claim
Lean proof walkthrough
- Read the quantified variables and typeclass brackets as part of the mathematical statement; inferred arguments are not missing assumptions.
- `intro` introduces quantified hypotheses into the local proof context.
- `have` creates a named intermediate mathematical fact.
- `rw` rewrites by an established identity.
- `apply` reduces the goal to the hypotheses of a reusable theorem.
- `refine` instantiates a reusable theorem while leaving explicit subgoals.
- `exact` closes the current goal with an already typed term.
Why the statement has this shape
The declaration is kept at the reusable level recorded by its Registry tags and direct consumers. Explicit measures, spaces, wrappers, and regularity hypotheses expose interfaces that paper notation often infers. A theorem card explains those interfaces but never widens the compiled statement.
Hidden assumptions and non-claims
- Measurability is represented explicitly or must be supplied by a dependency.
- Totalized `fderiv` values must not be read as a differentiability theorem.
- Almost-everywhere hypotheses depend on the stated measure and representative.
- A Gibbs expression is not automatically a probability law or an invariant law.