Repository navigation
Port positivity for the weighted diffusion semigroup - #1031
Conversation
|
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; external source and license claims remain unverified. SummaryAdds the weighted diffusion core and proves that its Friedrichs resolvent and semigroup preserve almost-everywhere nonnegativity.
Reviews (4) · Last reviewed commit: "Expose integrability of the diffusion co..." · Reviewed by Greptile |
Vilin97
left a comment
There was a problem hiding this comment.
Source approved at 997ddac3. Exact-head Lean validation is running.
- The test-core construction proves that the negative weighted generator is dense, symmetric and nonnegative, with energy given by the gradient pairing. A smooth contraction and the variational resolvent comparison prove preservation of almost-everywhere nonnegativity. Euler convergence and closedness of the nonnegative cone transfer it to all nonnegative semigroup times.
- The result applies to the finite smooth weighted Riemannian setting. It extends the existing operator calculus and Euclidean positivity results. The statement concerns the
L²resolvent and semigroup, and the port follows the corresponding upstream diffusion instance. Attribution and modification notices are present in all three source files. Pinned diffusion instance
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: 239,938 maxHeartbeats units across 3 valid files (542 added LOC). Sum of Count-heartbeats wall-clock total: 23.15 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.DiffusionTestFunctions |
2.20 s |
LeanPool.CutoffRigidity.Friedrichs.DiffusionPositivity |
2.20 s |
LeanPool.CutoffRigidity.Friedrichs.DiffusionForm |
1.90 s |
Per-file `lean --profile` output
LeanPool/CutoffRigidity/Friedrichs/DiffusionForm.lean
import took 3.06s
cumulative profiling times:
attribute application 0.0839ms
congr simp thm 3.17ms
declTypeLinter 10.1ms
elaboration 186ms
fix level params 0.667ms
import 3.06s
initialization 26.9ms
instantiate metavars 0.44ms
interpretation 211ms
let-to-have transformation 25.3ms
linting 12.1ms
module linting 0.0221ms
parsing 5.94ms
process pre-definitions 11.8ms
share common exprs 4.82ms
simp 23.8ms
tactic execution 89.1ms
tacticAnalysis 2.78ms
type checking 178ms
typeclass inference 556ms
real 4.59
user 2.19
sys 0.71
LeanPool/CutoffRigidity/Friedrichs/DiffusionPositivity.lean
import took 874ms
cumulative profiling times:
attribute application 0.197ms
compilation (IR) 0.0563ms
compilation (LCNF base) 0.502ms
compilation (LCNF impure) 0.186ms
compilation (LCNF mono) 0.212ms
congr simp thm 2.18ms
declTypeLinter 14.6ms
dsimp 8.31ms
elaboration 294ms
fix level params 1.68ms
import 874ms
initialization 28.6ms
instantiate metavars 3.19ms
interpretation 377ms
let-to-have transformation 0.748ms
linting 41.4ms
module linting 0.0185ms
norm_num 24.5ms
parsing 14.5ms
process pre-definitions 20ms
ring 22.6ms
share common exprs 14.6ms
simp 101ms
tactic execution 330ms
tacticAnalysis 6.59ms
type checking 188ms
typeclass inference 1.08s
real 2.78
user 3.41
sys 0.62
LeanPool/CutoffRigidity/Friedrichs/DiffusionTestFunctions.lean
import took 798ms
typeclass inference of IsContMDiffRiemannianBundle took 124ms
cumulative profiling times:
attribute application 1.7ms
blocked (unaccounted) 0.344ms
compilation (IR) 0.0729ms
compilation (LCNF base) 1.52ms
compilation (LCNF impure) 0.24ms
compilation (LCNF mono) 0.477ms
congr simp thm 2.71ms
declTypeLinter 18.6ms
dsimp 8.17ms
elaboration 236ms
fix level params 1.2ms
import 798ms
initialization 31.2ms
instantiate metavars 1.86ms
interpretation 302ms
let-to-have transformation 0.645ms
linting 26.2ms
module linting 0.021ms
norm_num 6.94ms
parsing 10.5ms
process pre-definitions 23ms
ring 3.32ms
share common exprs 8.31ms
simp 15.2ms
tactic execution 130ms
tacticAnalysis 5.29ms
type checking 196ms
typeclass inference 948ms
real 2.60
user 2.77
sys 0.60
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 on 997ddac3eb88d7f20d44e1dafbb2586c6adefe22.
Faithfulness and significance
diffFormData constructs a dense symmetric nonnegative operator on real (L^2(mu)) from the smooth compactly supported core and a finite weighted measure. The density comes from smooth approximation, and the pairing is identified by the pool’s weighted integration-by-parts theorem. The comparison argument proves 0 ≤ᵐ[μ] S.resolvent parameter g for a positive parameter and nonnegative input. The operator-norm Euler limit proves positivity for S.semigroup time, including time zero. The card describes these Hilbert-space results. The kernel construction and cutoff estimates remain on #924.
Novelty and sources
The previous Cutoff Rigidity PRs supply the abstract form, semigroup, and comparison theorem. These changes construct their weighted diffusion instance. Mathlib provides the (L^p) embedding, and Tau Ceti provides the support and gradient calculus. I checked the pool, Mathlib and Tau Ceti for the concrete weighted-generator positivity result. The Apache-2.0 license, author credit, AI provenance and exact source revision agree with the upstream license, proposal and Palomar record. Upstream revision · Palomar record
Engineering and verification
The port uses one integrated core pairing for symmetry, nonnegativity, and the public energy identity. It uses the pinned support and chain-rule lemmas for the manifold operators and the existing closed-form comparison and Euler convergence. The matched project build took 16.18 s before optimization and 11.72 s at this head, with 272,789 → 250,223 synchronous command heartbeats in Lean’s maxHeartbeats units across the three proof modules.
Local index, static quality, style, warning-free build, linter, card endpoint, axiom, prohibited-mechanism and build-message checks passed across 178 modules. The required hosted Build project check passed on this head, together with the content separation check and applicable validation workflows. All three new modules compiled in the hosted advisory profile. Lean CI · Profile
|
/review |
🤖 LLM review — refactor (
|
| Aspect | Value |
|---|---|
| Scope | weighted diffusion proof port |
| Introduces tech debt | 🛑 yes |
| Maintainability | ✅ improved |
| Brittleness | ✅ more_robust |
| Risk | ✅ low |
The shared Friedrichs APIs make the positivity proofs easier to maintain, and the omitted boundedness lemma adds a small cost to follow-up ports.
Findings (1)
- reusability-lost —
LeanPool/CutoffRigidity/Friedrichs/DiffusionTestFunctions.lean:45
The removedtestSub_boundedhas several callers at the pinned upstream revision. The log-Sobolev proof uses it for a uniform bound, andpenalized_perronuses its chosen bound in the theorem conclusion. Restore the helper besidetestSub_continuoususing Mathlib’sContinuous.bounded_above_of_compact_supportso those ports can share it. Log-Sobolev caller · Penalized Perron statement
Tokens: 8,089,106 in / 18,936 out · Tier: codex-subscription · Effort: xhigh · Billing: Codex subscription quota (no API credits) · Estimated cost: $32.6405 (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.
|
Both findings fixed in
The revised head passed the warning-free project build and synchronous profiling. Hosted checks are running again. Updated Lean CI |
Vilin97
left a comment
There was a problem hiding this comment.
Source approved at e032144b. The density and positivity statements are unchanged.
The density proof uses the Mathlib (L^p) norm bound and keeps the same approximation argument. The semigroup proof uses the shared Euler argument on the closed nonnegative cone. This preserves the almost-everywhere order conclusion at all nonnegative times. Earlier source review
Vilin97
left a comment
There was a problem hiding this comment.
Approve on e032144b4faf787c067b624a2e3783363a475365.
I reviewed the two changes since the earlier approval against the exact built sources. dense_test combines continuous compact-support approximation and uniform smooth approximation by bounding the second error with Lp.norm_le_of_ae_bound. The proof retains the dense-core conclusion for finite weighted measures. diffusion_semigroup_nonneg applies FormData.semigroup_mapsTo to the closed order interval Ici 0 and translates the conclusion with Lp.coeFn_nonneg. This removes the local cone-closure proof and uses the existing semigroup interface.
The weighted generator, resolvent and semigroup statements keep their types. The prior review established the source and license match, significance, and the distinction from the abstract Friedrichs development. The revised worktree passes the local build, index, style, declaration lint, card endpoint, axiom closure, prohibited-mechanism and build-message checks. The controlled project build is 16.18 s → 12.76 s from the first warning-free port, with synchronous profiles of 272,789 → 239,979 maxHeartbeats units. The required hosted build and content separation checks passed on this head. Greptile completed its rereview. Lean CI · Earlier review
|
/review |
|
Both follow-up findings fixed in
The revised head passed the project build, profiling, declaration lint and trust checks locally. Updated Lean CI |
Vilin97
left a comment
There was a problem hiding this comment.
Approve on 584c9ad065a3acf611fc906f304ef40cb5dee1e7.
I verified the follow-up diff against the previously reviewed head. The continuous approximation uses the (L^2) distance API, and resolvent comparison obtains continuity from the contraction’s Lipschitz bound. The dense core, resolvent, and semigroup results retain their types. The exact head passed the local index, style, warning-free build, declaration lint, card endpoint, axiom closure, prohibited-mechanism, and build-message checks. The matched build took 16.18 s → 10.19 s, and the three proof modules used 272,789 → 237,106 maxHeartbeats units. The matching hosted build passed the index, build, declaration lint, text style, and repository quality stages. The earlier review covers the unchanged upstream scope and mathematical endpoints.
|
/review |
|
Both follow-up findings addressed in
|
Vilin97
left a comment
There was a problem hiding this comment.
Source approved at ebec9792. The project’s core and positivity statements are unchanged.
The gradient-pairing integrability lemma now lives in the form module and only requires finiteness on compact sets. The positivity argument uses that lemma at the existing finite weighted measure. The dropped boundedness wrapper has no callers in the pool. Earlier source review
Vilin97
left a comment
There was a problem hiding this comment.
Approve on ebec979236ff6b8b30fb37454781e1359077ac82.
- The last diff moves the integrability proof to
DiffusionFormand exposes it with the natural assumption that the measure is finite on compact sets. Smoothness of the gradient pairing and compact support give the result. The positivity proof reuses this statement, and the pinned upstream energy estimate has a compatible public lemma available. The removed bound was a specialization of the Mathlib compact-support bound with no Pool callers. - The dense-core, resolvent and semigroup endpoints retain their statements. The complete local shard passed declaration lint across 178 modules and 2,444 declarations, endpoint validation, axiom closure, prohibited-mechanism and build-message checks. The local warning-free build, indexes, static quality and text style passed. The matched build took 16.18 s → 8.47 s, and the three proof modules used 272,789 → 241,211
maxHeartbeatsunits. - The hosted run passed index, build, declaration lint, text style, and quality checks. The required content separation check passed as well. The earlier review covers the pinned upstream comparison, scope and mathematical endpoints.
|
/review |
|
Approve. The pinned Mathlib API supplies the same uniform bound. I checked the upstream log-Sobolev and penalized Perron callers. In the pinned Lean environment, |
Ready for review. Ports the smooth compactly supported core of the weighted diffusion generator and proves that its Friedrichs resolvents and semigroup preserve almost-everywhere nonnegativity. This is the Hilbert-space step toward constructing Markov transition kernels for the Riemannian cutoff argument.
Mathematics and source
f3bf3663cfe743aaf74cd76bb2a7076c816a176f. The first public formalization commit is dated October 25, 2026 at 07:59:31 UTC. Djalil Chafaï directed the AI agents that wrote the proofs and reviewed the registered statements. First commit · Pinned source and license · Palomar recordPort and validation
The GPT review prompted two changes. The density proof now bounds the uniform approximation error with Mathlib’s
Lp.norm_le_of_ae_boundand combines the approximations with the triangle inequality. The positivity proof invokesFormData.semigroup_mapsToon the closed ordered cone and translates nonnegativity withLp.coeFn_nonneg. The follow-up uses Mathlib’sLpdistance lemmas for the continuous approximation and uses the contraction’s Lipschitz estimate directly. The publicintegrable_carrelemma inDiffusionFormsupports the follow-up energy bounds and applies to measures finite on compact sets. The unusedtestSub_boundedwrapper was removed.DiffForm,DiffForm1,DiffForm2,DiffusionRegular, andDiffMarkov1to the Pool’s existing Friedrichs construction, weighted integration by parts and operator calculus. The proof uses Mathlib’s linearity of the (L^p) embedding and Tau Ceti’s support and gradient results. The port uses Lean 4.36.0, Mathlibfc4f59e577feb1a4956671bc04ac18aaaf8cd842and Tau Ceti0642eae29e0a59ef798d04de325386445906e755.lake --no-ansi --no-cache build LeanPool.CutoffRigidity.Importson the Azure VM. Build wall time fell from 16.18 s to 8.47 s. The test-functions, form-data and positivity modules took 4.6 s → 1.9 s, 2.9 s → 1.6 s, and 2.8 s → 1.9 s. The optimized proof reuses the integrated core pairing and replaces general-purpose nonlinear arithmetic in the contraction inequality. Synchronous command traces across the three proof modules fell from 272,789 to 241,211 heartbeats in Lean’smaxHeartbeatsunits.Part of #924