Paper: clear AI-writing tells from §4, §5, appendix #53
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
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| name: Lake build + sorry/axiom audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install elan | |
| run: | | |
| curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain none | |
| echo "$HOME/.elan/bin" >> $GITHUB_PATH | |
| - name: Cache Mathlib oleans | |
| uses: actions/cache@v4 | |
| with: | |
| path: .lake/build | |
| key: mathlib-olean-${{ hashFiles('lake-manifest.json', 'lean-toolchain') }} | |
| restore-keys: | | |
| mathlib-olean- | |
| - name: Download Mathlib cache | |
| run: lake exe cache get | |
| - name: Build | |
| run: lake build | |
| - name: Build test + examples | |
| run: lake build test examples | |
| - name: Sorry audit | |
| run: | | |
| echo "Checking for code `sorry` / `admit` / `sorryAx`..." | |
| # Match Lean syntactic `sorry` / `admit` tokens; tolerate | |
| # natural-English uses of `admit` / `admits` in docstrings. | |
| if grep -rnE '(^|\s)(sorry|admit)(\s|$)' CombArg/ | \ | |
| grep -vE '(admits?|admit[a-z]|admitted|admittance)'; then | |
| echo "FAIL: code `sorry` or `admit` found." | |
| exit 1 | |
| fi | |
| if grep -rn 'sorryAx' CombArg/; then | |
| echo "FAIL: sorryAx found." | |
| exit 1 | |
| fi | |
| echo "Sorry audit: clean." | |
| - name: Axiom audit | |
| run: | | |
| echo "Checking axioms of the two public theorems..." | |
| cat > /tmp/axiom_audit.lean <<'EOF' | |
| import CombArg | |
| #print axioms CombArg.exists_sup_reduction_of_cover | |
| #print axioms CombArg.exists_sup_reduction | |
| EOF | |
| OUTPUT=$(lake env lean /tmp/axiom_audit.lean 2>&1) | |
| echo "$OUTPUT" | |
| # Expected: only [propext, Classical.choice, Quot.sound] for both. | |
| if echo "$OUTPUT" | grep -qE '(sorryAx|axioms: \[.*(sorryAx))'; then | |
| echo "FAIL: sorryAx detected in axiom list." | |
| exit 1 | |
| fi | |
| EXPECTED_AXIOMS="propext, Classical.choice, Quot.sound" | |
| EXPECTED_COUNT=2 | |
| MATCH_COUNT=$(echo "$OUTPUT" | grep -c "\[$EXPECTED_AXIOMS\]" || true) | |
| if [ "$MATCH_COUNT" -ne "$EXPECTED_COUNT" ]; then | |
| echo "FAIL: expected $EXPECTED_COUNT theorems with exactly [$EXPECTED_AXIOMS]; got $MATCH_COUNT." | |
| exit 1 | |
| fi | |
| echo "Axiom audit: clean." |