2570
|
1 |
open Dlist;
|
|
2 |
|
|
3 |
(* ------------------------------------------------------------------------- *)
|
|
4 |
(* expand fixed point properties of lmap *)
|
|
5 |
(* ------------------------------------------------------------------------- *)
|
|
6 |
|
|
7 |
bind_thm ("lmap_def2", fix_prover2 Dlist.thy lmap_def
|
3842
|
8 |
"lmap = (LAM f s. case s of dnil => dnil | x ## l => f`x ## lmap`f`l )");
|
2570
|
9 |
|
|
10 |
(* ------------------------------------------------------------------------- *)
|
|
11 |
(* recursive properties of lmap *)
|
|
12 |
(* ------------------------------------------------------------------------- *)
|
|
13 |
|
|
14 |
qed_goal "lmap1" Dlist.thy "lmap`f`UU = UU"
|
|
15 |
(fn prems =>
|
|
16 |
[
|
|
17 |
(rtac (lmap_def2 RS ssubst) 1),
|
|
18 |
(simp_tac (HOLCF_ss addsimps dlist.when_rews) 1)
|
|
19 |
]);
|
|
20 |
|
|
21 |
qed_goal "lmap2" Dlist.thy "lmap`f`dnil = dnil"
|
|
22 |
(fn prems =>
|
|
23 |
[
|
|
24 |
(rtac (lmap_def2 RS ssubst) 1),
|
|
25 |
(simp_tac (HOLCF_ss addsimps dlist.when_rews) 1)
|
|
26 |
]);
|
|
27 |
|
|
28 |
qed_goal "lmap3" Dlist.thy
|
|
29 |
"[|x~=UU; xs~=UU|] ==> lmap`f`(x##xs) = (f`x)##(lmap`f`xs)"
|
|
30 |
(fn prems =>
|
|
31 |
[
|
|
32 |
(cut_facts_tac prems 1),
|
|
33 |
(rtac trans 1),
|
|
34 |
(rtac (lmap_def2 RS ssubst) 1),
|
|
35 |
(asm_simp_tac (HOLCF_ss addsimps dlist.rews) 1),
|
|
36 |
(rtac refl 1)
|
|
37 |
]);
|