author | wenzelm |
Tue, 27 May 1997 15:45:07 +0200 | |
changeset 3362 | 0b268cff9344 |
parent 2493 | bdeb5024353a |
child 3734 | 33f355f56f82 |
permissions | -rw-r--r-- |
1461 | 1 |
(* Title: Cube.ML |
1048 | 2 |
ID: $Id$ |
1461 | 3 |
Author: Ole Rasmussen |
1048 | 4 |
Copyright 1995 University of Cambridge |
5 |
Logic Image: ZF |
|
6 |
*) |
|
7 |
||
8 |
open Cube; |
|
9 |
||
10 |
val prism_ss = (res1L_ss addsimps |
|
1461 | 11 |
[commutation,residuals_preserve_comp,sub_preserve_reg, |
12 |
residuals_preserve_reg,sub_comp,sub_comp RS comp_sym]); |
|
1048 | 13 |
|
14 |
(* ------------------------------------------------------------------------- *) |
|
15 |
(* Prism theorem *) |
|
16 |
(* ============= *) |
|
17 |
(* ------------------------------------------------------------------------- *) |
|
18 |
||
19 |
(* Having more ssumptions than needed -- removed below *) |
|
20 |
goal Cube.thy |
|
21 |
"!!u.v<==u ==> \ |
|
22 |
\ regular(u)-->(ALL w.w~v-->w~u--> \ |
|
23 |
\ w |> u = (w|>v) |> (u|>v))"; |
|
1732 | 24 |
by (etac Ssub.induct 1); |
2469 | 25 |
by (asm_simp_tac prism_ss 1); |
26 |
by (asm_simp_tac prism_ss 1); |
|
27 |
by (asm_simp_tac prism_ss 1); |
|
1048 | 28 |
by (dresolve_tac [spec RS mp RS mp] 1 THEN resolve_tac [Scomp.Comp_Fun] 1 |
29 |
THEN resolve_tac [Scomp.Comp_Fun] 2 THEN (REPEAT(assume_tac 1))); |
|
2469 | 30 |
by (asm_full_simp_tac prism_ss 1); |
31 |
by (asm_simp_tac prism_ss 1); |
|
1048 | 32 |
by (dresolve_tac [spec RS mp RS mp] 1 THEN resolve_tac [Scomp.Comp_Fun] 1 |
33 |
THEN resolve_tac [Scomp.Comp_Fun] 2 THEN (REPEAT(assume_tac 1))); |
|
2469 | 34 |
by (asm_full_simp_tac prism_ss 1); |
1048 | 35 |
val prism_l = result(); |
36 |
||
37 |
goal Cube.thy |
|
38 |
"!!u.[|v <== u; regular(u); w~v|]==> \ |
|
39 |
\ w |> u = (w|>v) |> (u|>v)"; |
|
40 |
by (resolve_tac [prism_l RS mp RS spec RS mp RS mp ] 1); |
|
1461 | 41 |
by (rtac comp_trans 4); |
1048 | 42 |
by (assume_tac 4); |
2469 | 43 |
by (ALLGOALS(asm_simp_tac prism_ss)); |
1048 | 44 |
val prism = result(); |
45 |
||
46 |
||
47 |
(* ------------------------------------------------------------------------- *) |
|
48 |
(* Levy's Cube Lemma *) |
|
49 |
(* ------------------------------------------------------------------------- *) |
|
50 |
||
51 |
goal Cube.thy |
|
52 |
"!!u.[|u~v; regular(v); regular(u); w~u|]==> \ |
|
53 |
\ (w|>u) |> (v|>u) = (w|>v) |> (u|>v)"; |
|
54 |
by (res_inst_tac [("u2","u"),("v2","v")](preservation RS ssubst) 1 |
|
55 |
THEN assume_tac 1 THEN assume_tac 1); |
|
56 |
by (res_inst_tac [("u2","v"),("v2","u")](preservation RS ssubst) 1); |
|
1677
99044cda4ef3
repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents:
1461
diff
changeset
|
57 |
by (etac comp_sym 1); |
99044cda4ef3
repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents:
1461
diff
changeset
|
58 |
by (atac 1); |
2034 | 59 |
by (stac (prism RS sym) 1); |
2469 | 60 |
by (asm_full_simp_tac (!simpset addsimps |
61 |
[prism RS sym,union_l,union_preserve_regular, |
|
62 |
comp_sym_iff, union_sym]) 4); |
|
63 |
by (asm_full_simp_tac (!simpset addsimps [union_r, comp_sym_iff]) 1); |
|
64 |
by (asm_full_simp_tac (!simpset addsimps |
|
65 |
[union_preserve_regular, comp_sym_iff]) 1); |
|
1677
99044cda4ef3
repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents:
1461
diff
changeset
|
66 |
by (etac comp_trans 1); |
99044cda4ef3
repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents:
1461
diff
changeset
|
67 |
by (atac 1); |
1048 | 68 |
val cube = result(); |
69 |
||
70 |
||
71 |
(* ------------------------------------------------------------------------- *) |
|
72 |
(* paving theorem *) |
|
73 |
(* ------------------------------------------------------------------------- *) |
|
74 |
||
75 |
goal Cube.thy |
|
76 |
"!!u.[|w~u; w~v; regular(u); regular(v)|]==> \ |
|
2493 | 77 |
\ EX uv vu. (w|>u) |> vu = (w|>v) |> uv & (w|>u)~vu &\ |
1048 | 78 |
\ regular(vu) & (w|>v)~uv & regular(uv) "; |
79 |
by (forw_inst_tac [("x1","v")] (comp_sym RS comp_trans) 1); |
|
2493 | 80 |
by (step_tac (!claset addSIs [exI]) 1); |
1461 | 81 |
by (rtac cube 1); |
1677
99044cda4ef3
repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents:
1461
diff
changeset
|
82 |
by (asm_simp_tac (prism_ss addsimps [comp_sym_iff]) 1); |
99044cda4ef3
repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents:
1461
diff
changeset
|
83 |
by (asm_simp_tac (prism_ss addsimps [comp_sym_iff]) 1); |
99044cda4ef3
repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents:
1461
diff
changeset
|
84 |
by (asm_simp_tac (prism_ss addsimps [comp_sym_iff]) 1); |
99044cda4ef3
repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents:
1461
diff
changeset
|
85 |
by (atac 1); |
99044cda4ef3
repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents:
1461
diff
changeset
|
86 |
by (etac (residuals_preserve_comp RS spec RS mp RS mp RS mp) 1); |
99044cda4ef3
repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents:
1461
diff
changeset
|
87 |
by(atac 1); |
99044cda4ef3
repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents:
1461
diff
changeset
|
88 |
by(etac comp_sym 1); |
99044cda4ef3
repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents:
1461
diff
changeset
|
89 |
by(atac 1); |
99044cda4ef3
repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents:
1461
diff
changeset
|
90 |
by (asm_simp_tac (prism_ss addsimps [comp_sym_iff]) 1); |
99044cda4ef3
repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents:
1461
diff
changeset
|
91 |
by (asm_simp_tac prism_ss 1); |
99044cda4ef3
repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents:
1461
diff
changeset
|
92 |
by (asm_simp_tac (prism_ss addsimps [comp_sym_iff]) 1); |
1048 | 93 |
val paving = result(); |
94 |