181
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
1 |
theory IntEx
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
2 |
imports QuotMain
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
3 |
begin
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
4 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
5 |
fun
|
206
|
6 |
intrel :: "(nat \<times> nat) \<Rightarrow> (nat \<times> nat) \<Rightarrow> bool"
|
181
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
7 |
where
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
8 |
"intrel (x, y) (u, v) = (x + v = u + y)"
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
9 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
10 |
quotient my_int = "nat \<times> nat" / intrel
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
11 |
apply(unfold EQUIV_def)
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
12 |
apply(auto simp add: mem_def expand_fun_eq)
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
13 |
done
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
14 |
|
184
|
15 |
print_quotients
|
|
16 |
|
181
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
17 |
typ my_int
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
18 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
19 |
local_setup {*
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
20 |
make_const_def @{binding "ZERO"} @{term "(0::nat, 0::nat)"} NoSyn @{typ "nat \<times> nat"} @{typ "my_int"} #> snd
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
21 |
*}
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
22 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
23 |
term ZERO
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
24 |
thm ZERO_def
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
25 |
|
193
|
26 |
(*
|
|
27 |
quotient_def (with my_int)
|
|
28 |
ZERO :: "my_int"
|
|
29 |
where
|
|
30 |
"ZERO \<equiv> (0::nat, 0::nat)"
|
|
31 |
*)
|
|
32 |
|
181
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
33 |
local_setup {*
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
34 |
make_const_def @{binding ONE} @{term "(1::nat, 0::nat)"} NoSyn @{typ "nat \<times> nat"} @{typ "my_int"} #> snd
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
35 |
*}
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
36 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
37 |
term ONE
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
38 |
thm ONE_def
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
39 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
40 |
fun
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
41 |
my_plus :: "(nat \<times> nat) \<Rightarrow> (nat \<times> nat) \<Rightarrow> (nat \<times> nat)"
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
42 |
where
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
43 |
"my_plus (x, y) (u, v) = (x + u, y + v)"
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
44 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
45 |
local_setup {*
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
46 |
make_const_def @{binding PLUS} @{term "my_plus"} NoSyn @{typ "nat \<times> nat"} @{typ "my_int"} #> snd
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
47 |
*}
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
48 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
49 |
term PLUS
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
50 |
thm PLUS_def
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
51 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
52 |
fun
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
53 |
my_neg :: "(nat \<times> nat) \<Rightarrow> (nat \<times> nat)"
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
54 |
where
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
55 |
"my_neg (x, y) = (y, x)"
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
56 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
57 |
local_setup {*
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
58 |
make_const_def @{binding NEG} @{term "my_neg"} NoSyn @{typ "nat \<times> nat"} @{typ "my_int"} #> snd
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
59 |
*}
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
60 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
61 |
term NEG
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
62 |
thm NEG_def
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
63 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
64 |
definition
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
65 |
MINUS :: "my_int \<Rightarrow> my_int \<Rightarrow> my_int"
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
66 |
where
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
67 |
"MINUS z w = PLUS z (NEG w)"
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
68 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
69 |
fun
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
70 |
my_mult :: "(nat \<times> nat) \<Rightarrow> (nat \<times> nat) \<Rightarrow> (nat \<times> nat)"
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
71 |
where
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
72 |
"my_mult (x, y) (u, v) = (x*u + y*v, x*v + y*u)"
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
73 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
74 |
local_setup {*
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
75 |
make_const_def @{binding MULT} @{term "my_mult"} NoSyn @{typ "nat \<times> nat"} @{typ "my_int"} #> snd
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
76 |
*}
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
77 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
78 |
term MULT
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
79 |
thm MULT_def
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
80 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
81 |
(* NOT SURE WETHER THIS DEFINITION IS CORRECT *)
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
82 |
fun
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
83 |
my_le :: "(nat \<times> nat) \<Rightarrow> (nat \<times> nat) \<Rightarrow> bool"
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
84 |
where
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
85 |
"my_le (x, y) (u, v) = (x+v \<le> u+y)"
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
86 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
87 |
local_setup {*
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
88 |
make_const_def @{binding LE} @{term "my_le"} NoSyn @{typ "nat \<times> nat"} @{typ "my_int"} #> snd
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
89 |
*}
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
90 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
91 |
term LE
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
92 |
thm LE_def
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
93 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
94 |
definition
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
95 |
LESS :: "my_int \<Rightarrow> my_int \<Rightarrow> bool"
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
96 |
where
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
97 |
"LESS z w = (LE z w \<and> z \<noteq> w)"
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
98 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
99 |
term LESS
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
100 |
thm LESS_def
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
101 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
102 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
103 |
definition
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
104 |
ABS :: "my_int \<Rightarrow> my_int"
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
105 |
where
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
106 |
"ABS i = (if (LESS i ZERO) then (NEG i) else i)"
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
107 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
108 |
definition
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
109 |
SIGN :: "my_int \<Rightarrow> my_int"
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
110 |
where
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
111 |
"SIGN i = (if i = ZERO then ZERO else if (LESS ZERO i) then ONE else (NEG ONE))"
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
112 |
|
199
|
113 |
lemma plus_sym_pre:
|
|
114 |
shows "intrel (my_plus a b) (my_plus b a)"
|
|
115 |
apply(cases a)
|
|
116 |
apply(cases b)
|
|
117 |
apply(auto)
|
|
118 |
done
|
|
119 |
|
191
|
120 |
lemma equiv_intrel: "EQUIV intrel"
|
|
121 |
sorry
|
|
122 |
|
|
123 |
lemma intrel_refl: "intrel a a"
|
|
124 |
sorry
|
|
125 |
|
206
|
126 |
lemma ho_plus_rsp:
|
199
|
127 |
"IntEx.intrel ===> IntEx.intrel ===> IntEx.intrel my_plus my_plus"
|
192
|
128 |
by (simp)
|
|
129 |
|
|
130 |
ML {* val consts = [@{const_name "my_plus"}] *}
|
|
131 |
ML {* val rty = @{typ "nat \<times> nat"} *}
|
|
132 |
ML {* val qty = @{typ "my_int"} *}
|
|
133 |
ML {* val rel = @{term "intrel"} *}
|
|
134 |
ML {* val rel_eqv = @{thm equiv_intrel} *}
|
|
135 |
ML {* val rel_refl = @{thm intrel_refl} *}
|
|
136 |
ML {* val quot = @{thm QUOTIENT_my_int} *}
|
|
137 |
ML {* val rsp_thms = @{thms ho_plus_rsp} @ @{thms ho_all_prs ho_ex_prs} *}
|
|
138 |
ML {* val trans2 = @{thm QUOT_TYPE_I_my_int.R_trans2} *}
|
197
|
139 |
ML {* val reps_same = @{thm QUOT_TYPE_I_my_int.REPS_same} *}
|
|
140 |
ML {* val t_defs = @{thms PLUS_def} *}
|
|
141 |
|
198
|
142 |
ML {*
|
|
143 |
fun lift_thm_my_int lthy t =
|
|
144 |
lift_thm lthy consts rty qty rel rel_eqv rel_refl quot rsp_thms trans2 reps_same t_defs t
|
|
145 |
*}
|
|
146 |
|
|
147 |
ML {* lift_thm_my_int @{context} @{thm plus_sym_pre} *}
|
|
148 |
|
|
149 |
lemma plus_assoc_pre:
|
|
150 |
shows "intrel (my_plus (my_plus i j) k) (my_plus i (my_plus j k))"
|
|
151 |
apply (cases i)
|
|
152 |
apply (cases j)
|
|
153 |
apply (cases k)
|
|
154 |
apply (simp add: intrel_refl)
|
|
155 |
done
|
|
156 |
|
|
157 |
ML {* lift_thm_my_int @{context} @{thm plus_assoc_pre} *}
|
197
|
158 |
|
191
|
159 |
|
198
|
160 |
|
|
161 |
|
|
162 |
|
|
163 |
|
|
164 |
|
|
165 |
|
|
166 |
text {* Below is the construction site code used if things do now work *}
|
|
167 |
|
|
168 |
ML {* val t_a = atomize_thm @{thm plus_assoc_pre} *}
|
192
|
169 |
ML {* val t_r = regularize t_a rty rel rel_eqv @{context} *}
|
191
|
170 |
|
|
171 |
ML {* val (g, thm, othm) =
|
|
172 |
Toplevel.program (fn () =>
|
192
|
173 |
repabs_eq @{context} t_r consts rty qty
|
|
174 |
quot rel_refl trans2
|
|
175 |
rsp_thms
|
191
|
176 |
)
|
|
177 |
*}
|
|
178 |
ML {*
|
|
179 |
val t_t2 =
|
|
180 |
Toplevel.program (fn () =>
|
|
181 |
repabs_eq2 @{context} (g, thm, othm)
|
|
182 |
)
|
|
183 |
*}
|
|
184 |
|
192
|
185 |
|
|
186 |
ML {* val abs = findabs rty (prop_of (atomize_thm @{thm plus_sym_pre})) *}
|
|
187 |
ML {* val simp_lam_prs_thms = map (make_simp_lam_prs_thm @{context} quot) abs *}
|
|
188 |
|
|
189 |
ML {*
|
191
|
190 |
fun simp_lam_prs lthy thm =
|
194
|
191 |
simp_lam_prs lthy (eqsubst_thm lthy simp_lam_prs_thms thm)
|
191
|
192 |
handle _ => thm
|
|
193 |
*}
|
|
194 |
ML {* t_t2 *}
|
|
195 |
ML {* val t_l = simp_lam_prs @{context} t_t2 *}
|
|
196 |
|
196
|
197 |
ML {* val t_a = simp_allex_prs @{context} quot t_l *}
|
191
|
198 |
|
|
199 |
ML {* val t_defs_sym = add_lower_defs @{context} t_defs *}
|
|
200 |
ML {* val t_d = MetaSimplifier.rewrite_rule t_defs_sym t_a *}
|
197
|
201 |
ML {* val t_r = MetaSimplifier.rewrite_rule [reps_same] t_d *}
|
191
|
202 |
ML {* ObjectLogic.rulify t_r *}
|
181
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
203 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
204 |
|
3e53081ad53a
added another example file about integers (see HOL/Int.thy)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
205 |
|