Repository navigation
Port weighted diffusion transition kernels - #1067
Conversation
Vilin97
left a comment
There was a problem hiding this comment.
Source review passed for d20fd36ed6b83dcc16667a2d6c7a5b2e48b35711.
- The closed graph argument bounds point evaluations on compact sets from the assumed continuous output representatives. Riesz representation then gives a density at each point. Measurability follows by evaluating on indicators of measurable sets.
- The composition proof uses the absolute continuity of the first kernel to integrate an almost-everywhere representative. The weighted specialization gives the identity kernel at time zero and the composition law at all times. The integral representation and absolute continuity apply at positive times, and the Markov and invariance results use the complete, connected setting.
- The port preserves the scope of the pinned development. Positive-time regularity is an explicit input, and the source headers identify the adapted modules. In the module introduction, it would be clearer to qualify “Markov kernels” with the completeness and connectedness assumptions used by the probability statement. Pinned Lean source · Paper §1.6
Required Lean CI is still running. Lean Action CI
|
Advisory cross-file review against Lean Pool's supervisory rubric. This is not by itself a significance, source-verification, or merge verdict. [Medium impact] No blocking code issue was found in the conditional kernel construction. SummaryAdds compact bounds for continuous L² representatives, constructs kernels from positive operators, and applies the construction to the weighted Friedrichs semigroup.
Reviews (1) · Last reviewed commit: "Port transition kernels for the weighted..." · Reviewed by Greptile |
Proof profile (new / modified Lean files)
This build covers the changed modules and their dependency cones on top of the restored cache. The serial per-file sums below are useful for ranking slow files, not as a build budget. A base→head comparison was attempted but its measurements are unavailable (see the run log); modified files are omitted from the tables below. Statement changes✅ No statements changed — all 0 tracked declarations across 2 modified files kept their type; only proofs / definition bodies changed. Statements are compared textually against the merge base (comments and whitespace ignored; Total heartbeats: 116,073 maxHeartbeats units across 3 valid files (504 added LOC). Sum of Count-heartbeats wall-clock total: 26.86 s. Repeated import cost inside Heartbeat values sum disjoint root command traces with LOC counts added lines in the profiled Lean files from this PR diff.
Aggregate phase totals
Slowest changed modules (from
|
| Changed module | Lake time |
|---|---|
LeanPool.CutoffRigidity.Friedrichs.ContinuousRepresentatives |
6.50 s |
LeanPool.CutoffRigidity.Friedrichs.TransitionKernel |
4.30 s |
LeanPool.CutoffRigidity.Friedrichs.DiffusionTransitionKernel |
2.10 s |
Per-file `lean --profile` output
LeanPool/CutoffRigidity/Friedrichs/ContinuousRepresentatives.lean
import took 2.31s
cumulative profiling times:
attribute application 2.53ms
congr simp thm 7.48ms
declTypeLinter 6.8ms
dsimp 18.3ms
elaboration 119ms
fix level params 2.2ms
import 2.31s
initialization 39.1ms
instantiate metavars 1.43ms
interpretation 290ms
let-to-have transformation 0.459ms
linting 17.8ms
module linting 0.0313ms
parsing 7.85ms
process pre-definitions 14.3ms
share common exprs 5.38ms
simp 54ms
tactic execution 156ms
tacticAnalysis 3.18ms
type checking 180ms
typeclass inference 874ms
real 4.43
user 2.67
sys 1.07
LeanPool/CutoffRigidity/Friedrichs/DiffusionTransitionKernel.lean
import took 1.24s
cumulative profiling times:
attribute application 1.11ms
congr simp thm 2.64ms
declTypeLinter 15.5ms
elaboration 201ms
fix level params 0.898ms
import 1.24s
initialization 30.1ms
instantiate metavars 0.917ms
interpretation 271ms
let-to-have transformation 13ms
linting 15.6ms
module linting 0.0357ms
parsing 6.86ms
process pre-definitions 14.7ms
share common exprs 5.82ms
simp 22.6ms
tactic execution 190ms
tacticAnalysis 4.39ms
type checking 182ms
typeclass inference 589ms
real 3.01
user 2.41
sys 0.98
LeanPool/CutoffRigidity/Friedrichs/TransitionKernel.lean
import took 856ms
cumulative profiling times:
attribute application 0.204ms
congr simp thm 20.6ms
declTypeLinter 12.9ms
dsimp 21.3ms
elaboration 317ms
fix level params 4.11ms
import 856ms
initialization 40.1ms
instantiate metavars 2.52ms
interpretation 383ms
let-to-have transformation 20.1ms
linting 31.6ms
module linting 0.0339ms
parsing 17ms
process pre-definitions 22.8ms
share common exprs 13ms
simp 65.7ms
tactic execution 374ms
tacticAnalysis 6.35ms
type checking 274ms
typeclass inference 876ms
real 2.78
user 3.36
sys 0.84
Advisory only — never blocks merge. Full log uploaded as the proof-profile artifact.
Vilin97
left a comment
There was a problem hiding this comment.
Approve the conditional transition-kernel port.
Statement and source
I checked all three proof modules, both entry points and the card against pinned upstream DiffKer1–5. The compact bound uses closedness of the graph of restriction to a compact neighborhood. The full-support measure promotes almost-everywhere equality to pointwise equality there. The next module uses bounded evaluation and Riesz representation, tests the density against its negative part, and uses measurable indicators to build the kernel. Upstream source
The composition law uses absolute continuity to replace an L² vector by its continuous representative in the inner transition integral. The identity at zero is a separate branch. Positive-time regularity is an input of the weighted specialization. Completeness and connectedness enter the Markov and invariance lemmas through the previous conservativity results. The scope is accurately recorded in the card and supports the approach to the diffusion in §1.6. Paper
Reuse and validation
The two abstract modules are independent of the project's Riemannian code. I found no equivalent combined construction in the pinned dependencies or prior pool imports. The port retains Chafaï's Apache-2.0 attribution and uses the existing weighted-volume and semigroup proofs. Per-file build and memory limits passed locally for every changed Lean file. The declaration, statement, axiom, mechanism and compiler-message checks passed for all 182 project modules. The interleaved build trials show stable or lower cost after the narrower imports and simpler proof steps.
Hosted Lean CI and content separation passed at d20fd36ed6. The scoped documentation, exposition, Python and workflow checks skipped these content-only changes. The hosted profiler measured the three proof modules without errors. Its standalone wrapper runs were missing compiled dependencies. Both wrappers passed the same synchronous profiling invocation locally after Lake built those dependencies. Lean CI · Hosted profile
🤖 LLM review — refactor (
|
| Aspect | Value |
|---|---|
| Scope | transition-kernel port |
| Introduces tech debt | 🛑 yes |
| Maintainability | ✅ improved |
| Brittleness | ➖ unchanged |
| Risk | ✅ low |
The port keeps the analytic proofs explicit and reusable, with two localized API issues that can be addressed independently.
Findings (2)
- reusability-lost —
LeanPool/CutoffRigidity/Friedrichs/ContinuousRepresentatives.lean:73
[BorelSpace X]excludes completed reference measures whose measurable sets strictly contain the Borel sets. Both abstract modules elaborate with[OpensMeasurableSpace X]and the existing proof bodies. Use that weaker assumption for the compact bound and kernel construction. - lost-structure —
LeanPool/CutoffRigidity/Friedrichs/DiffusionTransitionKernel.lean:63
Five proofs unfold the positive-time branch separately. A downstream import also has to reconstruct the measurable-set formula from the integral and absolute-continuity lemmas. Factor the branch rewrite into one lemma and expose the measurable-set formula usingkernel_apply.
Tokens: 4,398,590 in / 21,302 out · Tier: codex-subscription · Effort: xhigh · Billing: Codex subscription quota (no API credits) · Estimated cost: $17.9139 (Standard API equivalent; uncached input) (long-context rate)
Automated review against .github/REFACTOR_REVIEW_RULES.md. Disagree? Reply on the PR; rules can be updated in a PR of their own.
This ports the transition-kernel construction used in the Riemannian part of Chafaï and Fathi’s cutoff-rigidity development. It connects the weighted Friedrichs semigroup already in Lean Pool to pointwise transition measures.
Mathematics and scope
Source and port
f3bf3663cfe743aaf74cd76bb2a7076c816a176f. Chafaï directed the AI proof work and checked the Palomar statements against the corrected paper. First formalization commit · Pinned license · Palomar recordfc4f59e577feb1a4956671bc04ac18aaaf8cd842and Tau Ceti0642eae29e0a59ef798d04de325386445906e755.Measurements and validation
Two interleaved Azure VM trials per revision used warm pinned dependencies, fresh outputs for all three new modules, and
LC_ALL=C LEAN_NUM_THREADS=4 /usr/bin/time -f 'elapsed=%e maxrss=%M' lake --no-ansi build +LeanPool.CutoffRigidity.Friedrichs.DiffusionTransitionKernel. Baseline was 7.67 s and 6.53 s. The optimized port took 6.32 s and 5.83 s. The final per-module times were 1.5, 1.4 and 1.4 seconds. Peak process RSS was about 1.53 GiB in both variants. The revisions replace the manual convergence-in-measure argument with Mathlib’s Lp theorem, use direct arithmetic for the negative part, and narrow the imports exported by the kernel module.The warning-free project build and generated-index check passed locally. Declaration lint covered 2,544 declarations in 182 modules. The scoped Mathlib text-style check, card endpoint resolution, project-wide axiom and forbidden-mechanism audits, and compiler-message audit also passed.
Part of #924