positivity core extensions #
This file sets up the basic positivity extensions tagged with the @[positivity] attribute.
The positivity extension which identifies expressions of the form ite p a b,
such that positivity successfully recognises both a and b.
Instances For
The positivity extension which identifies expressions of the form min a b,
such that positivity successfully recognises both a and b.
Instances For
Extension for the max operator. The max of two numbers is nonnegative if at least one
is nonnegative, strictly positive if at least one is positive, and nonzero if both are nonzero.
Instances For
The positivity extension which identifies expressions of the form a + b,
such that positivity successfully recognises both a and b.
Instances For
The positivity extension which identifies expressions of the form a * b,
such that positivity successfully recognises both a and b.
Instances For
The positivity extension which identifies expressions of the form a / b,
where a and b are integers.
Instances For
The positivity extension which identifies expressions of the form a ^ (0 : ℕ).
This extension is run in addition to the general a ^ b extension (they are overlapping).
Instances For
The positivity extension which identifies expressions of the form a ^ (b : ℕ),
such that positivity successfully recognises both a and b.
Instances For
The positivity extension which identifies expressions of the form |a|.
Instances For
Extension for the positivity tactic: Int.natAbs is positive when its input is.
Since the output type of Int.natAbs is ℕ, the nonnegative case is handled by the default
positivity tactic.
Instances For
Extension for the positivity tactic: Nat.cast is always non-negative,
and positive when its input is.
Instances For
Extension for the positivity tactic: Int.cast is positive (resp. non-negative)
if its input is.
Instances For
Extension for Nat.succ.
Instances For
Extension for PNat.val.
Instances For
Extension for Nat.factorial.
Instances For
Extension for Nat.ascFactorial.
Instances For
Extension for Nat.gcd.
Uses positivity of the left term, if available, then tries the right term.
The implementation relies on the fact that Positivity.core on ℕ never returns nonzero.
Instances For
Extension for Nat.lcm.
Instances For
Extension for Nat.sqrt.
Instances For
Extension for Int.gcd.
Uses positivity of the left term, if available, then tries the right term.
Instances For
Extension for Int.lcm.
Instances For
Alias of the reverse direction of NNRat.num_pos.
Alias of the reverse direction of NNRat.num_ne_zero.
The positivity extension which identifies expressions of the form NNRat.num q,
such that positivity successfully recognises q.
Instances For
The positivity extension which identifies expressions of the form Rat.den a.
Instances For
Alias of the reverse direction of Rat.num_pos.
Alias of the reverse direction of Rat.num_nonneg.
Alias of the reverse direction of Rat.num_ne_zero.
The positivity extension which identifies expressions of the form Rat.num a,
such that positivity successfully recognises a.
Instances For
The positivity extension which identifies expressions of the form Rat.den a.
Instances For
Extension for posPart. a⁺ is always nonnegative, and positive if a is.
Instances For
Extension for negPart. a⁻ is always nonnegative.
Instances For
Extension for the positivity tactic: nonnegative maps take nonnegative values.