Documentation

Mathlib.Order.Interval.Multiset

Intervals as multisets #

This file defines intervals as multisets.

Main declarations #

In a LocallyFiniteOrder,

In a LocallyFiniteOrderTop,

In a LocallyFiniteOrderBot,

TODO #

Do we really need this file at all? (March 2024)

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

The multiset of elements x such that a ≤ x and x ≤ b. Basically Set.Icc a b as a multiset.

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

The multiset of elements x such that a ≤ x and x < b. Basically Set.Ico a b as a multiset.

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

The multiset of elements x such that a < x and x ≤ b. Basically Set.Ioc a b as a multiset.

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

The multiset of elements x such that a < x and x < b. Basically Set.Ioo a b as a multiset.

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

The multiset of elements x such that a ≤ x. Basically Set.Ici a as a multiset.

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

The multiset of elements x such that a < x. Basically Set.Ioi a as a multiset.

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

The multiset of elements x such that x ≤ b. Basically Set.Iic b as a multiset.

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

The multiset of elements x such that x < b. Basically Set.Iio b as a multiset.

Equations
@[simp]
theorem Multiset.mem_Iic {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] {b x : α} :
x Iic b x b
@[simp]
theorem Multiset.mem_Iio {α : Type u_1} [Preorder α] [LocallyFiniteOrderBot α] {b x : α} :
x Iio b x < b
theorem Multiset.nodup_Icc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
(Icc a b).Nodup
theorem Multiset.nodup_Ico {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
(Ico a b).Nodup
theorem Multiset.nodup_Ioc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
(Ioc a b).Nodup
theorem Multiset.nodup_Ioo {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
(Ioo a b).Nodup
@[simp]
theorem Multiset.Icc_eq_zero_iff {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
Icc a b = 0 ¬a b
@[simp]
theorem Multiset.Ico_eq_zero_iff {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
Ico a b = 0 ¬a < b
@[simp]
theorem Multiset.Ioc_eq_zero_iff {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
Ioc a b = 0 ¬a < b
@[simp]
theorem Multiset.Ioo_eq_zero_iff {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} [DenselyOrdered α] :
Ioo a b = 0 ¬a < b
theorem Multiset.Icc_eq_zero {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
¬a bIcc a b = 0

Alias of the reverse direction of Multiset.Icc_eq_zero_iff.

theorem Multiset.Ico_eq_zero {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
¬a < bIco a b = 0

Alias of the reverse direction of Multiset.Ico_eq_zero_iff.

theorem Multiset.Ioc_eq_zero {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
¬a < bIoc a b = 0

Alias of the reverse direction of Multiset.Ioc_eq_zero_iff.

@[simp]
theorem Multiset.Ioo_eq_zero {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} (h : ¬a < b) :
Ioo a b = 0
@[simp]
theorem Multiset.Icc_eq_zero_of_lt {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} (h : b < a) :
Icc a b = 0
@[simp]
theorem Multiset.Ico_eq_zero_of_le {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} (h : b a) :
Ico a b = 0
@[simp]
theorem Multiset.Ioc_eq_zero_of_le {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} (h : b a) :
Ioc a b = 0
@[simp]
theorem Multiset.Ioo_eq_zero_of_le {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} (h : b a) :
Ioo a b = 0
theorem Multiset.Ico_self {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a : α) :
Ico a a = 0
theorem Multiset.Ioc_self {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a : α) :
Ioc a a = 0
theorem Multiset.Ioo_self {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] (a : α) :
Ioo a a = 0
theorem Multiset.left_mem_Icc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
a Icc a b a b
theorem Multiset.left_mem_Ico {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
a Ico a b a < b
theorem Multiset.right_mem_Icc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
b Icc a b a b
theorem Multiset.right_mem_Ioc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
b Ioc a b a < b
theorem Multiset.left_notMem_Ioc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
aIoc a b
@[deprecated Multiset.left_notMem_Ioc (since := "2025-05-23")]
theorem Multiset.left_not_mem_Ioc {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
aIoc a b

Alias of Multiset.left_notMem_Ioc.

theorem Multiset.left_notMem_Ioo {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
aIoo a b
@[deprecated Multiset.left_notMem_Ioo (since := "2025-05-23")]
theorem Multiset.left_not_mem_Ioo {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
aIoo a b

Alias of Multiset.left_notMem_Ioo.

theorem Multiset.right_notMem_Ico {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
bIco a b
@[deprecated Multiset.right_notMem_Ico (since := "2025-05-23")]
theorem Multiset.right_not_mem_Ico {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
bIco a b

Alias of Multiset.right_notMem_Ico.

theorem Multiset.right_notMem_Ioo {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
bIoo a b
@[deprecated Multiset.right_notMem_Ioo (since := "2025-05-23")]
theorem Multiset.right_not_mem_Ioo {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} :
bIoo a b

Alias of Multiset.right_notMem_Ioo.

theorem Multiset.Ico_filter_lt_of_le_left {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b c : α} [DecidablePred fun (x : α) => x < c] (hca : c a) :
filter (fun (x : α) => x < c) (Ico a b) =
theorem Multiset.Ico_filter_lt_of_right_le {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b c : α} [DecidablePred fun (x : α) => x < c] (hbc : b c) :
filter (fun (x : α) => x < c) (Ico a b) = Ico a b
theorem Multiset.Ico_filter_lt_of_le_right {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b c : α} [DecidablePred fun (x : α) => x < c] (hcb : c b) :
filter (fun (x : α) => x < c) (Ico a b) = Ico a c
theorem Multiset.Ico_filter_le_of_le_left {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b c : α} [DecidablePred fun (x : α) => c x] (hca : c a) :
filter (fun (x : α) => c x) (Ico a b) = Ico a b
theorem Multiset.Ico_filter_le_of_right_le {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b : α} [DecidablePred fun (x : α) => b x] :
filter (fun (x : α) => b x) (Ico a b) =
theorem Multiset.Ico_filter_le_of_left_le {α : Type u_1} [Preorder α] [LocallyFiniteOrder α] {a b c : α} [DecidablePred fun (x : α) => c x] (hac : a c) :
filter (fun (x : α) => c x) (Ico a b) = Ico c b
@[simp]
theorem Multiset.Icc_self {α : Type u_1} [PartialOrder α] [LocallyFiniteOrder α] (a : α) :
Icc a a = {a}
theorem Multiset.Ico_cons_right {α : Type u_1} [PartialOrder α] [LocallyFiniteOrder α] {a b : α} (h : a b) :
b ::ₘ Ico a b = Icc a b
theorem Multiset.Ioo_cons_left {α : Type u_1} [PartialOrder α] [LocallyFiniteOrder α] {a b : α} (h : a < b) :
a ::ₘ Ioo a b = Ico a b
theorem Multiset.Ico_disjoint_Ico {α : Type u_1} [PartialOrder α] [LocallyFiniteOrder α] {a b c d : α} (h : b c) :
Disjoint (Ico a b) (Ico c d)
@[simp]
theorem Multiset.Ico_inter_Ico_of_le {α : Type u_1} [PartialOrder α] [LocallyFiniteOrder α] [DecidableEq α] {a b c d : α} (h : b c) :
Ico a b Ico c d = 0
theorem Multiset.Ico_filter_le_left {α : Type u_1} [PartialOrder α] [LocallyFiniteOrder α] {a b : α} [DecidablePred fun (x : α) => x a] (hab : a < b) :
filter (fun (x : α) => x a) (Ico a b) = {a}
theorem Multiset.card_Ico_eq_card_Icc_sub_one {α : Type u_1} [PartialOrder α] [LocallyFiniteOrder α] (a b : α) :
(Ico a b).card = (Icc a b).card - 1
theorem Multiset.card_Ioc_eq_card_Icc_sub_one {α : Type u_1} [PartialOrder α] [LocallyFiniteOrder α] (a b : α) :
(Ioc a b).card = (Icc a b).card - 1
theorem Multiset.card_Ioo_eq_card_Ico_sub_one {α : Type u_1} [PartialOrder α] [LocallyFiniteOrder α] (a b : α) :
(Ioo a b).card = (Ico a b).card - 1
theorem Multiset.card_Ioo_eq_card_Icc_sub_two {α : Type u_1} [PartialOrder α] [LocallyFiniteOrder α] (a b : α) :
(Ioo a b).card = (Icc a b).card - 2
theorem Multiset.Ico_subset_Ico_iff {α : Type u_1} [LinearOrder α] [LocallyFiniteOrder α] {a₁ b₁ a₂ b₂ : α} (h : a₁ < b₁) :
Ico a₁ b₁ Ico a₂ b₂ a₂ a₁ b₁ b₂
theorem Multiset.Ico_add_Ico_eq_Ico {α : Type u_1} [LinearOrder α] [LocallyFiniteOrder α] {a b c : α} (hab : a b) (hbc : b c) :
Ico a b + Ico b c = Ico a c
theorem Multiset.Ico_inter_Ico {α : Type u_1} [LinearOrder α] [LocallyFiniteOrder α] {a b c d : α} :
Ico a b Ico c d = Ico (max a c) (min b d)
@[simp]
theorem Multiset.Ico_filter_lt {α : Type u_1} [LinearOrder α] [LocallyFiniteOrder α] (a b c : α) :
filter (fun (x : α) => x < c) (Ico a b) = Ico a (min b c)
@[simp]
theorem Multiset.Ico_filter_le {α : Type u_1} [LinearOrder α] [LocallyFiniteOrder α] (a b c : α) :
filter (fun (x : α) => c x) (Ico a b) = Ico (max a c) b
@[simp]
theorem Multiset.Ico_sub_Ico_left {α : Type u_1} [LinearOrder α] [LocallyFiniteOrder α] (a b c : α) :
Ico a b - Ico a c = Ico (max a c) b
@[simp]
theorem Multiset.Ico_sub_Ico_right {α : Type u_1} [LinearOrder α] [LocallyFiniteOrder α] (a b c : α) :
Ico a b - Ico c b = Ico a (min b c)