Skip to content

fix(proofs): refuse a sorry or Admitted in any declaration, not only printed ones - #195

Merged
hyperpolymath merged 2 commits into
mainfrom
claude/new-session-8bfbi9-proof-holes
Nov 16, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
claude/new-session-8bfbi9-proof-holes

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

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.sh and scripts/check-lean.sh judged a file only by its Print Assumptions / #print axioms lines. A hole in any declaration those lines don't name passed the gate.

Measured with the old gate on a copy of Warrant.v whose consent_epi ends in Admitted.:

PASS: proofs/rocq/Warrant.v compiles; 6 statements are axiom-free

The fix:

  • Rocq: the gate now also refuses Admitted, admit, Axiom(s), Parameter(s) and Conjecture anywhere in the file.
  • Lean: the gate now also refuses any "declaration uses sorry" report and any axiom declaration.
  • Controls: each gate gets a second control, which plants the hole in the unprinted consent_epi / consentEpi. The gate must report it.

2. Two rows of PROOF-NEEDS.adoc pointed at the wrong section (#191, P2).
The Rust and signature-format rows said "see §5", but their OPEN entries are in §4. §5 lists toolchain deviations. The residual-assumptions row now describes the stricter gates.

Evidence

  • Rocq, run locally with coqc 8.18.0, the version CI pins:
    PASS: proofs/rocq/Warrant.v compiles; 6 statements are axiom-free; no declaration is admitted or assumed
    PASS: control, an Admitted proof is reported
    PASS: control, an Admitted definition outside Print Assumptions is reported
    
    The unprinted control still compiles, with all 6 Print Assumptions answers closed. So the new scan is the only thing that catches it.
  • Lean was not run locally. The Lean job here is the check. Its new control fails loudly if Lean's sorry warning were worded differently from what the gate matches.

Generated by Claude Code

…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
@sonarqubecloud

Copy link
Copy Markdown

Copy link
Copy Markdown
Owner Author

Every job this PR touches is green.

  • Lean: PASS: control, a sorry outside #print axioms is reported.
  • Rocq: PASS: control, an Admitted definition outside Print Assumptions is reported.

Governance, Hypatia Security Scan and Secret Scanner fail at startup, but that isn't this PR's doing. They fail the same way on main and on every PR, because hyperpolymath/standards was transferred. #194 repins them. #194 in turn waits on adding metadatastician/standards/.github/workflows/*@* to this repo's Actions allowlist, which is an owner setting.


Generated by Claude Code

Repository owner deleted a comment from coderabbitai Bot Nov 16, 2026
@hyperpolymath
hyperpolymath marked this pull request as ready for review November 16, 2026 19:37
@hyperpolymath
hyperpolymath merged commit 81a2315 into main Nov 16, 2026
29 checks passed
@hyperpolymath
hyperpolymath deleted the claude/new-session-8bfbi9-proof-holes branch November 16, 2026 19:37

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread scripts/check-lean.sh
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 ]]; })"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment thread scripts/check-rocq.sh
return 1
fi
echo "PASS: $file compiles; $printed statements are axiom-free"
holes="$({ grep -nE '\<(Admitted|admit|Axioms?|Parameters?|Conjecture)\>' "$file" || [[ $? -eq 1 ]]; })"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Repository owner deleted a comment from coderabbitai Bot Nov 16, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Nov 16, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Nov 16, 2026
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.

3 participants