This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
to_
framework
#13461
Labels
feature-request
This issue is a feature request, either for mathematics, tactics, or CI
t-meta
Tactics, attributes or user commands
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:to_add_op
: Turn lemmas abouta + b
intob + a
to_mul_op
: Turn lemmas abouta * b
intob * a
to_dual
: Turn lemmas abouta ≤ b
intob ≤ a
. to_additive-like attribute for order_dual #7691Many lemmas could benefit of several attributes at the same time, generating exponentially many lemmas. To ensure this,
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 theto_add_op
lemmas.a ≤ b
isb ≤ a
, notb ≥ a
(and similarly fora + b
/b + a
anda * b
/b * a
).@[to [add_op, mul_op, dual]]
rather than@[to_add_op, to_mul_op, to_dual]
, similar to howderive
works.n
attributes need2^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.Examples
mul_le_mul_of_le_of_lt
,mul_le_mul_of_lt_of_lt
,add_le_add_of_le_of_lt
,add_le_add_of_lt_of_lt
Non-examples
add_le_add
. This is a fixed point of bothadd_op
anddual
The text was updated successfully, but these errors were encountered: