Lattice operations on multisets
sup
Supremum of a finite set: sup {a, b, c} f = f a ⊔ f b ⊔ f c
Equations
- s.sup f = finset.fold has_sup.sup ⊥ f s
Computating sup
in a subtype (closed under sup
) is the same as computing it in α
.
inf
Infimum of a finite set: inf {a, b, c} f = f a ⊓ f b ⊓ f c
Equations
- s.inf f = finset.fold has_inf.inf ⊤ f s
Computating inf
in a subtype (closed under inf
) is the same as computing it in α
.
max and min of finite sets
Let s
be a finset in a linear order. Then s.max
is the maximum of s
if s
is not empty,
and none
otherwise. It belongs to option α
. If you want to get an element of α
, see
s.max'
.
Equations
Let s
be a finset in a linear order. Then s.min
is the minimum of s
if s
is not empty,
and none
otherwise. It belongs to option α
. If you want to get an element of α
, see
s.min'
.
Equations
{a}.min'
is a
.
{a}.max'
is a
.
If there's more than 1 element, the min' is less than the max'. An alternate version of
min'_lt_max'
which is sometimes more convenient.
Supremum of s i
, i : ι
, is equal to the supremum over t : finset ι
of suprema
⨆ i ∈ t, s i
. This version assumes ι
is a Type*
. See supr_eq_supr_finset'
for a version
that works for ι : Sort*
.
Supremum of s i
, i : ι
, is equal to the supremum over t : finset ι
of suprema
⨆ i ∈ t, s i
. This version works for ι : Sort*
. See supr_eq_supr_finset
for a version
that assumes ι : Type*
but has no plift
s.
Infimum of s i
, i : ι
, is equal to the infimum over t : finset ι
of infima
⨆ i ∈ t, s i
. This version assumes ι
is a Type*
. See infi_eq_infi_finset'
for a version
that works for ι : Sort*
.
Infimum of s i
, i : ι
, is equal to the infimum over t : finset ι
of infima
⨆ i ∈ t, s i
. This version works for ι : Sort*
. See infi_eq_infi_finset
for a version
that assumes ι : Type*
but has no plift
s.
Union of an indexed family of sets s : ι → set α
is equal to the union of the unions
of finite subfamilies. This version assumes ι : Type*
. See also Union_eq_Union_finset'
for
a version that works for ι : Sort*
.
Union of an indexed family of sets s : ι → set α
is equal to the union of the unions
of finite subfamilies. This version works for ι : Sort*
. See also Union_eq_Union_finset
for
a version that assumes ι : Type*
but avoids plift
s in the right hand side.
Intersection of an indexed family of sets s : ι → set α
is equal to the intersection of the
intersections of finite subfamilies. This version assumes ι : Type*
. See also
Inter_eq_Inter_finset'
for a version that works for ι : Sort*
.
Intersection of an indexed family of sets s : ι → set α
is equal to the intersection of the
intersections of finite subfamilies. This version works for ι : Sort*
. See also
Inter_eq_Inter_finset
for a version that assumes ι : Type*
but avoids plift
s in the right
hand side.