author | nipkow |
Thu, 29 Jun 1995 10:43:07 +0200 | |
changeset 1161 | 1831ba01c90c |
parent 1153 | 5c5daf97cf2d |
child 1266 | 3ae9fe3c0f68 |
permissions | -rw-r--r-- |
1120 | 1 |
(* Title: HOL/Lambda/Confluence.thy |
2 |
ID: $Id$ |
|
3 |
Author: Tobias Nipkow |
|
4 |
Copyright 1995 TU Muenchen |
|
5 |
||
6 |
Basic confluence lemmas. |
|
7 |
*) |
|
8 |
||
9 |
open Confluence; |
|
10 |
||
1153 | 11 |
goal Confluence.thy |
12 |
"!!R. [| !x y z. (x,y):R --> (x,z):S --> (? u. (y,u):S & (z,u):R); \ |
|
13 |
\ (x,y):R; (x,z):S^* |] ==> ? u. (y,u):S^* & (z,u):R"; |
|
1124
a6233ea105a4
Polished the presentation making it completely definitional.
nipkow
parents:
1120
diff
changeset
|
14 |
be rtrancl_induct 1; |
1131 | 15 |
by(fast_tac trancl_cs 1); |
1124
a6233ea105a4
Polished the presentation making it completely definitional.
nipkow
parents:
1120
diff
changeset
|
16 |
by(fast_tac (HOL_cs addSEs [rtrancl_into_rtrancl]) 1); |
1153 | 17 |
qed "commute_rtrancl"; |
18 |
||
19 |
goal HOL.thy "!!P. ? x.P(x) & Q(x) ==> ? x. Q(x) & P(x)"; |
|
20 |
by(fast_tac HOL_cs 1); |
|
21 |
val lemma = result(); |
|
22 |
||
23 |
goalw Confluence.thy [diamond_def] |
|
24 |
"!!R. diamond(R) ==> diamond(R^*)"; |
|
25 |
by(best_tac (HOL_cs addIs [commute_rtrancl,commute_rtrancl RS lemma]) 1); |
|
26 |
qed "diamond_diamond_rtrancl"; |
|
1120 | 27 |
|
28 |
goalw Confluence.thy [confluent_def] |
|
1124
a6233ea105a4
Polished the presentation making it completely definitional.
nipkow
parents:
1120
diff
changeset
|
29 |
"!!R.[| diamond(R); T <= R; R <= T^* |] ==> confluent(T)"; |
1120 | 30 |
bd rtrancl_mono 1; |
31 |
bd rtrancl_mono 1; |
|
1153 | 32 |
by(fast_tac (HOL_cs addIs [diamond_diamond_rtrancl] |
1120 | 33 |
addDs [subset_antisym] |
34 |
addss (HOL_ss addsimps [rtrancl_idemp])) 1); |
|
35 |
qed "diamond_to_confluence"; |
|
1131 | 36 |
|
37 |
goalw Confluence.thy [confluent_def,diamond_def,Church_Rosser_def] |
|
38 |
"Church_Rosser(R) = confluent(R)"; |
|
39 |
br iffI 1; |
|
1161 | 40 |
by(fast_tac (HOL_cs addIs |
41 |
[Un_upper2 RS rtrancl_mono RS subsetD RS rtrancl_trans, |
|
42 |
rtrancl_converseI, converseI, Un_upper1 RS rtrancl_mono RS subsetD])1); |
|
43 |
by(safe_tac HOL_cs); |
|
1131 | 44 |
be rtrancl_induct 1; |
45 |
by(fast_tac trancl_cs 1); |
|
46 |
by(slow_tac (rel_cs addIs [r_into_rtrancl] |
|
47 |
addEs [rtrancl_trans,r_into_rtrancl RS rtrancl_trans]) 1); |
|
48 |
qed "Church_Rosser_confluent"; |