Documentation

Mathlib.Order.Interval.Finset.Defs

Locally finite orders #

This file defines locally finite orders.

A locally finite order is an order for which all bounded intervals are finite. This allows to make sense of Icc/Ico/Ioc/Ioo as lists, multisets, or finsets. Further, if the order is bounded above (resp. below), then we can also make sense of the "unbounded" intervals Ici/Ioi (resp. Iic/Iio).

Many theorems about these intervals can be found in Mathlib.Order.Interval.Finset.Basic.

Examples #

Naturally occurring locally finite orders are , , ℕ+, Fin n, α × β the product of two locally finite orders, α →₀ β the finitely supported functions to a locally finite order β...

Main declarations #

In a LocallyFiniteOrder,

In a LocallyFiniteOrderTop,

In a LocallyFiniteOrderBot,

Instances #

A LocallyFiniteOrder instance can be built

Instances for concrete types are proved in their respective files:

TODO #

Provide the LocallyFiniteOrder instance for α ×ₗ β where LocallyFiniteOrder α and Fintype β.

Provide the LocallyFiniteOrder instance for α →₀ β where β is locally finite. Provide the LocallyFiniteOrder instance for Π₀ i, β i where all the β i are locally finite.

From LinearOrder α, NoMaxOrder α, LocallyFiniteOrder α, we can also define an order isomorphism α ≃ ℕ or α ≃ ℤ, depending on whether we have OrderBot α or NoMinOrder α and Nonempty α. When OrderBot α, we can match a : α to #(Iio a).

We can provide SuccOrder α from LinearOrder α and LocallyFiniteOrder α using

lemma exists_min_greater [LinearOrder α] [LocallyFiniteOrder α] {x ub : α} (hx : x < ub) :
    ∃ lub, x < lub ∧ ∀ y, x < y → lub ≤ y := by
  -- very non golfed
  have h : (Finset.Ioc x ub).Nonempty := ⟨ub, Finset.mem_Ioc.2 ⟨hx, le_rfl⟩⟩
  use Finset.min' (Finset.Ioc x ub) h
  constructor
  · exact (Finset.mem_Ioc.mp <| Finset.min'_mem _ h).1
  rintro y hxy
  obtain hy | hy := le_total y ub
  · refine Finset.min'_le (Ioc x ub) y ?_
    simp [*] at *
  · exact (Finset.min'_le _ _ (Finset.mem_Ioc.2 ⟨hx, le_rfl⟩)).trans hy

Note that the converse is not true. Consider {-2^z | z : ℤ} ∪ {2^z | z : ℤ}. Any element has a successor (and actually a predecessor as well), so it is a SuccOrder, but it's not locally finite as Icc (-1) 1 is infinite.

class LocallyFiniteOrder (α : Type u_1) [Preorder α] :
Type u_1

This is a mixin class describing a locally finite order, that is, is an order where bounded intervals are finite. When you don't care too much about definitional equality, you can use LocallyFiniteOrder.ofIcc or LocallyFiniteOrder.ofFiniteIcc to build a locally finite order from just Finset.Icc.

Instances
class LocallyFiniteOrderTop (α : Type u_1) [Preorder α] :
Type u_1

This mixin class describes an order where all intervals bounded below are finite. This is slightly weaker than LocallyFiniteOrder + OrderTop as it allows empty types.

Instances
class LocallyFiniteOrderBot (α : Type u_1) [Preorder α] :
Type u_1

This mixin class describes an order where all intervals bounded above are finite. This is slightly weaker than LocallyFiniteOrder + OrderBot as it allows empty types.

Instances
def LocallyFiniteOrder.ofIcc' (α : Type u_1) [Preorder α] [DecidableRel fun (x1 x2 : α) => x1 x2] (finsetIcc : ααFinset α) (mem_Icc : ∀ (a b x : α), x finsetIcc a b a x x b) :

A constructor from a definition of Finset.Icc alone, the other ones being derived by removing the ends. As opposed to LocallyFiniteOrder.ofIcc, this one requires DecidableRel (· ≤ ·) but only Preorder.

Equations
  • One or more equations did not get rendered due to their size.
def LocallyFiniteOrder.ofIcc (α : Type u_1) [PartialOrder α] [DecidableEq α] (finsetIcc : ααFinset α) (mem_Icc : ∀ (a b x : α), x finsetIcc a b a x x b) :

A constructor from a definition of Finset.Icc alone, the other ones being derived by removing the ends. As opposed to LocallyFiniteOrder.ofIcc', this one requires PartialOrder but only DecidableEq.

Equations
  • One or more equations did not get rendered due to their size.
def LocallyFiniteOrderTop.ofIci' (α : Type u_1) [Preorder α] [DecidableRel fun (x1 x2 : α) => x1 x2] (finsetIci : αFinset α) (mem_Ici : ∀ (a x : α), x finsetIci a a x) :

A constructor from a definition of Finset.Ici alone, the other ones being derived by removing the ends. As opposed to LocallyFiniteOrderTop.ofIci, this one requires DecidableRel (· ≤ ·) but only Preorder.

Equations
  • One or more equations did not get rendered due to their size.
def LocallyFiniteOrderTop.ofIci (α : Type u_1) [PartialOrder α] [DecidableEq α] (finsetIci : αFinset α) (mem_Ici : ∀ (a x : α), x finsetIci a a x) :

A constructor from a definition of Finset.Ici alone, the other ones being derived by removing the ends. As opposed to LocallyFiniteOrderTop.ofIci', this one requires PartialOrder but only DecidableEq.

Equations
  • One or more equations did not get rendered due to their size.
def LocallyFiniteOrderBot.ofIic' (α : Type u_1) [Preorder α] [DecidableRel fun (x1 x2 : α) => x1 x2] (finsetIic : αFinset α) (mem_Iic : ∀ (a x : α), x finsetIic a x a) :

A constructor from a definition of Finset.Iic alone, the other ones being derived by removing the ends. As opposed to LocallyFiniteOrderBot.ofIic, this one requires DecidableRel (· ≤ ·) but only Preorder.

Equations
  • One or more equations did not get rendered due to their size.
def LocallyFiniteOrderBot.ofIic (α : Type u_1) [PartialOrder α] [DecidableEq α] (finsetIic : αFinset α) (mem_Iic : ∀ (a x : α), x finsetIic a x a) :

A constructor from a definition of Finset.Iic alone, the other ones being derived by removing the ends. As opposed to LocallyFiniteOrderBot.ofIic', this one requires PartialOrder but only DecidableEq.

Equations
  • One or more equations did not get rendered due to their size.
@[reducible, inline]

An empty type is locally finite.

This is not an instance as it would not be defeq to more specific instances.

Equations
  • One or more equations did not get rendered due to their size.
@[reducible, inline]

An empty type is locally finite.

This is not an instance as it would not be defeq to more specific instances.

Equations
@[reducible, inline]

An empty type is locally finite.

This is not an instance as it would not be defeq to more specific instances.

Equations

Intervals as finsets #

def Finset.Icc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :

The finset [a,b] of elements x such that a ≤ x and x ≤ b. Basically Set.Icc a b as a finset.

Equations
def Finset.Ico {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :

The finset [a,b) of elements x such that a ≤ x and x < b. Basically Set.Ico a b as a finset.

Equations
def Finset.Ioc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :

The finset (a,b] of elements x such that a < x and x ≤ b. Basically Set.Ioc a b as a finset.

Equations
def Finset.Ioo {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :

The finset (a,b) of elements x such that a < x and x < b. Basically Set.Ioo a b as a finset.

Equations
@[simp]
theorem Finset.mem_Icc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b x : α} :
x Icc a b a x x b
@[simp]
theorem Finset.mem_Ico {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b x : α} :
x Ico a b a x x < b
@[simp]
theorem Finset.mem_Ioc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b x : α} :
x Ioc a b a < x x b
@[simp]
theorem Finset.mem_Ioo {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b x : α} :
x Ioo a b a < x x < b
@[simp]
theorem Finset.coe_Icc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :
(Icc a b) = Set.Icc a b
@[simp]
theorem Finset.coe_Ico {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :
(Ico a b) = Set.Ico a b
@[simp]
theorem Finset.coe_Ioc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :
(Ioc a b) = Set.Ioc a b
@[simp]
theorem Finset.coe_Ioo {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :
(Ioo a b) = Set.Ioo a b
def Finset.Ici {α : Type u_1} [Preorder α] [LocallyFiniteOrderTop α] (a : α) :

The finset [a,) of elements x such that a ≤ x. Basically Set.Ici a as a finset.

Equations
def Finset.Ioi {α : Type u_1} [Preorder α] [LocallyFiniteOrderTop α] (a : α) :

The finset (a,) of elements x such that a < x. Basically Set.Ioi a as a finset.

Equations
@[simp]
theorem Finset.mem_Ici {α : Type u_1} [Preorder α] [LocallyFiniteOrderTop α] {a x : α} :
x Ici a a x
@[simp]
theorem Finset.mem_Ioi {α : Type u_1} [Preorder α] [LocallyFiniteOrderTop α] {a x : α} :
x Ioi a a < x
@[simp]
theorem Finset.coe_Ici {α : Type u_1} [Preorder α] [LocallyFiniteOrderTop α] (a : α) :
(Ici a) = Set.Ici a
@[simp]
theorem Finset.coe_Ioi {α : Type u_1} [Preorder α] [LocallyFiniteOrderTop α] (a : α) :
(Ioi a) = Set.Ioi a
def Finset.Iic {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] (b : α) :

The finset (,b] of elements x such that x ≤ b. Basically Set.Iic b as a finset.

Equations
def Finset.Iio {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] (b : α) :

The finset (,b) of elements x such that x < b. Basically Set.Iio b as a finset.

Equations
@[simp]
theorem Finset.mem_Iic {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] {a x : α} :
x Iic a x a
@[simp]
theorem Finset.mem_Iio {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] {a x : α} :
x Iio a x < a
@[simp]
theorem Finset.coe_Iic {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] (a : α) :
(Iic a) = Set.Iic a
@[simp]
theorem Finset.coe_Iio {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] (a : α) :
(Iio a) = Set.Iio a
@[instance 100]
Equations
theorem Finset.Ici_eq_Icc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] [OrderTop α] (a : α) :
Ici a = Icc a
theorem Finset.Ioi_eq_Ioc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] [OrderTop α] (a : α) :
Ioi a = Ioc a
@[instance 100]
Equations
def Finset.uIcc {α : Type u_1} [Lattice α] [LocallyFiniteOrder α] (a b : α) :

Finset.uIcc a b is the set of elements lying between a and b, with a and b included. Note that we define it more generally in a lattice as Finset.Icc (a ⊓ b) (a ⊔ b). In a product type, Finset.uIcc corresponds to the bounding box of the two elements.

Equations

Finset.uIcc a b is the set of elements lying between a and b, with a and b included. Note that we define it more generally in a lattice as Finset.Icc (a ⊓ b) (a ⊔ b). In a product type, Finset.uIcc corresponds to the bounding box of the two elements.

Equations
  • One or more equations did not get rendered due to their size.
@[simp]
theorem Finset.mem_uIcc {α : Type u_1} [Lattice α] [LocallyFiniteOrder α] {a b x : α} :
x uIcc a b a b x x a b
@[simp]
theorem Finset.coe_uIcc {α : Type u_1} [Lattice α] [LocallyFiniteOrder α] (a b : α) :
(uIcc a b) = Set.uIcc a b

Elaborate set builder notation for Finset.

  • {x ≤ a | p x} is elaborated as Finset.filter (fun x ↦ p x) (Finset.Iic a) if the expected type is Finset.
  • {x ≥ a | p x} is elaborated as Finset.filter (fun x ↦ p x) (Finset.Ici a) if the expected type is Finset.
  • {x < a | p x} is elaborated as Finset.filter (fun x ↦ p x) (Finset.Iio a) if the expected type is Finset.
  • {x > a | p x} is elaborated as Finset.filter (fun x ↦ p x) (Finset.Ioi a) if the expected type is Finset.

See also

  • Data.Set.Defs for the Set builder notation elaborator that this elaborator partly overrides.
  • Data.Finset.Basic for the Finset builder notation elaborator partly overriding this one for syntax of the form {x ∈ s | p x}.
  • Data.Fintype.Basic for the Finset builder notation elaborator handling syntax of the form {x | p x}, {x : α | p x}, {x ∉ s | p x}, {x ≠ a | p x}.

TODO: Write a delaborator

Equations
  • One or more equations did not get rendered due to their size.

Finiteness of Set intervals #

instance Set.fintypeIcc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :
Fintype (Icc a b)
Equations
instance Set.fintypeIco {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :
Fintype (Ico a b)
Equations
instance Set.fintypeIoc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :
Fintype (Ioc a b)
Equations
instance Set.fintypeIoo {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :
Fintype (Ioo a b)
Equations
theorem Set.finite_Icc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :
(Icc a b).Finite
theorem Set.finite_Ico {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :
(Ico a b).Finite
theorem Set.finite_Ioc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :
(Ioc a b).Finite
theorem Set.finite_Ioo {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :
(Ioo a b).Finite
instance Set.fintypeIci {α : Type u_1} [Preorder α] [LocallyFiniteOrderTop α] (a : α) :
Fintype (Ici a)
Equations
instance Set.fintypeIoi {α : Type u_1} [Preorder α] [LocallyFiniteOrderTop α] (a : α) :
Fintype (Ioi a)
Equations
theorem Set.finite_Ici {α : Type u_1} [Preorder α] [LocallyFiniteOrderTop α] (a : α) :
(Ici a).Finite
theorem Set.finite_Ioi {α : Type u_1} [Preorder α] [LocallyFiniteOrderTop α] (a : α) :
(Ioi a).Finite
instance Set.fintypeIic {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] (b : α) :
Fintype (Iic b)
Equations
instance Set.fintypeIio {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] (b : α) :
Fintype (Iio b)
Equations
theorem Set.finite_Iic {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] (b : α) :
(Iic b).Finite
theorem Set.finite_Iio {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] (b : α) :
(Iio b).Finite
instance Set.fintypeUIcc {α : Type u_1} [Lattice α] [LocallyFiniteOrder α] (a b : α) :
Fintype (uIcc a b)
Equations
@[simp]
theorem Set.finite_interval {α : Type u_1} [Lattice α] [LocallyFiniteOrder α] (a b : α) :
(uIcc a b).Finite

Instances #

noncomputable def LocallyFiniteOrder.ofFiniteIcc {α : Type u_1} [Preorder α] (h : ∀ (a b : α), (Set.Icc a b).Finite) :

A noncomputable constructor from the finiteness of all closed intervals.

Equations
@[reducible, inline]
abbrev Fintype.toLocallyFiniteOrder {α : Type u_1} [Preorder α] [Fintype α] [DecidableRel fun (x1 x2 : α) => x1 < x2] [DecidableRel fun (x1 x2 : α) => x1 x2] :

A fintype is a locally finite order.

This is not an instance as it would not be defeq to better instances such as Fin.locallyFiniteOrder.

Equations
  • One or more equations did not get rendered due to their size.
noncomputable def OrderEmbedding.locallyFiniteOrder {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [LocallyFiniteOrder β] (f : α ↪o β) :

Given an order embedding α ↪o β, pulls back the LocallyFiniteOrder on β to α.

Equations
  • One or more equations did not get rendered due to their size.

OrderDual #

Note we define Icc (toDual a) (toDual b) as Icc α _ _ b a (which has type Finset α not Finset αᵒᵈ!) instead of (Icc b a).map toDual.toEmbedding as this means the following is defeq:

lemma this : (Icc (toDual (toDual a)) (toDual (toDual b)) :) = (Icc a b :) := rfl
Equations
  • One or more equations did not get rendered due to their size.
theorem Finset.Icc_orderDual_def {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : αᵒᵈ) :
Icc a b = map OrderDual.toDual.toEmbedding (Icc (OrderDual.ofDual b) (OrderDual.ofDual a))
theorem Finset.Ico_orderDual_def {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : αᵒᵈ) :
Ico a b = map OrderDual.toDual.toEmbedding (Ioc (OrderDual.ofDual b) (OrderDual.ofDual a))
theorem Finset.Ioc_orderDual_def {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : αᵒᵈ) :
Ioc a b = map OrderDual.toDual.toEmbedding (Ico (OrderDual.ofDual b) (OrderDual.ofDual a))
theorem Finset.Ioo_orderDual_def {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : αᵒᵈ) :
Ioo a b = map OrderDual.toDual.toEmbedding (Ioo (OrderDual.ofDual b) (OrderDual.ofDual a))
theorem Finset.Icc_toDual {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :
Icc (OrderDual.toDual a) (OrderDual.toDual b) = map OrderDual.toDual.toEmbedding (Icc b a)
theorem Finset.Ico_toDual {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :
Ico (OrderDual.toDual a) (OrderDual.toDual b) = map OrderDual.toDual.toEmbedding (Ioc b a)
theorem Finset.Ioc_toDual {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :
Ioc (OrderDual.toDual a) (OrderDual.toDual b) = map OrderDual.toDual.toEmbedding (Ico b a)
theorem Finset.Ioo_toDual {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : α) :
Ioo (OrderDual.toDual a) (OrderDual.toDual b) = map OrderDual.toDual.toEmbedding (Ioo b a)
theorem Finset.Icc_ofDual {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : αᵒᵈ) :
Icc (OrderDual.ofDual a) (OrderDual.ofDual b) = map OrderDual.ofDual.toEmbedding (Icc b a)
theorem Finset.Ico_ofDual {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : αᵒᵈ) :
Ico (OrderDual.ofDual a) (OrderDual.ofDual b) = map OrderDual.ofDual.toEmbedding (Ioc b a)
theorem Finset.Ioc_ofDual {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : αᵒᵈ) :
Ioc (OrderDual.ofDual a) (OrderDual.ofDual b) = map OrderDual.ofDual.toEmbedding (Ico b a)
theorem Finset.Ioo_ofDual {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a b : αᵒᵈ) :
Ioo (OrderDual.ofDual a) (OrderDual.ofDual b) = map OrderDual.ofDual.toEmbedding (Ioo b a)

Note we define Iic (toDual a) as Ici a (which has type Finset α not Finset αᵒᵈ!) instead of (Ici a).map toDual.toEmbedding as this means the following is defeq:

lemma this : (Iic (toDual (toDual a)) :) = (Iic a :) := rfl
Equations
  • One or more equations did not get rendered due to their size.
theorem Iic_orderDual_def {α : Type u_1} [Preorder α] [LocallyFiniteOrderTop α] (a : αᵒᵈ) :
Finset.Iic a = Finset.map OrderDual.toDual.toEmbedding (Finset.Ici (OrderDual.ofDual a))
theorem Iio_orderDual_def {α : Type u_1} [Preorder α] [LocallyFiniteOrderTop α] (a : αᵒᵈ) :
Finset.Iio a = Finset.map OrderDual.toDual.toEmbedding (Finset.Ioi (OrderDual.ofDual a))
theorem Finset.Iic_toDual {α : Type u_1} [Preorder α] [LocallyFiniteOrderTop α] (a : α) :
Iic (OrderDual.toDual a) = map OrderDual.toDual.toEmbedding (Ici a)
theorem Finset.Iio_toDual {α : Type u_1} [Preorder α] [LocallyFiniteOrderTop α] (a : α) :
Iio (OrderDual.toDual a) = map OrderDual.toDual.toEmbedding (Ioi a)
theorem Finset.Ici_ofDual {α : Type u_1} [Preorder α] [LocallyFiniteOrderTop α] (a : αᵒᵈ) :
Ici (OrderDual.ofDual a) = map OrderDual.ofDual.toEmbedding (Iic a)
theorem Finset.Ioi_ofDual {α : Type u_1} [Preorder α] [LocallyFiniteOrderTop α] (a : αᵒᵈ) :
Ioi (OrderDual.ofDual a) = map OrderDual.ofDual.toEmbedding (Iio a)

Note we define Ici (toDual a) as Iic a (which has type Finset α not Finset αᵒᵈ!) instead of (Iic a).map toDual.toEmbedding as this means the following is defeq:

lemma this : (Ici (toDual (toDual a)) :) = (Ici a :) := rfl
Equations
  • One or more equations did not get rendered due to their size.
theorem Ici_orderDual_def {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] (a : αᵒᵈ) :
Finset.Ici a = Finset.map OrderDual.toDual.toEmbedding (Finset.Iic (OrderDual.ofDual a))
theorem Ioi_orderDual_def {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] (a : αᵒᵈ) :
Finset.Ioi a = Finset.map OrderDual.toDual.toEmbedding (Finset.Iio (OrderDual.ofDual a))
theorem Finset.Ici_toDual {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] (a : α) :
Ici (OrderDual.toDual a) = map OrderDual.toDual.toEmbedding (Iic a)
theorem Finset.Ioi_toDual {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] (a : α) :
Ioi (OrderDual.toDual a) = map OrderDual.toDual.toEmbedding (Iio a)
theorem Finset.Iic_ofDual {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] (a : αᵒᵈ) :
Iic (OrderDual.ofDual a) = map OrderDual.ofDual.toEmbedding (Ici a)
theorem Finset.Iio_ofDual {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] (a : αᵒᵈ) :
Iio (OrderDual.ofDual a) = map OrderDual.ofDual.toEmbedding (Ioi a)

Prod #

instance Prod.instLocallyFiniteOrder {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [LocallyFiniteOrder α] [LocallyFiniteOrder β] [DecidableRel fun (x1 x2 : α × β) => x1 x2] :
Equations
theorem Finset.Icc_prod_def {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [LocallyFiniteOrder α] [LocallyFiniteOrder β] [DecidableRel fun (x1 x2 : α × β) => x1 x2] (x y : α × β) :
Icc x y = Icc x.1 y.1 ×ˢ Icc x.2 y.2
theorem Finset.Icc_product_Icc {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [LocallyFiniteOrder α] [LocallyFiniteOrder β] [DecidableRel fun (x1 x2 : α × β) => x1 x2] (a₁ a₂ : α) (b₁ b₂ : β) :
Icc a₁ a₂ ×ˢ Icc b₁ b₂ = Icc (a₁, b₁) (a₂, b₂)
theorem Finset.card_Icc_prod {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [LocallyFiniteOrder α] [LocallyFiniteOrder β] [DecidableRel fun (x1 x2 : α × β) => x1 x2] (x y : α × β) :
(Icc x y).card = (Icc x.1 y.1).card * (Icc x.2 y.2).card
instance Prod.instLocallyFiniteOrderTop {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [LocallyFiniteOrderTop α] [LocallyFiniteOrderTop β] [DecidableRel fun (x1 x2 : α × β) => x1 x2] :
Equations
theorem Finset.Ici_prod_def {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [LocallyFiniteOrderTop α] [LocallyFiniteOrderTop β] [DecidableRel fun (x1 x2 : α × β) => x1 x2] (x : α × β) :
Ici x = Ici x.1 ×ˢ Ici x.2
theorem Finset.Ici_product_Ici {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [LocallyFiniteOrderTop α] [LocallyFiniteOrderTop β] [DecidableRel fun (x1 x2 : α × β) => x1 x2] (a : α) (b : β) :
Ici a ×ˢ Ici b = Ici (a, b)
theorem Finset.card_Ici_prod {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [LocallyFiniteOrderTop α] [LocallyFiniteOrderTop β] [DecidableRel fun (x1 x2 : α × β) => x1 x2] (x : α × β) :
(Ici x).card = (Ici x.1).card * (Ici x.2).card
instance Prod.instLocallyFiniteOrderBot {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [LocallyFiniteOrderBot α] [LocallyFiniteOrderBot β] [DecidableRel fun (x1 x2 : α × β) => x1 x2] :
Equations
theorem Finset.Iic_prod_def {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [LocallyFiniteOrderBot α] [LocallyFiniteOrderBot β] [DecidableRel fun (x1 x2 : α × β) => x1 x2] (x : α × β) :
Iic x = Iic x.1 ×ˢ Iic x.2
theorem Finset.Iic_product_Iic {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [LocallyFiniteOrderBot α] [LocallyFiniteOrderBot β] [DecidableRel fun (x1 x2 : α × β) => x1 x2] (a : α) (b : β) :
Iic a ×ˢ Iic b = Iic (a, b)
theorem Finset.card_Iic_prod {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [LocallyFiniteOrderBot α] [LocallyFiniteOrderBot β] [DecidableRel fun (x1 x2 : α × β) => x1 x2] (x : α × β) :
(Iic x).card = (Iic x.1).card * (Iic x.2).card
theorem Finset.uIcc_prod_def {α : Type u_1} {β : Type u_2} [Lattice α] [Lattice β] [LocallyFiniteOrder α] [LocallyFiniteOrder β] [DecidableRel fun (x1 x2 : α × β) => x1 x2] (x y : α × β) :
uIcc x y = uIcc x.1 y.1 ×ˢ uIcc x.2 y.2
theorem Finset.uIcc_product_uIcc {α : Type u_1} {β : Type u_2} [Lattice α] [Lattice β] [LocallyFiniteOrder α] [LocallyFiniteOrder β] [DecidableRel fun (x1 x2 : α × β) => x1 x2] (a₁ a₂ : α) (b₁ b₂ : β) :
uIcc a₁ a₂ ×ˢ uIcc b₁ b₂ = uIcc (a₁, b₁) (a₂, b₂)
theorem Finset.card_uIcc_prod {α : Type u_1} {β : Type u_2} [Lattice α] [Lattice β] [LocallyFiniteOrder α] [LocallyFiniteOrder β] [DecidableRel fun (x1 x2 : α × β) => x1 x2] (x y : α × β) :
(uIcc x y).card = (uIcc x.1 y.1).card * (uIcc x.2 y.2).card

WithTop, WithBot #

Adding a to a locally finite OrderTop keeps it locally finite. Adding a to a locally finite OrderBot keeps it locally finite.

Equations
  • One or more equations did not get rendered due to their size.
theorem WithTop.Icc_coe_top (α : Type u_1) [PartialOrder α] [OrderTop α] [LocallyFiniteOrder α] (a : α) :
Finset.Icc a = Finset.insertNone (Finset.Ici a)
theorem WithTop.Ioc_coe_top (α : Type u_1) [PartialOrder α] [OrderTop α] [LocallyFiniteOrder α] (a : α) :
Finset.Ioc a = Finset.insertNone (Finset.Ioi a)
theorem WithBot.Icc_bot_coe (α : Type u_1) [PartialOrder α] [OrderBot α] [LocallyFiniteOrder α] (b : α) :
Finset.Icc b = Finset.insertNone (Finset.Iic b)
theorem WithBot.Ico_bot_coe (α : Type u_1) [PartialOrder α] [OrderBot α] [LocallyFiniteOrder α] (b : α) :
Finset.Ico b = Finset.insertNone (Finset.Iio b)

Transfer locally finite orders across order isomorphisms #

@[reducible, inline]
abbrev OrderIso.locallyFiniteOrder {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [LocallyFiniteOrder β] (f : α ≃o β) :

Transfer LocallyFiniteOrder across an OrderIso.

Equations
  • One or more equations did not get rendered due to their size.
@[reducible, inline]
abbrev OrderIso.locallyFiniteOrderTop {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [LocallyFiniteOrderTop β] (f : α ≃o β) :

Transfer LocallyFiniteOrderTop across an OrderIso.

Equations
  • One or more equations did not get rendered due to their size.
@[reducible, inline]
abbrev OrderIso.locallyFiniteOrderBot {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [LocallyFiniteOrderBot β] (f : α ≃o β) :

Transfer LocallyFiniteOrderBot across an OrderIso.

Equations
  • One or more equations did not get rendered due to their size.

Subtype of a locally finite order #

Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
theorem Finset.subtype_Icc_eq {α : Type u_1} [Preorder α] (p : αProp) [DecidablePred p] [LocallyFiniteOrder α] (a b : Subtype p) :
Icc a b = Finset.subtype p (Icc a b)
theorem Finset.subtype_Ico_eq {α : Type u_1} [Preorder α] (p : αProp) [DecidablePred p] [LocallyFiniteOrder α] (a b : Subtype p) :
Ico a b = Finset.subtype p (Ico a b)
theorem Finset.subtype_Ioc_eq {α : Type u_1} [Preorder α] (p : αProp) [DecidablePred p] [LocallyFiniteOrder α] (a b : Subtype p) :
Ioc a b = Finset.subtype p (Ioc a b)
theorem Finset.subtype_Ioo_eq {α : Type u_1} [Preorder α] (p : αProp) [DecidablePred p] [LocallyFiniteOrder α] (a b : Subtype p) :
Ioo a b = Finset.subtype p (Ioo a b)
theorem Finset.map_subtype_embedding_Icc {α : Type u_1} [Preorder α] (p : αProp) [DecidablePred p] [LocallyFiniteOrder α] (a b : Subtype p) (hp : ∀ ⦃a b x : α⦄, a xx bp ap bp x) :
map (Function.Embedding.subtype p) (Icc a b) = Icc a b
theorem Finset.map_subtype_embedding_Ico {α : Type u_1} [Preorder α] (p : αProp) [DecidablePred p] [LocallyFiniteOrder α] (a b : Subtype p) (hp : ∀ ⦃a b x : α⦄, a xx bp ap bp x) :
map (Function.Embedding.subtype p) (Ico a b) = Ico a b
theorem Finset.map_subtype_embedding_Ioc {α : Type u_1} [Preorder α] (p : αProp) [DecidablePred p] [LocallyFiniteOrder α] (a b : Subtype p) (hp : ∀ ⦃a b x : α⦄, a xx bp ap bp x) :
map (Function.Embedding.subtype p) (Ioc a b) = Ioc a b
theorem Finset.map_subtype_embedding_Ioo {α : Type u_1} [Preorder α] (p : αProp) [DecidablePred p] [LocallyFiniteOrder α] (a b : Subtype p) (hp : ∀ ⦃a b x : α⦄, a xx bp ap bp x) :
map (Function.Embedding.subtype p) (Ioo a b) = Ioo a b
theorem Finset.subtype_Ici_eq {α : Type u_1} [Preorder α] (p : αProp) [DecidablePred p] [LocallyFiniteOrderTop α] (a : Subtype p) :
Ici a = Finset.subtype p (Ici a)
theorem Finset.subtype_Ioi_eq {α : Type u_1} [Preorder α] (p : αProp) [DecidablePred p] [LocallyFiniteOrderTop α] (a : Subtype p) :
Ioi a = Finset.subtype p (Ioi a)
theorem Finset.map_subtype_embedding_Ici {α : Type u_1} [Preorder α] (p : αProp) [DecidablePred p] [LocallyFiniteOrderTop α] (a : Subtype p) (hp : ∀ ⦃a x : α⦄, a xp ap x) :
theorem Finset.map_subtype_embedding_Ioi {α : Type u_1} [Preorder α] (p : αProp) [DecidablePred p] [LocallyFiniteOrderTop α] (a : Subtype p) (hp : ∀ ⦃a x : α⦄, a xp ap x) :
theorem Finset.subtype_Iic_eq {α : Type u_1} [Preorder α] (p : αProp) [DecidablePred p] [LocallyFiniteOrderBot α] (a : Subtype p) :
Iic a = Finset.subtype p (Iic a)
theorem Finset.subtype_Iio_eq {α : Type u_1} [Preorder α] (p : αProp) [DecidablePred p] [LocallyFiniteOrderBot α] (a : Subtype p) :
Iio a = Finset.subtype p (Iio a)
theorem Finset.map_subtype_embedding_Iic {α : Type u_1} [Preorder α] (p : αProp) [DecidablePred p] [LocallyFiniteOrderBot α] (a : Subtype p) (hp : ∀ ⦃a x : α⦄, x ap ap x) :
theorem Finset.map_subtype_embedding_Iio {α : Type u_1} [Preorder α] (p : αProp) [DecidablePred p] [LocallyFiniteOrderBot α] (a : Subtype p) (hp : ∀ ⦃a x : α⦄, x ap ap x) :
theorem BddBelow.finite_of_bddAbove {α : Type u_3} [Preorder α] [LocallyFiniteOrder α] {s : Set α} (h₀ : BddBelow s) (h₁ : BddAbove s) :
s.Finite
theorem Set.finite_iff_bddAbove {α : Type u_3} {s : Set α} [SemilatticeSup α] [LocallyFiniteOrder α] [OrderBot α] :
s.Finite BddAbove s
theorem Set.finite_iff_bddBelow {α : Type u_3} {s : Set α} [SemilatticeInf α] [LocallyFiniteOrder α] [OrderTop α] :
s.Finite BddBelow s

We make the instances below low priority so when alternative constructions are available they are preferred.

@[instance 100]
instance instLocallyFiniteOrderTopSubtypeLeOfDecidableRelOfLocallyFiniteOrder {α : Type u_1} {y : α} [Preorder α] [DecidableRel fun (x1 x2 : α) => x1 x2] [LocallyFiniteOrder α] :
LocallyFiniteOrderTop { x : α // x y }
Equations
  • One or more equations did not get rendered due to their size.
@[instance 100]
instance instLocallyFiniteOrderTopSubtypeLtOfDecidableRelOfLocallyFiniteOrder {α : Type u_1} {y : α} [Preorder α] [DecidableRel fun (x1 x2 : α) => x1 < x2] [LocallyFiniteOrder α] :
LocallyFiniteOrderTop { x : α // x < y }
Equations
  • One or more equations did not get rendered due to their size.
@[instance 100]
instance instLocallyFiniteOrderBotSubtypeLeOfDecidableRelOfLocallyFiniteOrder {α : Type u_1} {y : α} [Preorder α] [DecidableRel fun (x1 x2 : α) => x1 x2] [LocallyFiniteOrder α] :
LocallyFiniteOrderBot { x : α // y x }
Equations
  • One or more equations did not get rendered due to their size.
@[instance 100]
instance instLocallyFiniteOrderBotSubtypeLtOfDecidableRelOfLocallyFiniteOrder {α : Type u_1} {y : α} [Preorder α] [DecidableRel fun (x1 x2 : α) => x1 < x2] [LocallyFiniteOrder α] :
LocallyFiniteOrderBot { x : α // y < x }
Equations
  • One or more equations did not get rendered due to their size.
instance instFiniteSubtypeLeOfLocallyFiniteOrderBot {α : Type u_1} {y : α} [Preorder α] [LocallyFiniteOrderBot α] :
Finite { x : α // x y }
instance instFiniteSubtypeLtOfLocallyFiniteOrderBot {α : Type u_1} {y : α} [Preorder α] [LocallyFiniteOrderBot α] :
Finite { x : α // x < y }
instance instFiniteSubtypeLeOfLocallyFiniteOrderTop {α : Type u_1} {y : α} [Preorder α] [LocallyFiniteOrderTop α] :
Finite { x : α // y x }
instance instFiniteSubtypeLtOfLocallyFiniteOrderTop {α : Type u_1} {y : α} [Preorder α] [LocallyFiniteOrderTop α] :
Finite { x : α // y < x }
@[simp]
theorem Set.toFinset_Icc {α : Type u_3} [Preorder α] [LocallyFiniteOrder α] (a b : α) [Fintype (Icc a b)] :
(Icc a b).toFinset = Finset.Icc a b
@[simp]
theorem Set.toFinset_Ico {α : Type u_3} [Preorder α] [LocallyFiniteOrder α] (a b : α) [Fintype (Ico a b)] :
(Ico a b).toFinset = Finset.Ico a b
@[simp]
theorem Set.toFinset_Ioc {α : Type u_3} [Preorder α] [LocallyFiniteOrder α] (a b : α) [Fintype (Ioc a b)] :
(Ioc a b).toFinset = Finset.Ioc a b
@[simp]
theorem Set.toFinset_Ioo {α : Type u_3} [Preorder α] [LocallyFiniteOrder α] (a b : α) [Fintype (Ioo a b)] :
(Ioo a b).toFinset = Finset.Ioo a b
@[simp]
theorem Set.toFinset_Ici {α : Type u_3} [Preorder α] [LocallyFiniteOrderTop α] (a : α) [Fintype (Ici a)] :
(Ici a).toFinset = Finset.Ici a
@[simp]
theorem Set.toFinset_Ioi {α : Type u_3} [Preorder α] [LocallyFiniteOrderTop α] (a : α) [Fintype (Ioi a)] :
(Ioi a).toFinset = Finset.Ioi a
@[simp]
theorem Set.toFinset_Iic {α : Type u_3} [Preorder α] [LocallyFiniteOrderBot α] (a : α) [Fintype (Iic a)] :
(Iic a).toFinset = Finset.Iic a
@[simp]
theorem Set.toFinset_Iio {α : Type u_3} [Preorder α] [LocallyFiniteOrderBot α] (a : α) [Fintype (Iio a)] :
(Iio a).toFinset = Finset.Iio a
@[reducible, inline]
abbrev LocallyFiniteOrder.ofOrderIsoClass {F : Type u_3} {M : Type u_4} {N : Type u_5} [Preorder M] [Preorder N] [EquivLike F M N] [OrderIsoClass F M N] (f : F) [LocallyFiniteOrder N] :

A LocallyFiniteOrder can be transferred across an order isomorphism.

Equations
  • One or more equations did not get rendered due to their size.