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 (fun (x1 x2 : α) => x1 ⊔ x2) ⊥ f s
Instances For
Alias of the reverse direction of Finset.sup_le_iff
.
See also Finset.product_biUnion
.
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 (fun (x1 x2 : α) => x1 ⊓ x2) ⊤ f s
Instances For
Alias of the reverse direction of Finset.le_inf_iff
.
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.
Instances For
Alias of the reverse direction of Finset.sup'_le_iff
.
See also Finset.sup'_prodMap
.
See also Finset.prodMk_sup'_sup'
.
To rewrite from right to left, use Finset.sup'_comp_eq_image
.
A version of Finset.sup'_image
with LHS and RHS reversed.
Also, this lemma assumes that s
is nonempty instead of assuming that its image is nonempty.
To rewrite from right to left, use Finset.sup'_comp_eq_map
.
A version of Finset.sup'_map
with LHS and RHS reversed.
Also, this lemma assumes that s
is nonempty instead of assuming that its image is nonempty.
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.
Instances For
See also Finset.inf'_prodMap
.
See also Finset.prodMk_inf'_inf'
.
To rewrite from right to left, use Finset.inf'_comp_eq_image
.
A version of Finset.inf'_image
with LHS and RHS reversed.
Also, this lemma assumes that s
is nonempty instead of assuming that its image is nonempty.
To rewrite from right to left, use Finset.inf'_comp_eq_map
.
A version of Finset.inf'_map
with LHS and RHS reversed.
Also, this lemma assumes that s
is nonempty instead of assuming that its image is nonempty.
max and min of finite sets #
{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.
To rewrite from right to left, use Monotone.map_finset_max'
.
A version of Finset.max'_image
with LHS and RHS reversed.
Also, this version assumes that s
is nonempty, not its image.
To rewrite from right to left, use Monotone.map_finset_min'
.
A version of Finset.min'_image
with LHS and RHS reversed.
Also, this version assumes that s
is nonempty, not its image.
If finsets s
and t
are interleaved, then Finset.card s ≤ Finset.card t + 1
.
If finsets s
and t
are interleaved, then Finset.card s ≤ Finset.card (t \ s) + 1
.
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 iSup_eq_iSup_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 iSup_eq_iSup_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 iInf_eq_iInf_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 iInf_eq_iInf_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 iUnion_eq_iUnion_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 iUnion_eq_iUnion_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
iInter_eq_iInter_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
iInter_eq_iInter_finset
for a version that assumes ι : Type*
but avoids PLift
s in the right
hand side.