Documentation

Mathlib.Tactic.Positivity.Basic

positivity core extensions #

This file sets up the basic positivity extensions tagged with the @[positivity] attribute.

theorem Mathlib.Meta.Positivity.ite_pos {α : Type u_1} [Zero α] (p : Prop) [Decidable p] {a b : α} [LT α] (ha : 0 < a) (hb : 0 < b) :
0 < if p then a else b
theorem Mathlib.Meta.Positivity.ite_nonneg {α : Type u_1} [Zero α] (p : Prop) [Decidable p] {a b : α} [LE α] (ha : 0 a) (hb : 0 b) :
0 if p then a else b
theorem Mathlib.Meta.Positivity.ite_nonneg_of_pos_of_nonneg {α : Type u_1} [Zero α] (p : Prop) [Decidable p] {a b : α} [Preorder α] (ha : 0 < a) (hb : 0 b) :
0 if p then a else b
theorem Mathlib.Meta.Positivity.ite_nonneg_of_nonneg_of_pos {α : Type u_1} [Zero α] (p : Prop) [Decidable p] {a b : α} [Preorder α] (ha : 0 a) (hb : 0 < b) :
0 if p then a else b
theorem Mathlib.Meta.Positivity.ite_ne_zero {α : Type u_1} [Zero α] (p : Prop) [Decidable p] {a b : α} (ha : a 0) (hb : b 0) :
(if p then a else b) 0
theorem Mathlib.Meta.Positivity.ite_ne_zero_of_pos_of_ne_zero {α : Type u_1} [Zero α] (p : Prop) [Decidable p] {a b : α} [Preorder α] (ha : 0 < a) (hb : b 0) :
(if p then a else b) 0
theorem Mathlib.Meta.Positivity.ite_ne_zero_of_ne_zero_of_pos {α : Type u_1} [Zero α] (p : Prop) [Decidable p] {a b : α} [Preorder α] (ha : a 0) (hb : 0 < b) :
(if p then a else b) 0

The positivity extension which identifies expressions of the form ite p a b, such that positivity successfully recognises both a and b.

Instances For
    theorem Mathlib.Meta.Positivity.le_min_of_lt_of_le {R : Type u_2} [LinearOrder R] {a b c : R} (ha : a < b) (hb : a c) :
    a min b c
    theorem Mathlib.Meta.Positivity.le_min_of_le_of_lt {R : Type u_2} [LinearOrder R] {a b c : R} (ha : a b) (hb : a < c) :
    a min b c
    theorem Mathlib.Meta.Positivity.min_ne {R : Type u_2} [LinearOrder R] {a b c : R} (ha : a c) (hb : b c) :
    min a b c
    theorem Mathlib.Meta.Positivity.min_ne_of_ne_of_lt {R : Type u_2} [LinearOrder R] {a b c : R} (ha : a c) (hb : c < b) :
    min a b c
    theorem Mathlib.Meta.Positivity.min_ne_of_lt_of_ne {R : Type u_2} [LinearOrder R] {a b c : R} (ha : c < a) (hb : b c) :
    min a b c
    theorem Mathlib.Meta.Positivity.max_ne {R : Type u_2} [LinearOrder R] {a b c : R} (ha : a c) (hb : b c) :
    max a b c

    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
            theorem Mathlib.Meta.Positivity.int_div_self_pos {a : } (ha : 0 < a) :
            0 < a / a
            theorem Mathlib.Meta.Positivity.int_div_nonneg_of_pos_of_nonneg {a b : } (ha : 0 < a) (hb : 0 b) :
            0 a / b
            theorem Mathlib.Meta.Positivity.int_div_nonneg_of_nonneg_of_pos {a b : } (ha : 0 a) (hb : 0 < b) :
            0 a / b
            theorem Mathlib.Meta.Positivity.int_div_nonneg_of_pos_of_pos {a b : } (ha : 0 < a) (hb : 0 < b) :
            0 a / b

            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
                  theorem Mathlib.Meta.Positivity.abs_pos_of_ne_zero {α : Type u_2} [AddGroup α] [LinearOrder α] [AddLeftMono α] {a : α} :
                  a 00 < |a|

                  The positivity extension which identifies expressions of the form |a|.

                  Instances For
                    theorem Mathlib.Meta.Positivity.int_natAbs_pos {n : } (hn : 0 < n) :
                    0 < n.natAbs

                    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.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 Int.gcd. Uses positivity of the left term, if available, then tries the right term.

                            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
                                  theorem Mathlib.Meta.Positivity.num_pos_of_pos {a : } :
                                  0 < a0 < a.num

                                  Alias of the reverse direction of Rat.num_pos.

                                  theorem Mathlib.Meta.Positivity.num_nonneg_of_nonneg {q : } :
                                  0 q0 q.num

                                  Alias of the reverse direction of Rat.num_nonneg.

                                  theorem Mathlib.Meta.Positivity.num_ne_zero_of_ne_zero {q : } :
                                  q 0q.num 0

                                  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.

                                          Instances For