src/ZF/ex/Prop.ML
author clasohm
Fri, 01 Jul 1994 11:04:12 +0200
changeset 445 7b6d8b8d4580
parent 419 7c7e71be40c8
child 477 53fc8ad84b33
permissions -rw-r--r--
changed syntax of datatype declaration

(*  Title: 	ZF/ex/prop.ML
    ID:         $Id$
    Author: 	Lawrence C Paulson
    Copyright   1993  University of Cambridge

Datatype definition of propositional logic formulae and inductive definition
of the propositional tautologies.
*)

(*Example of a datatype with mixfix syntax for some constructors*)
structure Prop = Datatype_Fun
 (val thy = Univ.thy;
  val rec_specs = 
      [("prop", "univ(0)",
	  [(["Fls"],	"i",NoSyn),
	   (["Var"],	"i=>i", Mixfix ("#_", [100], 100)),
	   (["=>"],	"[i,i]=>i", Infixr 90)])];
  val rec_styp = "i";
  val sintrs = 
	  ["Fls : prop",
	   "n: nat ==> #n : prop",
	   "[| p: prop;  q: prop |] ==> p=>q : prop"];
  val monos = [];
  val type_intrs = datatype_intrs;
  val type_elims = []);

val [FlsI,VarI,ImpI] = Prop.intrs;


(** Type-checking rules **)

val ImpE = Prop.mk_cases Prop.con_defs "p=>q : prop";

writeln"Reached end of file.";