Repository navigation
C185: Formalize the fixed-pair whole-square Poisson comparison - #1200
VanGogh7777 wants to merge 1 commit into
Conversation
Project metadata advisoryThis advisory summarizes source-project metadata for project entries added or changed by this PR.
License is read from GitHub SPDX metadata when available, and the last commit and Lean version are read from the source repository's default branch. |
|
Advisory cross-file review against Lean Pool's supervisory rubric. This is not by itself a significance, source-verification, or merge verdict. [Low impact] The additions reach the Lean library’s whole-square probability results, not existing runtime workflows. No blocking code defect was established; the copied helpers are a non-blocking cleanup. Findings
SummaryAdds the fixed-pair whole-square Poisson comparison:
One non-blocking cleanup concerns copied probability helpers. The pinned manuscript and upstream license were unavailable, so exact source fidelity and upstream completeness remain unverified. Mathlib/Tau Ceti prior-art coverage and compile-cost measurements also remain unverified. Reviews (1) · Last reviewed commit: "Formalize the registered C185 theorem" · 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. Total heartbeats: 1,817,626 maxHeartbeats units across 137 valid files (13,259 added LOC). Sum of Count-heartbeats wall-clock total: 420.33 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.C185WholeSquare.C185Grade.Matching |
5.00 s |
LeanPool.C185WholeSquare.C185General.Inventory |
4.50 s |
LeanPool.C185WholeSquare.C185Scan.Boundary |
2.90 s |
LeanPool.C185WholeSquare.C185Grade.Signs |
2.90 s |
LeanPool.C185WholeSquare.C185Fine.Tensor |
2.80 s |
LeanPool.C185WholeSquare.C185Square.Marks |
2.60 s |
LeanPool.C185WholeSquare.C185Scan.Orders |
2.60 s |
LeanPool.C185WholeSquare.C185Scan.Critical |
2.60 s |
LeanPool.C185WholeSquare.C185Poisson.Block |
2.50 s |
LeanPool.C185WholeSquare.C185Scan.Screen |
2.50 s |
LeanPool.C185WholeSquare.C185Physical.Observable |
2.40 s |
LeanPool.C185WholeSquare.C185Screen.Barrier |
2.40 s |
Comment truncated to fit GitHub's 64 KB limit. This PR profiles 137 files; the per-file table shows only the 137 hottest by heartbeats. The full table and raw
lean --profileoutput for every file are in the run's step summary andproof-profileartifact.
Advisory only — never blocks merge.
Vilin97
left a comment
There was a problem hiding this comment.
Approved at c86e3ff4, pending the configured review.
- The exact collar-count pushforward and the forward, reverse, and total-variation limits match Theorem 1, equations (12)–(15). One reverse kernel handles both laws for the fixed pair and works from either the Poisson experiment or the actual collar counts. The rate parameter allows zero exposure.
- I checked the pinned manuscript, Apache-2.0 source, and author attribution. The closest Mathlib, Tau Ceti, and Lean Pool results supply Poisson and total-variation tools for related settings. The whole-square comparison and common reverse kernel are new to the pool.
- The duplicate probability and preservation helpers are suitable for a later cleanup. They do not affect the fixed-pair result.
🤖 LLM review (
|
| Rubric | Verdict | Bottom line |
|---|---|---|
| Faithfulness | 🛑 block |
The Lean matches the pinned theorem, and the card omits the admissibility assumptions on the two site laws. Pinned manuscript, §3, Theorem 1 |
| Novelty | ✅ pass |
I found no duplicate of C185HeadlineReview.fixed_pair_whole_square in the pool or in targeted searches of the pinned Mathlib and Tau Ceti sources, and comprehensive coverage of those two libraries remains unverifiable. |
| Significance | ✅ pass |
The project develops fourth-order cylinder expansions, overlap bounds, and a common reconstruction kernel to prove a research-level comparison of statistical experiments. |
| Sources | ✅ pass |
The pinned manuscript supports the Lean hypotheses, exact collar-count readout, and all four limits in Theorem 1, including one reverse kernel for both alternatives and both input laws, and the card credits the upstream formalization. Pass B2, §§2–3 |
| Code quality (advisory) | flag |
The interior and terminal proofs duplicate shared probability arguments, and the public import brings in several modules whose results have no callers in the project. |
| Aspect | Value |
|---|---|
| Proves the claim | 🟡 weaker_than_claimed |
| Assumed, not proved | The card discloses submatch and the scale hypotheses. The Lean also requires both site laws to be atomless probability measures concentrated on (0, 1], each with an exactly linear lower tail of positive slope on an interval of positive length. |
| Matches cited source | ✅ matches |
| Fit | ✅ good_fit |
| Level | research |
| Branch | asymptotic statistics |
| Mode | theory_building |
| Code quality | 2 / 5 |
Statement check: For a fixed admissible pair satisfying submatch, the theorem proves the exact collar-count pushforward at every size, convergence to the product-Poisson laws, one reverse kernel per size shared by both alternatives and both input laws, and convergence of whole-field total variation to Poisson total variation, including at zero exposure.
For a fixed pair of height laws whose run coefficients match through order three, the overlapping collared-word counts are asymptotically sufficient for the complete ternary square, and their independent Poisson limit determines the limiting total-variation distance between the two full-field laws.
Faithfulness findings (1)
- undisclosed-hypothesis —
LeanPool/projects/c185-whole-square.yaml:30
The informal statement lists submatch and the scale hypotheses but leaves the domain of the fixed pair implicit. State that the pair consists of atomless probability laws concentrated on (0, 1] with exactly linear lower tails of positive slope near zero, and that their oriented-word coefficients agree through cost three.
Evidence: InPaper.lean, the headline starts withtheorem fixed_pair_whole_square (P : Pair) (M : submatch P). InC185General/Buckets.lean,abbrev Pair := Bool→Materialbundlesprob : IsProbabilityMeasure μ,atomless : NullSingletonClass μ, andtail : LinearTail μ slope radius. InC185Physical/Tail.lean,LinearTailrequiressupported : ∀ᵐ x ∂μ, x ∈ Ioc (0 : ℝ) 1,slope : 0 < c,radius : 0 < r, andcdf : ∀ {x : ℝ}, 0 ≤ x → x ≤ r → μ (Iic x) = ENNReal.ofReal (c*x).
Code quality findings (6)
- duplicate-proof —
LeanPool/C185WholeSquare/C185End/Reverse.lean:60
The interior and terminal screening proofs repeat the observed and resampled fiber calculations and the joint-measure exchange argument. The physical reverse proofs also copylaw_ae,kernel_ae, and the localpackproof. The two information modules copyretain_tvandtv_inj, with the terminal version oftv_injalready showing that[Finite Y]is unnecessary. Factor the common arguments into lemmas besidejoint,law, andkernelso changes to their definitions require one repair per argument.
Evidence: Bothterminal_screenin C185End/Reverse.lean andlocal_screeningin C185Screen/Screening.lean usehave db : C185Collar.law M (fresh f v g) = _ := funext (fresh_law P f v g hf hv hg 0). Both copies ofkernel_aeconcludesimp only [kernel,e,e']. Both information modules declareprivate theorem retain_tv {W V C : Type*} [Finite W] [Finite V] [Fintype C]. The interiortv_injadds[Finite Y], while the terminal proof useslet S := Finset.univ.image d. - duplicate-proof —
LeanPool/C185WholeSquare/C185Square/Field.lean:33
The same two measurability branches are proved repeatedly by unfoldingcode. Whole-field measurability is proved twice in C185End/Mirror.lean and again in C185Multi/Step.lean and C185Mix/Mask.lean. Block-word measurability is repeated in C185Mix/Blocks.lean, C185Mix/Replacement.lean, C185Mix/Stubs.lean, and C185Grade/Fibers.lean. Prove measurability of the ternary comparison at its definition and expose the whole-field and block-word lemmas alongside their definitions. A change to either comparison branch would then have a single proof to update.
Evidence: C185Square/Field.lean definesdef code (s a b : ℝ) : Fin 3 := if a < s*b then C185Ternary.first else if b < s*a then.field_measurable,field_meas, and the localmmproof useapply Measurable.of_eval; intro e; unfold squareField C185Square.code.word_meas,seam_product,group_norm, and thegroupMasscalculation in C185Grade/Fibers.lean useapply Measurable.of_eval; intro e; unfold groupWord C185Square.code. - duplicate-proof —
LeanPool/C185WholeSquare/C185Reverse/Physical.lean:21
Symmetry of the same total variation definition is proved incount_tv_symm,tv_swap,swap_tv, andreverse_tv, and inline in both information proofs for individual cuts, both cascade information proofs, andtransfer_recovery. The triangle inequality is also reproved intv_triangle,count_tv_triangle, andfinite_triangle. Put symmetry and the summable triangle inequality besideC185Poisson.tvand derive the finite form there. This gives callers one set of lemmas to update if the distance representation changes.
Evidence:theorem count_tv_symm {X : Type*} (a b : X → ℝ) : tv a b=tv b a := byusesexact tsum_congr fun _=>abs_sub_comm ... C185Fine/Experiment.lean declaresprivate theorem swap_tv {I : Type*} (u v : I → ℝ) : C185Poisson.tv u v = C185Poisson.tv v u := by. The triangle proofs in C185Poisson/Testing.lean and C185CutScan/Forward.lean both useabs_add_le,tsum_le_tsum, andSummable.tsum_add. - unused-import —
LeanPool/C185WholeSquare/C185Square/Testing.lean:9
The module definingfullMasspulls in three separate histogram and testing developments whose declarations have no callers outside their own files. The same dependency pattern occurs in C185General/Buckets.lean through C185Complete/Information.lean, in C185End/Square.lean through C185Multi/Limit.lean, and in C185Native/NativeCell.lean through C185Scan/Bank.lean. Import the lower-level modules that provide the symbols each caller uses. That keeps changes to standalone results from invalidating the whole-square proof’s import chain.
Evidence: C185Square/Testing.lean declares onlyfullMass, with body(grid N μ).real (squareField N s ⁻¹' {w}), and importspublic import LeanPool.C185WholeSquare.C185Square.Histogram,public import LeanPool.C185WholeSquare.C185Physical.Observable, andpublic import LeanPool.C185WholeSquare.C185Poisson.Testing. The other edges arepublic import LeanPool.C185WholeSquare.C185Complete.Information,public import LeanPool.C185WholeSquare.C185Multi.Limit, andpublic import LeanPool.C185WholeSquare.C185Scan.Bank. - duplicate-definition —
LeanPool/C185WholeSquare/C185CutScan/Forward.lean:23
The deterministic mass pushforward has two definitions and separate law and TV contraction lemmas.actual_pool_lawalready has to cross between the APIs. Move the shared operation into the channel layer and expose its fiber-sum and point-mass-kernel formulas as lemmas so finite-output and countable-output arguments can use the same operation.
Evidence:fiberPushis defined by∑' x : g ⁻¹' {y}, u x.val. C185Multi/Transport.lean definesdef push (d : X → Y) (u : X → ℝ) := runK u (delta d). Inactual_pool_law, the proof useschange push k (push g (law (grid N (P v).μ) f)) = _ at Aand then rewrites usingfiber_push_law. - duplicate-statement —
LeanPool/C185WholeSquare/Paper.lean:22
The public theorem repeats the entire statement ofwhole_square_experimentand forwards directly to it. The duplicated conjunction makes any change to the public experiment statement a synchronized edit across two files. Give the proof the public theorem name, or use a declaration alias if both names are needed.
Evidence: C185Headline/Sequence.lean declarestheorem whole_square_experiment (P : Pair) (M : submatch P). Paper.lean declarestheorem fixed_pair_whole_square (P : Pair) (M : submatch P)with the same statement and proves it withexact C185Headline.whole_square_experiment P M hs h0 hB.
Tokens: 6,435,904 in / 43,068 out across 5 model calls · Tier: codex-subscription · Effort: xhigh · Billing: Codex subscription quota (no API credits) · Estimated cost: $26.3896 (Standard API equivalent; uncached input)
Each rubric is an independent review against .github/review-rubrics/ on top of .github/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.
| informal: C185 Pass B2, Theorem 1, §3 Eqs. (12)–(15). The indexed survey and Poisson | ||
| experiment share an asymptotic reverse kernel under the submatch hypothesis for the | ||
| fixed pair, positive scale tending to zero and Ns² tending to B, with exact | ||
| collar-count pushforward and the limiting total-variation distance. |
There was a problem hiding this comment.
Please include the site-law assumptions exposed by the configured review. Pair bundles them, and the current card lists only matching and scaling. This wording keeps the Lean theorem and its source intact.
| informal: C185 Pass B2, Theorem 1, §3 Eqs. (12)–(15). The indexed survey and Poisson | |
| experiment share an asymptotic reverse kernel under the submatch hypothesis for the | |
| fixed pair, positive scale tending to zero and Ns² tending to B, with exact | |
| collar-count pushforward and the limiting total-variation distance. | |
| informal: >- | |
| C185 Pass B2, Theorem 1, §3 Eqs. (12)–(15). The fixed pair consists of atomless | |
| probability laws concentrated on (0, 1], each with an exactly linear lower tail | |
| of positive slope near zero. Their oriented-word coefficients match through cost | |
| three. At positive scales s tending to zero with Ns² tending to B, the indexed | |
| survey and Poisson experiment share an asymptotic reverse kernel, with exact | |
| collar-count pushforward and convergence of the full-field total-variation distance. |
This contribution formalizes Theorem 1, §3, Eqs. (12)–(15), of Mark Gladden’s C185 Pass B2 manuscript, Poisson experiments for complete turn surveys on random squares. It proves the fixed-pair whole-square comparison with its shared reverse kernel and exact collar-count pushforward for the fixed pair under the submatch hypothesis and a positive scale tending to zero with Ns² tending to B.
The public import is
LeanPool.C185WholeSquare. The sole principal declaration isC185HeadlineReview.fixed_pair_whole_square. The code is Apache-2.0. Mark Gladden designed and directed the research. AI systems wrote and checked the Lean proof.Pinned manuscript · Exact Lean source · Palomar registration