Skip to content

Vcgen - #39

Draft
abentkamp wants to merge 3 commits into
devfrom
vcgen
Draft

Vcgen#39
abentkamp wants to merge 3 commits into
devfrom
vcgen

Conversation

@abentkamp

Copy link
Copy Markdown

Instructions

Thanks for opening a PR! We welcome external contributions but encourage contributors to
coordinate with us before, either by joining the Zulip or by opening issues with detailed
proposals. In particular, we ask contributors to engage with us before making deep
modifications of the code or implementing non trivial features, as these require in-depth
design discussions and careful reviews. This means for instance that proposals to extend
the translation should be discussed first. On the other hand, you should feel free to
directly submit PRs that fix an issue through a scoped, small fix, or that add theorems to
the standard library. In case of doubt, discuss with us.

Good practices:

  • please keep your PRs small and scoped: they will be a lot easier to review and accept.
  • new models of Rust definitions should be systematically tested (you can annotate unit
    functions with #[verify::test] to generate tests at extraction time)
  • avoid AI generated PR descriptions: they tend to be verbose and imprecise

AI assisted PRs:

Please indicate whether the PR was AI assisted, and by how much: did you use AI in a
limited way or did you completely vibe-code the PR? We welcome AI assisted PRs but need
this information to adjust our level of scrutinee during the review and evaluate whether
it is reasonable to ask for the contributor to completely modify their code. Also note
that we expect contributors to own and understand the code they submit: as we will
carefully review the PR line by line, we expect contributors to have done the same for AI
generated code (reviewing PRs takes time and we have limited resources).

abentkamp and others added 3 commits August 4, 2026 15:58
Bump the Lean toolchain and mathlib to v4.33.0-rc2 and adapt the
backend and tests to the new toolchain.

Toolchain:
- backends/lean and tests/lean lean-toolchain -> v4.33.0-rc2
- mathlib tag -> v4.33.0-rc2 in lakefile.lean; regenerate both manifests

API breakage:
- BvEnumToBitVec / BvTac: BVDecide frontend moved from
  Lean.Elab.Tactic.BVDecide.Frontend.* to Lean.Meta.Tactic.BVDecide.*
- Simp: 4.33 no longer inserts the Array->Option coercion; make it explicit
- ReduceZMod: mathlib Monoid.toPow -> NPow.toPow / Monoid.toNPow

Proof / tactic repair:
- Make Pre reducible (like Post) so and_imp/exists_imp flatten
  conjunction/existential post-conditions again in step/let* (4.33's simp
  only rewrites when the conclusion is recognised as Prop)
- Fix grind/simp failures on spec (ok ...) goals via spec_ok, and the
  semireducible-wrapper getElem/setSlice! lemmas in Vec/Slice
- FlatOrder.mk admissibility, StepStar TaskOrDone annotation, StepArraySpec
  declModifiers TSyntax category, Step do-block returning Unit
- Update #guard_msgs for the reworded unusedVariables linter message

Tests:
- Work around leanprover/lean4#14521 (grind emits a kernel-invalid
  eq_false_of_decide term for BitVec equalities whose width is defeq but
  not syntactically 32): route the tutorial get_elem_tactic through
  scalar_tac, and spell out the one step* demo explicitly

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit 744f829)
Lean v4.33 newly enables the `dupNamespace`, `defProp`, and `ambiguousOpen`
linters. They fire on generated Rust-path declaration names, intentional
`Prop`-valued definitions, and `open Std` (now that `Lean.Std` also exists) --
none cleanly fixable in the generated / spec code -- so disable them in the
lakefile to keep CI's `lake build --iofail` green after the toolchain bump.
Also drop a few unused simp arguments and one unnecessary `<;>`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant