Skip to content

feat: Derive Arbitrary instances for inductive datatypes.#41

Merged
hargoniX merged 1 commit intoleanprover-community:mainfrom
codyroux:derive-arbitrary
Oct 15, 2025
Merged

feat: Derive Arbitrary instances for inductive datatypes.#41
hargoniX merged 1 commit intoleanprover-community:mainfrom
codyroux:derive-arbitrary

Conversation

@codyroux
Copy link
Contributor

WIP: this is a re-do of PR #35, mostly unchanged but for breaking the ArbitraryFuled class out.

I'm actually now convinced that we might want a fueled class in addition to size: e.g. for tree-like structures, the number of nodes is exponential in the depth at the moment. Is this the behavior we want? If so, then we want to keep size small but perhaps allow fuel to be large. If we switch size to correspond to the number of nodes, then now fuel has to be huge if we generate many things.

For now though, we should always be generating total functions, so fuel should be relatively moot. I can try to remove it if we feel that it is a distraction.

Copy link
Collaborator

@hargoniX hargoniX left a comment

Choose a reason for hiding this comment

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

Looks pretty good!

@codyroux codyroux marked this pull request as ready for review October 14, 2025 14:02
@codyroux
Copy link
Contributor Author

@ngernest, do you want to take a quick look?

@ngernest
Copy link

@codyroux This looks good to me, thanks!

@hargoniX hargoniX merged commit b949552 into leanprover-community:main Oct 15, 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.

3 participants