Repository navigation
fix(proofs): refuse a sorry or Admitted in any declaration, not only printed ones - #195
Conversation
…printed ones check-rocq.sh and check-lean.sh judged a file by its Print Assumptions / #print axioms lines only, so a hole in a declaration none of them names passed. Measured: with consent_epi turned into `Admitted.` the old Rocq gate printed "PASS ... 6 statements are axiom-free". - Rocq: also refuse Admitted, admit, Axiom(s), Parameter(s) and Conjecture anywhere in the file. - Lean: also refuse any "declaration uses sorry" report and any axiom declaration in the file. - Each gate gets a second control that plants the hole in the unprinted consent_epi / consentEpi and must be reported. Reported by Codex on #190. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LET2eHeDbN3b4WuxYjMUX9
…er gates The Rust and signature-format rows said "see §5", but their OPEN entries are in §4; §5 is toolchain deviations. Reported by Codex on #191. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LET2eHeDbN3b4WuxYjMUX9
|
|
Every job this PR touches is green.
Governance, Hypatia Security Scan and Secret Scanner fail at startup, but that isn't this PR's doing. They fail the same way on Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 630b3469bc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fi | ||
| echo "PASS: $file elaborates; $printed declarations are axiom-free" | ||
| holes="$({ grep -E "declaration uses .sorry." "$log" || [[ $? -eq 1 ]]; } | ||
| { grep -nE '^[[:space:]]*(@\[[^]]*\][[:space:]]*)?((private|protected|noncomputable|unsafe|partial)[[:space:]]+)*axiom\>' "$file" || [[ $? -eq 1 ]]; })" |
There was a problem hiding this comment.
Reject all Lean axiom-forming declarations
The source scan recognizes only the axiom keyword, but Lean also accepts axiom-forming declarations such as constant hidden : False. If an unprinted definition uses such a constant, Lean emits no “declaration uses 'sorry'” warning, none of the existing #print axioms commands inspect that definition, and this gate incorrectly reports the file as axiom-free. Inspect declaration dependencies or reject every axiom-forming command rather than matching only axiom.
Useful? React with 👍 / 👎.
| return 1 | ||
| fi | ||
| echo "PASS: $file compiles; $printed statements are axiom-free" | ||
| holes="$({ grep -nE '\<(Admitted|admit|Axioms?|Parameters?|Conjecture)\>' "$file" || [[ $? -eq 1 ]]; })" |
There was a problem hiding this comment.
Reject admitted Rocq Program obligations
The scan is case-sensitive and recognizes Admitted and lowercase admit, but Rocq's Program facility can turn unsolved proof obligations into axioms with Admit Obligations.. If an unprinted Program Definition uses that command, coqc can complete successfully, the six unrelated Print Assumptions results remain closed, and this regex misses the capitalized Admit, so the gate certifies a file containing admitted declarations.
Useful? React with 👍 / 👎.



Summary
This PR fixes two Codex findings that arrived as #190 and #191 were merging, so neither was handled before merge.
1. The Rocq and Lean gates only checked the declarations they print (#190, P2).
scripts/check-rocq.shandscripts/check-lean.shjudged a file only by itsPrint Assumptions/#print axiomslines. A hole in any declaration those lines don't name passed the gate.Measured with the old gate on a copy of
Warrant.vwhoseconsent_epiends inAdmitted.:The fix:
Admitted,admit,Axiom(s),Parameter(s)andConjectureanywhere in the file.axiomdeclaration.consent_epi/consentEpi. The gate must report it.2. Two rows of
PROOF-NEEDS.adocpointed at the wrong section (#191, P2).The Rust and signature-format rows said "see §5", but their
OPENentries are in §4. §5 lists toolchain deviations. The residual-assumptions row now describes the stricter gates.Evidence
Print Assumptionsanswers closed. So the new scan is the only thing that catches it.Generated by Claude Code