Documentation

Mathlib.Order.Interval.Finset.Basic

Intervals as finsets #

This file provides basic results about all the Finset.Ixx, which are defined in Order.Interval.Finset.Defs.

In addition, it shows that in a locally finite order and < are the transitive closures of, respectively, ⩿ and , which then leads to a characterization of monotone and strictly functions whose domain is a locally finite order. In particular, this file proves:

TODO #

This file was originally only about Finset.Ico a b where a b : ℕ. No care has yet been taken to generalize these lemmas properly and many lemmas about Icc, Ioc, Ioo are missing. In general, what's to do is taking the lemmas in Data.X.Intervals and abstract away the concrete structure.

Complete the API. See https://github.com/leanprover-community/mathlib/pull/14448#discussion_r906109235 for some ideas.

@[simp]
theorem Finset.nonempty_Icc {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
(Finset.Icc a b).Nonempty a b
theorem Finset.Aesop.nonempty_Icc_of_le {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
a b(Finset.Icc a b).Nonempty

Alias of the reverse direction of Finset.nonempty_Icc.

@[simp]
theorem Finset.nonempty_Ico {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
(Finset.Ico a b).Nonempty a < b
theorem Finset.Aesop.nonempty_Ico_of_lt {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
a < b(Finset.Ico a b).Nonempty

Alias of the reverse direction of Finset.nonempty_Ico.

@[simp]
theorem Finset.nonempty_Ioc {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
(Finset.Ioc a b).Nonempty a < b
theorem Finset.Aesop.nonempty_Ioc_of_lt {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
a < b(Finset.Ioc a b).Nonempty

Alias of the reverse direction of Finset.nonempty_Ioc.

@[simp]
theorem Finset.nonempty_Ioo {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] [DenselyOrdered α] :
(Finset.Ioo a b).Nonempty a < b
@[simp]
theorem Finset.Icc_eq_empty_iff {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
@[simp]
theorem Finset.Ico_eq_empty_iff {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
@[simp]
theorem Finset.Ioc_eq_empty_iff {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
@[simp]
theorem Finset.Ioo_eq_empty_iff {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] [DenselyOrdered α] :
theorem Finset.Icc_eq_empty {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
¬a bFinset.Icc a b =

Alias of the reverse direction of Finset.Icc_eq_empty_iff.

theorem Finset.Ico_eq_empty {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
¬a < bFinset.Ico a b =

Alias of the reverse direction of Finset.Ico_eq_empty_iff.

theorem Finset.Ioc_eq_empty {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
¬a < bFinset.Ioc a b =

Alias of the reverse direction of Finset.Ioc_eq_empty_iff.

@[simp]
theorem Finset.Ioo_eq_empty {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] (h : ¬a < b) :
@[simp]
theorem Finset.Icc_eq_empty_of_lt {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] (h : b < a) :
@[simp]
theorem Finset.Ico_eq_empty_of_le {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] (h : b a) :
@[simp]
theorem Finset.Ioc_eq_empty_of_le {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] (h : b a) :
@[simp]
theorem Finset.Ioo_eq_empty_of_le {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] (h : b a) :
theorem Finset.left_mem_Icc {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
a Finset.Icc a b a b
theorem Finset.left_mem_Ico {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
a Finset.Ico a b a < b
theorem Finset.right_mem_Icc {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
b Finset.Icc a b a b
theorem Finset.right_mem_Ioc {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
b Finset.Ioc a b a < b
theorem Finset.left_not_mem_Ioc {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
aFinset.Ioc a b
theorem Finset.left_not_mem_Ioo {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
aFinset.Ioo a b
theorem Finset.right_not_mem_Ico {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
bFinset.Ico a b
theorem Finset.right_not_mem_Ioo {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] :
bFinset.Ioo a b
theorem Finset.Icc_subset_Icc {α : Type u_2} {a₁ a₂ b₁ b₂ : α} [Preorder α] [LocallyFiniteOrder α] (ha : a₂ a₁) (hb : b₁ b₂) :
Finset.Icc a₁ b₁ Finset.Icc a₂ b₂
theorem Finset.Ico_subset_Ico {α : Type u_2} {a₁ a₂ b₁ b₂ : α} [Preorder α] [LocallyFiniteOrder α] (ha : a₂ a₁) (hb : b₁ b₂) :
Finset.Ico a₁ b₁ Finset.Ico a₂ b₂
theorem Finset.Ioc_subset_Ioc {α : Type u_2} {a₁ a₂ b₁ b₂ : α} [Preorder α] [LocallyFiniteOrder α] (ha : a₂ a₁) (hb : b₁ b₂) :
Finset.Ioc a₁ b₁ Finset.Ioc a₂ b₂
theorem Finset.Ioo_subset_Ioo {α : Type u_2} {a₁ a₂ b₁ b₂ : α} [Preorder α] [LocallyFiniteOrder α] (ha : a₂ a₁) (hb : b₁ b₂) :
Finset.Ioo a₁ b₁ Finset.Ioo a₂ b₂
theorem Finset.Icc_subset_Icc_left {α : Type u_2} {a₁ a₂ b : α} [Preorder α] [LocallyFiniteOrder α] (h : a₁ a₂) :
Finset.Icc a₂ b Finset.Icc a₁ b
theorem Finset.Ico_subset_Ico_left {α : Type u_2} {a₁ a₂ b : α} [Preorder α] [LocallyFiniteOrder α] (h : a₁ a₂) :
Finset.Ico a₂ b Finset.Ico a₁ b
theorem Finset.Ioc_subset_Ioc_left {α : Type u_2} {a₁ a₂ b : α} [Preorder α] [LocallyFiniteOrder α] (h : a₁ a₂) :
Finset.Ioc a₂ b Finset.Ioc a₁ b
theorem Finset.Ioo_subset_Ioo_left {α : Type u_2} {a₁ a₂ b : α} [Preorder α] [LocallyFiniteOrder α] (h : a₁ a₂) :
Finset.Ioo a₂ b Finset.Ioo a₁ b
theorem Finset.Icc_subset_Icc_right {α : Type u_2} {a b₁ b₂ : α} [Preorder α] [LocallyFiniteOrder α] (h : b₁ b₂) :
Finset.Icc a b₁ Finset.Icc a b₂
theorem Finset.Ico_subset_Ico_right {α : Type u_2} {a b₁ b₂ : α} [Preorder α] [LocallyFiniteOrder α] (h : b₁ b₂) :
Finset.Ico a b₁ Finset.Ico a b₂
theorem Finset.Ioc_subset_Ioc_right {α : Type u_2} {a b₁ b₂ : α} [Preorder α] [LocallyFiniteOrder α] (h : b₁ b₂) :
Finset.Ioc a b₁ Finset.Ioc a b₂
theorem Finset.Ioo_subset_Ioo_right {α : Type u_2} {a b₁ b₂ : α} [Preorder α] [LocallyFiniteOrder α] (h : b₁ b₂) :
Finset.Ioo a b₁ Finset.Ioo a b₂
theorem Finset.Ico_subset_Ioo_left {α : Type u_2} {a₁ a₂ b : α} [Preorder α] [LocallyFiniteOrder α] (h : a₁ < a₂) :
Finset.Ico a₂ b Finset.Ioo a₁ b
theorem Finset.Ioc_subset_Ioo_right {α : Type u_2} {a b₁ b₂ : α} [Preorder α] [LocallyFiniteOrder α] (h : b₁ < b₂) :
Finset.Ioc a b₁ Finset.Ioo a b₂
theorem Finset.Icc_subset_Ico_right {α : Type u_2} {a b₁ b₂ : α} [Preorder α] [LocallyFiniteOrder α] (h : b₁ < b₂) :
Finset.Icc a b₁ Finset.Ico a b₂
theorem Finset.Icc_subset_Icc_iff {α : Type u_2} {a₁ a₂ b₁ b₂ : α} [Preorder α] [LocallyFiniteOrder α] (h₁ : a₁ b₁) :
Finset.Icc a₁ b₁ Finset.Icc a₂ b₂ a₂ a₁ b₁ b₂
theorem Finset.Icc_subset_Ioo_iff {α : Type u_2} {a₁ a₂ b₁ b₂ : α} [Preorder α] [LocallyFiniteOrder α] (h₁ : a₁ b₁) :
Finset.Icc a₁ b₁ Finset.Ioo a₂ b₂ a₂ < a₁ b₁ < b₂
theorem Finset.Icc_subset_Ico_iff {α : Type u_2} {a₁ a₂ b₁ b₂ : α} [Preorder α] [LocallyFiniteOrder α] (h₁ : a₁ b₁) :
Finset.Icc a₁ b₁ Finset.Ico a₂ b₂ a₂ a₁ b₁ < b₂
theorem Finset.Icc_subset_Ioc_iff {α : Type u_2} {a₁ a₂ b₁ b₂ : α} [Preorder α] [LocallyFiniteOrder α] (h₁ : a₁ b₁) :
Finset.Icc a₁ b₁ Finset.Ioc a₂ b₂ a₂ < a₁ b₁ b₂
theorem Finset.Icc_ssubset_Icc_left {α : Type u_2} {a₁ a₂ b₁ b₂ : α} [Preorder α] [LocallyFiniteOrder α] (hI : a₂ b₂) (ha : a₂ < a₁) (hb : b₁ b₂) :
Finset.Icc a₁ b₁ Finset.Icc a₂ b₂
theorem Finset.Icc_ssubset_Icc_right {α : Type u_2} {a₁ a₂ b₁ b₂ : α} [Preorder α] [LocallyFiniteOrder α] (hI : a₂ b₂) (ha : a₂ a₁) (hb : b₁ < b₂) :
Finset.Icc a₁ b₁ Finset.Icc a₂ b₂
theorem Finset.Ico_self {α : Type u_2} (a : α) [Preorder α] [LocallyFiniteOrder α] :
theorem Finset.Ioc_self {α : Type u_2} (a : α) [Preorder α] [LocallyFiniteOrder α] :
theorem Finset.Ioo_self {α : Type u_2} (a : α) [Preorder α] [LocallyFiniteOrder α] :
def Set.fintypeOfMemBounds {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrder α] {s : Set α} [DecidablePred fun (x : α) => x s] (ha : a lowerBounds s) (hb : b upperBounds s) :
Fintype s

A set with upper and lower bounds in a locally finite order is a fintype

Equations
Instances For
    theorem Finset.Ico_filter_lt_of_le_left {α : Type u_2} {a b c : α} [Preorder α] [LocallyFiniteOrder α] [DecidablePred fun (x : α) => x < c] (hca : c a) :
    Finset.filter (fun (x : α) => x < c) (Finset.Ico a b) =
    theorem Finset.Ico_filter_lt_of_right_le {α : Type u_2} {a b c : α} [Preorder α] [LocallyFiniteOrder α] [DecidablePred fun (x : α) => x < c] (hbc : b c) :
    Finset.filter (fun (x : α) => x < c) (Finset.Ico a b) = Finset.Ico a b
    theorem Finset.Ico_filter_lt_of_le_right {α : Type u_2} {a b c : α} [Preorder α] [LocallyFiniteOrder α] [DecidablePred fun (x : α) => x < c] (hcb : c b) :
    Finset.filter (fun (x : α) => x < c) (Finset.Ico a b) = Finset.Ico a c
    theorem Finset.Ico_filter_le_of_le_left {α : Type u_2} [Preorder α] [LocallyFiniteOrder α] {a b c : α} [DecidablePred fun (x : α) => c x] (hca : c a) :
    Finset.filter (fun (x : α) => c x) (Finset.Ico a b) = Finset.Ico a b
    theorem Finset.Ico_filter_le_of_right_le {α : Type u_2} [Preorder α] [LocallyFiniteOrder α] {a b : α} [DecidablePred fun (x : α) => b x] :
    Finset.filter (fun (x : α) => b x) (Finset.Ico a b) =
    theorem Finset.Ico_filter_le_of_left_le {α : Type u_2} [Preorder α] [LocallyFiniteOrder α] {a b c : α} [DecidablePred fun (x : α) => c x] (hac : a c) :
    Finset.filter (fun (x : α) => c x) (Finset.Ico a b) = Finset.Ico c b
    theorem Finset.Icc_filter_lt_of_lt_right {α : Type u_2} [Preorder α] [LocallyFiniteOrder α] {a b c : α} [DecidablePred fun (x : α) => x < c] (h : b < c) :
    Finset.filter (fun (x : α) => x < c) (Finset.Icc a b) = Finset.Icc a b
    theorem Finset.Ioc_filter_lt_of_lt_right {α : Type u_2} [Preorder α] [LocallyFiniteOrder α] {a b c : α} [DecidablePred fun (x : α) => x < c] (h : b < c) :
    Finset.filter (fun (x : α) => x < c) (Finset.Ioc a b) = Finset.Ioc a b
    theorem Finset.Iic_filter_lt_of_lt_right {α : Type u_3} [Preorder α] [LocallyFiniteOrderBot α] {a c : α} [DecidablePred fun (x : α) => x < c] (h : a < c) :
    Finset.filter (fun (x : α) => x < c) (Finset.Iic a) = Finset.Iic a
    theorem Finset.filter_lt_lt_eq_Ioo {α : Type u_2} (a b : α) [Preorder α] [LocallyFiniteOrder α] [Fintype α] [DecidablePred fun (j : α) => a < j j < b] :
    Finset.filter (fun (j : α) => a < j j < b) Finset.univ = Finset.Ioo a b
    theorem Finset.filter_lt_le_eq_Ioc {α : Type u_2} (a b : α) [Preorder α] [LocallyFiniteOrder α] [Fintype α] [DecidablePred fun (j : α) => a < j j b] :
    Finset.filter (fun (j : α) => a < j j b) Finset.univ = Finset.Ioc a b
    theorem Finset.filter_le_lt_eq_Ico {α : Type u_2} (a b : α) [Preorder α] [LocallyFiniteOrder α] [Fintype α] [DecidablePred fun (j : α) => a j j < b] :
    Finset.filter (fun (j : α) => a j j < b) Finset.univ = Finset.Ico a b
    theorem Finset.filter_le_le_eq_Icc {α : Type u_2} (a b : α) [Preorder α] [LocallyFiniteOrder α] [Fintype α] [DecidablePred fun (j : α) => a j j b] :
    Finset.filter (fun (j : α) => a j j b) Finset.univ = Finset.Icc a b
    @[simp]
    theorem Finset.nonempty_Ici {α : Type u_2} {a : α} [Preorder α] [LocallyFiniteOrderTop α] :
    (Finset.Ici a).Nonempty
    @[simp]
    theorem Finset.nonempty_Ioi {α : Type u_2} {a : α} [Preorder α] [LocallyFiniteOrderTop α] :
    (Finset.Ioi a).Nonempty ¬IsMax a
    theorem Finset.Aesop.nonempty_Ioi_of_not_isMax {α : Type u_2} {a : α} [Preorder α] [LocallyFiniteOrderTop α] :
    ¬IsMax a(Finset.Ioi a).Nonempty

    Alias of the reverse direction of Finset.nonempty_Ioi.

    theorem Finset.Ioi_subset_Ioi {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrderTop α] (h : a b) :
    @[simp]
    theorem Finset.nonempty_Iic {α : Type u_2} {a : α} [Preorder α] [LocallyFiniteOrderBot α] :
    (Finset.Iic a).Nonempty
    @[simp]
    theorem Finset.nonempty_Iio {α : Type u_2} {a : α} [Preorder α] [LocallyFiniteOrderBot α] :
    (Finset.Iio a).Nonempty ¬IsMin a
    theorem Finset.Aesop.nonempty_Iio_of_not_isMin {α : Type u_2} {a : α} [Preorder α] [LocallyFiniteOrderBot α] :
    ¬IsMin a(Finset.Iio a).Nonempty

    Alias of the reverse direction of Finset.nonempty_Iio.

    theorem Finset.Iio_subset_Iio {α : Type u_2} {a b : α} [Preorder α] [LocallyFiniteOrderBot α] (h : a b) :
    theorem BddBelow.finite {α : Type u_2} [Preorder α] [LocallyFiniteOrderTop α] {s : Set α} (hs : BddBelow s) :
    s.Finite
    theorem Set.Infinite.not_bddBelow {α : Type u_2} [Preorder α] [LocallyFiniteOrderTop α] {s : Set α} :
    s.Infinite¬BddBelow s
    theorem Finset.filter_lt_eq_Ioi {α : Type u_2} [Preorder α] [LocallyFiniteOrderTop α] {a : α} [Fintype α] [DecidablePred fun (x : α) => a < x] :
    Finset.filter (fun (x : α) => a < x) Finset.univ = Finset.Ioi a
    theorem Finset.filter_le_eq_Ici {α : Type u_2} [Preorder α] [LocallyFiniteOrderTop α] {a : α} [Fintype α] [DecidablePred fun (x : α) => a x] :
    Finset.filter (fun (x : α) => a x) Finset.univ = Finset.Ici a
    theorem BddAbove.finite {α : Type u_2} [Preorder α] [LocallyFiniteOrderBot α] {s : Set α} (hs : BddAbove s) :
    s.Finite
    theorem Set.Infinite.not_bddAbove {α : Type u_2} [Preorder α] [LocallyFiniteOrderBot α] {s : Set α} :
    s.Infinite¬BddAbove s
    theorem Finset.filter_gt_eq_Iio {α : Type u_2} [Preorder α] [LocallyFiniteOrderBot α] {a : α} [Fintype α] [DecidablePred fun (x : α) => x < a] :
    Finset.filter (fun (x : α) => x < a) Finset.univ = Finset.Iio a
    theorem Finset.filter_ge_eq_Iic {α : Type u_2} [Preorder α] [LocallyFiniteOrderBot α] {a : α} [Fintype α] [DecidablePred fun (x : α) => x a] :
    Finset.filter (fun (x : α) => x a) Finset.univ = Finset.Iic a
    @[simp]
    theorem Finset.Icc_self {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] (a : α) :
    Finset.Icc a a = {a}
    @[simp]
    theorem Finset.Icc_eq_singleton_iff {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] {a b c : α} :
    Finset.Icc a b = {c} a = c b = c
    @[simp]
    theorem Finset.Icc_erase_left {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] [DecidableEq α] (a b : α) :
    (Finset.Icc a b).erase a = Finset.Ioc a b
    @[simp]
    theorem Finset.Icc_erase_right {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] [DecidableEq α] (a b : α) :
    (Finset.Icc a b).erase b = Finset.Ico a b
    @[simp]
    theorem Finset.Ico_erase_left {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] [DecidableEq α] (a b : α) :
    (Finset.Ico a b).erase a = Finset.Ioo a b
    @[simp]
    theorem Finset.Ioc_erase_right {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] [DecidableEq α] (a b : α) :
    (Finset.Ioc a b).erase b = Finset.Ioo a b
    @[simp]
    theorem Finset.Icc_diff_both {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] [DecidableEq α] (a b : α) :
    Finset.Icc a b \ {a, b} = Finset.Ioo a b
    @[simp]
    theorem Finset.Ico_insert_right {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] {a b : α} [DecidableEq α] (h : a b) :
    @[simp]
    theorem Finset.Ioc_insert_left {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] {a b : α} [DecidableEq α] (h : a b) :
    @[simp]
    theorem Finset.Ioo_insert_left {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] {a b : α} [DecidableEq α] (h : a < b) :
    @[simp]
    theorem Finset.Ioo_insert_right {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] {a b : α} [DecidableEq α] (h : a < b) :
    @[simp]
    theorem Finset.Icc_diff_Ico_self {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] {a b : α} [DecidableEq α] (h : a b) :
    Finset.Icc a b \ Finset.Ico a b = {b}
    @[simp]
    theorem Finset.Icc_diff_Ioc_self {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] {a b : α} [DecidableEq α] (h : a b) :
    Finset.Icc a b \ Finset.Ioc a b = {a}
    @[simp]
    theorem Finset.Icc_diff_Ioo_self {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] {a b : α} [DecidableEq α] (h : a b) :
    Finset.Icc a b \ Finset.Ioo a b = {a, b}
    @[simp]
    theorem Finset.Ico_diff_Ioo_self {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] {a b : α} [DecidableEq α] (h : a < b) :
    Finset.Ico a b \ Finset.Ioo a b = {a}
    @[simp]
    theorem Finset.Ioc_diff_Ioo_self {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] {a b : α} [DecidableEq α] (h : a < b) :
    Finset.Ioc a b \ Finset.Ioo a b = {b}
    theorem Finset.Icc_eq_cons_Ico {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] {a b : α} (h : a b) :

    Finset.cons version of Finset.Ico_insert_right.

    theorem Finset.Icc_eq_cons_Ioc {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] {a b : α} (h : a b) :

    Finset.cons version of Finset.Ioc_insert_left.

    theorem Finset.Ioc_eq_cons_Ioo {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] {a b : α} (h : a < b) :

    Finset.cons version of Finset.Ioo_insert_right.

    theorem Finset.Ico_eq_cons_Ioo {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] {a b : α} (h : a < b) :

    Finset.cons version of Finset.Ioo_insert_left.

    theorem Finset.Ico_filter_le_left {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] {a b : α} [DecidablePred fun (x : α) => x a] (hab : a < b) :
    Finset.filter (fun (x : α) => x a) (Finset.Ico a b) = {a}
    theorem Finset.card_Ico_eq_card_Icc_sub_one {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] (a b : α) :
    (Finset.Ico a b).card = (Finset.Icc a b).card - 1
    theorem Finset.card_Ioc_eq_card_Icc_sub_one {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] (a b : α) :
    (Finset.Ioc a b).card = (Finset.Icc a b).card - 1
    theorem Finset.card_Ioo_eq_card_Ico_sub_one {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] (a b : α) :
    (Finset.Ioo a b).card = (Finset.Ico a b).card - 1
    theorem Finset.card_Ioo_eq_card_Ioc_sub_one {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] (a b : α) :
    (Finset.Ioo a b).card = (Finset.Ioc a b).card - 1
    theorem Finset.card_Ioo_eq_card_Icc_sub_two {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] (a b : α) :
    (Finset.Ioo a b).card = (Finset.Icc a b).card - 2
    @[simp]
    theorem Finset.Ici_erase {α : Type u_2} [PartialOrder α] [LocallyFiniteOrderTop α] [DecidableEq α] (a : α) :
    (Finset.Ici a).erase a = Finset.Ioi a
    @[simp]
    theorem Finset.not_mem_Ioi_self {α : Type u_2} [PartialOrder α] [LocallyFiniteOrderTop α] {b : α} :
    bFinset.Ioi b
    @[simp]
    theorem Finset.Iic_erase {α : Type u_2} [PartialOrder α] [LocallyFiniteOrderBot α] [DecidableEq α] (b : α) :
    (Finset.Iic b).erase b = Finset.Iio b
    @[simp]
    theorem Finset.not_mem_Iio_self {α : Type u_2} [PartialOrder α] [LocallyFiniteOrderBot α] {b : α} :
    bFinset.Iio b
    theorem Finset.sup'_Iic {α : Type u_2} [SemilatticeSup α] [LocallyFiniteOrderBot α] (a : α) :
    (Finset.Iic a).sup' id = a
    @[simp]
    theorem Finset.sup_Iic {α : Type u_2} [SemilatticeSup α] [LocallyFiniteOrderBot α] [OrderBot α] (a : α) :
    (Finset.Iic a).sup id = a
    theorem Finset.inf'_Ici {α : Type u_2} [SemilatticeInf α] [LocallyFiniteOrderTop α] (a : α) :
    (Finset.Ici a).inf' id = a
    @[simp]
    theorem Finset.inf_Ici {α : Type u_2} [SemilatticeInf α] [LocallyFiniteOrderTop α] [OrderTop α] (a : α) :
    (Finset.Ici a).inf id = a
    theorem Finset.Ico_subset_Ico_iff {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] {a₁ b₁ a₂ b₂ : α} (h : a₁ < b₁) :
    Finset.Ico a₁ b₁ Finset.Ico a₂ b₂ a₂ a₁ b₁ b₂
    theorem Finset.Ico_union_Ico_eq_Ico {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] {a b c : α} (hab : a b) (hbc : b c) :
    @[simp]
    theorem Finset.Ioc_union_Ioc_eq_Ioc {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] {a b c : α} (h₁ : a b) (h₂ : b c) :
    theorem Finset.Ico_union_Ico' {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] {a b c d : α} (hcb : c b) (had : a d) :
    theorem Finset.Ico_union_Ico {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] {a b c d : α} (h₁ : a b c d) (h₂ : c d a b) :
    theorem Finset.Ico_inter_Ico {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] {a b c d : α} :
    @[simp]
    theorem Finset.Ico_filter_lt {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] (a b c : α) :
    Finset.filter (fun (x : α) => x < c) (Finset.Ico a b) = Finset.Ico a (b c)
    @[simp]
    theorem Finset.Ico_filter_le {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] (a b c : α) :
    Finset.filter (fun (x : α) => c x) (Finset.Ico a b) = Finset.Ico (a c) b
    @[simp]
    theorem Finset.Ioo_filter_lt {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] (a b c : α) :
    Finset.filter (fun (x : α) => x < c) (Finset.Ioo a b) = Finset.Ioo a (b c)
    @[simp]
    theorem Finset.Iio_filter_lt {α : Type u_3} [LinearOrder α] [LocallyFiniteOrderBot α] (a b : α) :
    Finset.filter (fun (x : α) => x < b) (Finset.Iio a) = Finset.Iio (a b)
    @[simp]
    theorem Finset.Ico_diff_Ico_left {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] (a b c : α) :
    @[simp]
    theorem Finset.Ico_diff_Ico_right {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] (a b c : α) :
    theorem Set.Infinite.exists_gt {α : Type u_2} [LinearOrder α] [LocallyFiniteOrderBot α] {s : Set α} (hs : s.Infinite) (a : α) :
    bs, a < b
    theorem Set.infinite_iff_exists_gt {α : Type u_2} [LinearOrder α] [LocallyFiniteOrderBot α] {s : Set α} [Nonempty α] :
    s.Infinite ∀ (a : α), bs, a < b
    theorem Set.Infinite.exists_lt {α : Type u_2} [LinearOrder α] [LocallyFiniteOrderTop α] {s : Set α} (hs : s.Infinite) (a : α) :
    bs, b < a
    theorem Set.infinite_iff_exists_lt {α : Type u_2} [LinearOrder α] [LocallyFiniteOrderTop α] {s : Set α} [Nonempty α] :
    s.Infinite ∀ (a : α), bs, b < a
    theorem Finset.Ioi_disjUnion_Iio {α : Type u_2} [LinearOrder α] [Fintype α] [LocallyFiniteOrderTop α] [LocallyFiniteOrderBot α] (a : α) :
    (Finset.Ioi a).disjUnion (Finset.Iio a) = {a}
    theorem Finset.uIcc_toDual {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] (a b : α) :
    Finset.uIcc (OrderDual.toDual a) (OrderDual.toDual b) = Finset.map OrderDual.toDual.toEmbedding (Finset.uIcc a b)
    @[simp]
    theorem Finset.uIcc_of_le {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] {a b : α} (h : a b) :
    @[simp]
    theorem Finset.uIcc_of_ge {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] {a b : α} (h : b a) :
    theorem Finset.uIcc_comm {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] (a b : α) :
    theorem Finset.uIcc_self {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] {a : α} :
    Finset.uIcc a a = {a}
    @[simp]
    theorem Finset.nonempty_uIcc {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] {a b : α} :
    (Finset.uIcc a b).Nonempty
    theorem Finset.Icc_subset_uIcc {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] {a b : α} :
    theorem Finset.Icc_subset_uIcc' {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] {a b : α} :
    theorem Finset.left_mem_uIcc {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] {a b : α} :
    theorem Finset.right_mem_uIcc {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] {a b : α} :
    theorem Finset.mem_uIcc_of_le {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] {a b x : α} (ha : a x) (hb : x b) :
    theorem Finset.mem_uIcc_of_ge {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] {a b x : α} (hb : b x) (ha : x a) :
    theorem Finset.uIcc_subset_uIcc {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] {a₁ a₂ b₁ b₂ : α} (h₁ : a₁ Finset.uIcc a₂ b₂) (h₂ : b₁ Finset.uIcc a₂ b₂) :
    Finset.uIcc a₁ b₁ Finset.uIcc a₂ b₂
    theorem Finset.uIcc_subset_Icc {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] {a₁ a₂ b₁ b₂ : α} (ha : a₁ Finset.Icc a₂ b₂) (hb : b₁ Finset.Icc a₂ b₂) :
    Finset.uIcc a₁ b₁ Finset.Icc a₂ b₂
    theorem Finset.uIcc_subset_uIcc_iff_mem {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] {a₁ a₂ b₁ b₂ : α} :
    Finset.uIcc a₁ b₁ Finset.uIcc a₂ b₂ a₁ Finset.uIcc a₂ b₂ b₁ Finset.uIcc a₂ b₂
    theorem Finset.uIcc_subset_uIcc_iff_le' {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] {a₁ a₂ b₁ b₂ : α} :
    Finset.uIcc a₁ b₁ Finset.uIcc a₂ b₂ a₂ b₂ a₁ b₁ a₁ b₁ a₂ b₂
    theorem Finset.uIcc_subset_uIcc_right {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] {a b x : α} (h : x Finset.uIcc a b) :
    theorem Finset.uIcc_subset_uIcc_left {α : Type u_2} [Lattice α] [LocallyFiniteOrder α] {a b x : α} (h : x Finset.uIcc a b) :
    theorem Finset.eq_of_mem_uIcc_of_mem_uIcc {α : Type u_2} [DistribLattice α] [LocallyFiniteOrder α] {a b c : α} :
    a Finset.uIcc b cb Finset.uIcc a ca = b
    theorem Finset.eq_of_mem_uIcc_of_mem_uIcc' {α : Type u_2} [DistribLattice α] [LocallyFiniteOrder α] {a b c : α} :
    b Finset.uIcc a cc Finset.uIcc a bb = c
    theorem Finset.Icc_min_max {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] {a b : α} :
    Finset.Icc (a b) (a b) = Finset.uIcc a b
    theorem Finset.uIcc_of_not_le {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] {a b : α} (h : ¬a b) :
    theorem Finset.uIcc_of_not_ge {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] {a b : α} (h : ¬b a) :
    theorem Finset.mem_uIcc' {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] {a b c : α} :
    a Finset.uIcc b c b a a c c a a b
    theorem Finset.not_mem_uIcc_of_lt {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] {a b c : α} :
    c < ac < bcFinset.uIcc a b
    theorem Finset.not_mem_uIcc_of_gt {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] {a b c : α} :
    a < cb < ccFinset.uIcc a b
    theorem Finset.uIcc_subset_uIcc_iff_le {α : Type u_2} [LinearOrder α] [LocallyFiniteOrder α] {a₁ a₂ b₁ b₂ : α} :
    Finset.uIcc a₁ b₁ Finset.uIcc a₂ b₂ a₂ b₂ a₁ b₁ a₁ b₁ a₂ b₂

    A sort of triangle inequality.

    ⩿, and monotonicity #

    @[irreducible]
    theorem transGen_wcovBy_of_le {α : Type u_2} [Preorder α] [LocallyFiniteOrder α] {x y : α} (hxy : x y) :
    Relation.TransGen (fun (x1 x2 : α) => x1 ⩿ x2) x y
    theorem le_iff_transGen_wcovBy {α : Type u_2} [Preorder α] [LocallyFiniteOrder α] {x y : α} :
    x y Relation.TransGen (fun (x1 x2 : α) => x1 ⩿ x2) x y

    In a locally finite preorder, is the transitive closure of ⩿.

    theorem le_iff_reflTransGen_covBy {α : Type u_2} [PartialOrder α] [LocallyFiniteOrder α] {x y : α} :
    x y Relation.ReflTransGen (fun (x1 x2 : α) => x1 x2) x y

    In a locally finite partial order, is the reflexive transitive closure of .

    @[irreducible]
    theorem transGen_covBy_of_lt {α : Type u_2} [Preorder α] [LocallyFiniteOrder α] {x y : α} (hxy : x < y) :
    Relation.TransGen (fun (x1 x2 : α) => x1 x2) x y
    theorem lt_iff_transGen_covBy {α : Type u_2} [Preorder α] [LocallyFiniteOrder α] {x y : α} :
    x < y Relation.TransGen (fun (x1 x2 : α) => x1 x2) x y

    In a locally finite preorder, < is the transitive closure of .

    theorem monotone_iff_forall_wcovBy {α : Type u_2} {β : Type u_3} [Preorder α] [LocallyFiniteOrder α] [Preorder β] (f : αβ) :
    Monotone f ∀ (a b : α), a ⩿ bf a f b

    A function from a locally finite preorder is monotone if and only if it is monotone when restricted to pairs satisfying a ⩿ b.

    theorem monotone_iff_forall_covBy {α : Type u_2} {β : Type u_3} [PartialOrder α] [LocallyFiniteOrder α] [Preorder β] (f : αβ) :
    Monotone f ∀ (a b : α), a bf a f b

    A function from a locally finite partial order is monotone if and only if it is monotone when restricted to pairs satisfying a ⋖ b.

    theorem strictMono_iff_forall_covBy {α : Type u_2} {β : Type u_3} [Preorder α] [LocallyFiniteOrder α] [Preorder β] (f : αβ) :
    StrictMono f ∀ (a b : α), a bf a < f b

    A function from a locally finite preorder is strictly monotone if and only if it is strictly monotone when restricted to pairs satisfying a ⋖ b.

    theorem antitone_iff_forall_wcovBy {α : Type u_2} {β : Type u_3} [Preorder α] [LocallyFiniteOrder α] [Preorder β] (f : αβ) :
    Antitone f ∀ (a b : α), a ⩿ bf b f a

    A function from a locally finite preorder is antitone if and only if it is antitone when restricted to pairs satisfying a ⩿ b.

    theorem antitone_iff_forall_covBy {α : Type u_2} {β : Type u_3} [PartialOrder α] [LocallyFiniteOrder α] [Preorder β] (f : αβ) :
    Antitone f ∀ (a b : α), a bf b f a

    A function from a locally finite partial order is antitone if and only if it is antitone when restricted to pairs satisfying a ⋖ b.

    theorem strictAnti_iff_forall_covBy {α : Type u_2} {β : Type u_3} [Preorder α] [LocallyFiniteOrder α] [Preorder β] (f : αβ) :
    StrictAnti f ∀ (a b : α), a bf b < f a

    A function from a locally finite preorder is strictly antitone if and only if it is strictly antitone when restricted to pairs satisfying a ⋖ b.