src/ZF/ex/PropLog.thy
 changeset 0 a5a9c433f639 child 501 9c724f7085f9
```     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/ZF/ex/PropLog.thy	Thu Sep 16 12:20:38 1993 +0200
1.3 @@ -0,0 +1,43 @@
1.4 +(*  Title: 	ZF/ex/prop-log.thy
1.5 +    ID:         \$Id\$
1.6 +    Author: 	Tobias Nipkow & Lawrence C Paulson
1.7 +    Copyright   1993  University of Cambridge
1.8 +
1.9 +Inductive definition of propositional logic.
1.10 +*)
1.11 +
1.12 +PropLog = Prop + Fin +
1.13 +consts
1.14 +  (*semantics*)
1.15 +  prop_rec :: "[i, i, i=>i, [i,i,i,i]=>i] => i"
1.16 +  is_true  :: "[i,i] => o"
1.17 +  "|="     :: "[i,i] => o"    			(infixl 50)
1.18 +  hyps     :: "[i,i] => i"
1.19 +
1.20 +  (*proof theory*)
1.21 +  thms     :: "i => i"
1.22 +  "|-"     :: "[i,i] => o"    			(infixl 50)
1.23 +
1.24 +translations
1.25 +  "H |- p" == "p : thms(H)"
1.26 +
1.27 +rules
1.28 +
1.29 +  prop_rec_def
1.30 +   "prop_rec(p,b,c,h) == \
1.31 +\   Vrec(p, %p g.prop_case(b, c, %x y. h(x, y, g`x, g`y), p))"
1.32 +
1.33 +  (** Semantics of propositional logic **)
1.34 +  is_true_def
1.35 +   "is_true(p,t) == prop_rec(p, 0,  %v. if(v:t, 1, 0), \
1.36 +\                               %p q tp tq. if(tp=1,tq,1))         =  1"
1.37 +
1.38 +  (*For every valuation, if all elements of H are true then so is p*)
1.39 +  sat_def     "H |= p == ALL t. (ALL q:H. is_true(q,t)) --> is_true(p,t)"
1.40 +
1.41 +  (** A finite set of hypotheses from t and the Vars in p **)
1.42 +  hyps_def
1.43 +   "hyps(p,t) == prop_rec(p, 0,  %v. {if(v:t, #v, #v=>Fls)}, \
1.44 +\                            %p q Hp Hq. Hp Un Hq)"
1.45 +
1.46 +end
```