Skip to content

perf(Vlasov): reduce peak compiler RSS by 11.39% - #688

Merged
Vilin97 merged 2 commits into
mainfrom
codex/optimize-vlasov-20261019-resume
Oct 20, 2026
Merged

Vilin97 merged 2 commits into
mainfrom
codex/optimize-vlasov-20261019-resume

Conversation

@Vilin97

@Vilin97 Vilin97 commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Vlasov's long weak solution and well-posedness files retain substantial elaboration state and repeat Picard-series and convolution estimates. This change shares those arguments and separates the analysis, flow construction, frozen field, flow differentiability, test approximation, local existence, continuation and stability layers while retaining the intended named mathematical API and all original public import paths.

  • Baseline: 5199f6df453142c54782d7d7812c9ffa3c6b98e0. Measured head: 9d6758f066dd89b3690fa20ea59436da8d9f449c. Current repair head: b7d5c2a7641359be28d0e98f2cda00495aee1103.
  • Pinned toolchain: Lean 4.35.0-rc3; Mathlib c55e6e786f49471c72fbddbec5415808896aec1e. Pins, configuration and gates are unchanged.
  • Exactly one existing project: Vlasov (22,596 baseline source lines). Profiles captured from source identical to the baseline identified WeakToLagrangian (31.22 s) and repeated Picard continuity/integral arguments (roughly 2.75–3.18 s each) as useful targets; these profile figures were selection evidence, separate from the controlled measurements below.

Concrete changes:

  • Share the uniform Picard majorant, specialize joint continuity to continuity at a fixed time, and reuse one Dyson-series IVP specification.
  • Prove one affine convolution bound from Lipschitz continuity and the first moment, then apply it at four existing call sites.
  • Extract seven compilation units with public reexports through the existing modules. Keep the Jacobian and fundamental-matrix definitions together in their original order so generated proof sharing is preserved. WeakEvolutionEqOn retains its original module.
  • Remove redundant imports following lake shake, including unused broad trigonometry and covering imports. Regenerate only this project's import index; keep LeanPool.lean fixed.

Historical invariant audit at measured head 9d6758f: before editing, Lean environment inspection recorded every compiled project declaration, including private/generated auxiliaries. The comparison retains full elaborated types, universe parameters, safety and other ConstantInfo metadata, export status, and complete non-theorem values. Only theorem bodies are omitted; inaccessible macro scopes on bound variable names are alpha-normalized. Constant names, named binder bases/order, universes and value structure are not normalized. At measured head 9d6758f, all 514 existing declarations matched; none were missing or modified. There are 82 additions and 125 intended moves between source modules. Private compatibility aliases deliberately preserve old compiled helper identities. All 13 original module import paths also preserve their exported project declarations.

Reviewer repair at b7d5c2a7641359be28d0e98f2cda00495aee1103. Configured review 2217 identified 42 unnecessary private aliases to tactic-generated _simp/_abel constants. The repair removes those aliases and retains the 37 named private aliases, all non-alias mathematical declarations/proofs and all original public import paths. It intentionally stops preserving the removed generated-private identities. The old 514-declaration invariant and 596-declaration validation count are not asserted for this child, and the measurements below remain historical at 9d6758f. Fresh current-head hosted CI and matching configured review are required; no new benchmark or compilation result is claimed here.

Controlled measurement: remove only the isolated worktree's Vlasov library/IR outputs before each build; keep dependencies warm; alternate three base/head pairs, sequentially under the cooperative machine build lock. Run /usr/bin/time -f '%e %U %S %M' taskset -c 8-11 lake build LeanPool.Vlasov.Imports. Record source fingerprints and require the shared Mathlib checkout to be clean and pinned before and after every build. Earlier source variants are excluded from these medians.

Pair Base wall (s) Head wall (s) Base max RSS (KiB) Head max RSS (KiB)
1 124.23 112.17 1,942,352 1,725,032
2 111.95 122.18 1,946,964 1,731,864
3 146.57 157.00 1,964,656 1,725,296
Median 124.23 122.18 1,946,964 1,725,296

Observed median wall reduction: 1.65%. Observed median peak compiler child process RSS reduction: 11.39%. Median user CPU time is 221.87 → 218.42 seconds; median system CPU time is 8.30 → 11.70 seconds. The VM is shared, so wall-time variation limits causal inference. RSS measures the largest individual process, not the sum of concurrent compiler processes.

Historical validation passed on measured source 9d6758f (not fresh validation of the repair child):

  • lake build --wfail LeanPool.Vlasov.Imports.
  • Repository standard/slow Mathlib linters over all 20 project modules / 596 compiled declarations; lake exe lint-style LeanPool.Vlasov.Imports.
  • lake exe mk_all --module --check over the repository; selected-project static quality/card checks using byte-identical sources and unchanged configuration.
  • Declaration/value manifest comparison and original-import export comparison.
  • Allowed-axiom audit of every compiled project declaration, plus the unchanged repository source-axiom and option/backdoor audits on the real worktree: no findings.
  • Up-to-date targeted build, lake shake --force --keep-public LeanPool.Vlasov.Imports, and git diff --check.

Full-pool validation and protected PR checks remain CI work. This PR does not request merging or auto-merge. Daily documentation publishing is asynchronous; the required Documentation preflight and all other protected checks remain applicable.

@greptile-apps

greptile-apps Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Advisory cross-file review against Lean Pool's supervisory rubric. This is not by itself a significance, source-verification, or merge verdict.

RetriggerView in Greptile

[Low impact] No actionable merge blocker was found in the reviewed changes.

Summary

The PR splits the Vlasov development into seven compilation units and shares Picard-series and convolution estimates.

  • Flow derivative proofs use shared linear ODE and Picard-series arguments.
  • Characteristic flows reuse shared growth and frozen-field estimates.
  • Weak-solution test estimates live in a separate module.
  • Local existence and continuation proofs sit in separate modules.

Reviews (2) · Last reviewed commit: "Remove unused aliases to generated Vlaso..." · Reviewed by Greptile

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Proof profile (new / modified Lean files)

lake build wall time (changed modules): 87.18 s (= 1.45 min) — user 240.79 s, sys 11.00 s.

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 108 tracked declarations across 5 modified files kept their type; only proofs / definition bodies changed.

Also: 0 declarations added, 138 removed. A reorganization moves declarations between files, which shows up here as an add in one file and a remove in another.

➖ Declarations removed (138)
  • Vlasov.IsCharacteristicFlowOn — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.IsCharacteristicFlowOn.mono — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.charFlowTight_perZ_trajectory — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.charFlowTight_piecewise_ode — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.charFlowTight_window_forceBound — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.charFlowTight_window_step — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.charFlowTight_window_velocity_carry — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.convolveFunctionMeasure_lipschitz_in_x — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.exists_vlasov_characteristicFlow_local — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.exists_vlasov_characteristicFlow_tight — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.exists_vlasov_characteristicFlow_twoWindow — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.exists_vlasov_extend_one_window — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.exists_vlasov_extend_one_window_tight — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.flow_difference_growth_bound — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.flow_difference_mild_bound — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.flow_distance_growth_bound — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.flow_distance_growth_bound_on — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.flow_distance_growth_bound_on_timedep — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.gronwall_envelope_exists — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.hasDerivWithinAt_Icc_self — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.integral_mild_bound — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.integrated_coupling_gronwall_bound — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.phi_moment_envelope_le — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.vlasovVectorField — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.vlasovVectorField_lipschitzWith — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.vlasovVectorField_norm_le — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.vlasov_window_confinement — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.vlasov_window_position_bound — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.vlasov_window_velocity_bound — LeanPool/Vlasov/OT/CharacteristicFlow.lean
  • Vlasov.IsLinearVlasovSolutionOn — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.IsVlasovSolutionOn.toLinearSelf — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.LinearWeakEvolutionEqOn — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.assW2_contDiff_gradW — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.convolveFunctionMeasure_fderiv_continuous — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.convolveFunctionMeasure_hasFDerivAt — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.exists_frozenField_charFlow_On — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.exists_linearODE_solution_Icc — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.measure_eq_of_forall_Cc_integral_eq — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.picardIter — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.picardIter_continuousOn_and_bound — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.picardIter_succ — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.picardIter_zero — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.picardSum_continuousOn — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.picardSum_continuous_param — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.picardSum_continuous_param_Icc — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.picardSum_finset_recurrence — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.picardSum_solves_integralEq — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.transportedIntegral_const_On — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.vlasovVectorField_hasFDerivAt_in_z — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • Vlasov.vlasov_frozenField_pushforward_isLinearVlasovSolutionOn — LeanPool/Vlasov/OT/WeakToLagrangian.lean
  • … +88 more

Statements are compared textually against the merge base (comments and whitespace ignored; by proof terms embedded in a type are treated as proof-irrelevant), the same method as physlib's /check-golf. Anonymous instances and examples are not tracked.

Compile cost of modified files — base → head

Heartbeats: 1 → 1 (+0, +0.0%). Commands: 3 → 3.

Per-file wall sum: 6.7 s → 6.7 s (+0.3%). Wall clock is measured under parallel load and is noisy; heartbeats are deterministic and are the regression signal.

Files: 1 compared — 0 cheaper, 0 costlier, 1 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 trace.profiler.useHeartbeats and synchronous elaboration, converted to maxHeartbeats units. Failed measurements are not classified as cheaper or costlier. Δ lines counts added/deleted lines from this PR diff.

File Δ lines HB base HB head Δ HB Δ HB % Wall base (s) Wall head (s)
LeanPool/Vlasov/OT.lean +0/-2 1 1 +0 +0.0% 6.70 6.72
Total +0/-2 1 1 +0 +0.0% 6.7 6.7

New files — absolute profile

Total heartbeats: 4,827,849 maxHeartbeats units across 7 valid files (10,457 added LOC).

Sum of lean --profile: 150551.2 ms (= 150.55 s) across 7 valid files. Import-excluded time: 140361.2 ms (= 140.36 s).

Count-heartbeats wall-clock total: 395.58 s. Repeated import cost inside lean --profile: 10190.0 ms (= 10.19 s).

Heartbeat values sum disjoint root command traces with trace.profiler.useHeartbeats and synchronous elaboration, converted from raw allocations to maxHeartbeats units by dividing by 1000. They include command elaboration and kernel checking, exclude imports, and include profiler overhead; they are not comparable to the deprecated linter's totals. Per-file wall clocks are measured under parallel load and are noisier than heartbeats.

LOC counts added lines in the profiled Lean files from this PR diff.

File LOC Heartbeats (maxHB) Count wall (s) lean --profile (s) Without import (s) Import (s) Commands Errors
LeanPool/Vlasov/OT/FlowDifferentiability.lean 1,400 1,507,982 108.36 39.52 38.26 1.26 120 0
LeanPool/Vlasov/OT/TestApproximation.lean 715 1,379,326 56.46 20.64 19.41 1.23 157 0
LeanPool/Vlasov/OT/Continuation.lean 2,912 581,087 61.46 25.51 24.28 1.23 69 0
LeanPool/Vlasov/OT/CharacteristicConstruction.lean 2,568 496,579 72.30 29.97 28.71 1.26 60 0
LeanPool/Vlasov/OT/FrozenField.lean 594 475,244 35.98 12.29 11.04 1.25 76 0
LeanPool/Vlasov/ForMathlib/VariationalEquation.lean 701 275,358 44.18 15.66 12.91 2.75 40 0
LeanPool/Vlasov/OT/LocalWellPosedness.lean 1,471 112,272 16.84 6.96 5.75 1.21 33 0
LeanPool/Vlasov/Imports.lean 7 — — — — — 0 1
LeanPool/Vlasov/OT/CharacteristicFlow.lean 17 — — — — — 0 1
LeanPool/Vlasov/OT/WeakToLagrangian.lean 6 — — — — — 0 1
LeanPool/Vlasov/OT/WellPosedness.lean 66 — — — — — 0 1
Total 10,457 4,827,849 395.58 150.55 140.36 10.19 555 4

Aggregate phase totals

Phase Time
typeclass inference 48900.0 ms (= 48.90 s)
tactic execution 41190.0 ms (= 41.19 s)
interpretation 23541.0 ms (= 23.54 s)
import 10190.0 ms (= 10.19 s)
type checking 6726.0 ms (= 6.73 s)
simp 3842.7 ms (= 3.84 s)
elaboration 3483.0 ms (= 3.48 s)
tacticAnalysis 2711.0 ms (= 2.71 s)
blocked (unaccounted) 2270.6 ms (= 2.27 s)
norm_num 1768.5 ms (= 1.77 s)
linting 1464.5 ms (= 1.46 s)
ring 1350.8 ms (= 1.35 s)

Slowest changed modules (from lake build)

Changed module Lake time
LeanPool.Vlasov.OT.TestApproximation 32.00 s
LeanPool.Vlasov.OT.FlowDifferentiability 24.00 s
LeanPool.Vlasov.OT.Continuation 22.00 s
LeanPool.Vlasov.OT.CharacteristicConstruction 18.00 s
LeanPool.Vlasov.OT.CharacteristicFlow 15.00 s
LeanPool.Vlasov.OT.FrozenField 13.00 s
LeanPool.Vlasov.ForMathlib.VariationalEquation 12.00 s
LeanPool.Vlasov.OT.LocalWellPosedness 9.70 s
Per-file `lean --profile` output

LeanPool/Vlasov/ForMathlib/VariationalEquation.lean

import took 2.75s
tactic execution of Lean.Parser.Tactic.refine took 111ms
tactic execution of Lean.Parser.Tactic.refine took 109ms
tactic execution of Lean.Parser.Tactic.refine took 110ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Set___elabRules_Mathlib_Tactic_setTactic_1._boxed took 109ms
tactic execution of Lean.Parser.Tactic.refine took 1.58s
cumulative profiling times:
	aesop 31ms
	attribute application 2.29ms
	blocked (unaccounted) 2.27s
	compilation (IR) 0.0974ms
	compilation (LCNF base) 0.731ms
	compilation (LCNF impure) 0.301ms
	compilation (LCNF mono) 0.515ms
	congr simp thm 11.6ms
	dsimp 25.1ms
	elaboration 281ms
	fix level params 9.05ms
	import 2.75s
	initialization 30.4ms
	instantiate metavars 11.9ms
	interpretation 1.61s
	let-to-have transformation 0.854ms
	linting 115ms
	module linting 0.00196ms
	norm_num 32.1ms
	overlappingInstancesLinter 21.5ms
	parsing 69.4ms
	process pre-definitions 55.5ms
	ring 82.5ms
	share common exprs 43ms
	simp 178ms
	tactic execution 3.49s
	tacticAnalysis 213ms
	type checking 338ms
	typeclass inference 3.99s
real 6.74
user 11.57
sys 1.23

LeanPool/Vlasov/OT/CharacteristicConstruction.lean

import took 1.26s
tactic execution of Mathlib.Tactic.nlinarith took 460ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 136ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 266ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 331ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 312ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 434ms
tactic execution of Lean.Parser.Tactic.refine took 112ms
tactic execution of Lean.Parser.Tactic.refine took 118ms
tactic execution of Lean.Parser.Tactic.refine took 100ms
type checking took 117ms
tactic execution of Lean.Parser.Tactic.refine took 115ms
tactic execution of Lean.Parser.Tactic.refine took 102ms
cumulative profiling times:
	attribute application 0.423ms
	congr simp thm 28.4ms
	dsimp 7.67ms
	elaboration 718ms
	fix level params 14.7ms
	import 1.26s
	initialization 29.5ms
	instantiate metavars 44.2ms
	interpretation 7.66s
	let-to-have transformation 2.32ms
	linting 421ms
	module linting 0.00149ms
	norm_num 1.41s
	overlappingInstancesLinter 46.6ms
	parsing 225ms
	process pre-definitions 185ms
	ring 644ms
	share common exprs 215ms
	simp 746ms
	tactic execution 6.21s
	tacticAnalysis 733ms
	type checking 1.21s
	typeclass inference 8.16s
real 10.02
user 29.38
sys 1.20

LeanPool/Vlasov/OT/Continuation.lean

import took 1.23s
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 253ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 265ms
tactic execution of Lean.Parser.Tactic.exact took 158ms
tactic execution of Lean.Parser.Tactic.exact took 225ms
tactic execution of Lean.Parser.Tactic.exact took 151ms
tactic execution of Lean.Parser.Tactic.exact took 217ms
tactic execution of Lean.Parser.Tactic.exact took 150ms
tactic execution of Lean.Parser.Tactic.exact took 154ms
tactic execution of Mathlib.Tactic.nlinarith took 686ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 548ms
cumulative profiling times:
	attribute application 0.48ms
	blocked (unaccounted) 0.555ms
	congr simp thm 30.7ms
	elaboration 757ms
	fix level params 13.6ms
	import 1.23s
	initialization 30.8ms
	instantiate metavars 49ms
	interpretation 4.62s
	let-to-have transformation 2.65ms
	linting 390ms
	module linting 0.0016ms
	norm_num 243ms
	overlappingInstancesLinter 40.3ms
	parsing 244ms
	process pre-definitions 233ms
	ring 399ms
	share common exprs 146ms
	simp 597ms
	tactic execution 7.26s
	tacticAnalysis 697ms
	type checking 1.12s
	typeclass inference 7.41s
real 8.53
user 25.11
sys 1.12

LeanPool/Vlasov/OT/FlowDifferentiability.lean

import took 1.26s
simp took 178ms
simp took 172ms
simp took 161ms
simp took 170ms
tactic execution of Lean.Parser.Tactic.exact took 154ms
type checking took 359ms
simp took 174ms
simp took 170ms
simp took 160ms
simp took 168ms
tactic execution of Lean.Parser.Tactic.exact took 153ms
tactic execution of Lean.Parser.Tactic.exact took 149ms
type checking took 477ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 1.23s
tactic execution of Lean.Parser.Tactic.refine took 108ms
tactic execution of Lean.Parser.Tactic.exact took 149ms
tactic execution of Lean.Parser.Tactic.refine took 117ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 2.33s
type checking took 168ms
tactic execution of Lean.Parser.Tactic.obtain took 134ms
tactic execution of Lean.Parser.Tactic.exact took 151ms
tactic execution of Lean.Parser.Tactic.exact took 114ms
type checking took 103ms
tactic execution of Lean.Parser.Tactic.obtain took 119ms
tactic execution of Lean.Parser.Tactic.refine took 132ms
tactic execution of Lean.Parser.Tactic.rewriteSeq took 1.17s
tactic execution of Lean.Parser.Tactic.obtain took 121ms
tactic execution of Lean.Parser.Tactic.exact took 148ms
tactic execution of Lean.Parser.Tactic.clearValue took 247ms
tactic execution of Lean.Parser.Tactic.exact took 1.42s
type checking took 129ms
tactic execution of Lean.Parser.Tactic.refine took 109ms
tactic execution of Lean.Parser.Tactic.refine took 182ms
tactic execution of Lean.Parser.Tactic.refine took 126ms
tactic execution of Lean.Parser.Tactic.refine took 131ms
tactic execution of Lean.Parser.Tactic.rewriteSeq took 2.22s
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Set___elabRules_Mathlib_Tactic_setTactic_1._boxed took 156ms
tactic execution of Lean.Parser.Tactic.refine took 119ms
type checking took 113ms
tactic execution of Lean.Parser.Tactic.refine took 139ms
tactic execution of Lean.Parser.Tactic.refine took 132ms
cumulative profiling times:
	attribute application 0.303ms
	congr simp thm 13.7ms
	dsimp 8.52ms
	elaboration 649ms
	fix level params 10.5ms
	import 1.26s
	initialization 29.4ms
	instantiate metavars 31.1ms
	interpretation 5.7s
	let-to-have transformation 2.38ms
	linting 218ms
	module linting 0.00193ms
	norm_num 35.3ms
	overlappingInstancesLinter 29.9ms
	parsing 143ms
	process pre-definitions 141ms
	ring 96.3ms
	share common exprs 78.2ms
	simp 1.6s
	tactic execution 14.5s
	tacticAnalysis 440ms
	type checking 2.03s
	typeclass inference 12.5s
real 12.99
user 38.97
sys 1.23

LeanPool/Vlasov/OT/FrozenField.lean

import took 1.25s
tactic execution of Lean.Parser.Tactic.exact took 154ms
tactic execution of Lean.Parser.Tactic.exact took 231ms
tactic execution of Lean.Parser.Tactic.exact took 153ms
tactic execution of Lean.Parser.Tactic.exact took 212ms
type checking took 110ms
typeclass inference of MeasureTheory.Measure.IsNegInvariant took 119ms
tactic execution of Lean.Parser.Tactic.refine took 107ms
tactic execution of Lean.Parser.Tactic.refine took 110ms
type checking took 196ms
cumulative profiling times:
	attribute application 0.151ms
	congr simp thm 7.97ms
	elaboration 272ms
	fix level params 2.85ms
	import 1.25s
	initialization 30.7ms
	instantiate metavars 7.68ms
	interpretation 731ms
	let-to-have transformation 0.955ms
	linting 77.5ms
	module linting 0.00167ms
	norm_num 23.2ms
	overlappingInstancesLinter 12.3ms
	parsing 40.5ms
	process pre-definitions 47ms
	ring 12.2ms
	share common exprs 23.7ms
	simp 458ms
	tactic execution 2.86s
	tacticAnalysis 144ms
	type checking 763ms
	typeclass inference 5.53s
real 5.89
user 11.90
sys 1.10

LeanPool/Vlasov/OT/LocalWellPosedness.lean

import took 1.21s
cumulative profiling times:
	attribute application 0.211ms
	congr simp thm 3.85ms
	dsimp 4.1ms
	elaboration 410ms
	fix level params 5.05ms
	import 1.21s
	initialization 30.1ms
	instantiate metavars 13.4ms
	interpretation 1.06s
	let-to-have transformation 1.41ms
	linting 140ms
	module linting 0.00148ms
	norm_num 11.3ms
	overlappingInstancesLinter 18.7ms
	parsing 104ms
	process pre-definitions 57.6ms
	ring 72.2ms
	share common exprs 39.5ms
	simp 65.7ms
	tactic execution 1.42s
	tacticAnalysis 293ms
	type checking 375ms
	typeclass inference 1.62s
real 3.67
user 6.65
sys 1.02

LeanPool/Vlasov/OT/TestApproximation.lean

import took 1.23s
tactic execution of Lean.Parser.Tactic.refine took 129ms
tactic execution of Lean.Parser.Tactic.refine took 134ms
tactic execution of Lean.Parser.Tactic.rewriteSeq took 513ms
tactic execution of Lean.Parser.Tactic.exact took 118ms
type checking took 158ms
typeclass inference of AddMonoidHomClass took 112ms
tactic execution of Lean.Parser.Tactic.rewriteSeq took 113ms
tactic execution of Lean.Parser.Tactic.exact took 151ms
tactic execution of Lean.Parser.Tactic.exact took 160ms
tactic execution of Lean.Parser.Tactic.exact took 145ms
tactic execution of Lean.Parser.Tactic.exact took 147ms
typeclass inference of ZeroHomClass took 118ms
typeclass inference of ZeroHomClass took 121ms
interpretation of Mathlib.Meta.Positivity.evalAdd._lam_0._boxed took 164ms
interpretation of Mathlib.Meta.Positivity.evalDiv._lam_0._boxed took 178ms
tactic execution of Lean.Parser.Tactic.clearValue took 202ms
interpretation of Mathlib.Meta.Positivity.evalAdd._lam_0._boxed took 155ms
interpretation of Mathlib.Meta.Positivity.evalDiv._lam_0._boxed took 227ms
interpretation of Mathlib.Meta.Positivity.evalAdd._lam_0._boxed took 246ms
tactic execution of Mathlib.Tactic.nlinarith took 499ms
cumulative profiling times:
	attribute application 0.247ms
	congr simp thm 9ms
	dsimp 8.71ms
	elaboration 396ms
	fix level params 5.12ms
	import 1.23s
	initialization 30.3ms
	instantiate metavars 14.9ms
	interpretation 2.16s
	let-to-have transformation 1.32ms
	linting 103ms
	module linting 0.00145ms
	norm_num 13.6ms
	overlappingInstancesLinter 14.6ms
	parsing 70.7ms
	process pre-definitions 73.9ms
	ring 44.6ms
	share common exprs 42ms
	simp 198ms
	tactic execution 5.45s
	tacticAnalysis 191ms
	type checking 890ms
	typeclass inference 9.69s
real 11.12
user 20.25
sys 1.11

Advisory only — never blocks merge. Full log uploaded as the proof-profile artifact.

@Vilin97 Vilin97 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
"summary": "This refactor splits the Vlasov flow, differentiability, weak-solution and well-posedness arguments into focused modules and shares their repeated Picard and convolution estimates. The inspected proofs retain explicit integrability, moment and time-window hypotheses, while public re-exports and documented compatibility aliases preserve the existing module interfaces. The shared IVP specification keeps the explicit Dyson-series witness. These changes improve maintainability without hiding the analytic argument behind broad automation. The reported 11.39% reduction in per-process peak RSS is arithmetically consistent but remains an author measurement; the small, variable wall-time difference does not establish a reliable speedup. The compiled declaration audit was also author-run. Hosted CI and the matching configured review remain separate requirements.",
"assessment": {
"scope": "module split and shared analytic estimates",
"introduces_tech_debt": false,
"maintainability": "improved",
"brittleness": "more_robust",
"risk": "low",
"assessment_one_sentence": "The module boundaries and shared estimates make the existing proofs easier to maintain, with no actionable regression found in the source review."
},
"verdict": "approve",
"findings": []
}

@Vilin97

Vilin97 commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator Author

🤖 LLM review — refactor (gpt-6.1-sol)

Reviewed head: b7d5c2a7641359be28d0e98f2cda00495aee1103

Verdict: ✅ approve

The refactor separates seven compilation units and shares Picard-series and convolution estimates while retaining explicit proof structure. Public reexports preserve access through the original module paths, and the repair removes dependencies on tactic-generated helper names. I found no actionable maintenance regression. Local compilation was blocked by missing Mathlib dependencies; the historical RSS measurements were not independently reproduced.

Aspect Value
Scope module split and shared proof estimates
Introduces tech debt ✅ no
Maintainability ✅ improved
Brittleness ➖ unchanged
Risk ✅ low

The module boundaries and shared lemmas reduce duplication without obscuring the arguments or broadening proof automation.


Tokens: 1,213,194 in / 11,431 out · Tier: codex-subscription · Effort: xhigh · Billing: Codex subscription quota (no API credits) · Estimated cost: $5.0242 (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.

Address configured review2217 by removing42 unused private aliases to tactic-generated simp/abel constants. Preserve37 named aliases, non-alias mathematical statements/proofs, imports and gates. Old compiled-count/benchmark evidence remains historical; fresh current-head validation is required.

@Vilin97 Vilin97 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
"summary": "The configured review identified generated-helper coupling I missed in the initial source review. This child removes 42 unused private aliases to generated simp/abel constants, retaining all 37 named private compatibility aliases, non-alias mathematical statements and proofs, and original public import paths.",
"assessment": {
"scope": "Generated-private compatibility alias cleanup following the Vlasov module split",
"introduces_tech_debt": false,
"maintainability": "improved",
"brittleness": "more_robust",
"risk": "low",
"assessment_one_sentence": "Removing unused dependencies on tactic-generated names preserves the useful module split and named compatibility interfaces."
},
"verdict": "approve",
"findings": [],
"verification_scope": "The prior twelve-file source review is retained through the inspected three-file deletion. All twenty project bodies were authenticated and searched; removed names have no written clients beyond their alias declaration and target. This is static source evidence, not fresh compiled-environment equivalence.",
"historical_validation": "The 514-declaration preservation audit, 596 compiled count, measurements and successful authored CI belong to 9d6758f. This child intentionally drops 42 generated-private identities; those old counts, full private-environment preservation and new performance results are not claimed.",
"gate_status": "Source accepted only at this child. Matching configured 2217 request_changes remains historical at its original head. Fresh current-head authored CI, configured review and normal native queue checks remain required. No queue or automatic merge is enabled.",
"reviewed_commit": "b7d5c2a7641359be28d0e98f2cda00495aee1103"
}

@Vilin97

Vilin97 commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

/review

Please run the configured review for exact head b7d5c2a7641359be28d0e98f2cda00495aee1103, including the generated-helper alias cleanup. Its own Lean Action CI is still running; this requests source review in parallel and does not replace that validation. Please assess the actual diff independently. No policy or protection exception is requested.

@Vilin97
Vilin97 added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit ed76a7c Oct 20, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant