Commit 2022-11-24 01:53 822c8702
View on Github →fix: fix to_additive handling of Nat and Int (#689)
- Remove
[to_additive]attributes fromNatandInt. That attribute disables all useful heuristics forto_additiveon these types. - deal with literals in specific types, like
Nat. This uses a new attribute@[to_additive_fixed_numeral]. - Add
to_additive_relevant_argattribute for heterogenous operations - Fix
to_additive_reorderarguments onHPow.hPow - Fix parsing of
to_additive_relevant_argto use 1-indexed numbers instead of 0-indexed numbers - Do not add
relevantArgAttron many declarations if they would have the default value anyway. - Revert test
foo2intests/ToAdditiveto the Lean 3 behavior. Previosuly the test would only succeed if the heuristics forNatandIntwere disabled. - Some cleanup in code, comments and docs