Lattice operations on finsets #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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
Instances for ↥finset.sup
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
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.
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 ⊥ otherwise. It belongs to with_bot α. If you want to get an element of α, see
s.max'.
Let s be a finset in a linear order. Then s.min is the minimum of s if s is not empty,
and ⊤ otherwise. It belongs to with_top α. If you want to get an element of α, see
s.min'.
Given a nonempty finset s in a linear order α, then s.min' h is its minimum, as an
element of α, where h is a proof of nonemptiness. Without this assumption, use instead s.min,
taking values in with_top α.
Given a nonempty finset s in a linear order α, then s.max' h is its maximum, as an
element of α, where h is a proof of nonemptiness. Without this assumption, use instead s.max,
taking values in with_bot α.
{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.
If finsets s and t are interleaved, then finset.card s ≤ finset.card (t \ s) + 1.
Induction principle for finsets in a linearly ordered type: a predicate is true on all
s : finset α provided that:
Induction principle for finsets in a linearly ordered type: a predicate is true on all
s : finset α provided that:
Induction principle for finsets 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 finsets 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 plifts.
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 plifts.
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 plifts 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 plifts in the right
hand side.