|
1 (* Title: HOLCF/IOA/meta_theory/Pred.thy |
|
2 Author: Olaf Müller |
|
3 *) |
|
4 |
|
5 header {* Logical Connectives lifted to predicates *} |
|
6 |
|
7 theory Pred |
|
8 imports Main |
|
9 begin |
|
10 |
|
11 default_sort type |
|
12 |
|
13 types |
|
14 'a predicate = "'a => bool" |
|
15 |
|
16 consts |
|
17 |
|
18 satisfies ::"'a => 'a predicate => bool" ("_ |= _" [100,9] 8) |
|
19 valid ::"'a predicate => bool" (* ("|-") *) |
|
20 |
|
21 NOT ::"'a predicate => 'a predicate" (".~ _" [40] 40) |
|
22 AND ::"'a predicate => 'a predicate => 'a predicate" (infixr ".&" 35) |
|
23 OR ::"'a predicate => 'a predicate => 'a predicate" (infixr ".|" 30) |
|
24 IMPLIES ::"'a predicate => 'a predicate => 'a predicate" (infixr ".-->" 25) |
|
25 |
|
26 |
|
27 notation (output) |
|
28 NOT ("~ _" [40] 40) and |
|
29 AND (infixr "&" 35) and |
|
30 OR (infixr "|" 30) and |
|
31 IMPLIES (infixr "-->" 25) |
|
32 |
|
33 notation (xsymbols output) |
|
34 NOT ("\<not> _" [40] 40) and |
|
35 AND (infixr "\<and>" 35) and |
|
36 OR (infixr "\<or>" 30) and |
|
37 IMPLIES (infixr "\<longrightarrow>" 25) |
|
38 |
|
39 notation (xsymbols) |
|
40 satisfies ("_ \<Turnstile> _" [100,9] 8) |
|
41 |
|
42 notation (HTML output) |
|
43 NOT ("\<not> _" [40] 40) and |
|
44 AND (infixr "\<and>" 35) and |
|
45 OR (infixr "\<or>" 30) |
|
46 |
|
47 |
|
48 defs |
|
49 |
|
50 satisfies_def: |
|
51 "s |= P == P s" |
|
52 |
|
53 (* priority einfuegen, da clash mit |=, wenn graphisches Symbol *) |
|
54 valid_def: |
|
55 "valid P == (! s. (s |= P))" |
|
56 |
|
57 NOT_def: |
|
58 "NOT P s == ~ (P s)" |
|
59 |
|
60 AND_def: |
|
61 "(P .& Q) s == (P s) & (Q s)" |
|
62 |
|
63 OR_def: |
|
64 "(P .| Q) s == (P s) | (Q s)" |
|
65 |
|
66 IMPLIES_def: |
|
67 "(P .--> Q) s == (P s) --> (Q s)" |
|
68 |
|
69 end |