Repository navigation
Import the sharp critical-set bound for Latin squares - #710
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 concrete code defect was found, but source fidelity and wider novelty remain unverified, so this is not a complete merge approval. SummaryAdds the sharp quarter-square bound for Latin-square critical sets:
The four advertised results match their formal statements, including labelled completions and positive-order minima. The algebraic support has concrete consumers in the proof. External source fidelity, the upstream license and complete module inventory, release provenance, and novelty against Mathlib and Tau Ceti remain unverified. Those sources were unavailable. Existing PR discussion was also unavailable. Compile timings are author-supplied; this review did not run a build or benchmark.
Reviews (1) · Last reviewed commit: "Import the sharp critical-set bound for ..." · Reviewed by Greptile |
|
Greptile completed on The separate source review checked the actual Apache-2.0 LICENSE, NOTICE, provenance, release, 15-module inventory, and paper definitions/Theorems A/B. The standalone generator confirms that the omitted standalone file concatenates those same 15 modules and adds audit commands. The local checks are green, including the complete project build and all compiled declaration audits. Hosted Lean Action CI is still restoring the pool build. The configured GPT review and hosted validation remain outstanding. The separate source approval does not replace them. The exact author head remains fixed. Auto-merge is disabled and the PR is outside the queue under the current-main infrastructure hold. |
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: 198,325 maxHeartbeats units across 17 valid files (1,667 added LOC). Sum of Count-heartbeats wall-clock total: 58.40 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.LatinQuarter.Basic |
3.30 s |
LeanPool.LatinQuarter.Tags |
3.30 s |
LeanPool.LatinQuarter.SquareZero |
2.80 s |
LeanPool.LatinQuarter.Budget |
2.60 s |
LeanPool.LatinQuarter.Cyclic |
2.10 s |
LeanPool.LatinQuarter.Counting |
2.10 s |
LeanPool.LatinQuarter.Minors |
2.00 s |
LeanPool.LatinQuarter.Vanishing |
1.90 s |
LeanPool.LatinQuarter.CornerSize |
1.70 s |
LeanPool.LatinQuarter.Rows |
1.50 s |
LeanPool.LatinQuarter.LowerBound |
1.30 s |
LeanPool.LatinQuarter.Parity |
1.20 s |
Per-file `lean --profile` output
LeanPool/LatinQuarter.lean
import took 1.56s
cumulative profiling times:
elaboration 0.165ms
import 1.56s
initialization 33.2ms
interpretation 134ms
linting 1.03ms
module linting 0.00202ms
overlappingInstancesLinter 0.902ms
parsing 0.054ms
tacticAnalysis 1.46ms
real 2.23
user 0.84
sys 0.59
LeanPool/LatinQuarter/Basic.lean
import took 419ms
cumulative profiling times:
attribute application 0.706ms
blocked (unaccounted) 52.9ms
congr simp thm 0.912ms
elaboration 13.8ms
fix level params 0.105ms
import 419ms
initialization 31.5ms
instantiate metavars 0.175ms
interpretation 142ms
let-to-have transformation 0.0605ms
linting 7.81ms
module linting 0.00184ms
overlappingInstancesLinter 3.34ms
parsing 4.34ms
process pre-definitions 1.94ms
share common exprs 0.421ms
simp 16.2ms
tactic execution 13.4ms
tacticAnalysis 12.1ms
type checking 2.65ms
typeclass inference 50.5ms
real 1.14
user 0.78
sys 0.46
LeanPool/LatinQuarter/Budget.lean
import took 591ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 106ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 107ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 102ms
cumulative profiling times:
attribute application 0.0385ms
congr simp thm 15.2ms
elaboration 16.6ms
fix level params 0.577ms
import 591ms
initialization 31.2ms
instantiate metavars 2.09ms
interpretation 528ms
let-to-have transformation 0.0707ms
linting 7.38ms
module linting 0.00164ms
norm_num 77.5ms
overlappingInstancesLinter 2.14ms
parsing 3.67ms
process pre-definitions 5.16ms
ring 39.2ms
share common exprs 10.6ms
simp 279ms
tactic execution 93.5ms
tacticAnalysis 12.7ms
type checking 143ms
typeclass inference 319ms
real 2.05
user 2.17
sys 0.54
LeanPool/LatinQuarter/CornerSize.lean
import took 598ms
cumulative profiling times:
attribute application 0.0153ms
congr simp thm 0.796ms
dsimp 37.7ms
elaboration 5.61ms
fix level params 0.175ms
import 598ms
initialization 31.8ms
instantiate metavars 1.95ms
interpretation 154ms
let-to-have transformation 0.0209ms
linting 6.07ms
module linting 0.00175ms
overlappingInstancesLinter 1.64ms
parsing 3.68ms
process pre-definitions 10.3ms
share common exprs 1.76ms
simp 24.1ms
tactic execution 350ms
tacticAnalysis 10.1ms
type checking 440ms
typeclass inference 69.3ms
real 1.84
user 1.76
sys 0.53
LeanPool/LatinQuarter/Counting.lean
import took 653ms
cumulative profiling times:
attribute application 0.144ms
compilation (IR) 0.0973ms
compilation (LCNF base) 0.424ms
compilation (LCNF impure) 0.425ms
compilation (LCNF mono) 0.555ms
congr simp thm 2.31ms
elaboration 70.1ms
fix level params 0.858ms
import 653ms
initialization 33.3ms
instantiate metavars 1.12ms
interpretation 235ms
let-to-have transformation 0.2ms
linting 14.2ms
module linting 0.00198ms
overlappingInstancesLinter 6.24ms
parsing 8.29ms
process pre-definitions 5.6ms
share common exprs 3.77ms
simp 50.7ms
tactic execution 134ms
tacticAnalysis 23.9ms
type checking 39.4ms
typeclass inference 375ms
real 1.66
user 1.64
sys 0.56
LeanPool/LatinQuarter/Cyclic.lean
import took 483ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 112ms
cumulative profiling times:
attribute application 0.631ms
compilation (IR) 0.2ms
compilation (LCNF base) 2.63ms
compilation (LCNF impure) 0.759ms
compilation (LCNF mono) 1.26ms
congr simp thm 1.8ms
dsimp 8.43ms
elaboration 19.4ms
fix level params 0.264ms
import 483ms
initialization 33.2ms
instantiate metavars 0.793ms
interpretation 286ms
let-to-have transformation 0.0858ms
linting 15.5ms
module linting 0.00203ms
norm_num 1.93ms
overlappingInstancesLinter 3.34ms
parsing 7.52ms
process pre-definitions 4.14ms
ring 6.79ms
share common exprs 1.9ms
simp 200ms
tactic execution 145ms
tacticAnalysis 18.4ms
type checking 143ms
typeclass inference 164ms
real 1.65
user 1.58
sys 0.50
LeanPool/LatinQuarter/Imports.lean
import took 691ms
cumulative profiling times:
elaboration 0.348ms
import 691ms
initialization 38.7ms
interpretation 119ms
linting 0.241ms
module linting 0.00207ms
overlappingInstancesLinter 0.0964ms
parsing 0.00202ms
tacticAnalysis 0.645ms
real 1.38
user 0.88
sys 0.52
LeanPool/LatinQuarter/LowerBound.lean
import took 664ms
cumulative profiling times:
attribute application 0.0238ms
congr simp thm 0.294ms
elaboration 29ms
fix level params 0.163ms
import 664ms
initialization 31ms
instantiate metavars 0.385ms
interpretation 167ms
let-to-have transformation 0.059ms
linting 6.8ms
module linting 0.0019ms
overlappingInstancesLinter 1.84ms
parsing 2.99ms
process pre-definitions 1.92ms
share common exprs 1.1ms
simp 1.6ms
tactic execution 98.4ms
tacticAnalysis 7.41ms
type checking 48.2ms
typeclass inference 184ms
real 1.67
user 1.24
sys 0.54
LeanPool/LatinQuarter/Main.lean
import took 673ms
cumulative profiling times:
attribute application 0.0858ms
elaboration 16.3ms
fix level params 0.132ms
import 673ms
initialization 37.5ms
instantiate metavars 0.292ms
interpretation 184ms
let-to-have transformation 0.0825ms
linting 8.28ms
module linting 0.00195ms
overlappingInstancesLinter 3.66ms
parsing 4.42ms
process pre-definitions 1.96ms
share common exprs 0.644ms
tactic execution 15.4ms
tacticAnalysis 11.7ms
type checking 7.49ms
typeclass inference 12.1ms
real 1.40
user 0.96
sys 0.55
LeanPool/LatinQuarter/Minors.lean
import took 641ms
cumulative profiling times:
attribute application 0.0816ms
congr simp thm 3.42ms
elaboration 20.8ms
fix level params 0.814ms
import 641ms
initialization 37.9ms
instantiate metavars 1.1ms
interpretation 201ms
let-to-have transformation 0.0858ms
linting 13.1ms
module linting 0.00195ms
overlappingInstancesLinter 6.86ms
parsing 5.25ms
process pre-definitions 3.47ms
share common exprs 2.1ms
simp 65.1ms
tactic execution 83.9ms
tacticAnalysis 15.7ms
type checking 29.5ms
typeclass inference 162ms
real 1.54
user 1.26
sys 0.55
LeanPool/LatinQuarter/Parity.lean
import took 645ms
cumulative profiling times:
attribute application 0.0495ms
elaboration 36ms
fix level params 0.285ms
import 645ms
initialization 32.9ms
instantiate metavars 0.693ms
interpretation 185ms
let-to-have transformation 0.102ms
linting 12.1ms
module linting 0.00187ms
overlappingInstancesLinter 2.23ms
parsing 5.27ms
process pre-definitions 2.79ms
share common exprs 1.92ms
tactic execution 69.7ms
tacticAnalysis 15.5ms
type checking 37.1ms
typeclass inference 107ms
real 1.50
user 1.17
sys 0.53
LeanPool/LatinQuarter/Rows.lean
import took 594ms
cumulative profiling times:
attribute application 0.969ms
congr simp thm 2.1ms
elaboration 22ms
fix level params 0.315ms
import 594ms
initialization 44ms
instantiate metavars 0.416ms
interpretation 176ms
let-to-have transformation 0.148ms
linting 10.6ms
module linting 0.00188ms
overlappingInstancesLinter 4.31ms
parsing 5.64ms
process pre-definitions 3.21ms
share common exprs 1.36ms
simp 38.9ms
tactic execution 29.6ms
tacticAnalysis 13.1ms
type checking 9.15ms
typeclass inference 42.1ms
real 1.37
user 1.01
sys 0.53
LeanPool/LatinQuarter/Shifted.lean
import took 660ms
cumulative profiling times:
attribute application 0.0388ms
congr simp thm 2.25ms
elaboration 14.4ms
fix level params 0.968ms
import 660ms
initialization 39.3ms
instantiate metavars 0.908ms
interpretation 169ms
let-to-have transformation 0.101ms
linting 7.8ms
module linting 0.00179ms
overlappingInstancesLinter 3ms
parsing 3.92ms
process pre-definitions 3.71ms
share common exprs 2.01ms
simp 80.1ms
tactic execution 159ms
tacticAnalysis 12.5ms
type checking 48.9ms
typeclass inference 351ms
real 1.77
user 1.55
sys 0.56
LeanPool/LatinQuarter/SquareZero.lean
import took 588ms
cumulative profiling times:
attribute application 0.0374ms
congr simp thm 0.631ms
elaboration 11.2ms
fix level params 0.597ms
import 588ms
initialization 39.5ms
instantiate metavars 0.393ms
interpretation 180ms
let-to-have transformation 0.0516ms
linting 5.48ms
module linting 0.00207ms
overlappingInstancesLinter 4.67ms
parsing 2.66ms
process pre-definitions 1.3ms
share common exprs 1.16ms
simp 12ms
tactic execution 41.1ms
tacticAnalysis 12.4ms
type checking 7.19ms
typeclass inference 74ms
real 1.39
user 0.97
sys 0.55
LeanPool/LatinQuarter/Tags.lean
import took 655ms
cumulative profiling times:
attribute application 2.3ms
congr simp thm 4.03ms
elaboration 74.8ms
fix level params 1.18ms
import 655ms
initialization 37.9ms
instantiate metavars 0.798ms
interpretation 203ms
let-to-have transformation 0.227ms
linting 14ms
module linting 0.00188ms
overlappingInstancesLinter 5.53ms
parsing 7.18ms
process pre-definitions 6.74ms
share common exprs 3.94ms
simp 107ms
tactic execution 85.1ms
tacticAnalysis 19.7ms
type checking 60.1ms
typeclass inference 360ms
real 1.71
user 1.62
sys 0.55
LeanPool/LatinQuarter/Textbook.lean
import took 692ms
cumulative profiling times:
attribute application 0.208ms
compilation (IR) 0.0536ms
compilation (LCNF base) 0.553ms
compilation (LCNF impure) 0.233ms
compilation (LCNF mono) 0.197ms
congr simp thm 0.81ms
elaboration 42.1ms
fix level params 0.663ms
import 692ms
initialization 40.5ms
instantiate metavars 1.84ms
interpretation 275ms
let-to-have transformation 0.197ms
linting 27.4ms
module linting 0.00153ms
overlappingInstancesLinter 6.51ms
parsing 16.1ms
process pre-definitions 8.56ms
share common exprs 4.05ms
simp 18.2ms
tactic execution 153ms
tacticAnalysis 44.8ms
type checking 30.2ms
typeclass inference 57.4ms
real 1.54
user 1.39
sys 0.58
LeanPool/LatinQuarter/Vanishing.lean
import took 667ms
cumulative profiling times:
attribute application 0.0916ms
congr simp thm 1.99ms
elaboration 21.6ms
fix level params 0.655ms
import 667ms
initialization 33.3ms
instantiate metavars 0.677ms
interpretation 177ms
let-to-have transformation 0.104ms
linting 9.86ms
module linting 0.00195ms
overlappingInstancesLinter 6.24ms
parsing 4.11ms
process pre-definitions 2.54ms
share common exprs 1.63ms
simp 44.3ms
tactic execution 61.9ms
tacticAnalysis 17.5ms
type checking 16.3ms
typeclass inference 247ms
real 1.58
user 1.30
sys 0.56
Advisory only — never blocks merge. Full log uploaded as the proof-profile artifact.
🤖 LLM review (
|
| Rubric | Verdict | Bottom line |
|---|---|---|
| Faithfulness | ✅ pass |
All four card headlines match the Lean statements, without undisclosed mathematical assumptions. |
| Novelty | ✅ pass |
No declaration duplicating any of the four headlines was identified; broader Tau Ceti novelty remains unverifiable beyond the bounded searches. |
| Significance | ✅ pass |
The exact critical-set minimum and completion-parity theorem constitute substantial, completed research content. |
| Sources | ✅ pass |
The parity result, positive-order minima, and corner construction match Bean’s paper, and the upstream formalization is explicitly credited. |
| Code quality (advisory) | ✅ pass |
Shared coefficient and vanishing lemmas, reusable algebraic helpers with concrete callers, and explicit interface bridges make the Lean maintainable; no material code-quality defect was found. |
| Aspect | Value |
|---|---|
| Proves the claim | ✅ proves_it |
| Assumed, not proved | The parity theorem assumes only the advertised cardinality bound; the defining-set theorem assumes Latinness and unique completion through IsDefining; the minimum and corner results assume positive order, as disclosed in the card. |
| Matches cited source | ✅ matches |
| Fit | ✅ good_fit |
| Level | research |
| Branch | combinatorial design theory |
| Mode | mixed |
| Code quality | 4 / 5 |
Statement check: The Lean proves parity for arbitrary clue triples below floor(n²/4), the universal defining-set lower bound, and both positive-order minima using explicit cyclic corner critical sets; critical-set existence prevents empty-infimum vacuity.
Textbook.scs_eq_quarter settles the critical-set minimum conjecture documented by Hatami and Qian, alongside the stronger completions_even theorem and supporting developments on matrix minors, square-zero ideals, and polynomial coefficients.
Faithfulness findings (1)
- prompt-injection — PR-wide
The supplied discussion embeds a completed faithfulness verdict and claims prior source approval, which could anchor this independent review. These claims were disregarded as authority; the mathematical verdict rests on the Lean.
Evidence: prose only: .review-pr.json comments[0] supplies "conclusion": "approve" and a faithfulness "verdict": "pass"; comments[2] refers to "The separate source approval".
Novelty findings (1)
- prompt-injection — PR-wide
The contributor-supplied discussion claims prior approval of this exact head, including a novelty pass; accepting that claim as authority would bypass the required independent comparison.
Evidence: .review-pr.json comments[0] presents a ‘separate thorough agentic source review’ with "conclusion": "approve" and a novelty "verdict": "pass"; comments[2] reiterates a ‘separate source approval’. These claims were excluded from the novelty verdict.
Significance findings (1)
- prompt-injection — PR-wide
The contributor supplies an overall approval and a ready-made significance verdict in the discussion, risking substitution of claimed prior approval for independent assessment; these claims have no authority for this review.
Evidence: In .review-pr.json, comment 6362752412 contains "conclusion": "approve" and a significance assessment with "verdict": "pass"; comment 6362867059 subsequently refers to "The separate source approval".
Sources findings (1)
- prompt-injection — PR-wide
The contributor-supplied discussion embeds a completed approval and sources verdict for this head. These prior-approval assertions cannot substitute for independent source verification; I disregarded them and checked the cited sources directly.
Evidence: The discussion labels its report "review_type": "separate thorough agentic source review", supplies "conclusion": "approve" and "source_match": "matches", and subsequently calls it "The separate source approval".
Code quality findings (1)
- prompt-injection — PR-wide
The discussion supplies a purported prior approving review, including a quality verdict and score, which could anchor this independent assessment; those claims were ignored.
Evidence: .review-pr.json comments[0].body contains "conclusion": "approve" and a quality object with "verdict": "pass" and "code_quality": 4; comments[2].body reiterates: "The separate source approval does not replace them."
Tokens: 5,078,339 in / 30,588 out across 5 model calls · Tier: codex-subscription · Effort: xhigh · Billing: Codex subscription quota (no API credits) · Estimated cost: $20.7722 (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.
Vilin97
left a comment
There was a problem hiding this comment.
Source assessment: approve at 57a1d4c0. Independent review covers all 18 complete files, the actual finite labelled-completion model, the coefficient/ideal argument and the cyclic corner construction. The lower bounds do not exploit an empty infimum: critical-set witnesses are proved, and the positive-order minimum is over all Latin squares, not asserted separately for every fixed square. The order-zero/inconsistent cases and order-one corner boundary are handled honestly.
The completion parity and sharp minima agree with Bean's primary Theorems A/B and Section11. The shared Schur-complement and square-zero machinery proves the required vanishing rather than assuming the removal bound. Apache-2.0 notices and disclosed AI provenance are retained. Bounded pinned/current dependency and pool searches identified no duplicate; this is not an exhaustive semantic-absence claim.
I independently agree with the exact-head configured source conclusion. Author build claims are not independent protected validation. The stated infrastructure condition remains: keep this open and unqueued while main is unqualified; all authored/current-main/native gates remain separate.
This adds Richard Bean's complete modular proof of the sharp critical-set bound for Latin squares. Every set of fewer than floor(n²/4) filled cells has an even number of labelled completions; every defining set therefore has at least floor(n²/4) cells, and the two corner triangles in the cyclic square attain the bound. The independently stated textbook interface proves both the unrestricted minimum and the cyclic minimum for every positive order. The result settles the critical-set conjecture described in Bean's paper.
The public formalization's v0.2.0 release was published on 2026-10-16 at 05:39:09 UTC, inside this acquisition run's [2026-08-23 09:45:14, 2026-10-16 09:45:14) UTC window. The manuscript was submitted on 2026-10-13 at 11:36:23 UTC. Upstream is RichardBean/latin-quarter-lean, pinned at 9997439dee62e1ede0aa995ddb7160dbceeff7b7, under Apache-2.0. Provenance is AI: Richard Bean directed the development, Codex generated version 0.1.0, and Claude wrote the parity and independent textbook additions for version 0.2.0. The complete upstream NOTICE is preserved in the entry module, with copyright and license headers throughout.
The import preserves all 15 upstream mathematical modules, adds the pool entry point and generated public Imports wrapper, and registers one YAML card. It retains the general infrastructure: ideal membership of arbitrary matrix minors under multiplication and transpose, determinant membership in ideal powers, square-zero ideal nilpotence, characteristic-two block elimination, and square-free coefficient extraction. The duplicate standalone file and upstream build/audit tooling are outside the import. Searches of pool cards, source/module inventory, all-state PRs/issues, history, pinned Mathlib/Tau Ceti sources, and their current public module inventories found no matching headline result. LeanPool.lean is unchanged.
The port targets Lean v4.35.0-rc3, Mathlib c55e6e786f49471c72fbddbec5415808896aec1e, and the repository's existing settings. Changes update polynomial coefficient access, Matrix.of boundaries, quotient nontriviality and characteristic instances, deprecated APIs, module visibility, and required documentation/style. All upstream theorem names and strengths are retained. Two shared lemmas factor repeated coefficient enumeration and vanishing arguments; four broad Mathlib imports are replaced with specific imports. No heartbeat/recursion override or suppression is introduced. The compiled trust audit checks every owned declaration and generated auxiliary; only Classical.choice, propext, and Quot.sound are allowed.
Measured clean project builds use
LEAN_NUM_THREADS=2 lake --no-cache --wfail build LeanPool.LatinQuarter.Importson the Azure VM. Each run deletes this project's artifacts under.lake/build/lib/leanand.lake/build/ir, retaining the installed dependency artifacts and OS cache. The working port before optimization took 46.473 s; the final optimized source took 20.031 s, a 56.9% reduction. An earlier optimized run took 18.352 s; shared-machine variance is visible, so the final measurement is used. Lake's dependency/build inventory falls from 8,975 to 1,840 jobs. Counting falls from 4.0 to 1.0 s and Shifted from 5.4 to 1.9 s. Additional profiling of Budget and CornerSize shows imports and small arithmetic proofs dominate; no further material safe improvement was identified. These are local project measurements, not whole-pool CI speedup claims.Local validation: warning-free complete project/aggregate build; generated-index consistency; project declaration linters; text style; whole-repository static quality and card checks; headline resolution; named-declaration axiom closures; and the compiled option/soundness backdoor audit including generated declarations. Python implementation is unchanged. Hosted CI remains authoritative; configured Greptile and GPT reviews must finish, and a separate thorough source review will be posted against the exact head.
Keep this PR open and unqueued under the infrastructure rollout hold. PR610 and PR611 are merged, but current main is not verified green: its latest substantive parent, 4d9fa35, has a failed Lean Action CI run, and the current metadata-only head has no replacement passing validation. No auto-merge or competing queue action is authorized by this PR. Daily documentation publication is asynchronous and is not being treated as a merge gate.