Documentation

Projects.Util.Order

theorem max_right_eq_of_max_eq_and_ne {α : Type u_1} [LinearOrder α] {a b c : α} (h₁ : max a b = c) (h₂ : a c) :
b = c
@[instance_reducible, instance 100]
instance leOfOrd' {α : Type u_1} [Ord α] :
LE α
Equations
@[instance_reducible, instance 100]
instance ltOfOrd' {α : Type u_1} [Ord α] :
LT α
Equations
@[instance_reducible, instance 100]
instance minOfOrd' {α : Type u_1} [Ord α] :
Min α
Equations
@[instance_reducible, instance 100]
instance maxOfOrd' {α : Type u_1} [Ord α] :
Max α
Equations
theorem Ord.le_def {α : Type u_1} [ha : Ord α] {a b : α} :
a b (compare a b).isLE = true
theorem Ord.lt_def {α : Type u_1} [ha : Ord α] {a b : α} :
a < b (compare a b).isLT = true
@[instance_reducible]
instance instDecidableRelLt_projects {α : Type u_1} [ha : Ord α] :
Equations
theorem compare_eq {α : Type u_1} [ha : LinearOrder α] {a b : α} :
@[reducible]
def Preorder.ofOrd {α : Type u_1} [ha : Ord α] (h_refl : ∀ (a : α), a a) (h_trans : ∀ (a b c : α), a bb ca c) (h_lt : ∀ (a b : α), a < b a b ¬b a) :
Equations
Instances For
    @[reducible]
    def PartialOrder.ofOrd {α : Type u_1} [ha : Ord α] (h_refl : ∀ (a : α), a a) (h_trans : ∀ (a b c : α), a bb ca c) (h_lt : ∀ (a b : α), a < b a b ¬b a) (h_ant : ∀ (a b : α), a bb aa = b) :
    Equations
    Instances For
      @[reducible]
      def LinearOrder.ofOrd {α : Type u_1} [ha : Ord α] (h_refl : ∀ (a : α), a a) (h_trans : ∀ (a b c : α), a bb ca c) (h_lt : ∀ (a b : α), a < b a b ¬b a) (h_ant : ∀ (a b : α), a bb aa = b) (h_tot : ∀ (a b : α), a b b a) :
      Equations
      Instances For
        theorem isLe_compare_iff_le {α : Type u_1} [ha : LinearOrder α] {x y : α} :
        (compare x y).isLE = true x y
        theorem isLt_compare_iff_lt {α : Type u_1} [ha : LinearOrder α] {x y : α} :
        (compare x y).isLT = true x < y
        @[reducible]
        def equivToLinearOrderAux {α : Type u_1} {β : Type u_2} [ha : LinearOrder α] (e : α β) :
        Equations
        Instances For
          theorem min_def₁ {α : Type u_1} [ha : LinearOrder α] :
          min = fun (x y : α) => if x y then x else y
          theorem max_def₁ {α : Type u_1} [ha : LinearOrder α] :
          max = fun (x y : α) => if x y then y else x
          @[reducible]
          def Equiv.toLinearOrder {α : Type u_1} {β : Type u_2} [ha : LinearOrder α] (e : α β) :
          Equations
          Instances For
            theorem false_of_lt_and_lt {α : Type u_1} [ha : LinearOrder α] {a b : α} (h₁ : a < b) (h₂ : b < a) :
            @[simp]
            theorem not_lt_and_lt {α : Type u_1} [ha : LinearOrder α] {a b : α} :
            ¬(a < b b < a)
            theorem max_eq_ite {α : Type u_1} [ha : LinearOrder α] {a b : α} :
            max a b = if b a then a else b
            theorem abs_add_le_max_add_max {α : Type u_1} [ha₁ : LinearOrder α] [ha₂ : Ring α] [ha₃ : IsOrderedAddMonoid α] (a b x y : α) :
            |a + b| max |a| x + max y |b|
            theorem nonneg_of_abs_le {α : Type u_1} {a b : α} [ha₁ : LinearOrder α] [ha₂ : Ring α] [ha₃ : IsOrderedAddMonoid α] (h : |a| b) :
            0 b
            theorem pos_of_abs_lt {α : Type u_1} {a b : α} [ha₁ : LinearOrder α] [ha₂ : Ring α] [ha₃ : IsOrderedAddMonoid α] (h : |a| < b) :
            0 < b
            class InjectiveOfNat (α : Type u_1) [ha : Semiring α] :
            Instances
              @[simp]
              theorem add_self_eq_zero_iff {α : Type u_1} [ha₂ : Ring α] [ha₄ : NoZeroDivisors α] [ha₅ : InjectiveOfNat α] {a : α} :
              a + a = 0 a = 0
              class LocallyFiniteOrderList (α : Type u_1) extends LinearOrder α :
              Type u_1
              Instances
                @[instance_reducible]
                Equations
                @[instance_reducible]
                Equations
                def List.icc {α : Type u_1} [ha : LocallyFiniteOrderList α] :
                ααList α
                Equations
                Instances For
                  @[simp]
                  theorem List.sortedLT_icc {α : Type u_1} [ha : LocallyFiniteOrderList α] {a b : α} :
                  @[simp]
                  theorem List.sortedLE_icc {α : Type u_1} [ha : LocallyFiniteOrderList α] {a b : α} :
                  @[simp]
                  theorem List.mem_icc {α : Type u_1} [ha : LocallyFiniteOrderList α] {a b x : α} :
                  x icc a b a x x b
                  @[simp]
                  theorem List.icc_eq_nil_iff {α : Type u_1} [ha : LocallyFiniteOrderList α] {a b : α} :
                  icc a b = [] b < a
                  @[simp]
                  theorem List.nodup_icc {α : Type u_1} [ha : LocallyFiniteOrderList α] {x y : α} :
                  (icc x y).Nodup
                  @[simp]
                  theorem List.length_icc_int_nat {z : } {a b : } :
                  (icc (z - a) (z + b)).length = a + b + 1
                  theorem List.icc_eq_range {n m : } (h : n m) :
                  icc n m = map (fun (x : ) => n + x) (range (m - n + 1))
                  theorem List.icc_split (k : ) {n m : } (h₁ : n k) (h₂ : k < m) :
                  icc n m = icc n k ++ icc (k + 1) m
                  @[simp]
                  theorem min_sub_one_lt_left {α : Type u_1} [ha₁ : LinearOrder α] [ha₂ : Ring α] [ha₃ : IsOrderedAddMonoid α] [ha₄ : ZeroLEOneClass α] [ha₅ : NeZero 1] {a b : α} :
                  min a b - 1 < a
                  @[simp]
                  theorem min_sub_one_lt_right {α : Type u_1} [ha₁ : LinearOrder α] [ha₂ : Ring α] [ha₃ : IsOrderedAddMonoid α] [ha₄ : ZeroLEOneClass α] [ha₅ : NeZero 1] {a b : α} :
                  min a b - 1 < b
                  @[simp]
                  theorem left_lt_max_add_one {α : Type u_1} [ha₁ : LinearOrder α] [ha₂ : Ring α] [ha₃ : IsOrderedAddMonoid α] [ha₄ : ZeroLEOneClass α] [ha₅ : NeZero 1] {a b : α} :
                  a < max a b + 1
                  @[simp]
                  theorem right_lt_max_add_one {α : Type u_1} [ha₁ : LinearOrder α] [ha₂ : Ring α] [ha₃ : IsOrderedAddMonoid α] [ha₄ : ZeroLEOneClass α] [ha₅ : NeZero 1] {a b : α} :
                  b < max a b + 1
                  theorem min_eq_ite {α : Type u_2} [ha : LinearOrder α] {x y : α} :
                  min x y = if x y then x else y
                  theorem abs_eq_ite {α : Type u_2} [ha₁ : LinearOrder α] [hs₂ : AddGroup α] [ha₃ : AddLeftMono α] {x : α} :
                  |x| = if 0 x then x else -x
                  theorem bddBelow_range_of_forall_le {ι : Type u_2} {α : Type u_3} [ha : LinearOrder α] {f : ια} (x : α) (h : ∀ (i : ι), x f i) :
                  theorem bddAbove_range_of_forall_le {ι : Type u_2} {α : Type u_3} [ha : LinearOrder α] {f : ια} (x : α) (h : ∀ (i : ι), f i x) :
                  theorem bddBelow_range {ι : Type u_2} {α : Type u_3} [ha : LinearOrder α] {f : ια} :
                  BddBelow (Set.range f) ∃ (x : α), ∀ (i : ι), x f i
                  theorem bddAbove_range {ι : Type u_2} {α : Type u_3} [ha : LinearOrder α] {f : ια} :
                  BddAbove (Set.range f) ∃ (x : α), ∀ (i : ι), f i x
                  theorem bddBelow_range_neg {ι : Type u_2} {α : Type u_3} [ha₁ : LinearOrder α] [ha₂ : Ring α] [ha₃ : AddLeftMono α] [ha₄ : AddRightMono α] {f : ια} :
                  theorem bddAbove_range_neg {ι : Type u_2} {α : Type u_3} [ha₁ : LinearOrder α] [ha₂ : Ring α] [ha₃ : AddLeftMono α] [ha₄ : AddRightMono α] {f : ια} :
                  noncomputable def fintypeIdx {α : Type u_2} [ha₁ : DecidableEq α] [ha₂ : Fintype α] (x : α) :
                  Equations
                  Instances For
                    @[simp]
                    theorem fintypeIdx_eq_iff {α : Type u_2} [ha₁ : DecidableEq α] [ha₂ : Fintype α] {x y : α} :
                    @[reducible]
                    noncomputable def fintypeToLinearOrder {α : Type u_2} [ha₁ : DecidableEq α] [ha₂ : Fintype α] :
                    Equations
                    Instances For
                      theorem abs_sub_lt_iff' {x y z : } :
                      |x - y| < z y - z < x x < y + z
                      theorem abs_sub_lt_trans {α : Type u_2} [LinearOrder α] [NormedField α] [IsStrictOrderedRing α] {a c e : α} (b : α) (h : |a - b| + |b - c| < e) :
                      |a - c| < e
                      theorem abs_sub_le_trans {α : Type u_2} [LinearOrder α] [NormedField α] [IsStrictOrderedRing α] {a c e : α} (b : α) (h : |a - b| + |b - c| e) :
                      |a - c| e
                      theorem abs_sub_lt_trans_half {α : Type u_2} [LinearOrder α] [NormedField α] [IsStrictOrderedRing α] {a c e : α} (b : α) (h₁ : |a - b| < e / 2) (h₂ : |b - c| < e / 2) :
                      |a - c| < e
                      theorem abs_sub_le_trans_half {α : Type u_2} [LinearOrder α] [NormedField α] [IsStrictOrderedRing α] {a c e : α} (b : α) (h₁ : |a - b| e / 2) (h₂ : |b - c| e / 2) :
                      |a - c| e
                      structure LeCnd {α : Type u_2} (le : ααProp) :
                      • refl (x : α) : le x x
                      • trans (x y z : α) : le x yle y zle x z
                      • antisymm (x y : α) : le x yle y xx = y
                      • total (x y : α) : le x y le y x
                      Instances For
                        theorem exi_leCnd {α : Type u_2} :
                        ∃ (le : ααProp), LeCnd le
                        def leClassical {α : Type u_2} :
                        ααProp
                        Equations
                        Instances For
                          @[reducible]
                          noncomputable def linearOrderClassical {α : Type u_2} :
                          Equations
                          Instances For
                            @[instance_reducible, instance 100]
                            noncomputable instance instLinearOrderOfDecidable_projects {α : Type u_2} [(P : Prop) → Decidable P] :
                            Equations
                            theorem le_congr {α : Type u_2} [ha : LinearOrder α] {a b c d : α} (h₁ : a = c) (h₂ : b = d) :
                            a b c d
                            theorem exists_not_le_of_sInf_not_mem {α : Type u_2} [ha : CompleteLattice α] {s : Set α} {x : α} (h : sInf ss) (hx : x s) :
                            ys, ¬x y
                            theorem exists_not_le_of_sSup_not_mem {α : Type u_2} [ha : CompleteLattice α] {s : Set α} {x : α} (h : sSup ss) (hx : x s) :
                            ys, ¬y x
                            @[simp]
                            theorem sInf_mem_iff {α : Type u_2} [ha : CompleteLattice α] {s : Set α} :
                            sInf s s xs, ys, x y
                            @[simp]
                            theorem sSup_mem_iff {α : Type u_2} [ha : CompleteLattice α] {s : Set α} :
                            sSup s s xs, ys, y x
                            theorem List.eq_of_sortedLE_and_perm {α : Type u_2} {xs ys : List α} [ha : LinearOrder α] (h₁ : xs.SortedLE) (h₂ : ys.SortedLE) (h₃ : xs.Perm ys) :
                            xs = ys