Skip to content

Import full chip-firing and graph Riemann–Roch development - #474

Open
Vilin97 wants to merge 23 commits into
mainfrom
codex/import42-chip-firing-with-lean
Open

Vilin97 wants to merge 23 commits into
mainfrom
codex/import42-chip-firing-with-lean

Conversation

@Vilin97

@Vilin97 Vilin97 commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

Imports the full chip-firing and graph-divisor development from dhyeymavani2003/chip-firing-with-lean at 5b422d855c02af60591121ba7c11b5e8242542b8: all ten production Lean modules, including algorithms, examples, the graph Riemann–Roch theorem and proved submission bridge. Duplicate open statements and documentation build harnesses are excluded; their completed mathematical content remains present.

Ports the complete source to Lean/Mathlib v4.34.0, retains upstream authorship and Apache licensing, documents public APIs, and makes the five recursive algorithm helpers explicit without changing their fuel bounds or behavior. Uses the declared mixed proof provenance.

Validation: warning-free targeted build, all 15 Lean linters, style, generated index, project metadata, static quality, public-declaration axiom audit and compiled-environment audit pass. Full integration CI and independent review are pending for the migrated head. Never merged.

Current checkpoint 7d32440a1 preserves the automated main merge and migrates all 11 retained files to the Lean module system. Its warning-free build, all 15 declaration linters, style, module-index and compiled audits pass. Fresh CI is pending. The PR’s existing ready-for-review state is preserved.

@github-actions

Copy link
Copy Markdown
Contributor

Proof profile (new / modified Lean files)

lake build wall time (changed modules): 47.69 s (= 0.79 min) — user 60.36 s, sys 13.27 s.

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,862 maxHeartbeats units across 11 files (5,588 added LOC).

Sum of lean --profile: 45806.4 ms (= 45.81 s). Import-excluded time: 26996.4 ms (= 27.00 s).

Count-heartbeats wall-clock total: 60.14 s. Repeated import cost inside lean --profile: 18810.0 ms (= 18.81 s).

Heartbeat values come from Mathlib's linter.countHeartbeats and are already in maxHeartbeats units. 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) Decls Errors
LeanPool/ChipFiring/ChipFiringWithLean/Basic.lean 1,748 481 9.34 9.74 8.02 1.72 97 0
LeanPool/ChipFiring/ChipFiringWithLean/CFGraphExample.lean 170 477 7.11 4.08 2.37 1.71 77 0
LeanPool/ChipFiring/ChipFiringWithLean/Config.lean 773 306 6.46 5.30 3.66 1.64 40 0
LeanPool/ChipFiring/ChipFiringWithLean/Orientation.lean 1,259 230 7.02 6.83 5.10 1.73 57 0
LeanPool/ChipFiring/ChipFiringWithLean/Rank.lean 352 124 5.05 3.33 1.66 1.67 31 0
LeanPool/ChipFiring/ChipFiringWithLean/RRGHelpers.lean 544 104 5.56 3.85 2.19 1.66 26 0
LeanPool/ChipFiring/ChipFiringWithLean/RiemannRoch.lean 384 68 3.60 3.84 2.17 1.67 17 0
LeanPool/ChipFiring/ChipFiringWithLean/Algorithms.lean 277 60 4.86 2.66 0.95 1.71 15 0
LeanPool/ChipFiring/ChipFiringWithLean/PalomarSolution.lean 39 12 3.74 2.09 0.41 1.68 3 0
LeanPool/ChipFiring.lean 27 0 3.44 2.09 0.24 1.85 0 0
LeanPool/ChipFiring/ChipFiringWithLean.lean 15 0 3.96 2.00 0.23 1.77 0 0
Total 5,588 1,862 60.14 45.81 27.00 18.81 363 0

Aggregate phase totals

Phase Time
import 18810.0 ms (= 18.81 s)
interpretation 7438.0 ms (= 7.44 s)
tactic execution 4868.7 ms (= 4.87 s)
typeclass inference 3570.3 ms (= 3.57 s)
simp 2406.6 ms (= 2.41 s)
type checking 1744.1 ms (= 1.74 s)
elaboration 1251.6 ms (= 1.25 s)
blocked (unaccounted) 1097.8 ms (= 1.10 s)
tacticAnalysis 827.9 ms (= 0.83 s)
ring 641.0 ms (= 0.64 s)
process pre-definitions 563.7 ms (= 0.56 s)
linting 545.2 ms (= 0.55 s)

Slowest changed modules (from lake build)

Changed module Lake time
LeanPool.ChipFiring.ChipFiringWithLean.Basic 11.00 s
LeanPool.ChipFiring.ChipFiringWithLean.Config 6.70 s
LeanPool.ChipFiring.ChipFiringWithLean.CFGraphExample 5.60 s
LeanPool.ChipFiring.ChipFiringWithLean.Orientation 4.90 s
LeanPool.ChipFiring.ChipFiringWithLean.Rank 4.20 s
LeanPool.ChipFiring.ChipFiringWithLean.RRGHelpers 3.60 s
LeanPool.ChipFiring.ChipFiringWithLean.Algorithms 3.30 s
LeanPool.ChipFiring.ChipFiringWithLean.RiemannRoch 3.00 s
LeanPool.ChipFiring.ChipFiringWithLean.PalomarSolution 2.30 s
LeanPool.ChipFiring.ChipFiringWithLean 2.20 s
LeanPool.ChipFiring 2.10 s
Per-file `lean --profile` output

LeanPool/ChipFiring.lean

import took 1.85s
cumulative profiling times:
	elaboration 0.272ms
	import 1.85s
	initialization 37.6ms
	interpretation 196ms
	linting 0.397ms
	module linting 0.00283ms
	overlappingInstancesLinter 0.68ms
	parsing 0.0579ms
	tacticAnalysis 3.39ms
real 3.06
user 1.95
sys 1.13

LeanPool/ChipFiring/ChipFiringWithLean.lean

import took 1.77s
cumulative profiling times:
	elaboration 0.14ms
	import 1.77s
	initialization 44.5ms
	interpretation 186ms
	linting 0.24ms
	module linting 0.00228ms
	overlappingInstancesLinter 0.177ms
	parsing 0.00248ms
	tacticAnalysis 0.679ms
real 2.96
user 1.79
sys 1.19

LeanPool/ChipFiring/ChipFiringWithLean/Algorithms.lean

import took 1.71s
cumulative profiling times:
	attribute application 12.4ms
	compilation (IR) 0.649ms
	compilation (LCNF base) 7.27ms
	compilation (LCNF impure) 2.8ms
	compilation (LCNF mono) 5.44ms
	congr simp thm 7.55ms
	elaboration 89ms
	fix level params 0.408ms
	import 1.71s
	initialization 40.2ms
	instantiate metavars 0.637ms
	interpretation 299ms
	let-to-have transformation 7.34ms
	linting 13.6ms
	module linting 0.00223ms
	overlappingInstancesLinter 4.65ms
	parsing 13.6ms
	process pre-definitions 67.4ms
	share common exprs 1.6ms
	simp 136ms
	tactic execution 12.7ms
	tacticAnalysis 26.5ms
	type checking 80.6ms
	typeclass inference 124ms
real 3.33
user 2.44
sys 1.15

LeanPool/ChipFiring/ChipFiringWithLean/Basic.lean

import took 1.72s
process pre-definitions took 105ms
cumulative profiling times:
	attribute application 6.95ms
	blocked (unaccounted) 503ms
	compilation (IR) 1.75ms
	compilation (LCNF base) 27.5ms
	compilation (LCNF impure) 7.68ms
	compilation (LCNF mono) 18.9ms
	congr simp thm 37ms
	dsimp 88.4ms
	elaboration 373ms
	fix level params 14.6ms
	import 1.72s
	initialization 37ms
	instantiate metavars 24.5ms
	interpretation 1.76s
	let-to-have transformation 140ms
	linting 192ms
	module linting 0.00209ms
	norm_num 17.5ms
	overlappingInstancesLinter 29.7ms
	parsing 106ms
	process pre-definitions 257ms
	ring 151ms
	share common exprs 53.5ms
	simp 1.02s
	tactic execution 1.33s
	tacticAnalysis 268ms
	type checking 397ms
	typeclass inference 1.16s
real 5.16
user 8.98
sys 1.17

LeanPool/ChipFiring/ChipFiringWithLean/CFGraphExample.lean

import took 1.71s
type checking took 140ms
cumulative profiling times:
	attribute application 1.12ms
	blocked (unaccounted) 0.559ms
	compilation (IR) 1.27ms
	compilation (LCNF base) 12.6ms
	compilation (LCNF impure) 5.89ms
	compilation (LCNF mono) 9.23ms
	congr simp thm 0.838ms
	elaboration 110ms
	fix level params 0.478ms
	import 1.71s
	initialization 33.9ms
	instantiate metavars 1.11ms
	interpretation 394ms
	let-to-have transformation 0.416ms
	linting 21.9ms
	module linting 0.00275ms
	overlappingInstancesLinter 10.2ms
	parsing 18.4ms
	process pre-definitions 13.8ms
	share common exprs 2.34ms
	simp 11.8ms
	tactic execution 1.13s
	tacticAnalysis 42.1ms
	type checking 497ms
	typeclass inference 46.2ms
real 3.59
user 3.84
sys 1.16

LeanPool/ChipFiring/ChipFiringWithLean/Config.lean

import took 1.64s
cumulative profiling times:
	attribute application 2.88ms
	blocked (unaccounted) 215ms
	compilation (IR) 0.508ms
	compilation (LCNF base) 8ms
	compilation (LCNF impure) 2.44ms
	compilation (LCNF mono) 4.7ms
	congr simp thm 22.8ms
	dsimp 98.4ms
	elaboration 195ms
	fix level params 7.18ms
	import 1.64s
	initialization 40.8ms
	instantiate metavars 11.9ms
	interpretation 844ms
	let-to-have transformation 41.4ms
	linting 72.5ms
	module linting 0.00273ms
	norm_num 10.6ms
	overlappingInstancesLinter 9.68ms
	parsing 47.4ms
	process pre-definitions 104ms
	ring 69.5ms
	share common exprs 25ms
	simp 404ms
	tactic execution 509ms
	tacticAnalysis 107ms
	type checking 174ms
	typeclass inference 628ms
real 4.03
user 4.85
sys 1.15

LeanPool/ChipFiring/ChipFiringWithLean/Orientation.lean

import took 1.73s
cumulative profiling times:
	attribute application 0.965ms
	blocked (unaccounted) 379ms
	compilation (IR) 0.844ms
	compilation (LCNF base) 8.9ms
	compilation (LCNF impure) 3.96ms
	compilation (LCNF mono) 8.53ms
	congr simp thm 33ms
	dsimp 57.7ms
	elaboration 214ms
	fix level params 10.9ms
	import 1.73s
	initialization 37ms
	instantiate metavars 16.5ms
	interpretation 1.36s
	let-to-have transformation 1.3ms
	linting 100ms
	module linting 0.00235ms
	norm_num 29ms
	overlappingInstancesLinter 16.7ms
	parsing 71.2ms
	process pre-definitions 51.8ms
	ring 141ms
	share common exprs 43.8ms
	simp 580ms
	tactic execution 839ms
	tacticAnalysis 174ms
	type checking 246ms
	typeclass inference 671ms
real 4.36
user 6.26
sys 1.15

LeanPool/ChipFiring/ChipFiringWithLean/PalomarSolution.lean

import took 1.68s
cumulative profiling times:
	attribute application 0.0372ms
	congr simp thm 0.423ms
	elaboration 13.6ms
	fix level params 0.388ms
	import 1.68s
	initialization 40.4ms
	instantiate metavars 0.397ms
	interpretation 245ms
	let-to-have transformation 0.0424ms
	linting 4.89ms
	module linting 0.00179ms
	norm_num 0.558ms
	overlappingInstancesLinter 2.24ms
	parsing 2.93ms
	process pre-definitions 1.62ms
	ring 10.6ms
	share common exprs 1.9ms
	simp 10.4ms
	tactic execution 24ms
	tacticAnalysis 7.86ms
	type checking 16.2ms
	typeclass inference 31.1ms
real 2.86
user 1.91
sys 1.06

LeanPool/ChipFiring/ChipFiringWithLean/RRGHelpers.lean

import took 1.66s
cumulative profiling times:
	attribute application 0.301ms
	congr simp thm 9.76ms
	dsimp 13.1ms
	elaboration 103ms
	fix level params 5.27ms
	import 1.66s
	initialization 37.8ms
	instantiate metavars 7.05ms
	interpretation 732ms
	let-to-have transformation 0.27ms
	linting 60.3ms
	module linting 0.0027ms
	norm_num 9.15ms
	overlappingInstancesLinter 7.84ms
	parsing 35.5ms
	process pre-definitions 25.7ms
	ring 74ms
	share common exprs 20ms
	simp 100ms
	tactic execution 407ms
	tacticAnalysis 86.7ms
	type checking 116ms
	typeclass inference 341ms
real 3.27
user 3.56
sys 1.15

LeanPool/ChipFiring/ChipFiringWithLean/Rank.lean

import took 1.67s
cumulative profiling times:
	attribute application 0.351ms
	congr simp thm 4.54ms
	dsimp 4.85ms
	elaboration 78.6ms
	fix level params 3.28ms
	import 1.67s
	initialization 38.6ms
	instantiate metavars 3.71ms
	interpretation 580ms
	let-to-have transformation 0.236ms
	linting 33.3ms
	module linting 0.00224ms
	norm_num 16ms
	overlappingInstancesLinter 6.25ms
	parsing 27.7ms
	process pre-definitions 16.4ms
	ring 52.9ms
	share common exprs 14.7ms
	simp 118ms
	tactic execution 254ms
	tacticAnalysis 51.8ms
	type checking 97.3ms
	typeclass inference 259ms
real 3.17
user 3.07
sys 1.15

LeanPool/ChipFiring/ChipFiringWithLean/RiemannRoch.lean

import took 1.67s
cumulative profiling times:
	attribute application 0.577ms
	blocked (unaccounted) 0.285ms
	congr simp thm 2.78ms
	dsimp 5.45ms
	elaboration 75ms
	fix level params 4.62ms
	import 1.67s
	initialization 36.6ms
	instantiate metavars 5.69ms
	interpretation 842ms
	let-to-have transformation 0.757ms
	linting 46.1ms
	module linting 0.00155ms
	norm_num 46ms
	overlappingInstancesLinter 5.38ms
	parsing 19.7ms
	process pre-definitions 26ms
	ring 142ms
	share common exprs 27.9ms
	simp 26.4ms
	tactic execution 363ms
	tacticAnalysis 59.9ms
	type checking 120ms
	typeclass inference 310ms
real 3.28
user 3.52
sys 1.15

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

@Vilin97 Vilin97 changed the title WIP: Import chip-firing-with-lean Import full chip-firing and graph Riemann–Roch development Sep 21, 2026
@Vilin97

Vilin97 commented Sep 22, 2026

Copy link
Copy Markdown
Owner Author

Automation disposition: needs-maintainer

Reviewed exact head 7b122ee7f78dd3dc66ae8c43f47d7458b1501fad for this draft pooled-project/content import, Import full chip-firing and graph Riemann–Roch development. The changed tree is a substantial source import (including LeanPool/ChipFiring.lean) with the pinned upstream source, project metadata, and generated index present. Observed exact-head required checks have no failures; profile evidence: lake build wall time (changed modules): 47.69 s (= 0.79 min) — user 60.36 s, sys 13.27 s.; Total heartbeats: 1,862 maxHeartbeats units across 11 files (5,588 added LOC)..

No concrete author-actionable defect was established in this bounded review that would justify an ordinary change request. The PR is still marked draft, so protected merge is not permitted. Maintainer decision required: confirm the headline result's significance, faithfulness, novelty, source/provenance and scope, then ask the author to mark the PR ready (or give scope direction). This is a maintainer disposition, not an approval.

@Vilin97 Vilin97 added the needs-maintainer Requires a maintainer decision; automation must not merge label Sep 22, 2026
@Vilin97
Vilin97 marked this pull request as ready for review September 23, 2026 06:10
@Vilin97

Vilin97 commented Sep 23, 2026

Copy link
Copy Markdown
Owner Author

/review

@greptile-apps

greptile-apps Bot commented Sep 23, 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.

Retrigger

[Low risk] Adds mathematical library code for chip-firing graph theory.

No outstanding review finding blocks merging, though independent validation of the upstream source and measured build cost remains open.

Summary

Imports the chip-firing development, including graph divisors, reduction algorithms, Riemann–Roch, Clifford’s theorem, and a project catalog entry. No new actionable issue was identified in the changes since the previous review.

Reviews (19) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..."

Comment thread LeanPool/ChipFiring/ChipFiringWithLean/Algorithms.lean Outdated
@Vilin97

Vilin97 commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner Author

🤖 LLM review (gpt-6-astra, 5 rubrics)

Reviewed head: 440e1af0e0f95954a2d5431dba379cfe1a8d5786

Verdict: ✅ approve — computed from the rubric verdicts below, not chosen by a model.

Rubric Verdict Bottom line
Faithfulness ✅ pass Both card headlines are faithfully proved for finite connected loopless multigraphs.
Novelty ✅ pass Full-diff review and searches of pinned Mathlib v4.34.0 and pooled projects found no duplicate of either graph-divisor headline.
Significance ✅ pass This substantial, self-contained development of graph divisor theory meets the significance bar without a generated-bulk maintenance burden.
Sources ✅ pass The citations support the stated results in Corry–Perkinson, variants are labelled, and the pinned upstream formalization is explicitly credited.
Code quality (advisory) ✅ pass The development is competent overall, with two unnecessary public theorem hypotheses worth removing for easier reuse.
Aspect Value
Proves the claim ✅ proves_it
Assumed, not proved Connectivity and Clifford’s nonnegative-rank conditions match the card’s connected-graph and special-divisor hypotheses; CFGraph supplies the finite, nonempty, loopless multigraph domain, while rank existence and the required reduction and orientation results are proved internally.
Matches cited source ✅ matches
Fit ✅ good_fit
Level research
Branch algebraic graph theory
Mode theory_building
Code quality 3 / 5

Statement check: The Lean proves r(D) − r(K−D) = deg(D) + 1 − g for every divisor, and r(D) ≤ deg(D)/2 in ℚ when both ranks are nonnegative; the wrappers’ rank predicates have proved existence and uniqueness.

The project develops reduced divisors, superstability, orientations, and ranks into proofs of Baker–Norine graph Riemann–Roch and the graph analogue of Clifford’s theorem.

Code quality findings (1)

  • unused-hypothesis — LeanPool/ChipFiring/ChipFiringWithLean/Orientation.lean:492
    Remove the second acyclicity hypothesis from orientation_determined_by_indegrees: its proof only needs acyclicity of O. Likewise, superstable_of_divisor_negative_k in RRGHelpers.lean:76–91 never uses its superstability hypothesis; Config already supplies the nonnegativity needed by config_eff. These assumptions impose unnecessary proof obligations on downstream callers.
    Evidence: Orientation.lean: isAcyclic G O → isAcyclic G O' → (∀ v : G.V, indeg G O v = indeg G O' v) → O = O' := by; intro h_acyc h_acyc' h_indeg_eq; the acyclicity application is subset_source G O T h_T_nonempty h_acyc, with no use of h_acyc'. RRGHelpers.lean, superstable_of_divisor_negative_k: superstable G q c → k < 0 := by; intro h_not_winnable c k h_equiv h_super; effectivity follows from exact (config_eff (configDegree c + k) c).2 (by linarith), and the proof ends with exact winnable_equiv_winnable G D' D h_winnable_D' h_equiv.symm, without using h_super.

Tokens: 6,884,594 in / 23,200 out across 5 model calls · Tier: codex-subscription · Effort: xhigh · Billing: Codex subscription quota (no API credits) · Estimated cost: $139.4319 (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

Vilin97 commented Sep 23, 2026

Copy link
Copy Markdown
Owner Author

Changes requested by automated review

Reviewed exact current head 0ba647f2d410ac85bd0c6109950a03cdd32816b5.

The exact-head Build pool and Build project checks fail because LeanPool.ChipFiring is not module-compatible under the current module root. Port the imported entry and closure, regenerate LeanPool.lean, and rerun complete protected CI. Greptile also reports the experimental findQReducedDivisorLoop can return success on fuel exhaustion; either repair that behavior or remove the executable API before merge.

Acceptance condition: repair the named defects on a new head and make all required protected checks green. Do not change repository policy or add waivers.

@Vilin97 Vilin97 removed the needs-maintainer Requires a maintainer decision; automation must not merge label Sep 23, 2026
@Vilin97

Vilin97 commented Sep 24, 2026

Copy link
Copy Markdown
Owner Author

Changes requested by automated review

Reviewed head ad99b7a5bd1c3c7db3053a7df477e485e850b84b. Completed graph Riemann–Roch and Clifford statements; meaningful contribution.

  1. Complete the pinned-toolchain integration. The exact-head build fails. Its concrete error includes:

    error: LeanPool.lean:1:0: cannot import non-`module` LeanPool.ChipFiring from `module`
    

    The file/dependency audit finds 11 changed Lean files without the required module form. Repair the affected dependency closure, regenerate the module index, and obtain a warning-free full pool build plus the unchanged linter, quality and axiom gates. A project-only or previous-head build does not resolve this failure.

Review coverage: complete changed-file inventory and full diff retained; 11 changed project files, 5,681 lines, import reachability and executable trust-token scan; advertised endpoints and supporting definitions examined with bounded implementation sampling and existing review findings reconciled. Potential reusable value: Divisor rank and reduced-divisor infrastructure; overlaps supporting graph theory in #510, not its endpoints. Source/provenance and prior-art evidence were considered separately from CI; these findings do not assert that every proof line was manually read. Earlier automated scores are advisory and are not approval of this failing head.

@Vilin97 Vilin97 added the needs-manual-rebase Maintainer-managed rebase; automatic updater leaves this branch unchanged label Sep 25, 2026

@Vilin97 Vilin97 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

{
"reviewed_head": "b8c44faaebffc40595a258ec2aae80c9b356a00e",
"verdict": "approve",
"assessment": "The completed graph Riemann\u2013Roch and Clifford theorems retain the statements and proofs covered by the prior complete five-rubric approval. The incoming module-system migration and main integration are preserved. This revision repairs the remaining experimental reduction API defect: the loop now returns none on fuel exhaustion and some only when its reduction stopping condition holds; findQReducedDivisor propagates that result.",
"repair": "One file changed (8 added, 10 removed lines). The only external caller of findQReducedDivisorLoop is its wrapper in the same file; the Riemann\u2013Roch proof does not depend on this algorithm. Existing wrappers dhar and isWinnable keep their signatures and failure behavior.",
"validation": "The modified Algorithms module and its three local dependencies compile warning-free with the unchanged package options. Three separately compiled proofs verify zero-fuel failure, successful completion with fuel, and failure after one unfinished step. Source/header/size checks and git diff checks pass. The exact parent head had successful full CI, including repository lint and trust gates. A new local linter run has not completed: script execution encountered a missing toolchain private artifact, and the shared memory-safe build slot is occupied. Fresh authoritative CI must pass on this new head before merge.",
"findings": []
}

Comment thread LeanPool/ChipFiring/ChipFiringWithLean/Algorithms.lean

@Vilin97 Vilin97 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Current-main reconciliation at ef954fca68a3f791e38bf8a784da7d8e87ea41ed.

Merged main 0e9b057b62cc4eaa1b4a42cf23766cf7b9bd3537 normally into the previously reviewed head 58507d115778ab5ccebdb0e605f63a7dff6e9eb3. All 11 Lean files in LeanPool.ChipFiring remain byte-for-byte identical. All 218 main project cards and this PR's own unchanged card are preserved, with both parsed-value and original-card-text checks (only trailing separator whitespace ignored). The actual pinned mk_all --module --check passed, and the refresh introduces no whitespace errors.

The prior substantive review carries forward because this refresh changes none of this project's Lean source or stated results. No new local compiler job was started for the refresh. Acceptance remains conditional on fresh required CI for this exact merged head.

@Vilin97 Vilin97 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Reviewed current-main integration 4b6522f1c4e499380df0e6c4545657d379a8025d. All 11 project files remain byte-identical to the previously reviewed head ef954fca68a3f791e38bf8a784da7d8e87ea41ed. All 219 main cards and the project's own card retain their values and original payload bytes; the actual pinned mk_all --module --check passes. The prior substantive review and source validation carry forward unchanged. Fresh required CI at this exact integration commit remains necessary before normal merge.

@Vilin97 Vilin97 removed the needs-manual-rebase Maintainer-managed rebase; automatic updater leaves this branch unchanged label Sep 26, 2026
@Vilin97

Vilin97 commented Sep 26, 2026

Copy link
Copy Markdown
Owner Author

Changes requested by automated review

Reviewed 928231785d8af8918c27c3c377d24af3f9a07d32. The Riemann–Roch and Clifford endpoints are complete and independently significant, and the current main integration preserves all eleven project files. The experimental algorithm module has a concrete API defect separate from those sound endpoints.

ChipFiringWithLean/Algorithms.lean:237 exports isWinnable : ... → Bool, described as a winnability determination, but maps reduction fuel exhaustion to false. It accepts every CFGraph, without connectedness. On the graph with two isolated vertices, source q = 0, and zero divisor, the zero divisor is effective (hence winnable), yet the non-source vertex never burns (0 < outdeg = 0 is false); firing it changes nothing, reduction exhausts its finite fuel and this API returns false. This conclusion follows directly from the definitions; it is not a claimed local kernel test.

Acceptance condition: propagate an explicit unknown/fuel-exhausted result, or provide the necessary connectedness/termination and correctness contract; alternatively remove the unused exploratory algorithm surface from this completed formalization. The whole-file “experimental” disclaimer does not make a Boolean negative into an unwinnability certificate. Keep the established mathematical theorem statements unchanged and pass the ordinary gates. The source census found no consumers of these decision wrappers outside this module, so a bounded repair is available; closure or needs-maintainer is not justified.

@Vilin97 Vilin97 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

{
"summary": "Focused repair review at 9b476e6. ChipFiring.CF.isWinnable intentionally changes its public return type from Bool to Option Bool: effective divisors return some true immediately, exhausted preprocessing or reduction returns none, and completed reduction retains the source-coordinate sign test. This fixes the reported effective-divisor counterexample and distinguishes an inconclusive search from unwinnability. There are no in-project callers to migrate; the other ten project files, headline mathematics, incoming cards, index and configuration are unchanged. The exact repaired module compiled warning-free. Five regression proofs also compiled warning-free: on two isolated vertices, wealth (0,0) gives some true, (0,-1) gives none during preprocessing, and (-1,0) gives none during reduction; on one edge, (-1,1) gives some true and (-1,0) gives some false. A strict isWinnable axiom inspection found only propext, Classical.choice and Quot.sound. Four scoped static checks, actual-target style, and the pinned native index check passed; source, configuration and six reused module artifacts were hash-verified. Independent source review passed. This approves the bounded repair and carries forward the prior source assessment, with fresh required full-project CI still pending; it is not a general algorithm-correctness proof or a whole-project compiler claim.",
"assessment": {
"scope": "Winnability result and effective-input bug fix",
"introduces_tech_debt": false,
"maintainability": "improved",
"brittleness": "more_robust",
"risk": "medium",
"assessment_one_sentence": "The explicit inconclusive result corrects the observable behavior while making the intentional public type change clear; current required CI must pass before merge."
},
"verdict": "approve",
"findings": []
}

@Vilin97 Vilin97 added the needs-maintainer Requires a maintainer decision; automation must not merge label Sep 26, 2026
@Vilin97

Vilin97 commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner Author

Reviewed exact head 1ba2108970ea22fca15f5cfde24be657c1e1b676. Preserved the inspected isWinnable repair: effective divisors return some true, exhausted fuel returns none, and a completed reduction retains its sign test. The prior focused compilation/regressions and exact-head integration checks passed. Graph Riemann–Roch and special-divisor Clifford endpoints and the card remain unchanged; published-edition chapter numbering remains an explicitly inherited source limitation.

The complete prior review was carried forward after checking the project source/card and inspecting the repair delta; prior local validation is inherited evidence. Previous rubric review. The original maintainer blocker is resolved; clearing needs-maintainer. Current-base integration and successful required checks remain conditions for a normal protected merge.

Observed checks: Build project: not yet reported; Content / non-content separation: SUCCESS; Documentation preflight: IN_PROGRESS. Unfinished checks are not passes.

Successor-head reconciliation (1ba2108970ea22fca15f5cfde24be657c1e1b676): The successor only integrates the already independently reviewed main changes; the submitted project source and the cited blocker/repair evidence are unchanged. Current observed gates: Build project=pending, Documentation preflight=SUCCESS, Content / non-content separation=SUCCESS. The disposition remains needs-maintainer. This updates the existing review rather than adding a duplicate comment.

@Vilin97 Vilin97 added needs-maintainer Requires a maintainer decision; automation must not merge and removed needs-maintainer Requires a maintainer decision; automation must not merge labels Sep 26, 2026
@Vilin97

Vilin97 commented Sep 26, 2026

Copy link
Copy Markdown
Owner Author

Disposition: needs-maintainer — protected merge operation. Reviewed head 1ba2108970ea22fca15f5cfde24be657c1e1b676. The substantive review and valid repairs are preserved. A concurrent run cleared the operational label, but this PR remains open with no auto-merge request. GitHub still reports allow_auto_merge=false, and the protected auto-merge attempt was rejected.

The remaining maintainer decision is to authorize normal protected auto-merge or arrange serialized current-main integration and protected merging. No mathematical blocker justifies requested changes or closure; no protected merge is queued. This label records the unresolved operational authority/coordination decision and must be removed before merge. Repository settings and protection were not changed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-maintainer Requires a maintainer decision; automation must not merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant