Lattice operations on finsets #
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
See also finset.product_bUnion
.
Computing 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
Computing inf
in a subtype (closed under inf
) is the same as computing it in α
.
Given nonempty finset s
then s.sup' H f
is the supremum of its image under f
in (possibly
unbounded) join-semilattice α
, where H
is a proof of nonemptiness. If α
has a bottom element
you may instead use finset.sup
which does not require s
nonempty.
Equations
- s.sup' H f = option.get _
- _ = _
Given nonempty finset s
then s.inf' H f
is the infimum of its image under f
in (possibly
unbounded) meet-semilattice α
, where H
is a proof of nonemptiness. If α
has a top element you
may instead use finset.inf
which does not require s
nonempty.
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.
Induction principle for finset
s in a linearly ordered type: a predicate is true on all
s : finset α
provided that:
Induction principle for finset
s in a linearly ordered type: a predicate is true on all
s : finset α
provided that:
Induction principle for finset
s in any type from which a given function f
maps to a linearly
ordered type : a predicate is true on all s : finset α
provided that:
Induction principle for finset
s in any type from which a given function f
maps to a linearly
ordered type : a predicate is true on all s : finset α
provided that:
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.