You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 6, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 6, 2026. It is now read-only.
to_additive has had great success in homogenizing lemmas and reducing maintenance burden. It would now be great to extend this principle to other kinds of dualities:
Many lemmas could benefit of several attributes at the same time, generating exponentially many lemmas. To ensure this,
We should probably hardcode an order in which the to_ attributes should be applied, and each should apply to all the previously generated lemmas. Further, some combinations of attributes have nontrivial relations between them. For example, to_mul_op + to_additive creates the to_add_op lemmas.
The actual replacement will become significantly more complicated (both in the proof term and lemma name) as the dual of a ≤ b is b ≤ a, not b ≥ a (and similarly for a + b/b + a and a * b/b * a).
The attribute syntax might need to change, to be @[to [add_op, mul_op, dual]] rather than @[to_add_op, to_mul_op, to_dual], similar to how derive works.
Adding comments will be more complicated as n attributes need 2^n - 1 comments within the attribute. Luckily, it should rarely happen that a lemma is both interesting enough to deserve a docstring and boring enough to be dualized.
It would be really helpful to collect a bunch of examples here of lemmas that could/should be autogenerated, as examples and test cases for whoever writes this.
Activity
alexjbest commentedon Apr 16, 2022
It would be really helpful to collect a bunch of examples here of lemmas that could/should be autogenerated, as examples and test cases for whoever writes this.