src/ZF/ex/prop.ML
author lcp
Tue Aug 16 18:58:42 1994 +0200 (1994-08-16)
changeset 532 851df239ac8b
parent 71 729fe026c5f3
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@0
    13
  val rec_specs = 
clasohm@0
    14
      [("prop", "univ(0)",
clasohm@0
    15
	  [(["Fls"],	"i"),
clasohm@0
    16
	   (["Var"],	"i=>i"),
clasohm@0
    17
	   (["op =>"],	"[i,i]=>i")])];
clasohm@0
    18
  val rec_styp = "i";
lcp@16
    19
  val ext = Some (Syntax.simple_sext
lcp@16
    20
		    [Mixfix("#_", "i => i", "Var", [100], 100),
lcp@16
    21
		     Infixr("=>", "[i,i] => i", 90)]);
clasohm@0
    22
  val sintrs = 
clasohm@0
    23
	  ["Fls : prop",
clasohm@0
    24
	   "n: nat ==> #n : prop",
clasohm@0
    25
	   "[| p: prop;  q: prop |] ==> p=>q : prop"];
clasohm@0
    26
  val monos = [];
lcp@71
    27
  val type_intrs = datatype_intrs;
clasohm@0
    28
  val type_elims = []);
clasohm@0
    29
clasohm@0
    30
val [FlsI,VarI,ImpI] = Prop.intrs;
clasohm@0
    31
clasohm@0
    32
clasohm@0
    33
(** Type-checking rules **)
clasohm@0
    34
clasohm@0
    35
val ImpE = Prop.mk_cases Prop.con_defs "p=>q : prop";
clasohm@0
    36
clasohm@0
    37
writeln"Reached end of file.";