File: Mathlib/Data/List/Lex.lean

full_name: List.Lex.rel
code: /-- Given a strict order `<` on `α`, the lexicographic strict order on `List α`, for which
`[a0, ..., an] < [b0, ..., b_k]` if `a0 < b0` or `a0 = b0` and `[a1, ..., an] < [b1, ..., bk]`.
The definition is given for any relation `r`, not only strict orders. -/
inductive Lex (r : α → α → Prop) : List α → List α → Prop
  | nil {a l} : Lex r [] (a :: l)
  | cons {a l₁ l₂} (h : Lex r l₁ l₂) : Lex r (a :: l₁) (a :: l₂)
  | rel {a₁ l₁ a₂ l₂} (h : r a₁ a₂) : Lex r (a₁ :: l₁) (a₂ :: l₂)
goal: List.Lex r (a₁ :: l₁) (a₂ :: l₂)

full_name: List.Lex.cons
code: /-- Given a strict order `<` on `α`, the lexicographic strict order on `List α`, for which
`[a0, ..., an] < [b0, ..., b_k]` if `a0 < b0` or `a0 = b0` and `[a1, ..., an] < [b1, ..., bk]`.
The definition is given for any relation `r`, not only strict orders. -/
inductive Lex (r : α → α → Prop) : List α → List α → Prop
  | nil {a l} : Lex r [] (a :: l)
  | cons {a l₁ l₂} (h : Lex r l₁ l₂) : Lex r (a :: l₁) (a :: l₂)
  | rel {a₁ l₁ a₂ l₂} (h : r a₁ a₂) : Lex r (a₁ :: l₁) (a₂ :: l₂)
goal: List.Lex r (a :: l₁) (a :: l₂)

full_name: List.Lex.nil
code: /-- Given a strict order `<` on `α`, the lexicographic strict order on `List α`, for which
`[a0, ..., an] < [b0, ..., b_k]` if `a0 < b0` or `a0 = b0` and `[a1, ..., an] < [b1, ..., bk]`.
The definition is given for any relation `r`, not only strict orders. -/
inductive Lex (r : α → α → Prop) : List α → List α → Prop
  | nil {a l} : Lex r [] (a :: l)
  | cons {a l₁ l₂} (h : Lex r l₁ l₂) : Lex r (a :: l₁) (a :: l₂)
  | rel {a₁ l₁ a₂ l₂} (h : r a₁ a₂) : Lex r (a₁ :: l₁) (a₂ :: l₂)
goal: List.Lex r [] (a :: l)

full_name: List.Lex
code: /-- Given a strict order `<` on `α`, the lexicographic strict order on `List α`, for which
`[a0, ..., an] < [b0, ..., b_k]` if `a0 < b0` or `a0 = b0` and `[a1, ..., an] < [b1, ..., bk]`.
The definition is given for any relation `r`, not only strict orders. -/
inductive Lex (r : α → α → Prop) : List α → List α → Prop
  | nil {a l} : Lex r [] (a :: l)
  | cons {a l₁ l₂} (h : Lex r l₁ l₂) : Lex r (a :: l₁) (a :: l₂)
  | rel {a₁ l₁ a₂ l₂} (h : r a₁ a₂) : Lex r (a₁ :: l₁) (a₂ :: l₂)
goal: List α → List α → Prop

full_name: List.Lex.cons_iff
code: theorem cons_iff {r : α → α → Prop} [IsIrrefl α r] {a l₁ l₂} :
    Lex r (a :: l₁) (a :: l₂) ↔ Lex r l₁ l₂ 
goal: List.Lex r (a :: l₁) (a :: l₂) ↔ List.Lex r l₁ l₂

full_name: List.Lex.not_nil_right
code: @[simp]
theorem not_nil_right (r : α → α → Prop) (l : List α) : ¬Lex r l [] 
goal: ¬List.Lex r l []

full_name: List.Lex.nil_left_or_eq_nil
code: theorem nil_left_or_eq_nil {r : α → α → Prop} (l : List α) : List.Lex r [] l ∨ l = [] 
goal: List.Lex r [] l ∨ l = []

full_name: List.Lex.singleton_iff
code: @[simp]
theorem singleton_iff {r : α → α → Prop} (a b : α) : List.Lex r [a] [b] ↔ r a b 
goal: List.Lex r [a] [b] ↔ r a b

full_name: List.Lex.isOrderConnected
code: instance isOrderConnected (r : α → α → Prop) [IsOrderConnected α r] [IsTrichotomous α r] :
    IsOrderConnected (List α) (Lex r) 
goal: IsOrderConnected (List α) (List.Lex r)

full_name: List.Lex.isOrderConnected.aux
code: instance isOrderConnected (r : α → α → Prop) [IsOrderConnected α r] [IsTrichotomous α r] :
    IsOrderConnected (List α) (Lex r) 
goal: ∀ (x x_1 x_2 : List α), List.Lex r x x_2 → List.Lex r x x_1 ∨ List.Lex r x_1 x_2

full_name: List.Lex.isTrichotomous.aux
code: instance isTrichotomous (r : α → α → Prop) [IsTrichotomous α r] :
    IsTrichotomous (List α) (Lex r) 
goal: ∀ (x x_1 : List α), List.Lex r x x_1 ∨ x = x_1 ∨ List.Lex r x_1 x

full_name: List.Lex.isTrichotomous
code: instance isTrichotomous (r : α → α → Prop) [IsTrichotomous α r] :
    IsTrichotomous (List α) (Lex r) 
goal: IsTrichotomous (List α) (List.Lex r)

full_name: List.Lex.isAsymm.aux
code: instance isAsymm (r : α → α → Prop) [IsAsymm α r] : IsAsymm (List α) (Lex r) 
goal: ∀ (x x_1 : List α), List.Lex r x x_1 → List.Lex r x_1 x → False

full_name: List.Lex.isAsymm
code: instance isAsymm (r : α → α → Prop) [IsAsymm α r] : IsAsymm (List α) (Lex r) 
goal: IsAsymm (List α) (List.Lex r)

full_name: List.Lex.isStrictTotalOrder
code: instance isStrictTotalOrder (r : α → α → Prop) [IsStrictTotalOrder α r] :
    IsStrictTotalOrder (List α) (Lex r) 
goal: IsStrictTotalOrder (List α) (List.Lex r)

full_name: List.Lex.decidableRel
code: instance decidableRel [DecidableEq α] (r : α → α → Prop) [DecidableRel r] : DecidableRel (Lex r)
  
goal: DecidableRel (List.Lex r)

full_name: List.Lex.append_right
code: theorem append_right (r : α → α → Prop) : ∀ {s₁ s₂} (t), Lex r s₁ s₂ → Lex r s₁ (s₂ ++ t)
  
goal: List.Lex r s₁ s₂ → List.Lex r s₁ (s₂ ++ t)

full_name: List.Lex.append_left
code: theorem append_left (R : α → α → Prop) {t₁ t₂} (h : Lex R t₁ t₂) : ∀ s, Lex R (s ++ t₁) (s ++ t₂)
  
goal: List.Lex R (s ++ t₁) (s ++ t₂)

full_name: List.Lex.imp
code: theorem imp {r s : α → α → Prop} (H : ∀ a b, r a b → s a b) : ∀ l₁ l₂, Lex r l₁ l₂ → Lex s l₁ l₂
  
goal: List.Lex r l₁ l₂ → List.Lex s l₁ l₂

full_name: List.Lex.to_ne
code: theorem to_ne : ∀ {l₁ l₂ : List α}, Lex (· ≠ ·) l₁ l₂ → l₁ ≠ l₂
  
goal: List.Lex (fun x x_1 => x ≠ x_1) l₁ l₂ → l₁ ≠ l₂

full_name: Decidable.List.Lex.ne_iff
code: theorem _root_.Decidable.List.Lex.ne_iff [DecidableEq α] {l₁ l₂ : List α}
    (H : length l₁ ≤ length l₂) : Lex (· ≠ ·) l₁ l₂ ↔ l₁ ≠ l₂ 
goal: List.Lex (fun x x_1 => x ≠ x_1) l₁ l₂ ↔ l₁ ≠ l₂

full_name: List.Lex.ne_iff
code: theorem ne_iff {l₁ l₂ : List α} (H : length l₁ ≤ length l₂) : Lex (· ≠ ·) l₁ l₂ ↔ l₁ ≠ l₂ 
goal: List.Lex (fun x x_1 => x ≠ x_1) l₁ l₂ ↔ l₁ ≠ l₂

full_name: List.LT'
code: instance LT' [LT α] : LT (List α) 
goal: LT (List α)

full_name: List.nil_lt_cons
code: theorem nil_lt_cons [LT α] (a : α) (l : List α) : [] < a :: l 
goal: [] < a :: l

full_name: List.instLinearOrder
code: instance [LinearOrder α] : LinearOrder (List α) 
goal: LinearOrder (List α)

full_name: List.LE'
code: instance LE' [LinearOrder α] : LE (List α) 
goal: LE (List α)

full_name: List.lt_iff_lex_lt
code: theorem lt_iff_lex_lt [LinearOrder α] (l l' : List α) : lt l l' ↔ Lex (· < ·) l l' 
goal: l.lt l' ↔ List.Lex (fun x x_1 => x < x_1) l l'

full_name: List.nil_le
code: @[simp]
theorem nil_le {α} [LinearOrder α] {l : List α} : [] ≤ l 
goal: [] ≤ l

full_name: List.head_le_of_lt
code: theorem head_le_of_lt [Preorder α] {a a' : α} {l l' : List α} (h : (a' :: l') < (a :: l)) :
    a' ≤ a 
goal: a' ≤ a

full_name: List.head!_le_of_lt
code: theorem head!_le_of_lt [Preorder α] [Inhabited α] (l l' : List α) (h : l' < l) (hl' : l' ≠ []) :
    l'.head! ≤ l.head! 
goal: l'.head! ≤ l.head!

full_name: List.cons_le_cons
code: theorem cons_le_cons [LinearOrder α] (a : α) {l l' : List α} (h : l' ≤ l) :
    a :: l' ≤ a :: l 
goal: a :: l' ≤ a :: l