src/HOL/Finite.thy
author nipkow
Mon, 04 Mar 1996 14:37:33 +0100
changeset 1531 e5eb247ad13c
parent 1475 7f5a4cd08209
child 1556 2fd82cec17d4
permissions -rw-r--r--
Added a constant UNIV == {x.True} Added many new rewrite rules for sets. Moved LEAST into Nat. Added cardinality to Finite.

(*  Title:      HOL/Finite.thy
    ID:         $Id$
    Author:     Lawrence C Paulson & Tobias Nipkow
    Copyright   1995  University of Cambridge & TU Muenchen

Finite sets and their cardinality
*)

Finite = Arith +

consts Fin :: 'a set => 'a set set

inductive "Fin(A)"
  intrs
    emptyI  "{} : Fin(A)"
    insertI "[| a: A;  b: Fin(A) |] ==> insert a b : Fin(A)"

consts finite :: 'a set => bool
defs finite_def "finite A == A : Fin(UNIV)"

consts card :: 'a set => nat
defs card_def "card A == LEAST n. ? f. A = {f i |i. i<n}"

end