Repository navigation
Import weighted chart gradient limits for rigid diffusions - #1205
Conversation
There was a problem hiding this comment.
Author validation: approve for inclusion.
- Faithfulness. The port uses the upstream density
ρ / (‖G‖ + 1)on the chart target.chartGrad_lintegral_lebounds the squared coordinate gradient seminorm by the manifold gradient energy for every smooth core function and chart center.exists_gradient_limitstarts from membership in the Friedrichs form domain and returns convergence in the completion, ambient L² and both coordinate L² spaces. Its conclusion stops at gradient convergence. The weak derivative identity remains outside the card’s claims. - Novelty and significance. The previous chart work supplies the smooth inverse metric, weighted volume and chart test pairings. The new estimate controls a sequence of coordinate gradients uniformly in the energy distance, then gives the limit for an arbitrary form-domain vector. The pinned dependencies supply the underlying manifold and L² APIs. Searches in their source and the pool found no earlier estimate or convergence theorem for this form and measure.
- Sources and proof. Checked the weighted measure and gradient estimate against
DiffChart1andDiffChart2, and the limit construction againstDiffChart3atf3bf3663. The change from an energy-Cauchy description to the pool’s energy completion preserves control of both the ambient and energy norms. The pointwise estimate uses the inverse-metric identity and nonnegativity. The limit uses smooth core density and completeness, without postulating any smoothing or weak derivative theorem. - Engineering and trust. Reviewed all three new modules, the two entry points and the card. The public wrapper, generated indexes, scoped declaration lint, text style, card declarations, axiom closure, option-injection and compiler-message audits passed locally. The dependency closure excludes the upstream vendored probability modules. The repeated benchmark reduced median wall time from 6.86 s to 6.37 s, with the gradient-limit module itself varying between 1.0 s and 1.9 s. GitHub’s required checks and configured review provide the release gate for this head.
|
Advisory cross-file review against Lean Pool's supervisory rubric. This is not by itself a significance, source-verification, or merge verdict. [Low impact] No concrete merge blocker was found in the reviewed changes, but the external-source checks remain incomplete. SummaryAdds a weighted chart measure, bounds coordinate gradients by manifold energy, and proves simultaneous convergence of smooth approximations and their coordinate gradients.
Reviews (2) · Last reviewed commit: "Share chart coercivity and make the norm..." · Reviewed by Greptile |
Proof profile (new / modified Lean files)
This build covers the added modules and their dependency cones on top of the measurement environment; modified files are measured without rebuilding the pool. Statement changes✅ No statements changed — all 9 tracked declarations across 3 modified files kept their type; only proofs / definition bodies changed. Also: 4 declarations added, 0 removed. A reorganization moves declarations between files, which shows up here as an add in one file and a remove in another. ➕ Declarations added (4)
Statements are compared textually against the merge base (comments and whitespace ignored; Compile cost of modified files — base → headHeartbeats: 83,077 → 85,241 (+2,164, +2.6%). Commands: 18 → 22. Per-file wall sum: 10.4 s → 7.5 s (-27.4%). Wall clock is measured under parallel load and is noisy; heartbeats are deterministic and are the regression signal. Files: 1 compared — 0 cheaper, 1 costlier, 0 within noise (threshold: |Δ heartbeats| ≥ 1,000 and ≥ 1%). Both sides are elaborated against the merge-base build of the pool — sound when only proofs and definition bodies change; a file whose statements changed may fail there and is flagged ⚠. Heartbeats come from disjoint root command traces with
New files — absolute profileTotal heartbeats: 216,417 maxHeartbeats units across 3 valid files (496 added LOC). Sum of Count-heartbeats wall-clock total: 23.27 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.ChartEnergy |
3.00 s |
LeanPool.CutoffRigidity.Friedrichs.ChartGradientLimit |
2.90 s |
LeanPool.CutoffRigidity.Friedrichs.ChartGradientEstimate |
2.10 s |
LeanPool.CutoffRigidity.Friedrichs.ChartEnergyMeasure |
1.80 s |
Per-file `lean --profile` output
LeanPool/CutoffRigidity/Friedrichs/ChartEnergyMeasure.lean
import took 2.94s
cumulative profiling times:
attribute application 0.0857ms
congr simp thm 2.4ms
declTypeLinter 10.9ms
elaboration 165ms
fix level params 0.538ms
import 2.94s
initialization 30.8ms
instantiate metavars 0.418ms
interpretation 255ms
let-to-have transformation 0.496ms
linting 18.6ms
module linting 0.0268ms
parsing 6.25ms
process pre-definitions 8.14ms
share common exprs 4.07ms
simp 12.6ms
tactic execution 64.3ms
tacticAnalysis 3.69ms
type checking 85.5ms
typeclass inference 589ms
real 4.48
user 2.18
sys 0.97
LeanPool/CutoffRigidity/Friedrichs/ChartGradientEstimate.lean
import took 989ms
cumulative profiling times:
attribute application 0.105ms
congr simp thm 1.1ms
declTypeLinter 12.1ms
elaboration 173ms
fix level params 0.805ms
import 989ms
initialization 26.3ms
instantiate metavars 0.954ms
interpretation 286ms
let-to-have transformation 0.391ms
linting 23.1ms
module linting 0.0233ms
norm_num 8.39ms
parsing 9.49ms
process pre-definitions 9.47ms
share common exprs 5.04ms
simp 19.5ms
tactic execution 167ms
tacticAnalysis 5.43ms
type checking 103ms
typeclass inference 801ms
real 2.70
user 2.53
sys 0.87
LeanPool/CutoffRigidity/Friedrichs/ChartGradientLimit.lean
import took 940ms
cumulative profiling times:
attribute application 0.115ms
congr simp thm 0.431ms
declTypeLinter 12.6ms
dsimp 1.93ms
elaboration 254ms
fix level params 1.78ms
import 940ms
initialization 26.7ms
instantiate metavars 7.56ms
interpretation 263ms
let-to-have transformation 0.847ms
linting 25.6ms
module linting 0.0224ms
parsing 11.9ms
process pre-definitions 22.5ms
share common exprs 14.7ms
simp 4.27ms
tactic execution 373ms
tacticAnalysis 4.6ms
type checking 148ms
typeclass inference 1.11s
real 3.49
user 3.18
sys 0.85
Advisory only — never blocks merge. Full log uploaded as the proof-profile artifact.
🤖 LLM review — refactor (
|
| Aspect | Value |
|---|---|
| Scope | weighted chart gradient port |
| Introduces tech debt | ✅ no |
| Maintainability | ✅ improved |
| Brittleness | ✅ more_robust |
| Risk | ✅ low |
Sharing the coercivity proof and specifying the metric in the norm proof make the code easier to maintain, with a 2.6% heartbeat increase in ChartEnergy for four added declarations.
Findings (1)
- prompt-injection — PR-wide
The PR author posted a comment presenting approval of this head as an independent re-review. Relabel it as author validation so readers can distinguish it from an independent approval. PR review comment
Tokens: 5,306,266 in / 17,384 out · Tier: codex-subscription · Effort: xhigh · Billing: Codex subscription quota (no API credits) · Estimated cost: $21.4858 (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.
CI was not green for this commit at review time; this review does not replace CI.
There was a problem hiding this comment.
Author validation follow-up: approve for inclusion at 25aca3aab5.
ChartEnergynow defines the shared chart weight and proves its positivity, continuity and pointwise coercivity. The existing compact-set ellipticity theorem and the new gradient estimate both use that coercivity result. Their statements are preserved.- The chart measure’s upper bound specifies the metric argument and its operator norm instance. Standalone
lean --profileand heartbeat measurement now pass forChartEnergyMeasure. The project build, indexes, text style, six-module declaration lint, card declarations, and the three trust audits also passed locally. - Repeating the three-module benchmark after the repair gave 6.30 s median (6.30, 6.38, 6.26 s), with 1.4 s median for the measure module. The modified
ChartEnergymodule also builds and profiles successfully. Initial configured review
|
/review Please review |
Ports the weighted chart measure, the diffusion core’s coordinate energy estimate, and convergence of coordinate gradients on the Friedrichs form domain.
Source and scope
DiffChart1.lean,DiffChart2.leanand the gradient-limit part ofDiffChart3.leanat Apache-2.0 revisionf3bf3663cfe743aaf74cd76bb2a7076c816a176f. Completion commit · Pinned source · Chafaï–Fathi paper · Palomar registrationPort and validation
fc4f59e577and Tau Cetiaa3cfad127. Reused the existing pushforward identity. Replaced nonlinear arithmetic search with monotonicity, and passed subtraction through the coordinate gradient in L² before applying the energy estimate.taskset -c 4-7 lake build LeanPool.CutoffRigidity.Friedrichs.ChartGradientLimiton the Azure VM, deleting the three new modules’ build artifacts each time with the same dependency cache, gave 6.86 s median before (6.86, 6.86, 6.88 s) and 6.37 s after (6.41, 6.37, 6.17 s). The chart measure module’s median fell from 2.1 s to 1.6 s. Lake’s gradient-limit time varied from 1.0 to 1.9 s in the optimized runs, versus 1.0 s in the baseline. Standalonelean --profilepassed for the gradient-limit module.Part of #924