Skip to content

Conversation

@ammkrn
Copy link
Contributor

@ammkrn ammkrn commented Jun 2, 2025

  • Implements the format changes described here

  • Adds an option to export unsafe declarations, to be used for creating test cases/counter examples

  • Ensures mdata nodes are removed from expressions

  • Ensures all uparams are exported, even if they don't show up in the declaration's type (needed for some new Mathlib declarations, esp in CategoryTheory there's occasionally a floating t uparam).

  • Ensures all constructors are exported even if unused (this is necessary for one of the BoundedChannel declarations)

  • Updates the examples (removes Init for size)

  • Bump semver

In the interest of disclosure, the README currently links to Type Checking in Lean 4 since the format is fully documented there. I don't mind if that documentation is copied elsewhere or if the link is redirected somewhere more appropriate, I just did it out of convenience.

ammkrn added 2 commits June 1, 2025 18:51
Adds `isReflexive` to inductive data
Uses `numNested` instead of `isNested`

Ensure all uparams instead of relying on appearance in type
Ensure all of an inductive's constructors are dumped

Removes the Init.export example for size (Init has grown over time)
The ability to ask for unsafe declarations to be exported is useful for
creating test data or counter-examples. It's much easier and less
error-prone to write these in Lean as unsafe declarations and export
them as such than it is to try and write them from primitives in an
external tool.
@hargoniX hargoniX merged commit ebd6dd8 into leanprover:master Jun 2, 2025
1 check passed
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