Repository navigation
Declare: disputes and verdicts as data, with the boilerplate generated - #222
Merged
Merged
Conversation
Two commands in Testimony.Logic.Declare. declare_dispute takes a dispute's packages, unfold set and three tables (defeats, supports, part-of, each a list of pairs) and generates what every dispute module spelled out by hand: the Dispute, each party's strength (computed, then checked), the prepared clauses, the three table theorems proved cell by cell by horn_certify, the solver form and the map. declare_verdict takes a witness and generates the Verdict and the theorem it proves, its statement unfolded from the claim. The Trinity and Spirit baptism disputes are rewritten with them: the same verdicts, the same AIF graphs (node and edge counts unchanged), and the pages in source order. The linter learns `proves NAME` for L6 and L9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SkMSatro8D3AXSRBAmEcVM
Every dispute in TestimonyArguments is now declared with the Declare commands, except Howell's hearing, whose parties nest the sola fide dispute's and so are not an enumeration; its verdict uses declare_verdict. The commands gain what the conversion needed: - declare_dispute: `pruned` (prepare_parts) and `rows N` (the table proved a few rows at a time); support and part-of tables only when written or a map needs them; D.defeatsTable as data; the solver form and the map matching on the parties, tied to the lists by one kernel decision (table_spec, part_spec) rather than a decide in every cell. - declare_hearing: a dispute with some parties heard, and its solver form. - declare_rerated: a register's dispute at each standard's ratings. - declare_verdict: `using F`, an optional `proves`, and `proves T : type` for a statement written out and checked against the claim. - strengths and soundness read from the packages' own P_strength and P_establishes theorems where they exist. Every AIF graph keeps its node and edge counts. The AIF check now draws ten hearings, not five: the Isaiah and Wegner hearings were built inline and are now named. The linter learns the names the commands declare (L9), and the benchmarks use the new names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SkMSatro8D3AXSRBAmEcVM
deanberris
marked this pull request as ready for review
November 13, 2026 07:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows #221, which is merged; this branch is rebased on it.
What this changes
No verdict moves. This adds four commands in a new module,
Testimony.Logic.Declare, and declares every dispute inTestimonyArgumentswith them.A dispute module written by hand repeated a fixed pattern around a small amount of real content. The commands take the content and generate the pattern.
declare_disputeIt takes the parties' packages, the unfold set, and the defeat, support and part-of tables as lists of pairs. It generates:
DisputeP_strengththeorem where there is one, and otherwise computed and checked by the kernelpruned, the partshorn_certifyas before; withrows N, a few rows at a time, as sola fide's 17-party table needsdeclare_verdictIt takes a witness and generates the
Verdictand the theorem it proves, so the result is stated once instead of twice. The theorem's statement is unfolded from the claim.proves T : typekeeps a statement written out, checked against the claim.using Fnames a solver form other than the dispute's own.proves, only the verdict is declared, for a theorem that does more than restate it.declare_hearingdeclare_hearing H := D only [...], orexcept [...], hears some of a dispute's parties and gives the hearing its solver form.declare_reratedIt takes a register's defeat table under each standard and generates the re-rated strengths, the table theorem, the solver forms and the hearing under each standard. This is the pattern in Matthew, the Genesis 3:15 promise, and James's ratings.
What a converted module looks like
Each table's statement is its list, so it reads as data on the page:
Under a standard, a table is written as the change it makes, for example
matthewDispute.defeatsTable.erase (.drift, .matthew).Converted modules
Seventeen modules lose 1,537 lines between them; the new library module is 669.
SolaFide/DisputeSolaFide/JamesSolaFide/RatingsSolaFide/JesusWordsSolaFide/HearingsBornOfAVirgin/DisputeBornOfAVirgin/Dispute/SeptuagintBornOfAVirgin/Dispute/ProtoevangeliumBornOfAVirgin/Dispute/MatthewBornOfAVirgin/Dispute/WegnerBornOfAVirgin/Dispute/GenesisBornOfAVirgin/Dispute/PromiseHearingSolaScriptura/DisputeSolaScriptura/HearingsSpiritBaptism/DisputeTrinity/DisputeArticles/Howell2003What it claims, and what it does not
It claims that the generated declarations are the ones the hand-written modules had:
One dispute is not declared this way. Howell's hearing seats every sola fide party inside its own, as
.sola q, so its parties are not an enumeration. Its table is still a function, now proved from the generated sola fide table, and its verdict usesdeclare_verdict.Statements that change:
declare_hearingnames them.grounded D.defeats = Solver.toSet [...]. Where a theorem had{.x}or another hand-written form that other modules use, the theorem stays hand-written or keeps its statement throughproves T : type.D.finitefor the old…Finite,D.node_strengthfor…PartyNode_strength, andR_defeatsfor…_rerated_defeats. The benchmarks are updated to them.Build time. I timed each converted dispute module against its old version, both elaborated in the same environment, three times each:
The small modules pay the commands' own fixed cost. Most of sola fide's extra 3 s, about 2 s, is the kernel checking once, over all 289 pairs of parties, that the solver form's function agrees with the written list. Profiling found two other costs, and both are removed. Scanning the list in every verdict check was the larger: kernel type-checking time rose from 84 s to 302 s, summed over threads. The other was a
decidein each of 289 cells.The A/B gate cannot compare the benchmarks that name dispute internals. Both sides of the A/B run this branch's benchmark file, and
mainlacks the new names. So those benchmarks are reported for this branch only. The by-hand timings above stand in for that comparison. Every benchmark elaborates and runs here (37 of 37).For the reader
The "Weighing" pages and their siblings lose the boilerplate entries: the table functions, decidability instances, strength theorems and solver forms. Every result, verdict and table stays, in source order. Where a party's weakest link was described by a strength theorem that is gone, the description moves to the party's docstring.
docs/src/logic.mddescribes the commands, andCLAUDE.mdlists the module.Checks run
lake build,lake lint,lake exe axiom-audit,scripts/kernel-replay.sh(library)python3 scripts/testimony_lint.py, clean. It now knows the names the commands declare: L6 forproves, L9 fordeclare_*.scripts/test_testimony_lint.pypasses, with 4 new tests.arguments/, andscripts/kernel-replay.sh TestimonyArguments bibgen argtex statusgen argdocbibgen,statusgen,argdoc,argtex, each with--check;mdbook build docs;examples/buildsscripts/bench.sh --runs 1: all 37 benchmarks elaborateSources
None.
🤖 Generated with Claude Code
https://claude.ai/code/session_01SkMSatro8D3AXSRBAmEcVM