Plain-English statement
- The actual Gibbs-initialized endpoint law is the countable sector sum, a probability, and preserved by the flipped swap.
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_countable_endpoint_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_countable_endpoint_statement hα hαβ hV hH hη hβη := by
classical
unfold actual_countable_endpoint_statement
intro c Φ S rate Λ τ next record P ε history Rec Hist readTime Δ Prefix m zAt K qReal q A eventTime I N liveTime d survival weight C Path Ψ Γ ρ R Vy nu
obtain ⟨Z, hZm, hZa, hZf, hZ0, h93⟩ :=
AutoSamplingTheory.ExampleCases.ProximalBPS.ActualFiniteCountPath.actual_finite_count_path_law
hα hαβ hV hH hη hβη
refine ⟨Z, hZm, hZa, hZf, hZ0, ?_⟩
intro y r T B sigma L M Q J
have h103 := AutoSamplingTheory.ExampleCases.ProximalBPS.ActualPhaseNormalization.actual_phase_gibbs_normalization
hα hαβ hV hH hη hβη y
letI : IsProbabilityMeasure (nu y) := by
have hp := h103.2.2.2.2.2.1
rw [h103.2.2.2.2.2.2] at hp
exact hp
letI : IsProbabilityMeasure P :=
AutoSamplingTheory.TechnicalLemmas.Probability.UnitExponentialProduct.unit_exponential_product_laws.1
have hembZ : Measurable (fun q : (E × E) × (ℕ → ℝ) => (((y, r), q.1), T, q.2)) :=
(measurable_const.prodMk measurable_fst).prodMk (measurable_const.prodMk measurable_snd)
have hZend := hZm.comp hembZ
have hM : Measurable M := measurable_fst.prodMk hZend
have hQ : IsProbabilityMeasure Q := Measure.isProbabilityMeasure_map hM.aemeasurable
have hB (n : ℕ) : Measurable (B n) := by
have hemb : Measurable (fun q : (E × E) × Prefix n T => (((y, r), q.1), q.2)) :=
(measurable_const.prodMk measurable_fst).prodMk measurable_snd
have hp := (h93 n T).2.1.comp hemb
have he := (measurable_pi_apply (⟨T, le_rfl⟩ : {s : ℝ≥0 // s ≤ T})).comp hp
exact measurable_fst.prodMk he
have hρ (n : ℕ) : Measurable (fun q : (E × E) × Prefix n T => ρ y r q.1 n T q.2) := by
have hemb : Measurable (fun q : (E × E) × Prefix n T => (((y, r), q.1), q.2)) :=
(measurable_const.prodMk measurable_fst).prodMk measurable_snd
have h := (h93 n T).2.2.1.comp hemb
simpa only [Function.comp_def] using h
have hm (n : ℕ) : SigmaFinite (m n T) := by
have hcons (i : Fin (n + 1)) :
Measurable (fun t : Fin n → ℝ => (Fin.cons (0 : ℝ) t : Fin (n + 1) → ℝ) i) := by
induction i using Fin.cases with
| zero => exact measurable_const
| succ i => exact measurable_pi_apply i
have hs : MeasurableSet (Δ n T) := by
change MeasurableSet {t : Fin n → ℝ |
(∀ i j : Fin (n + 1), i < j → (Fin.cons (0 : ℝ) t : Fin (n + 1) → ℝ) i < (Fin.cons (0 : ℝ) t : Fin (n + 1) → ℝ) j) ∧
∀ i : Fin n, t i < (T : ℝ)}
rw [Set.ofPred_and]
apply MeasurableSet.inter
· simpa only [← Set.ofPred_forall] using (MeasurableSet.iInter fun (i : Fin (n + 1)) =>
MeasurableSet.iInter fun (j : Fin (n + 1)) =>
MeasurableSet.iInter fun (_ : i < j) => measurableSet_lt (hcons i) (hcons j))
· simpa only [← Set.ofPred_forall] using (MeasurableSet.iInter fun (i : Fin n) =>
measurableSet_lt (measurable_pi_apply i) (measurable_const (a := (T : ℝ))))
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
exact SigmaFinite.of_map (m n T) measurable_subtype_coe.aemeasurable hmσ
have hsum : Q = Measure.sum L := by
apply Measure.ext_of_lintegral
intro F hF
let D : ℕ → (E × E) → ℝ≥0∞ := fun n z =>
∫⁻ t : Prefix n T, F (B n (z, t)) * ρ y r z n T t ∂m n T
have hD (n : ℕ) : Measurable (D n) := by
letI := hm n
exact ((hF.comp (hB n)).mul (hρ n)).lintegral_prod_right'
have hz (z : E × E) :
(∫⁻ w, F (z, Z y r z T w) ∂P) = ∑' n, D n z := by
have hN : Measurable (N y r z T) := ((h93 0 T).2.2.2 y r z).2.2.1
have hsets (n : ℕ) : MeasurableSet {w | N y r z T w = n} :=
(measurableSet_singleton n).preimage hN
have hdis : Pairwise (fun i j : ℕ => Disjoint {w | N y r z T w = i} {w | N y r z T w = j}) := by
intro i j hij
exact Set.disjoint_left.mpr (fun w hi hj => hij (hi.symm.trans hj))
have hu : (⋃ n : ℕ, {w | N y r z T w = n}) = Set.univ := by
ext w
simp
calc
(∫⁻ w, F (z, Z y r z T w) ∂P) =
∑' n, ∫⁻ w in {w | N y r z T w = n}, F (z, Z y r z T w) ∂P := by
simpa only [hu, Measure.restrict_univ] using
(lintegral_iUnion hsets hdis (fun w => F (z, Z y r z T w)))
_ = ∑' n, D n z := by
apply tsum_congr
intro n
rcases (h93 n T).2.2.2 y r z with
⟨hH, hZT, hNN, hC, hGamma, hactual, hAE, hdisjoint, hcover, hlaw, hint, hmass, hbound⟩
exact hint (fun hp => F (z, hp.2 ⟨T, le_rfl⟩))
(hF.comp (measurable_const.prodMk ((measurable_pi_apply (⟨T, le_rfl⟩ : {s : ℝ≥0 // s ≤ T})).comp measurable_snd)))
calc
(∫⁻ x, F x ∂Q) = ∫⁻ z, ∫⁻ w, F (z, Z y r z T w) ∂P ∂nu y := by
change (∫⁻ x, F x ∂Measure.map M ((nu y).prod P)) = _
rw [lintegral_map hF hM]
exact lintegral_prod (f := fun x => F (M x)) (hF.comp hM).aemeasurable
_ = ∫⁻ z, ∑' n, D n z ∂nu y := lintegral_congr hz
_ = ∑' n, ∫⁻ z, D n z ∂nu y := lintegral_tsum (fun n => (hD n).aemeasurable)
_ = ∑' n, ∫⁻ x, F x ∂L n := by
apply tsum_congr
intro n
letI := hm n
change (∫⁻ z, ∫⁻ t : Prefix n T, F (B n (z, t)) * ρ y r z n T t ∂m n T ∂nu y) =
∫⁻ x, F x ∂Measure.map (B n) (sigma n)
rw [lintegral_map hF (hB n)]
change _ = ∫⁻ x, F (B n x) ∂(((nu y).prod (m n T)).withDensity (fun x => ρ y r x.1 n T x.2))
rw [lintegral_withDensity_eq_lintegral_mul _
(f := fun x : (E × E) × Prefix n T => ρ y r x.1 n T x.2)
(g := fun x => F (B n x)) (hρ n) (hF.comp (hB n))]
simp only [Pi.mul_apply]
rw [lintegral_prod (f := fun x : (E × E) × Prefix n T =>
ρ y r x.1 n T x.2 * F (B n x)) ((hρ n).mul (hF.comp (hB n))).aemeasurable]
apply lintegral_congr
intro z
apply lintegral_congr
intro t
exact mul_comm _ _
_ = ∫⁻ x, F x ∂Measure.sum L := (lintegral_sum_measure F L).symm
have hsector (n : ℕ) : MeasurePreserving J (L n) (L n) :=
AutoSamplingTheory.ExampleCases.ProximalBPS.ActualNormalizedEndpointSector.actual_normalized_endpoint_sector_reversal
hα hαβ hV hH hη hβη y r n T
refine ⟨hsum, hQ, (hsector 0).measurable, ?_⟩
rw [hsum, Measure.map_sum (hsector 0).measurable.aemeasurable]
congr 1
funext n
exact (hsector n).map_eq
#print axioms actual_countable_endpoint_law
end
end AutoSamplingTheory.ExampleCases.ProximalBPS.ActualCountableEndpointLaw
Open AutoSamplingTheory/ExampleCases/ProximalBPS/ActualCountableEndpointLaw.lean:159published source at ed709a7f320d
Proof architecture
Actual countable endpoint law; 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.
- `calc` records an equality or inequality chain matching a paper calculation.
- `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.
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.
- Density statements retain normalization and absolute-continuity prerequisites.
- A Gibbs expression is not automatically a probability law or an invariant law.