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.
Equations
Instances For
Equations
@[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
empty #
The empty finset
Equations
Instances For
Equations
Equations
@[simp]
theorem
Finset.eq_empty_of_forall_notMem
{α : Type u_1}
{s : Finset α}
(H : ā (x : α), x ā s)
:
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
A Finset for an empty type is empty.
@[simp]
Alias of the reverse direction of Finset.empty_ssubset.
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?