|
2570
|
1 |
open Witness;
|
|
|
2 |
|
|
|
3 |
(* -------------------------------------------------------------------- *)
|
|
|
4 |
(* classes cplus, cminus, ctimes, cdiv introduce
|
|
|
5 |
characteristic constants o+ o- o* o/
|
|
|
6 |
|
|
|
7 |
"bullet":: "void -> void -> void"
|
|
|
8 |
|
|
|
9 |
is the witness for o+ o- o* o/
|
|
|
10 |
|
|
|
11 |
No characteristic axioms are to be checked
|
|
|
12 |
*)
|
|
|
13 |
|
|
|
14 |
(* -------------------------------------------------------------------- *)
|
|
|
15 |
(* classes per and qpo introduce characteristic constants
|
|
|
16 |
".=" :: "'a::per -> 'a -> tr" (cinfixl 55)
|
|
|
17 |
".<=" :: "'a::qpo -> 'a -> tr" (cinfixl 55)
|
|
|
18 |
|
|
|
19 |
The witness for these is
|
|
|
20 |
|
|
|
21 |
"cric" :: "void -> void -> tr" (cinfixl 55)
|
|
|
22 |
|
|
|
23 |
the classes equiv, eq, qlinear impose additional axioms
|
|
|
24 |
*)
|
|
|
25 |
|
|
|
26 |
(* -------------------------------------------------------------------- *)
|
|
|
27 |
(*
|
|
|
28 |
|
|
|
29 |
characteristic axioms of class per:
|
|
|
30 |
|
|
|
31 |
strict_per "(UU .= x) = UU & (x .= UU) = UU"
|
|
|
32 |
total_per "[|x ~= UU; y ~= UU|] ==> (x .= y) ~= UU"
|
|
|
33 |
flat_per "flat (UU::'a::per)"
|
|
|
34 |
|
|
|
35 |
sym_per "(x .= y) = (y .= x)"
|
|
|
36 |
trans_per "[|(x .= y)=TT; (y .= z)=TT |] ==> (x .= z)=TT"
|
|
|
37 |
|
|
|
38 |
--------------------------------------------------------------------
|
|
|
39 |
|
|
|
40 |
characteristic axioms of class equiv:
|
|
|
41 |
|
|
|
42 |
refl_per "[|(x::'a::equiv) ~= UU|] ==> (x .= x)=TT"
|
|
|
43 |
|
|
|
44 |
--------------------------------------------------------------------
|
|
|
45 |
|
|
|
46 |
characteristic axioms of class eq:
|
|
|
47 |
|
|
|
48 |
weq "[|(x::'a::eq) ~= UU; y ~= UU|] ==> (x = y --> (x .= y)=TT) & (x ~= y --> Çx .= yÈ)"
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
--------------------------------------------------------------------
|
|
|
52 |
|
|
|
53 |
characteristic axioms of class qpo:
|
|
|
54 |
|
|
|
55 |
strict_qpo "(UU .<= x) = UU & (x .<= UU) = UU"
|
|
|
56 |
total_qpo "[|x ~= UU; y ~= UU|] ==> (x .<= y) ~= UU"
|
|
|
57 |
|
|
|
58 |
refl_qpo "[|x ~= UU|] ==> (x .<= x)=TT"
|
|
|
59 |
antisym_qpo "[|(x .<= y)=TT; (y .<= x)=TT |] ==> (x .= y)=TT"
|
|
|
60 |
trans_qpo "[|(x .<= y)=TT; (y .<= z)=TT |] ==> (x .<= z)=TT"
|
|
|
61 |
antisym_qpo_rev " (x .= y)=TT ==> (x .<= y)=TT & (y .<= x)=TT"
|
|
|
62 |
|
|
|
63 |
--------------------------------------------------------------------
|
|
|
64 |
|
|
|
65 |
characteristic axioms of class qlinear:
|
|
|
66 |
|
|
|
67 |
qlinear "[|(x::'a::qlinear) ~= UU; y ~= UU|] ==> (x .<= y)=TT | (y .<= x)=TT "
|
|
|
68 |
|
|
|
69 |
*)
|
|
|
70 |
|
|
|
71 |
(* strict_per, strict_qpo *)
|
|
|
72 |
val prems = goal thy "(UU circ x) = UU & (x circ UU) = UU";
|
|
|
73 |
by (simp_tac (HOLCF_ss addsimps [circ_def]) 1);
|
|
|
74 |
result();
|
|
|
75 |
|
|
|
76 |
(* total_per, total_qpo *)
|
|
|
77 |
val prems = goal thy "[|x ~= UU; y ~= UU|] ==> (x circ y) ~= UU";
|
|
|
78 |
by (cut_facts_tac prems 1);
|
|
|
79 |
by (etac notE 1);
|
|
|
80 |
by (rtac unique_void2 1);
|
|
|
81 |
result();
|
|
|
82 |
|
|
|
83 |
(* flat_per *)
|
|
|
84 |
|
|
|
85 |
val prems = goal thy "flat (UU::void)";
|
|
|
86 |
by (rtac flat_void 1);
|
|
|
87 |
result();
|
|
|
88 |
|
|
|
89 |
(* sym_per *)
|
|
|
90 |
val prems = goal thy "(x circ y) = (y circ x)";
|
|
|
91 |
by (simp_tac (HOLCF_ss addsimps [circ_def]) 1);
|
|
|
92 |
result();
|
|
|
93 |
|
|
|
94 |
(* trans_per, trans_qpo *)
|
|
|
95 |
val prems = goal thy "[|(x bullet y)=TT; (y bullet z)=TT |] ==> (x bullet z)=TT";
|
|
|
96 |
by (cut_facts_tac prems 1);
|
|
|
97 |
by (asm_full_simp_tac (HOLCF_ss addsimps [bullet_def]) 1);
|
|
|
98 |
result();
|
|
|
99 |
|
|
|
100 |
(* refl_per *)
|
|
|
101 |
val prems = goal thy "[|(x::void) ~= UU|] ==> (x bullet x)=TT";
|
|
|
102 |
by (cut_facts_tac prems 1);
|
|
|
103 |
by (etac notE 1);
|
|
|
104 |
by (rtac unique_void2 1);
|
|
|
105 |
result();
|
|
|
106 |
|
|
|
107 |
(* weq *)
|
|
|
108 |
val prems = goal thy
|
|
|
109 |
"[|(x::void) ~= UU; y ~= UU|] ==> (x = y --> (x bullet y)=TT) & (x ~= y --> (x bullet y)=FF)";
|
|
|
110 |
by (cut_facts_tac prems 1);
|
|
|
111 |
by (etac notE 1);
|
|
|
112 |
by (rtac unique_void2 1);
|
|
|
113 |
result();
|
|
|
114 |
|
|
|
115 |
(* antisym_qpo *)
|
|
|
116 |
val prems = goal thy "[|(x bullet y)=TT; (y bullet x)=TT |] ==> (x bullet y)=TT";
|
|
|
117 |
by (cut_facts_tac prems 1);
|
|
|
118 |
by (asm_full_simp_tac (HOLCF_ss addsimps [bullet_def]) 1);
|
|
|
119 |
result();
|
|
|
120 |
|
|
|
121 |
(* antisym_qpo_rev *)
|
|
|
122 |
val prems = goal thy "(x bullet y)=TT ==> (x bullet y)=TT & (y bullet x)=TT";
|
|
|
123 |
by (cut_facts_tac prems 1);
|
|
|
124 |
by (asm_full_simp_tac (HOLCF_ss addsimps [bullet_def]) 1);
|
|
|
125 |
|
|
|
126 |
(* qlinear *)
|
|
|
127 |
val prems = goal thy
|
|
|
128 |
"[|(x::void) ~= UU; y ~= UU|] ==> (x bullet y)=TT | (y bullet x)=TT ";
|
|
|
129 |
by (cut_facts_tac prems 1);
|
|
|
130 |
by (etac notE 1);
|
|
|
131 |
by (rtac unique_void2 1);
|
|
|
132 |
result();
|