Repository navigation
Add C196 three-read alignment and finite-menu masking - #1062
Conversation
|
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 new blocking issue was found in the attribution-only update. SummaryAdds calibrated three-read bounds and exact finite-menu masking near a nonaligned angle.
Reviews (2) · Last reviewed commit: "Preserve C196 source attribution and ada..." · 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: 91,874 maxHeartbeats units across 7 valid files (785 added LOC). Sum of Count-heartbeats wall-clock total: 20.55 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.VenNullClockRoundRates.ThreeReadModel |
2.30 s |
LeanPool.VenNullClockRoundRates.LocalMaskModel |
2.20 s |
LeanPool.VenNullClockRoundRates.LocalMaskSphereModel |
2.10 s |
LeanPool.VenNullClockRoundRates.ThreeRead |
1.90 s |
LeanPool.VenNullClockRoundRates.LocalMaskGram |
1.60 s |
LeanPool.VenNullClockRoundRates.LocalMask |
1.30 s |
LeanPool.VenNullClockRoundRates.LocalMaskAngular |
1.10 s |
Per-file `lean --profile` output
LeanPool/VenNullClockRoundRates/LocalMask.lean
import took 1.1s
cumulative profiling times:
attribute application 0.054ms
blocked (unaccounted) 170ms
congr simp thm 0.917ms
declTypeLinter 2.81ms
dsimp 4.59ms
elaboration 13.2ms
fix level params 0.604ms
import 1.1s
initialization 26.3ms
instantiate metavars 1.76ms
interpretation 361ms
let-to-have transformation 0.0435ms
linting 12.9ms
module linting 0.0219ms
norm_num 1.56ms
parsing 5.64ms
process pre-definitions 6.73ms
ring 28.9ms
share common exprs 9.06ms
simp 37.3ms
tactic execution 93ms
tacticAnalysis 2.37ms
type checking 37.7ms
typeclass inference 189ms
real 2.23
user 1.47
sys 0.54
LeanPool/VenNullClockRoundRates/LocalMaskAngular.lean
import took 569ms
cumulative profiling times:
attribute application 0.0314ms
congr simp thm 0.614ms
declTypeLinter 3.02ms
dsimp 0.555ms
elaboration 11.1ms
fix level params 0.333ms
import 569ms
initialization 26.9ms
instantiate metavars 1.06ms
interpretation 217ms
let-to-have transformation 0.0342ms
linting 10.2ms
module linting 0.0167ms
norm_num 0.681ms
parsing 6.36ms
process pre-definitions 4.47ms
ring 12ms
share common exprs 3.7ms
simp 10.3ms
tactic execution 100ms
tacticAnalysis 2.21ms
type checking 21.1ms
typeclass inference 104ms
real 1.37
user 1.16
sys 0.47
LeanPool/VenNullClockRoundRates/LocalMaskGram.lean
import took 560ms
cumulative profiling times:
attribute application 0.0477ms
blocked (unaccounted) 1.53ms
congr simp thm 1.48ms
declTypeLinter 4.21ms
dsimp 5.35ms
elaboration 27.5ms
fix level params 0.796ms
import 560ms
initialization 27.1ms
instantiate metavars 1.16ms
interpretation 220ms
let-to-have transformation 0.0715ms
linting 10.7ms
module linting 0.0244ms
norm_num 0.214ms
parsing 5.9ms
process pre-definitions 4.35ms
ring 4.84ms
share common exprs 3.21ms
simp 143ms
tactic execution 125ms
tacticAnalysis 3.08ms
type checking 39.3ms
typeclass inference 276ms
real 1.50
user 1.48
sys 0.50
LeanPool/VenNullClockRoundRates/LocalMaskModel.lean
import took 575ms
cumulative profiling times:
attribute application 0.0447ms
compilation (IR) 0.0781ms
compilation (LCNF base) 1.24ms
compilation (LCNF impure) 0.276ms
compilation (LCNF mono) 0.5ms
declTypeLinter 3.57ms
elaboration 21ms
fix level params 0.0884ms
import 575ms
initialization 26.8ms
instantiate metavars 0.0883ms
interpretation 156ms
let-to-have transformation 0.0503ms
linting 5.78ms
module linting 0.0213ms
parsing 4.25ms
process pre-definitions 2.6ms
share common exprs 0.364ms
tacticAnalysis 1.45ms
type checking 4.49ms
typeclass inference 18.9ms
real 1.25
user 0.86
sys 0.48
LeanPool/VenNullClockRoundRates/LocalMaskSphereModel.lean
import took 566ms
cumulative profiling times:
attribute application 0.0168ms
declTypeLinter 1.21ms
elaboration 8.7ms
fix level params 0.0188ms
import 566ms
initialization 26.7ms
instantiate metavars 0.0177ms
interpretation 137ms
let-to-have transformation 0.97ms
linting 2.33ms
module linting 0.0181ms
parsing 1.89ms
process pre-definitions 0.768ms
share common exprs 0.0862ms
tacticAnalysis 0.759ms
type checking 2.16ms
typeclass inference 5.45ms
real 1.21
user 0.79
sys 0.47
LeanPool/VenNullClockRoundRates/ThreeRead.lean
import took 566ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 104ms
cumulative profiling times:
attribute application 0.201ms
blocked (unaccounted) 2.5ms
compilation (IR) 0.552ms
compilation (LCNF base) 3.35ms
compilation (LCNF impure) 1.87ms
compilation (LCNF mono) 2.31ms
congr simp thm 4.37ms
declTypeLinter 8.27ms
dsimp 3.88ms
elaboration 103ms
fix level params 4.47ms
import 566ms
initialization 26.9ms
instantiate metavars 3.52ms
interpretation 615ms
let-to-have transformation 0.256ms
linting 34.5ms
module linting 0.0235ms
norm_num 80.3ms
parsing 11.3ms
process pre-definitions 35.2ms
ring 174ms
share common exprs 69ms
simp 62.1ms
tactic execution 272ms
tacticAnalysis 4.68ms
type checking 209ms
typeclass inference 412ms
real 1.85
user 2.72
sys 0.52
LeanPool/VenNullClockRoundRates/ThreeReadModel.lean
import took 567ms
cumulative profiling times:
attribute application 0.0575ms
compilation (IR) 0.237ms
compilation (LCNF base) 5.7ms
compilation (LCNF impure) 0.839ms
compilation (LCNF mono) 1.47ms
declTypeLinter 5.25ms
elaboration 25.5ms
fix level params 0.116ms
import 567ms
initialization 26.8ms
instantiate metavars 0.17ms
interpretation 154ms
let-to-have transformation 0.0633ms
linting 5.67ms
module linting 0.0207ms
parsing 4.01ms
process pre-definitions 3.58ms
share common exprs 0.458ms
tacticAnalysis 1.88ms
type checking 6.92ms
typeclass inference 36.8ms
real 1.27
user 0.89
sys 0.48
Advisory only — never blocks merge. Full log uploaded as the proof-profile artifact.
🤖 LLM review — refactor (
|
| Aspect | Value |
|---|---|
| Scope | Integration of two proof developments into C196 |
| Introduces tech debt | 🛑 yes |
| Maintainability | 🛑 regressed |
| Brittleness | 🛑 more_brittle |
| Risk | 🟡 medium |
Reuse the existing geometry lemmas and define the sphere observation model through the generic masking API so future changes only need to be made once.
Findings (2)
- duplicated-proof —
LeanPool/VenNullClockRoundRates/LocalMask.lean:76
sphere_local_maskingreconstructs theOpensMeasurableSpaceinstance and repeats the continuity and energy-bound proofs fromGeometry.lean. ImportGeometryand use its instance,VenRate.first_cont,VenRate.second_cont, andVenRate.en_bounds. The interval bounds give the required absolute-value bounds viaabs_of_nonneg. This removes the second copy of the sphere coordinate and rotation arguments. - duplicated-definition —
LeanPool/VenNullClockRoundRates/LocalMaskSphereModel.lean:23
sphereKernelrepeatskernel, andSphereMaskingCertificatespells out the same finite sum and weighted integral assynthesisandread. The final proof inLocalMask.leanrelies on all three pairs of expressions being definitionally equal. DefinesphereKernelas a specialization ofkerneland usesynthesisandreadin the certificate so the public sphere model and the generic proof share the same definitions.
Tokens: 1,431,447 in / 9,328 out · Tier: codex-subscription · Effort: xhigh · Billing: Codex subscription quota (no API credits) · Estimated cost: $5.8657 (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.
request_changes is an ask, not a close: of the reviewer's past request_changes verdicts, 39% were merged after a human looked. Read the findings before acting on the verdict.
Vilin97
left a comment
There was a problem hiding this comment.
Approved for d85be119c549a9ac5f69235132ae3bb41084cfa0, pending required CI on this commit.
- Theorem 4 derives the explicit angular margin from the supplied projection moments. The formalization proves the weighted-square identity, the equality criterion for alignment, and the deterministic 4ε and 8ε bounds. The card states the projection-moment hypothesis. C196 manuscript, p. 4
- Proposition 7 proves exact matching of the whole finite menu near a fixed nonaligned angle with a single strictly positive profile. The proof establishes the open image and kernel independence, solves the finite Gram system, and uses the vanishing correction at the reference angle to preserve the strict lower bound. This adds a result beyond the existing matching-rate bounds. Pinned Lean source
- I restored the upstream proof-authorship credit and added adaptation notices to all seven copied modules. The commit also identifies the existing shared NOTICE as applying to both source snapshots. The patch changes comments only, and the existing result signatures and proofs are unchanged. Apache-2.0, section 4
Two follow-ups are advisory. The sphere continuity and bounds proofs could reuse the existing geometry lemmas. The manuscript could also supply a source pin for the ancillary projectionLaw_of_uniform reference. The submitted certificate explicitly assumes the projection law.
C196 calibrated three-read separation and finite-menu masking
Extend the existing C196 Lean Pool project with the checked proofs of Theorem 4 and Proposition 7 from the same v0.3 manuscript. The original matching-rate and smooth-witness modules are unchanged.
Theorem 4, p. 4, Eqs. (24)–(28), gives the explicit calibrated margin, alignment equivalence, weighted exponential-square identity and deterministic error bounds for three readings. It assumes a probability measure with the supplied projection-moment law, axis overlap (c^2 \le 1), and (t > 0). It uses one profile (w \ge 1) and integrable reads at ((2t,0), (t,t), (0,2t)). The identification of physical round area with the supplied moment law remains analytic. Registered Split formalization
Proposition 7, p. 6, Eq. (35), proves local exact matching for a finite menu of distinct controls near a fixed nonaligned reference angle. It uses a finite open-positive measure and a constant reference profile above one. The explicit exponential-sum witness stays above one and matches every reference read. Registered Mask formalization
The masking proof reuses the project's existing Cartesian sphere and energy definitions. The finite-menu certificate and kernel belong to the new proof dependency closure. Both result groups use the existing proofs from the C196 source snapshot.
Mark Gladden is the responsible maintainer. AI produced the Lean proofs under his direction. The code and manuscript are released under Apache-2.0.