Skip to content

Give the Nat type a different Lean name in the extract - #26

Merged
tamnd merged 1 commit into
mainfrom
fix/extract-nat-name
Nov 21, 2026
Merged

tamnd merged 1 commit into
mainfrom
fix/extract-nat-name

Conversation

@tamnd

@tamnd tamnd commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Refers to #2.

The extract job on main fails since #23. Aeneas binds its Fuel type to the Lean name Nat, and the Nat type of rulean-nat gets the same name. Aeneas then writes partial Lean files and stops with an error.

This change gives the type the Lean name BigNat with #[aeneas::rename]. The attribute and the register_tool line are behind cfg(rulean_extract), and only scripts/extract.sh sets this cfg, through RUSTFLAGS. So a normal build on stable Rust does not see them, and the Rust name stays Nat. RUSTFLAGS goes to every crate of the build, so rulean-store and rulean-format see the same name as rulean-nat.

The workspace lints declare the cfg, so unexpected_cfgs does not warn.

Tests: a nightly build of rulean-store and rulean-format with --cfg rulean_extract passes. The extract job of this PR is the real test.

@tamnd tamnd added this to the M1 Store and parser milestone Nov 21, 2026
@tamnd tamnd added area/nat The big number type and the Nat operations area/proof The Lean proofs, the twin and the extraction area/ci Workflows, releases, policy checks and repository settings type/fix A fault labels Nov 21, 2026
@tamnd
tamnd merged commit 688b854 into main Nov 21, 2026
17 checks passed
@tamnd
tamnd deleted the fix/extract-nat-name branch November 21, 2026 15:45
@tamnd tamnd mentioned this pull request Nov 21, 2026
6 of 16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci Workflows, releases, policy checks and repository settings area/nat The big number type and the Nat operations area/proof The Lean proofs, the twin and the extraction type/fix A fault

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant