Skip to content

fix(checker): reject a record whose hypothesis is not the statement's - #216

Merged
the-homeless-god merged 11 commits into
devfrom
a/checker-replays-steps-from-assumptions
Oct 2, 2026
Merged

the-homeless-god merged 11 commits into
devfrom
a/checker-replays-steps-from-assumptions

Conversation

@the-homeless-god

Copy link
Copy Markdown
Member
  • docs(site): sync the theorem count with the tree
  • docs(ledger): count the assumption-replay probe programs
  • fix(checker): name two assumption-replay probes in listed words
  • docs: follow prose numbers and the inventory to the tree
  • feat(checker): replay by-assumption steps from the statement premises
  • fix(checker): name the forged precondition probe in listed words
  • fix(checker): reject a record whose hypothesis is not the statement's

Verified on the tree of dev plus this branch (f2296da): the checker test set passes, the provability verdict is green with all four checks, the proved-share ledger and the rule tables agree with the tree, pre-push is green, commit messages follow the convention.

🤖 Generated with Claude Code

@the-homeless-god
the-homeless-god force-pushed the a/checker-replays-steps-from-assumptions branch from f2296da to 1d07c09 Compare October 2, 2026 00:41
the-homeless-god and others added 11 commits October 2, 2026 02:27
The independent checker accepted a theorem's assumption lines without
asking where they came from. It now requires each one to be a conjunct
of the statement's such-that clause, a precondition of the function,
or "X >= 0" for a variable of a built-in segment type; otherwise code 1.

New family flang/proof/checker/tests/families/hypothesis has an honest
and a forged record per rule; the k2b record (a postcondition proved
under a hypothesis it does not have) moves from honest to forged; two
record-lies forgeries join the manifest and the forgeries ratchet. The
checker-code-lines ceiling rises by the 32 lines spent. Prose numbers,
the proved-share ledger and the tree inventory follow the tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PNHrA3rG7FTWhB11E7pjDQ
The forged precondition probe of the hypothesis family carried a word
outside the file-name word list; it is now named like its siblings,
and its proved-share ledger row counts the one postcondition the
ledger counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PNHrA3rG7FTWhB11E7pjDQ
The independent checker left every "by assumption" step outside induction
on the kernel's word, so the five valid syllogism moods proved from
premises got code 3, Darii with the existence word got code 1 and a
statement whose premises sit only in its such-that clause got code 1.

For a statement without a function whose theorem steps are all "by
assumption", whose formulas are built from boolean fields of objects
bound by the statement, the checker now takes the conjuncts of the
statement's such-that clause as premises and replays each step: it must
follow in one move (a premise, modus ponens from "if A then F else yes",
a conjunction of such, or "no" from X and "not X"). An existence goal is
compared and replayed with the witness substituted, also inside field
access. Each step is also judged by a truth table over the fields: a
valuation where the premises hold and the step fails is code 1 with that
valuation; a true step that needs more than one move stays on the
kernel's word. The step's assumption number may now point at the
such-that clause.

New family tests/families/assumption-replay: eight honest records now
checked (code 0), ten forged ones refused with code 1 (five invalid
moods, premise about another object, witness without premises, witness
differing from the statement, refutation without its minor premise, a
swapped assumption line) and one valid but two-move record kept at code
3. checker-code-lines rises by the 102 lines spent, forgery-probes by
the 11 new forged rows. The missing probe program named by the
forgeries manifest comes from the kernel change of task 5311.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PNHrA3rG7FTWhB11E7pjDQ
The checker grew by 103 lines and the tree by five flang probe files;
the prose numbers and the inventory cell that count them are retaken.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PNHrA3rG7FTWhB11E7pjDQ
The refutation and witness forgeries carried words outside the
file-name word list; they are renamed and their records rewritten for
the new paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PNHrA3rG7FTWhB11E7pjDQ
Five new probe programs carry one obligation each; the proved-share
ledger names them with the kernel's verdict: one proved, four refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PNHrA3rG7FTWhB11E7pjDQ
GCC on the CI runner refused the build with -Werror=string-compare:
the conditional handed the theorem literal to a comparison with the
proved-step literal. The theorem line now takes its own branch;
behaviour is unchanged and the probe set gives the same answers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PNHrA3rG7FTWhB11E7pjDQ
The two checker branches together give 7952 code lines in checker.c,
613 forged probes (0 accepted) and 297 honest ones (0 refused); the
forgery catalogue catches 38 of 38.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PNHrA3rG7FTWhB11E7pjDQ
Together with the merged checker work, checker.c holds 8086 code
lines; 628 forged probes are all refused and 310 honest ones accepted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PNHrA3rG7FTWhB11E7pjDQ
The program came with the checker work, its row did not. The kernel
row joins after the print that carries the kernel fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PNHrA3rG7FTWhB11E7pjDQ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PNHrA3rG7FTWhB11E7pjDQ
@the-homeless-god
the-homeless-god force-pushed the a/checker-replays-steps-from-assumptions branch from 1d07c09 to 1a49b78 Compare October 2, 2026 02:48
@the-homeless-god
the-homeless-god merged commit f786ace into dev Oct 2, 2026
27 checks passed
@the-homeless-god
the-homeless-god deleted the a/checker-replays-steps-from-assumptions branch October 2, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant