
diff -r 5f99df1e26c4 -r 18d44ab74672 ex/PL.thy
--- a/ex/PL.thy	Sat Aug 13 16:33:53 1994 +0200
+++ b/ex/PL.thy	Sat Aug 13 16:34:30 1994 +0200
@@ -14,34 +14,36 @@
     ruleMP,thms :: "'a pl set => 'a pl set"
     "|-" 	:: "['a pl set, 'a pl] => bool"	(infixl 50)
     "|="	:: "['a pl set, 'a pl] => bool"	(infixl 50)
-    pl_rec	:: "['a pl,'a => 'b, 'b, ['b,'b] => 'b] => 'b"
+    eval2	:: "['a pl, 'a set] => bool"
     eval	:: "['a set, 'a pl] => bool"	("_[_]" [100,0] 100)
     hyps	:: "['a pl, 'a set] => 'a pl set"
 rules
 
   (** Proof theory for propositional logic **)
 
-    axK_def   "axK ==  {x . ? p q.   x = p->q->p}"
-    axS_def   "axS ==  {x . ? p q r. x = (p->q->r) -> (p->q) -> p->r}"
-    axDN_def  "axDN == {x . ? p.     x = ((p->false) -> false) -> p}"
+  axK_def   "axK ==  {x . ? p q.   x = p->q->p}"
+  axS_def   "axS ==  {x . ? p q r. x = (p->q->r) -> (p->q) -> p->r}"
+  axDN_def  "axDN == {x . ? p.     x = ((p->false) -> false) -> p}"
 
-    (*the use of subsets simplifies the proof of monotonicity*)
-    ruleMP_def  "ruleMP(X) == {q. ? p:X. p->q : X}"
+  (*the use of subsets simplifies the proof of monotonicity*)
+  ruleMP_def  "ruleMP(X) == {q. ? p:X. p->q : X}"
 
-    thms_def
+  thms_def
    "thms(H) == lfp(%X. H Un axK Un axS Un axDN Un ruleMP(X))"
 
-    conseq_def  "H |- p == p : thms(H)"
+  conseq_def  "H |- p == p : thms(H)"
 
-    sat_def "H |= p  ==  (!tt. (!q:H. tt[q]) --> tt[p])"
+  sat_def "H |= p  ==  (!tt. (!q:H. tt[q]) --> tt[p])"
 
-    pl_rec_var   "pl_rec(#v,f,y,z)    = f(v)"
-    pl_rec_false "pl_rec(false,f,y,z) = y"
-    pl_rec_imp   "pl_rec(p->q,f,y,g)  = g(pl_rec(p,f,y,g),pl_rec(q,f,y,g))"
+  eval_def "tt[p] == eval2(p,tt)"
+primrec eval2 pl
+  eval2_false "eval2(false) = (%x.False)"
+  eval2_var   "eval2(#v) = (%tt.v:tt)"
+  eval2_imp   "eval2(p->q) = (%tt.eval2(p,tt)-->eval2(q,tt))"
 
-    eval_def "tt[p] == pl_rec(p, %v.v:tt, False, op -->)"
-
-    hyps_def
-      "hyps(p,tt) == pl_rec(p, %a. {if(a:tt, #a, #a->false)}, {}, op Un)"
+primrec hyps pl
+  hyps_false "hyps(false) = (%tt.{})"
+  hyps_var   "hyps(#v) = (%tt.{if(v:tt, #v, #v->false)})"
+  hyps_imp   "hyps(p->q) = (%tt.hyps(p,tt) Un hyps(q,tt))"
 
 end




