Empty and nonempty finite sets #
This file defines the empty finite set ā
and a predicate for nonempty Finsets.
Main declarations #
Finset.Nonempty: A finset is nonempty if it has elements. This is equivalent to sayings ā ā.Finset.empty: Denoted byā. The finset associated to any type consisting of no elements.
Tags #
finite sets, finset
Nonempty #
The property s.Nonempty expresses the fact that the finset s is not empty. It should be used
in theorem assumptions instead of ā x, x ā s or s ā ā
as it gives access to a nice API thanks
to the dot notation.
Instances For
@[implicit_reducible]
@[simp]
Alias of the reverse direction of Finset.coe_nonempty.
Alias of the reverse direction of Finset.nonempty_coe_sort.
theorem
Finset.Nonempty.exists_mem
{α : Type u_1}
{s : Finset α}
(h : s.Nonempty)
:
ā (x : α), x ā s
theorem
Finset.Nonempty.mono
{α : Type u_1}
{s t : Finset α}
(hst : s ā t)
(hs : s.Nonempty)
:
t.Nonempty
empty #
@[implicit_reducible]
@[implicit_reducible]
@[simp]
theorem
Finset.eq_empty_of_forall_notMem
{α : Type u_1}
{s : Finset α}
(H : ā (x : α), x ā s)
:
s = ā
theorem
Finset.eq_empty_iff_forall_notMem
{α : Type u_1}
{s : Finset α}
:
s = ā
ā ā (x : α), x ā s
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
A Finset for an empty type is empty.
@[implicit_reducible]
@[simp]
Alias of the reverse direction of Finset.empty_ssubset.
theorem
Finset.exists_mem_empty_iff
{α : Type u_1}
(p : α ā Prop)
:
(ā x ā ā
, p x) ā False
theorem
Finset.forall_mem_empty_iff
{α : Type u_1}
(p : α ā Prop)
:
(ā x ā ā
, p x) ā True
def
Mathlib.Meta.proveFinsetNonempty
{u : Lean.Level}
{α : Q(Type u)}
(s : Q(Finset «$α»))
:
Lean.MetaM (Option Q(Ā«$sĀ».Nonempty))
Attempt to prove that a finset is nonempty using the finsetNonempty aesop rule-set.
You can add lemmas to the rule-set by tagging them with either:
aesop safe apply (rule_sets := [finsetNonempty])if they are always a good idea to follow oraesop unsafe apply (rule_sets := [finsetNonempty])if they risk directing the search to a blind alley.
TODO: should some of the lemmas be aesop safe simp instead?