src/ZF/Finite.thy
author paulson
Fri, 11 Aug 2000 13:26:40 +0200
changeset 9577 9e66e8ed8237
parent 9491 1a36151ee2fc
child 12175 5cf58a1799a7
permissions -rw-r--r--
ZF arith

(*  Title:      ZF/Finite.thy
    ID:         $Id$
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    Copyright   1994  University of Cambridge

Finite powerset operator
*)

Finite = Inductive + Nat +

setup setup_datatypes

(*The natural numbers as a datatype*)
rep_datatype 
  elim		natE
  induct	nat_induct
  case_eqns	nat_case_0, nat_case_succ
  recursor_eqns recursor_0, recursor_succ


consts
  Fin       :: i=>i
  FiniteFun :: [i,i]=>i         ("(_ -||>/ _)" [61, 60] 60)

inductive
  domains   "Fin(A)" <= "Pow(A)"
  intrs
    emptyI  "0 : Fin(A)"
    consI   "[| a: A;  b: Fin(A) |] ==> cons(a,b) : Fin(A)"
  type_intrs empty_subsetI, cons_subsetI, PowI
  type_elims "[make_elim PowD]"

inductive
  domains   "FiniteFun(A,B)" <= "Fin(A*B)"
  intrs
    emptyI  "0 : A -||> B"
    consI   "[| a: A;  b: B;  h: A -||> B;  a ~: domain(h)   
             |] ==> cons(<a,b>,h) : A -||> B"
  type_intrs "Fin.intrs"
end