Plain-English statement
- Weight matching under event-time and terminal momentum reversal.
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_prescribed_weighted_density_balance
{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_prescribed_weighted_density_statement hα hαβ hV hH hη hβη := by
classical
unfold actual_prescribed_weighted_density_statement
intro c Φ S rate Λ Rec Hist Δ Prefix zAt K qReal q liveTime d weight Path Ψ Γ ρ R U w P I dReal n T
obtain ⟨rho, hrho, h100⟩ :=
AutoSamplingTheory.ExampleCases.ProximalBPS.ActualPrescribedPathReversal.actual_prescribed_path_reversal_and_survival
hα hαβ hV hH hη hβη n T
obtain ⟨rho99, hrho99, h99⟩ :=
AutoSamplingTheory.ExampleCases.ProximalBPS.ActualPrescribedStateReversal.actual_prescribed_state_reversal_and_rate_product
hα hαβ hV hH hη hβη n T
-- The public coordinate equations identify the independently produced witnesses.
have halign : rho99 = rho := by
funext t
apply Subtype.ext
funext i
exact (hrho99 t i).trans (hrho t i).symm
subst rho99
refine ⟨rho, hrho, ?_⟩
intro y r z t A
-- Incoming rates, including zero factors, pair under finite state reversal.
have hprod : P y r (R A) n T (rho t) = P y r z n T t := by
simpa only [P, Fin.succ_castSucc, Fin.snoc_castSucc, Fin.cons_succ] using
(h99 y r z t).2
-- The reversed survival integral equals the momentum-flipped forward integral.
have hint : I y r (R A) n T (rho t) =
∫ s in (0 : ℝ)..(T : ℝ), rate r (R (Γ y r z n T t
⟨min (Real.toNNReal s) T, min_le_right _ _⟩)) :=
(h100 y r z t).2.2.2
-- Gibbs survival balance and invariance of target energy under momentum flip.
have hbal :=
(AutoSamplingTheory.ExampleCases.ProximalBPS.ActualPrescribedGibbsSurvival.actual_prescribed_gibbs_survival_balance
hα hαβ hV hH hη hβη y r z n T t).2.2.2
have hw : w y (R A) = w y A := by simp only [w, U, R, norm_neg]
have hs : w y z * Real.exp (-I y r z n T t) =
w y (R A) * Real.exp (-I y r (R A) n T (rho t)) := by
rw [hw, hint]
exact hbal
-- Multiply by the common event product; no rate cancellation is used.
have hreal : w y z * dReal y r z n T t =
w y (R A) * dReal y r (R A) n T (rho t) := by
dsimp only [dReal]
rw [hprod, ← mul_assoc, ← mul_assoc, hs]
refine ⟨hreal, ?_⟩
-- Reconnect both real densities to the original algorithmic ENNReal density.
have hd (a : E × E) (u : Prefix n T) :
ρ y r a n T u = ENNReal.ofReal (dReal y r a n T u) := by
simpa only [dReal, I, P, Fin.snoc_castSucc] using
(AutoSamplingTheory.ExampleCases.ProximalBPS.ActualPrescribedPathDensity.actual_prescribed_path_density_rewrite
hα hαβ hV hH hη hβη y r a n T u).2.2.2
rw [hd z t, hd (R A) (rho t), ← ENNReal.ofReal_mul (Real.exp_nonneg _),
← ENNReal.ofReal_mul (Real.exp_nonneg _), hreal]
#print axioms actual_prescribed_weighted_density_balance
end
end AutoSamplingTheory.ExampleCases.ProximalBPS.ActualPrescribedWeightedDensity
Open AutoSamplingTheory/ExampleCases/ProximalBPS/ActualPrescribedWeightedDensity.lean:106published source at ed709a7f320d
Proof architecture
Actual finite PBPS weighted density matching; 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.
- `simp` normalizes through registered definitional and theorem rewrites.
- `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.
- Density statements retain normalization and absolute-continuity prerequisites.
- A Gibbs expression is not automatically a probability law or an invariant law.