Minimal/maximal elements of a set #
This file defines minimal and maximal of a set with respect to an arbitrary relation.
Main declarations #
maximals r s
: Maximal elements ofs
with respect tor
.minimals r s
: Minimal elements ofs
with respect tor
.
TODO #
Do we need a Finset
version?
theorem
maximals_swap
{α : Type u_1}
(r : α → α → Prop)
(s : Set α)
:
maximals (Function.swap r) s = minimals r s
theorem
minimals_swap
{α : Type u_1}
(r : α → α → Prop)
(s : Set α)
:
minimals (Function.swap r) s = maximals r s
theorem
eq_of_mem_maximals
{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
{a : α}
{b : α}
[IsAntisymm α r]
(ha : a ∈ maximals r s)
(hb : b ∈ s)
(h : r a b)
:
a = b
theorem
eq_of_mem_minimals
{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
{a : α}
{b : α}
[IsAntisymm α r]
(ha : a ∈ minimals r s)
(hb : b ∈ s)
(h : r b a)
:
a = b
theorem
mem_minimals_iff_forall_lt_not_mem'
{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
{x : α}
(rlt : α → α → Prop)
[IsNonstrictStrictOrder α r rlt]
:
This theorem can't be used to rewrite without specifying rlt
, since rlt
would have to be
guessed. See mem_minimals_iff_forall_ssubset_not_mem
and mem_minimals_iff_forall_lt_not_mem
for ⊆
and ≤
versions.
theorem
maximals_antichain
{α : Type u_1}
(r : α → α → Prop)
(s : Set α)
[IsAntisymm α r]
:
IsAntichain r (maximals r s)
theorem
minimals_antichain
{α : Type u_1}
(r : α → α → Prop)
(s : Set α)
[IsAntisymm α r]
:
IsAntichain r (minimals r s)
theorem
Set.Subsingleton.maximals_eq
{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
(h : Set.Subsingleton s)
:
theorem
Set.Subsingleton.minimals_eq
{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
(h : Set.Subsingleton s)
:
theorem
maximals_mono
{α : Type u_1}
{r₁ : α → α → Prop}
{r₂ : α → α → Prop}
{s : Set α}
[IsAntisymm α r₂]
(h : (a b : α) → r₁ a b → r₂ a b)
:
theorem
minimals_mono
{α : Type u_1}
{r₁ : α → α → Prop}
{r₂ : α → α → Prop}
{s : Set α}
[IsAntisymm α r₂]
(h : (a b : α) → r₁ a b → r₂ a b)
:
theorem
IsAntichain.maximals_eq
{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
(h : IsAntichain r s)
:
theorem
IsAntichain.minimals_eq
{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
(h : IsAntichain r s)
:
theorem
IsLeast.mem_minimals
{α : Type u_1}
{s : Set α}
{a : α}
[PartialOrder α]
(h : IsLeast s a)
:
theorem
IsGreatest.mem_maximals
{α : Type u_1}
{s : Set α}
{a : α}
[PartialOrder α]
(h : IsGreatest s a)
:
theorem
IsGreatest.maximals_eq
{α : Type u_1}
{s : Set α}
{a : α}
[PartialOrder α]
(h : IsGreatest s a)
:
theorem
IsAntichain.minimals_upperClosure
{α : Type u_1}
{s : Set α}
[PartialOrder α]
(hs : IsAntichain (fun x x_1 => x ≤ x_1) s)
:
minimals (fun x x_1 => x ≤ x_1) ↑(upperClosure s) = s
theorem
IsAntichain.maximals_lowerClosure
{α : Type u_1}
{s : Set α}
[PartialOrder α]
(hs : IsAntichain (fun x x_1 => x ≤ x_1) s)
:
maximals (fun x x_1 => x ≤ x_1) ↑(lowerClosure s) = s
@[simp]
@[simp]