Skip to content

Conversation

@kim-em
Copy link
Collaborator

@kim-em kim-em commented Jan 6, 2026

This PR adds support for verifying Lean projects with nanoda, an independent Lean 4 type checker written in Rust.

New Inputs

Input Default Description
nanoda "false" Enable nanoda verification
nanoda-allow-sorry "true" Permit sorryAx axiom
nanoda-on-main-only "true" Only run on push to main, not PRs

New Output

  • nanoda-status: "SUCCESS" | "FAILURE" | ""

Reusable Daily Workflow

Also adds .github/workflows/nanoda-daily.yml - a reusable workflow for scheduled daily verification with configurable notifications:

jobs:
  verify:
    uses: leanprover/lean-action/.github/workflows/nanoda-daily.yml@v1
    # Notifications: issue (default), webhook, zulip, or none

Implementation Notes

Testing

Successfully tested on:

  • sphere-eversion: 352,154 declarations (~6 min)
  • Carleson: 353,613 declarations (~6 min)
  • FLT: 420,742 declarations (~11 min)
  • Mathlib: 627,356 declarations (~17 min)

🤖 Prepared with Claude Code

kim-em and others added 2 commits January 6, 2026 15:33
This PR adds support for verifying Lean projects with nanoda, an independent
Lean 4 type checker written in Rust.

New inputs:
- `nanoda`: Enable nanoda verification (default: false)
- `nanoda-allow-sorry`: Permit sorryAx axiom (default: true)
- `nanoda-on-main-only`: Only run on push to main, not PRs (default: true)

New output:
- `nanoda-status`: SUCCESS | FAILURE | ""

Also adds a reusable workflow `nanoda-daily.yml` for scheduled daily
verification with configurable notifications (GitHub issue, webhook, or Zulip).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Copy link
Collaborator

@austinletson austinletson left a comment

Choose a reason for hiding this comment

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

Looks good to me other than a few quesetions.

Love checking MathLib in 17 minutes on a GitHub runner!

Allowed values: "true" | "false".
required: false
default: "true"
nanoda-on-main-only:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it make sense to encourage users to control the behavior through workflow events instead of having the nanoda-on-main-only. This would be more explicit and idiomatic. The users could either specify the events in the on block or with something like this:

- uses: leanprover/lean-action@v1
   with:
     nanoda: ${{ github.event_name == 'push' }}

I understand the convenience of nanoda-on-main-only for the standard single-job workflow. And it also would mean that it is backwards compatible with the existing single job workflow that comes with lake new, but I think this might cause confusion, especially looking at the usage in the nanoda-daily.yml workflow in this PR.


# Step 2: Clone and build lean4export
echo "Cloning and building lean4export..."
# TODO: Once https://github.com/leanprover/lean4export/pull/11 is merged,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this is now merged can we resolve this TODO?

CONFIG_FILE="_nanoda_config.json"

# Build permitted_axioms array
PERMITTED_AXIOMS='["propext", "Classical.choice", "Quot.sound", "Lean.trustCompiler"'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is Lean.trustCompiler included here by default? Isn't it and native_decide not allowed in Mathlib?

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.

2 participants