Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facility for single proposition mixins #472

Open
CohenCyril opened this issue Dec 11, 2024 · 0 comments
Open

Facility for single proposition mixins #472

CohenCyril opened this issue Dec 11, 2024 · 0 comments

Comments

@CohenCyril
Copy link
Member

CohenCyril commented Dec 11, 2024

Sometimes mixins are constituted of a single field, in which case it is extremely verbose to declare it. We should be able to promote definitions to mixins. (or automatically wrap 🤷)

e.g. for now

Definition commutative {T} (op : T -> T -> T) := forall x y,  op x y = op y x.

HB.mixin Record isCommutative T op := { opC : commutative T op }.
HB.structure Definition Commutative T := { op of isCommutative T op }

now we want (tentative)

Definition commutative {T} (op : T -> T -> T) := forall x y,  op x y = op y x.
HB.structure Definition Commutative T := { op; opC : commutative op}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant