| author | wenzelm |
| Sun, 01 Oct 2006 18:29:28 +0200 | |
| changeset 20810 | 3377a830b727 |
| parent 17309 | c43ed29bd197 |
| permissions | -rw-r--r-- |
| 17309 | 1 |
(* |
| 3807 | 2 |
File: Buffer.ML |
| 17309 | 3 |
ID: $Id$ |
| 3807 | 4 |
Author: Stephan Merz |
5 |
Copyright: 1997 University of Munich |
|
6 |
||
7 |
Simple FIFO buffer (theorems and proofs) |
|
8 |
*) |
|
9 |
||
10 |
(* ---------------------------- Data lemmas ---------------------------- *) |
|
11 |
||
| 17309 | 12 |
(*FIXME: move to theory List? Maybe as (tl xs = xs) = (xs = [])"?*) |
| 14396 | 13 |
Goal "xs ~= [] --> tl xs ~= xs"; |
| 4089 | 14 |
by (auto_tac (claset(), simpset() addsimps [neq_Nil_conv])); |
| 3807 | 15 |
qed_spec_mp "tl_not_self"; |
16 |
||
| 6255 | 17 |
Addsimps [tl_not_self]; |
| 3807 | 18 |
|
19 |
(* ---------------------------- Action lemmas ---------------------------- *) |
|
20 |
||
21 |
(* Dequeue is visible *) |
|
| 13601 | 22 |
Goalw [angle_def,Deq_def] "|- <Deq ic q oc>_(ic,q,oc) = Deq ic q oc"; |
23 |
by (REPEAT (Safe_tac THEN Asm_lr_simp_tac 1)); |
|
| 3807 | 24 |
qed "Deq_visible"; |
25 |
||
26 |
(* Enabling condition for dequeue -- NOT NEEDED *) |
|
| 5069 | 27 |
Goalw [temp_rewrite Deq_visible] |
| 6255 | 28 |
"!!q. basevars (ic,q,oc) ==> |- Enabled (<Deq ic q oc>_(ic,q,oc)) = (q ~= #[])"; |
| 17309 | 29 |
by (force_tac (claset() addSEs [base_enabled,enabledE], |
|
9517
f58863b1406a
tuned version by Stephan Merz (unbatchified etc.);
wenzelm
parents:
6255
diff
changeset
|
30 |
simpset() addsimps [Deq_def]) 1); |
| 3807 | 31 |
qed "Deq_enabled"; |
32 |
||
33 |
(* For the left-to-right implication, we don't need the base variable stuff *) |
|
| 17309 | 34 |
Goalw [temp_rewrite Deq_visible] |
| 6255 | 35 |
"|- Enabled (<Deq ic q oc>_(ic,q,oc)) --> (q ~= #[])"; |
| 4089 | 36 |
by (auto_tac (claset() addSEs [enabledE], simpset() addsimps [Deq_def])); |
| 3807 | 37 |
qed "Deq_enabledE"; |