equal
deleted
inserted
replaced
61 default_sort pcpo |
61 default_sort pcpo |
62 |
62 |
63 definition tr_case :: "'a \<rightarrow> 'a \<rightarrow> tr \<rightarrow> 'a" |
63 definition tr_case :: "'a \<rightarrow> 'a \<rightarrow> tr \<rightarrow> 'a" |
64 where "tr_case = (\<Lambda> t e (Def b). if b then t else e)" |
64 where "tr_case = (\<Lambda> t e (Def b). if b then t else e)" |
65 |
65 |
66 abbreviation cifte_syn :: "[tr, 'c, 'c] \<Rightarrow> 'c" ("(If (_)/ then (_)/ else (_))" [0, 0, 60] 60) |
66 abbreviation cifte_syn :: "[tr, 'c, 'c] \<Rightarrow> 'c" (\<open>(If (_)/ then (_)/ else (_))\<close> [0, 0, 60] 60) |
67 where "If b then e1 else e2 \<equiv> tr_case\<cdot>e1\<cdot>e2\<cdot>b" |
67 where "If b then e1 else e2 \<equiv> tr_case\<cdot>e1\<cdot>e2\<cdot>b" |
68 |
68 |
69 translations |
69 translations |
70 "\<Lambda> (XCONST TT). t" \<rightleftharpoons> "CONST tr_case\<cdot>t\<cdot>\<bottom>" |
70 "\<Lambda> (XCONST TT). t" \<rightleftharpoons> "CONST tr_case\<cdot>t\<cdot>\<bottom>" |
71 "\<Lambda> (XCONST FF). t" \<rightleftharpoons> "CONST tr_case\<cdot>\<bottom>\<cdot>t" |
71 "\<Lambda> (XCONST FF). t" \<rightleftharpoons> "CONST tr_case\<cdot>\<bottom>\<cdot>t" |
80 subsection \<open>Boolean connectives\<close> |
80 subsection \<open>Boolean connectives\<close> |
81 |
81 |
82 definition trand :: "tr \<rightarrow> tr \<rightarrow> tr" |
82 definition trand :: "tr \<rightarrow> tr \<rightarrow> tr" |
83 where andalso_def: "trand = (\<Lambda> x y. If x then y else FF)" |
83 where andalso_def: "trand = (\<Lambda> x y. If x then y else FF)" |
84 |
84 |
85 abbreviation andalso_syn :: "tr \<Rightarrow> tr \<Rightarrow> tr" ("_ andalso _" [36,35] 35) |
85 abbreviation andalso_syn :: "tr \<Rightarrow> tr \<Rightarrow> tr" (\<open>_ andalso _\<close> [36,35] 35) |
86 where "x andalso y \<equiv> trand\<cdot>x\<cdot>y" |
86 where "x andalso y \<equiv> trand\<cdot>x\<cdot>y" |
87 |
87 |
88 definition tror :: "tr \<rightarrow> tr \<rightarrow> tr" |
88 definition tror :: "tr \<rightarrow> tr \<rightarrow> tr" |
89 where orelse_def: "tror = (\<Lambda> x y. If x then TT else y)" |
89 where orelse_def: "tror = (\<Lambda> x y. If x then TT else y)" |
90 |
90 |
91 abbreviation orelse_syn :: "tr \<Rightarrow> tr \<Rightarrow> tr" ("_ orelse _" [31,30] 30) |
91 abbreviation orelse_syn :: "tr \<Rightarrow> tr \<Rightarrow> tr" (\<open>_ orelse _\<close> [31,30] 30) |
92 where "x orelse y \<equiv> tror\<cdot>x\<cdot>y" |
92 where "x orelse y \<equiv> tror\<cdot>x\<cdot>y" |
93 |
93 |
94 definition neg :: "tr \<rightarrow> tr" |
94 definition neg :: "tr \<rightarrow> tr" |
95 where "neg = flift2 Not" |
95 where "neg = flift2 Not" |
96 |
96 |