src/ZF/ex/Prop.ML
author lcp
Tue Aug 16 18:58:42 1994 +0200 (1994-08-16)
changeset 532 851df239ac8b
parent 477 53fc8ad84b33
permissions -rw-r--r--
ZF/Makefile,ROOT.ML, ZF/ex/Integ.thy: updated for EquivClass
clasohm@0
     1
(*  Title: 	ZF/ex/prop.ML
clasohm@0
     2
    ID:         $Id$
clasohm@0
     3
    Author: 	Lawrence C Paulson
clasohm@0
     4
    Copyright   1993  University of Cambridge
clasohm@0
     5
clasohm@0
     6
Datatype definition of propositional logic formulae and inductive definition
clasohm@0
     7
of the propositional tautologies.
clasohm@0
     8
*)
clasohm@0
     9
clasohm@0
    10
(*Example of a datatype with mixfix syntax for some constructors*)
clasohm@0
    11
structure Prop = Datatype_Fun
clasohm@0
    12
 (val thy = Univ.thy;
clasohm@477
    13
  val thy_name = "Prop";
clasohm@0
    14
  val rec_specs = 
clasohm@0
    15
      [("prop", "univ(0)",
clasohm@445
    16
	  [(["Fls"],	"i",NoSyn),
clasohm@445
    17
	   (["Var"],	"i=>i", Mixfix ("#_", [100], 100)),
clasohm@445
    18
	   (["=>"],	"[i,i]=>i", Infixr 90)])];
clasohm@0
    19
  val rec_styp = "i";
clasohm@0
    20
  val sintrs = 
clasohm@0
    21
	  ["Fls : prop",
clasohm@0
    22
	   "n: nat ==> #n : prop",
clasohm@0
    23
	   "[| p: prop;  q: prop |] ==> p=>q : prop"];
clasohm@0
    24
  val monos = [];
lcp@71
    25
  val type_intrs = datatype_intrs;
clasohm@0
    26
  val type_elims = []);
clasohm@0
    27
clasohm@0
    28
val [FlsI,VarI,ImpI] = Prop.intrs;
clasohm@0
    29
clasohm@0
    30
clasohm@0
    31
(** Type-checking rules **)
clasohm@0
    32
clasohm@0
    33
val ImpE = Prop.mk_cases Prop.con_defs "p=>q : prop";
clasohm@0
    34
clasohm@0
    35
writeln"Reached end of file.";