src/ZF/inductive.ML
changeset 0 a5a9c433f639
child 516 1957113f0d7d
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/ZF/inductive.ML	Thu Sep 16 12:20:38 1993 +0200
     1.3 @@ -0,0 +1,63 @@
     1.4 +(*  Title: 	ZF/inductive.ML
     1.5 +    ID:         $Id$
     1.6 +    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
     1.7 +    Copyright   1993  University of Cambridge
     1.8 +
     1.9 +Inductive Definitions for Zermelo-Fraenkel Set Theory
    1.10 +
    1.11 +Uses least fixedpoints with standard products and sums
    1.12 +
    1.13 +Sums are used only for mutual recursion;
    1.14 +Products are used only to derive "streamlined" induction rules for relations
    1.15 +*)
    1.16 +
    1.17 +
    1.18 +structure Lfp =
    1.19 +  struct
    1.20 +  val oper	= Const("lfp",      [iT,iT-->iT]--->iT)
    1.21 +  val bnd_mono	= Const("bnd_mono", [iT,iT-->iT]--->oT)
    1.22 +  val bnd_monoI	= bnd_monoI
    1.23 +  val subs	= def_lfp_subset
    1.24 +  val Tarski	= def_lfp_Tarski
    1.25 +  val induct	= def_induct
    1.26 +  end;
    1.27 +
    1.28 +structure Standard_Prod =
    1.29 +  struct
    1.30 +  val sigma	= Const("Sigma", [iT, iT-->iT]--->iT)
    1.31 +  val pair	= Const("Pair", [iT,iT]--->iT)
    1.32 +  val split_const	= Const("split", [[iT,iT]--->iT, iT]--->iT)
    1.33 +  val fsplit_const	= Const("fsplit", [[iT,iT]--->oT, iT]--->oT)
    1.34 +  val pair_iff	= Pair_iff
    1.35 +  val split_eq	= split
    1.36 +  val fsplitI	= fsplitI
    1.37 +  val fsplitD	= fsplitD
    1.38 +  val fsplitE	= fsplitE
    1.39 +  end;
    1.40 +
    1.41 +structure Standard_Sum =
    1.42 +  struct
    1.43 +  val sum	= Const("op +", [iT,iT]--->iT)
    1.44 +  val inl	= Const("Inl", iT-->iT)
    1.45 +  val inr	= Const("Inr", iT-->iT)
    1.46 +  val elim	= Const("case", [iT-->iT, iT-->iT, iT]--->iT)
    1.47 +  val case_inl	= case_Inl
    1.48 +  val case_inr	= case_Inr
    1.49 +  val inl_iff	= Inl_iff
    1.50 +  val inr_iff	= Inr_iff
    1.51 +  val distinct	= Inl_Inr_iff
    1.52 +  val distinct' = Inr_Inl_iff
    1.53 +  end;
    1.54 +
    1.55 +functor Inductive_Fun (Ind: INDUCTIVE) : sig include INTR_ELIM INDRULE end =
    1.56 +struct
    1.57 +structure Intr_elim = 
    1.58 +    Intr_elim_Fun(structure Ind=Ind and Fp=Lfp and 
    1.59 +		  Pr=Standard_Prod and Su=Standard_Sum);
    1.60 +
    1.61 +structure Indrule = Indrule_Fun (structure Ind=Ind and 
    1.62 +		                 Pr=Standard_Prod and Intr_elim=Intr_elim);
    1.63 +
    1.64 +open Intr_elim Indrule
    1.65 +end;
    1.66 +