The areas / V34. The tactics of Mathlib
Mathlib.Tactic.Positivity.Basic
55 declarations. Mathlib docs · Source
positivity core extensions
This file sets up the basic positivity extensions tagged with the @[positivity] attribute.
theorem Mathlib.Meta.Positivity.ite_pos E1 #
∀ {α : Type u_1} [inst : Zero α] (p : Prop) [inst_1 : Decidable p] {a b : α} [inst_2 : LT α],
0 < a → 0 < b → 0 < if p then a else b
theorem Mathlib.Meta.Positivity.ite_nonneg E1 #
∀ {α : Type u_1} [inst : Zero α] (p : Prop) [inst_1 : Decidable p] {a b : α} [inst_2 : LE α],
0 ≤ a → 0 ≤ b → 0 ≤ if p then a else b
theorem Mathlib.Meta.Positivity.ite_nonneg_of_pos_of_nonneg E1 #
∀ {α : Type u_1} [inst : Zero α] (p : Prop) [inst_1 : Decidable p] {a b : α} [inst_2 : Preorder α],
0 < a → 0 ≤ b → 0 ≤ if p then a else b
theorem Mathlib.Meta.Positivity.ite_nonneg_of_nonneg_of_pos E1 #
∀ {α : Type u_1} [inst : Zero α] (p : Prop) [inst_1 : Decidable p] {a b : α} [inst_2 : Preorder α],
0 ≤ a → 0 < b → 0 ≤ if p then a else b
theorem Mathlib.Meta.Positivity.ite_ne_zero E1 #
∀ {α : Type u_1} [inst : Zero α] (p : Prop) [inst_1 : Decidable p] {a b : α}, a ≠ 0 → b ≠ 0 → (if p then a else b) ≠ 0
theorem Mathlib.Meta.Positivity.ite_ne_zero_of_pos_of_ne_zero E1 #
∀ {α : Type u_1} [inst : Zero α] (p : Prop) [inst_1 : Decidable p] {a b : α} [inst_2 : Preorder α],
0 < a → b ≠ 0 → (if p then a else b) ≠ 0
theorem Mathlib.Meta.Positivity.ite_ne_zero_of_ne_zero_of_pos E1 #
∀ {α : Type u_1} [inst : Zero α] (p : Prop) [inst_1 : Decidable p] {a b : α} [inst_2 : Preorder α],
a ≠ 0 → 0 < b → (if p then a else b) ≠ 0
def Mathlib.Meta.Positivity.evalIte E1 #
Mathlib.Meta.Positivity.PositivityExt
The positivity extension which identifies expressions of the form ite p a b,
such that positivity successfully recognises both a and b.
theorem Mathlib.Meta.Positivity.le_min_of_lt_of_le E1 #
∀ {R : Type u_2} [inst : LinearOrder R] {a b c : R}, a < b → a ≤ c → a ≤ min b c
theorem Mathlib.Meta.Positivity.le_min_of_le_of_lt E1 #
∀ {R : Type u_2} [inst : LinearOrder R] {a b c : R}, a ≤ b → a < c → a ≤ min b c
theorem Mathlib.Meta.Positivity.min_ne E1 #
∀ {R : Type u_2} [inst : LinearOrder R] {a b c : R}, a ≠ c → b ≠ c → min a b ≠ c
theorem Mathlib.Meta.Positivity.min_ne_of_ne_of_lt E1 #
∀ {R : Type u_2} [inst : LinearOrder R] {a b c : R}, a ≠ c → c < b → min a b ≠ c
theorem Mathlib.Meta.Positivity.min_ne_of_lt_of_ne E1 #
∀ {R : Type u_2} [inst : LinearOrder R] {a b c : R}, c < a → b ≠ c → min a b ≠ c
theorem Mathlib.Meta.Positivity.max_ne E1 #
∀ {R : Type u_2} [inst : LinearOrder R] {a b c : R}, a ≠ c → b ≠ c → max a b ≠ c
def Mathlib.Meta.Positivity.evalMin E1 #
Mathlib.Meta.Positivity.PositivityExt
The positivity extension which identifies expressions of the form min a b,
such that positivity successfully recognises both a and b.
def Mathlib.Meta.Positivity.evalMax E1 #
Mathlib.Meta.Positivity.PositivityExt
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.
def Mathlib.Meta.Positivity.evalAdd E1 #
Mathlib.Meta.Positivity.PositivityExt
The positivity extension which identifies expressions of the form a + b,
such that positivity successfully recognises both a and b.
def Mathlib.Meta.Positivity.evalSub E1 #
Mathlib.Meta.Positivity.PositivityExt
The positivity extension which identifies expressions of the form a - b,
such that there is a local hypothesis b < a, b ≤ a, a ≠ b or b ≠ a.
def Mathlib.Meta.Positivity.evalMul E1 #
Mathlib.Meta.Positivity.PositivityExt
The positivity extension which identifies expressions of the form a * b,
such that positivity successfully recognises both a and b.
theorem Mathlib.Meta.Positivity.int_div_self_pos E1 #
∀ {a : ℤ}, 0 < a → 0 < a / a
theorem Mathlib.Meta.Positivity.int_div_nonneg_of_pos_of_nonneg E1 #
∀ {a b : ℤ}, 0 < a → 0 ≤ b → 0 ≤ a / b
theorem Mathlib.Meta.Positivity.int_div_nonneg_of_nonneg_of_pos E1 #
∀ {a b : ℤ}, 0 ≤ a → 0 < b → 0 ≤ a / b
theorem Mathlib.Meta.Positivity.int_div_nonneg_of_pos_of_pos E1 #
∀ {a b : ℤ}, 0 < a → 0 < b → 0 ≤ a / b
def Mathlib.Meta.Positivity.evalIntDiv E1 #
Mathlib.Meta.Positivity.PositivityExt
The positivity extension which identifies expressions of the form a / b,
where a and b are integers.
theorem Mathlib.Meta.Positivity.pow_zero_pos E1 #
∀ {α : Type u_1} [inst : Semiring α] [inst_1 : PartialOrder α] [IsOrderedRing α] [Nontrivial α] (a : α), 0 < a ^ 0
theorem Mathlib.Meta.Positivity.pow_zero_ne_zero E1 #
∀ {α : Type u_1} [inst : Semiring α] [Nontrivial α] (a : α), a ^ 0 ≠ 0
def Mathlib.Meta.Positivity.evalPowZeroNat E1 #
Mathlib.Meta.Positivity.PositivityExt
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).
def Mathlib.Meta.Positivity.evalPow E1 #
Mathlib.Meta.Positivity.PositivityExt
The positivity extension which identifies expressions of the form a ^ (b : ℕ),
such that positivity successfully recognises both a and b.
theorem Mathlib.Meta.Positivity.abs_pos_of_ne_zero E1 #
∀ {α : Type u_2} [inst : AddGroup α] [inst_1 : LinearOrder α] [AddLeftMono α] {a : α}, a ≠ 0 → 0 < |a|
def Mathlib.Meta.Positivity.evalAbs E1 #
Mathlib.Meta.Positivity.PositivityExt
The positivity extension which identifies expressions of the form |a|.
theorem Mathlib.Meta.Positivity.int_natAbs_pos E1 #
∀ {n : ℤ}, 0 < n → 0 < n.natAbs
def Mathlib.Meta.Positivity.evalNatAbs E1 #
Mathlib.Meta.Positivity.PositivityExt
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.
def Mathlib.Meta.Positivity.evalNatCast E1 #
Mathlib.Meta.Positivity.PositivityExt
Extension for the positivity tactic: Nat.cast is always non-negative,
and positive when its input is.
def Mathlib.Meta.Positivity.evalIntCast E1 #
Mathlib.Meta.Positivity.PositivityExt
Extension for the positivity tactic: Int.cast is positive (resp. non-negative)
if its input is.
def Mathlib.Meta.Positivity.evalNatSucc E1 #
Mathlib.Meta.Positivity.PositivityExt
Extension for Nat.succ.
def Mathlib.Meta.Positivity.evalPNatVal E1 #
Mathlib.Meta.Positivity.PositivityExt
Extension for PNat.val.
def Mathlib.Meta.Positivity.evalFactorial E1 #
Mathlib.Meta.Positivity.PositivityExt
Extension for Nat.factorial.
def Mathlib.Meta.Positivity.evalAscFactorial E1 #
Mathlib.Meta.Positivity.PositivityExt
Extension for Nat.ascFactorial.
def Mathlib.Meta.Positivity.evalNatGCD E1 #
Mathlib.Meta.Positivity.PositivityExt
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.
def Mathlib.Meta.Positivity.evalNatLCM E1 #
Mathlib.Meta.Positivity.PositivityExt
Extension for Nat.lcm.
def Mathlib.Meta.Positivity.evalNatSqrt E1 #
Mathlib.Meta.Positivity.PositivityExt
Extension for Nat.sqrt.
def Mathlib.Meta.Positivity.evalIntGCD E1 #
Mathlib.Meta.Positivity.PositivityExt
Extension for Int.gcd.
Uses positivity of the left term, if available, then tries the right term.
def Mathlib.Meta.Positivity.evalIntLCM E1 #
Mathlib.Meta.Positivity.PositivityExt
Extension for Int.lcm.
theorem Mathlib.Meta.Positivity.NNRat.num_pos_of_pos E1 #
∀ {q : ℚ≥0}, 0 < q → 0 < q.num
Alias of the reverse direction of NNRat.num_pos.
theorem Mathlib.Meta.Positivity.NNRat.num_ne_zero_of_ne_zero E1 #
∀ {q : ℚ≥0}, q ≠ 0 → q.num ≠ 0
Alias of the reverse direction of NNRat.num_ne_zero.
def Mathlib.Meta.Positivity.evalNNRatNum E1 #
Mathlib.Meta.Positivity.PositivityExt
The positivity extension which identifies expressions of the form NNRat.num q,
such that positivity successfully recognises q.
def Mathlib.Meta.Positivity.evalNNRatDen E1 #
Mathlib.Meta.Positivity.PositivityExt
The positivity extension which identifies expressions of the form Rat.den a.
theorem Mathlib.Meta.Positivity.num_pos_of_pos E1 #
∀ {a : ℚ}, 0 < a → 0 < a.num
Alias of the reverse direction of Rat.num_pos.
theorem Mathlib.Meta.Positivity.num_nonneg_of_nonneg E1 #
∀ {q : ℚ}, 0 ≤ q → 0 ≤ q.num
Alias of the reverse direction of Rat.num_nonneg.
theorem Mathlib.Meta.Positivity.num_ne_zero_of_ne_zero E1 #
∀ {q : ℚ}, q ≠ 0 → q.num ≠ 0
Alias of the reverse direction of Rat.num_ne_zero.
def Mathlib.Meta.Positivity.evalRatNum E1 #
Mathlib.Meta.Positivity.PositivityExt
The positivity extension which identifies expressions of the form Rat.num a,
such that positivity successfully recognises a.
def Mathlib.Meta.Positivity.evalRatDen E1 #
Mathlib.Meta.Positivity.PositivityExt
The positivity extension which identifies expressions of the form Rat.den a.
def Mathlib.Meta.Positivity.evalPosPart E1 #
Mathlib.Meta.Positivity.PositivityExt
Extension for posPart. a⁺ is always nonnegative, and positive if a is.
def Mathlib.Meta.Positivity.evalNegPart E1 #
Mathlib.Meta.Positivity.PositivityExt
Extension for negPart. a⁻ is always nonnegative.
def Mathlib.Meta.Positivity.evalMap E1 #
Mathlib.Meta.Positivity.PositivityExt
Extension for the positivity tactic: nonnegative maps take nonnegative values.