author | huffman |
Wed, 17 Feb 2010 10:00:22 -0800 | |
changeset 35174 | e15040ae75d7 |
parent 19741 | f65265d71426 |
child 35355 | 613e133966ea |
permissions | -rw-r--r-- |
5976 | 1 |
(* Title: HOLCF/IOA/meta_theory/Pred.thy |
12218 | 2 |
Author: Olaf Müller |
17233 | 3 |
*) |
4559 | 4 |
|
17233 | 5 |
header {* Logical Connectives lifted to predicates *} |
4559 | 6 |
|
17233 | 7 |
theory Pred |
8 |
imports Main |
|
9 |
begin |
|
10 |
||
11 |
defaultsort type |
|
4559 | 12 |
|
13 |
types |
|
17233 | 14 |
'a predicate = "'a => bool" |
4559 | 15 |
|
16 |
consts |
|
17 |
||
18 |
satisfies ::"'a => 'a predicate => bool" ("_ |= _" [100,9] 8) |
|
17233 | 19 |
valid ::"'a predicate => bool" (* ("|-") *) |
4559 | 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 |
syntax ("" output) |
|
28 |
"NOT" ::"'a predicate => 'a predicate" ("~ _" [40] 40) |
|
29 |
"AND" ::"'a predicate => 'a predicate => 'a predicate" (infixr "&" 35) |
|
30 |
"OR" ::"'a predicate => 'a predicate => 'a predicate" (infixr "|" 30) |
|
31 |
"IMPLIES" ::"'a predicate => 'a predicate => 'a predicate" (infixr "-->" 25) |
|
32 |
||
12114
a8e860c86252
eliminated old "symbols" syntax, use "xsymbols" instead;
wenzelm
parents:
7661
diff
changeset
|
33 |
syntax (xsymbols output) |
17233 | 34 |
"NOT" ::"'a predicate => 'a predicate" ("\<not> _" [40] 40) |
35 |
"AND" ::"'a predicate => 'a predicate => 'a predicate" (infixr "\<and>" 35) |
|
36 |
"OR" ::"'a predicate => 'a predicate => 'a predicate" (infixr "\<or>" 30) |
|
37 |
"IMPLIES" ::"'a predicate => 'a predicate => 'a predicate" (infixr "\<longrightarrow>" 25) |
|
4559 | 38 |
|
12114
a8e860c86252
eliminated old "symbols" syntax, use "xsymbols" instead;
wenzelm
parents:
7661
diff
changeset
|
39 |
syntax (xsymbols) |
17233 | 40 |
"satisfies" ::"'a => 'a predicate => bool" ("_ \<Turnstile> _" [100,9] 8) |
4559 | 41 |
|
6340 | 42 |
syntax (HTML output) |
17233 | 43 |
"NOT" ::"'a predicate => 'a predicate" ("\<not> _" [40] 40) |
44 |
"AND" ::"'a predicate => 'a predicate => 'a predicate" (infixr "\<and>" 35) |
|
45 |
"OR" ::"'a predicate => 'a predicate => 'a predicate" (infixr "\<or>" 30) |
|
6340 | 46 |
|
4559 | 47 |
|
48 |
defs |
|
49 |
||
17233 | 50 |
satisfies_def: |
51 |
"s |= P == P s" |
|
4559 | 52 |
|
53 |
(* priority einfuegen, da clash mit |=, wenn graphisches Symbol *) |
|
17233 | 54 |
valid_def: |
4559 | 55 |
"valid P == (! s. (s |= P))" |
56 |
||
17233 | 57 |
NOT_def: |
4559 | 58 |
"NOT P s == ~ (P s)" |
59 |
||
17233 | 60 |
AND_def: |
4559 | 61 |
"(P .& Q) s == (P s) & (Q s)" |
62 |
||
17233 | 63 |
OR_def: |
4559 | 64 |
"(P .| Q) s == (P s) | (Q s)" |
65 |
||
17233 | 66 |
IMPLIES_def: |
4559 | 67 |
"(P .--> Q) s == (P s) --> (Q s)" |
68 |
||
7661 | 69 |
end |