Commit 2022-10-05 09:33 caf8c55f
View on Github →feat(tactic/positivity): Handle a ≠ 0
assumptions (#16529)
Make positivity
handle a ≠ 0
assumptions. This involves
- adding a third constructor to
positivity.strictness
, that I've callednonzero
. It is meant to hold proofs ofa ≠ 0
, not0 ≠ a
- modifying the existing extensions to handle that new case.
- changing
positivity.orelse'
to account for the fact that if we can prove0 ≤ a
anda ≠ 0
then we can prove0 < a
. - making
compare_hyp
handleeq
andne
hypotheses.
Other changes
- Introduce
tac1 ≤|≥ tac2
as notation forpositivity.orelse' tac1 tac2
. This has the same precedence as the<|>
notation fororelse
. - Make
positivity
extensions fail with more informative error messages. This is useless when runningpositivity
alone but:- It clearly marks within the code what each failure means
- The errors can show up when calling an extension directly. Not sure why you would do that, but you could.
- Add a
has_to_format strictness
instance. This is mostly useful for debugging.