Standard Isabelle Finite.thy contains a very useful notion of finite powerset: the set of finite subsets of a given set. The definition, however, is specific to Isabelle and based on the notion of "datatype", obviously not something that belongs to ZF set theory. This theory file devolops the notion of finite powerset similarly as in Finite.thy, but based on standard library's Cardinal.thy. This theory file is intended to replace IsarMathLib's Finite1 and Finite_ZF_1 theories that are currently derived from the "datatype" approach.
The goal of this section is to prove an induction theorem about finite powersets: if the empty set has some property and this property is preserved by adding a single element of a set, then this property is true for all finite subsets of this set.
We defined the finite powerset
definition
The cardinality of an element of finite powerset is a natural number.
lemma card_fin_is_nat:
assumes
The cardinality of a finite set is a natural number.
lemma card_fin_is_nat1:
assumes
A reformulation of card_fin_is_nat: for a finit
set
lemma fin_bij_card:
assumes A1:
If a set has the same number of elements as
lemma card_card:
assumes
If we add a point to a finite set, the cardinality
increases by one. To understand the second assertion
lemma card_fin_add_one:
assumes A1:
We can decompose the finite powerset into collection of sets of the same natural cardinalities.
lemma finpow_decomp:
showsFinite powerset is the union of sets of cardinality bounded by natural numbers.
lemma finpow_union_card_nat:
showsA different form of finpow_union_card_nat (see above) - a subset that has not more elements than a given natural number is in the finite powerset.
lemma lepoll_nat_in_finpow:
assumes
Natural numbers are finite subsets of the set of natural numbers.
lemma nat_finpow_nat:
assumes
A finite subset is a finite subset of itself.
lemma fin_finpow_self:
assumes
A set is finite iff it is in its finite powerset.
lemma fin_finpow_iff:
showsIf we remove an element and put it back we get the set back.
lemma rem_add_eq:
assumes
Induction for finite powerset. This is smilar to the standard Isabelle's Fin_induct.
theorem FinPow_induct:
assumes A1:
A subset of a finite subset is a finite subset.
lemma subset_finpow:
assumes
If we subtract anything from a finite set, the resulting set is finite.
lemma diff_finpow:
assumes
If we remove a point from a finites subset, we get a finite subset.
corollary fin_rem_point_fin:
assumes
Cardinality of a nonempty finite set is a successsor of some natural number.
lemma card_non_empty_succ:
assumes A1:
Nonempty set has non-zero cardinality. This is probably true without the assumption that the set is finite, but I couldn't derive it from standard Isabelle theorems.
lemma card_non_empty_non_zero:
assumes
Another variation on the induction theme:
If we can show something holds for the empty set and
if it holds for all finite sets with
at most
theorem FinPow_card_ind:
assumes A1:
Another type of induction (or, maybe recursion). In the induction step we try to find a point in the set that if we remove it, the fact that the property holds for the smaller set implies that the property holds for the whole set.
lemma FinPow_ind_rem_one:
assumes A1:
Yet another induction theorem. This is similar, but slightly more complicated than FinPow_ind_rem_one. The difference is in the treatment of the empty set to allow to show properties that are not true for empty set.
lemma FinPow_rem_ind:
assumes A1:
If a family of sets is closed with respect to taking intersections of two sets then it is closed with respect to taking intersections of any nonempty finite collection.
lemma inter_two_inter_fin:
assumes A1:
If a family of sets contains the empty set and is closed with respect to taking unions of two sets then it is closed with respect to taking unions of any finite collection.
lemma union_two_union_fin:
assumes A1:
Empty set is in finite power set, hence finite power set is never empty.
lemma empty_in_finpow:
showsSingleton is in the finite powerset.
lemma singleton_in_finpow:
assumes
If a set is nonempty then its finite power set contains a nonempty set.
lemma finpow_nempty_nempty:
assumes
Union of two finite subsets is a finite subset.
lemma union_finpow:
assumes
Union of finite number of finite sets is finite.
lemma fin_union_finpow:
assumes
If a set is finite after removing one element, then it is finite.
lemma rem_point_fin_fin:
assumes A1:
An image of a finite set is finite.
lemma fin_image_fin:
assumes
If a set
lemma fin_rep_fin:
assumes
The image of a singleton by any function is finite. It's of course either empty or has exactly one element, but showing that it's a finite subset of the codomain is good enough for us.
lemma image_singleton_fin:
assumes
Union of a finite indexed family of finite sets is finite.
lemma union_fin_list_fin:
assumes A1: