src/HOL/Trancl.ML
author nipkow
Wed Oct 28 11:25:38 1998 +0100 (1998-10-28)
changeset 5771 7c2c8cf20221
parent 5608 a82a038a3e7a
child 6162 484adda70b65
permissions -rw-r--r--
added nat_diff_split and a few lemmas in Trancl.
oheimb@4764
     1
(*  Title:      HOL/Trancl
clasohm@923
     2
    ID:         $Id$
clasohm@1465
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
clasohm@923
     4
    Copyright   1992  University of Cambridge
clasohm@923
     5
paulson@5316
     6
Theorems about the transitive closure of a relation
clasohm@923
     7
*)
clasohm@923
     8
nipkow@5771
     9
(** The relation rtrancl **)
clasohm@923
    10
nipkow@5771
    11
section "^*";
clasohm@923
    12
nipkow@5608
    13
Goal "mono(%s. Id Un (r O s))";
clasohm@923
    14
by (rtac monoI 1);
clasohm@923
    15
by (REPEAT (ares_tac [monoI, subset_refl, comp_mono, Un_mono] 1));
clasohm@923
    16
qed "rtrancl_fun_mono";
clasohm@923
    17
clasohm@923
    18
val rtrancl_unfold = rtrancl_fun_mono RS (rtrancl_def RS def_lfp_Tarski);
clasohm@923
    19
clasohm@923
    20
(*Reflexivity of rtrancl*)
wenzelm@5069
    21
Goal "(a,a) : r^*";
clasohm@923
    22
by (stac rtrancl_unfold 1);
paulson@2891
    23
by (Blast_tac 1);
clasohm@923
    24
qed "rtrancl_refl";
clasohm@923
    25
paulson@1921
    26
Addsimps [rtrancl_refl];
paulson@1921
    27
AddSIs   [rtrancl_refl];
paulson@1921
    28
paulson@1921
    29
clasohm@923
    30
(*Closure under composition with r*)
paulson@5143
    31
Goal "[| (a,b) : r^*;  (b,c) : r |] ==> (a,c) : r^*";
clasohm@923
    32
by (stac rtrancl_unfold 1);
paulson@2891
    33
by (Blast_tac 1);
clasohm@923
    34
qed "rtrancl_into_rtrancl";
clasohm@923
    35
clasohm@923
    36
(*rtrancl of r contains r*)
wenzelm@5069
    37
Goal "!!p. p : r ==> p : r^*";
paulson@1552
    38
by (split_all_tac 1);
nipkow@1301
    39
by (etac (rtrancl_refl RS rtrancl_into_rtrancl) 1);
clasohm@923
    40
qed "r_into_rtrancl";
clasohm@923
    41
clasohm@923
    42
(*monotonicity of rtrancl*)
paulson@5143
    43
Goalw [rtrancl_def] "r <= s ==> r^* <= s^*";
paulson@1552
    44
by (REPEAT(ares_tac [lfp_mono,Un_mono,comp_mono,subset_refl] 1));
clasohm@923
    45
qed "rtrancl_mono";
clasohm@923
    46
clasohm@923
    47
(** standard induction rule **)
clasohm@923
    48
paulson@5316
    49
val major::prems = Goal 
clasohm@972
    50
  "[| (a,b) : r^*; \
clasohm@972
    51
\     !!x. P((x,x)); \
clasohm@972
    52
\     !!x y z.[| P((x,y)); (x,y): r^*; (y,z): r |]  ==>  P((x,z)) |] \
clasohm@972
    53
\  ==>  P((a,b))";
clasohm@923
    54
by (rtac ([rtrancl_def, rtrancl_fun_mono, major] MRS def_induct) 1);
wenzelm@4089
    55
by (blast_tac (claset() addIs prems) 1);
clasohm@923
    56
qed "rtrancl_full_induct";
clasohm@923
    57
clasohm@923
    58
(*nice induction rule*)
paulson@5316
    59
val major::prems = Goal
clasohm@972
    60
    "[| (a::'a,b) : r^*;    \
clasohm@923
    61
\       P(a); \
clasohm@1465
    62
\       !!y z.[| (a,y) : r^*;  (y,z) : r;  P(y) |] ==> P(z) |]  \
clasohm@923
    63
\     ==> P(b)";
clasohm@923
    64
(*by induction on this formula*)
clasohm@972
    65
by (subgoal_tac "! y. (a::'a,b) = (a,y) --> P(y)" 1);
clasohm@923
    66
(*now solve first subgoal: this formula is sufficient*)
paulson@2891
    67
by (Blast_tac 1);
clasohm@923
    68
(*now do the induction*)
clasohm@923
    69
by (resolve_tac [major RS rtrancl_full_induct] 1);
wenzelm@4089
    70
by (blast_tac (claset() addIs prems) 1);
wenzelm@4089
    71
by (blast_tac (claset() addIs prems) 1);
clasohm@923
    72
qed "rtrancl_induct";
clasohm@923
    73
berghofe@5098
    74
bind_thm ("rtrancl_induct2", split_rule
berghofe@5098
    75
  (read_instantiate [("a","(ax,ay)"), ("b","(bx,by)")] rtrancl_induct));
nipkow@1706
    76
clasohm@923
    77
(*transitivity of transitive closure!! -- by induction.*)
wenzelm@5069
    78
Goalw [trans_def] "trans(r^*)";
paulson@4153
    79
by Safe_tac;
paulson@1642
    80
by (eres_inst_tac [("b","z")] rtrancl_induct 1);
wenzelm@4089
    81
by (ALLGOALS(blast_tac (claset() addIs [rtrancl_into_rtrancl])));
paulson@1642
    82
qed "trans_rtrancl";
paulson@1642
    83
paulson@1642
    84
bind_thm ("rtrancl_trans", trans_rtrancl RS transD);
paulson@1642
    85
clasohm@923
    86
clasohm@923
    87
(*elimination of rtrancl -- by induction on a special formula*)
paulson@5316
    88
val major::prems = Goal
clasohm@1465
    89
    "[| (a::'a,b) : r^*;  (a = b) ==> P;        \
clasohm@1465
    90
\       !!y.[| (a,y) : r^*; (y,b) : r |] ==> P  \
clasohm@923
    91
\    |] ==> P";
clasohm@972
    92
by (subgoal_tac "(a::'a) = b  | (? y. (a,y) : r^* & (y,b) : r)" 1);
clasohm@923
    93
by (rtac (major RS rtrancl_induct) 2);
wenzelm@4089
    94
by (blast_tac (claset() addIs prems) 2);
wenzelm@4089
    95
by (blast_tac (claset() addIs prems) 2);
clasohm@923
    96
by (REPEAT (eresolve_tac ([asm_rl,exE,disjE,conjE]@prems) 1));
clasohm@923
    97
qed "rtranclE";
clasohm@923
    98
paulson@1642
    99
bind_thm ("rtrancl_into_rtrancl2", r_into_rtrancl RS rtrancl_trans);
paulson@1642
   100
paulson@1642
   101
paulson@1642
   102
(*** More r^* equations and inclusions ***)
paulson@1642
   103
wenzelm@5069
   104
Goal "(r^*)^* = r^*";
paulson@1642
   105
by (rtac set_ext 1);
paulson@1642
   106
by (res_inst_tac [("p","x")] PairE 1);
paulson@1642
   107
by (hyp_subst_tac 1);
paulson@1642
   108
by (rtac iffI 1);
paulson@1552
   109
by (etac rtrancl_induct 1);
paulson@1642
   110
by (rtac rtrancl_refl 1);
wenzelm@4089
   111
by (blast_tac (claset() addIs [rtrancl_trans]) 1);
paulson@1642
   112
by (etac r_into_rtrancl 1);
paulson@1642
   113
qed "rtrancl_idemp";
paulson@1642
   114
Addsimps [rtrancl_idemp];
paulson@1642
   115
wenzelm@5069
   116
Goal "R^* O R^* = R^*";
wenzelm@5132
   117
by (rtac set_ext 1);
wenzelm@5132
   118
by (split_all_tac 1);
wenzelm@5132
   119
by (blast_tac (claset() addIs [rtrancl_trans]) 1);
nipkow@4830
   120
qed "rtrancl_idemp_self_comp";
nipkow@4830
   121
Addsimps [rtrancl_idemp_self_comp];
nipkow@4830
   122
paulson@5143
   123
Goal "r <= s^* ==> r^* <= s^*";
paulson@2031
   124
by (dtac rtrancl_mono 1);
paulson@1642
   125
by (Asm_full_simp_tac 1);
paulson@1642
   126
qed "rtrancl_subset_rtrancl";
paulson@1642
   127
paulson@5143
   128
Goal "[| R <= S; S <= R^* |] ==> S^* = R^*";
paulson@1642
   129
by (dtac rtrancl_mono 1);
paulson@1642
   130
by (dtac rtrancl_mono 1);
paulson@1642
   131
by (Asm_full_simp_tac 1);
paulson@2891
   132
by (Blast_tac 1);
paulson@1642
   133
qed "rtrancl_subset";
paulson@1642
   134
paulson@5143
   135
Goal "(R^* Un S^*)^* = (R Un S)^*";
paulson@5479
   136
by (blast_tac (claset() addSIs [rtrancl_subset]
paulson@5479
   137
                        addIs [r_into_rtrancl, rtrancl_mono RS subsetD]) 1);
paulson@1642
   138
qed "rtrancl_Un_rtrancl";
nipkow@1496
   139
wenzelm@5069
   140
Goal "(R^=)^* = R^*";
nipkow@5281
   141
by (blast_tac (claset() addSIs [rtrancl_subset] addIs [r_into_rtrancl]) 1);
paulson@1642
   142
qed "rtrancl_reflcl";
paulson@1642
   143
Addsimps [rtrancl_reflcl];
paulson@1642
   144
paulson@5143
   145
Goal "(x,y) : (r^-1)^* ==> (x,y) : (r^*)^-1";
paulson@4746
   146
by (rtac converseI 1);
paulson@1642
   147
by (etac rtrancl_induct 1);
paulson@1642
   148
by (rtac rtrancl_refl 1);
wenzelm@4089
   149
by (blast_tac (claset() addIs [r_into_rtrancl,rtrancl_trans]) 1);
paulson@4746
   150
qed "rtrancl_converseD";
paulson@1642
   151
paulson@5143
   152
Goal "(x,y) : (r^*)^-1 ==> (x,y) : (r^-1)^*";
paulson@4746
   153
by (dtac converseD 1);
paulson@1642
   154
by (etac rtrancl_induct 1);
paulson@1642
   155
by (rtac rtrancl_refl 1);
wenzelm@4089
   156
by (blast_tac (claset() addIs [r_into_rtrancl,rtrancl_trans]) 1);
paulson@4746
   157
qed "rtrancl_converseI";
paulson@1642
   158
wenzelm@5069
   159
Goal "(r^-1)^* = (r^*)^-1";
oheimb@4838
   160
by (safe_tac (claset() addSDs [rtrancl_converseD] addSIs [rtrancl_converseI]));
paulson@4746
   161
qed "rtrancl_converse";
paulson@1642
   162
paulson@5316
   163
val major::prems = Goal
nipkow@1706
   164
    "[| (a,b) : r^*; P(b); \
nipkow@1706
   165
\       !!y z.[| (y,z) : r;  (z,b) : r^*;  P(z) |] ==> P(y) |]  \
nipkow@1706
   166
\     ==> P(a)";
paulson@4746
   167
by (rtac ((major RS converseI RS rtrancl_converseI) RS rtrancl_induct) 1);
paulson@2031
   168
by (resolve_tac prems 1);
paulson@4746
   169
by (blast_tac (claset() addIs prems addSDs[rtrancl_converseD])1);
paulson@4746
   170
qed "converse_rtrancl_induct";
nipkow@1706
   171
nipkow@5347
   172
bind_thm ("converse_rtrancl_induct2", split_rule
nipkow@5347
   173
  (read_instantiate [("a","(ax,ay)"),("b","(bx,by)")]converse_rtrancl_induct));
nipkow@1496
   174
paulson@5316
   175
val major::prems = Goal
nipkow@3413
   176
 "[| (x,z):r^*; \
nipkow@3413
   177
\    x=z ==> P; \
nipkow@3413
   178
\    !!y. [| (x,y):r; (y,z):r^* |] ==> P \
nipkow@3413
   179
\ |] ==> P";
nipkow@3413
   180
by (subgoal_tac "x = z  | (? y. (x,y) : r & (y,z) : r^*)" 1);
paulson@4746
   181
by (rtac (major RS converse_rtrancl_induct) 2);
wenzelm@4089
   182
by (blast_tac (claset() addIs prems) 2);
wenzelm@4089
   183
by (blast_tac (claset() addIs prems) 2);
nipkow@3413
   184
by (REPEAT (eresolve_tac ([asm_rl,exE,disjE,conjE]@prems) 1));
nipkow@5347
   185
qed "converse_rtranclE";
nipkow@5347
   186
nipkow@5347
   187
bind_thm ("converse_rtranclE2", split_rule
nipkow@5347
   188
  (read_instantiate [("x","(xa,xb)"), ("z","(za,zb)")] converse_rtranclE));
nipkow@3413
   189
wenzelm@5069
   190
Goal "r O r^* = r^* O r";
nipkow@5347
   191
by (blast_tac (claset() addEs [rtranclE, converse_rtranclE] 
paulson@3723
   192
	               addIs [rtrancl_into_rtrancl, rtrancl_into_rtrancl2]) 1);
nipkow@3413
   193
qed "r_comp_rtrancl_eq";
nipkow@3413
   194
clasohm@923
   195
clasohm@923
   196
(**** The relation trancl ****)
clasohm@923
   197
nipkow@5771
   198
section "^+";
nipkow@5771
   199
paulson@5143
   200
Goalw [trancl_def] "[| p:r^+; r <= s |] ==> p:s^+";
wenzelm@4089
   201
by (blast_tac (claset() addIs [rtrancl_mono RS subsetD]) 1);
nipkow@3413
   202
qed "trancl_mono";
nipkow@3413
   203
clasohm@923
   204
(** Conversions between trancl and rtrancl **)
clasohm@923
   205
wenzelm@5069
   206
Goalw [trancl_def]
oheimb@4764
   207
    "!!p. p : r^+ ==> p : r^*";
oheimb@4764
   208
by (split_all_tac 1);
oheimb@4764
   209
by (etac compEpair 1);
clasohm@923
   210
by (REPEAT (ares_tac [rtrancl_into_rtrancl] 1));
clasohm@923
   211
qed "trancl_into_rtrancl";
clasohm@923
   212
clasohm@923
   213
(*r^+ contains r*)
wenzelm@5069
   214
Goalw [trancl_def]
oheimb@4764
   215
   "!!p. p : r ==> p : r^+";
oheimb@4764
   216
by (split_all_tac 1);
clasohm@923
   217
by (REPEAT (ares_tac [prem,compI,rtrancl_refl] 1));
clasohm@923
   218
qed "r_into_trancl";
clasohm@923
   219
clasohm@923
   220
(*intro rule by definition: from rtrancl and r*)
paulson@5255
   221
Goalw [trancl_def] "[| (a,b) : r^*;  (b,c) : r |]   ==>  (a,c) : r^+";
paulson@5255
   222
by Auto_tac;
clasohm@923
   223
qed "rtrancl_into_trancl1";
clasohm@923
   224
clasohm@923
   225
(*intro rule from r and rtrancl*)
paulson@5255
   226
Goal "[| (a,b) : r;  (b,c) : r^* |]   ==>  (a,c) : r^+";
paulson@5255
   227
by (etac rtranclE 1);
paulson@5255
   228
by (blast_tac (claset() addIs [r_into_trancl]) 1);
nipkow@1122
   229
by (rtac (rtrancl_trans RS rtrancl_into_trancl1) 1);
paulson@5255
   230
by (REPEAT (ares_tac [r_into_rtrancl] 1));
clasohm@923
   231
qed "rtrancl_into_trancl2";
clasohm@923
   232
paulson@1642
   233
(*Nice induction rule for trancl*)
paulson@5316
   234
val major::prems = Goal
paulson@1642
   235
  "[| (a,b) : r^+;                                      \
paulson@1642
   236
\     !!y.  [| (a,y) : r |] ==> P(y);                   \
paulson@1642
   237
\     !!y z.[| (a,y) : r^+;  (y,z) : r;  P(y) |] ==> P(z)       \
paulson@1642
   238
\  |] ==> P(b)";
paulson@1642
   239
by (rtac (rewrite_rule [trancl_def] major  RS  compEpair) 1);
paulson@1642
   240
(*by induction on this formula*)
paulson@1642
   241
by (subgoal_tac "ALL z. (y,z) : r --> P(z)" 1);
paulson@1642
   242
(*now solve first subgoal: this formula is sufficient*)
paulson@2891
   243
by (Blast_tac 1);
paulson@1642
   244
by (etac rtrancl_induct 1);
wenzelm@4089
   245
by (ALLGOALS (blast_tac (claset() addIs (rtrancl_into_trancl1::prems))));
paulson@1642
   246
qed "trancl_induct";
paulson@1642
   247
clasohm@923
   248
(*elimination of r^+ -- NOT an induction rule*)
paulson@5316
   249
val major::prems = Goal
clasohm@972
   250
    "[| (a::'a,b) : r^+;  \
clasohm@972
   251
\       (a,b) : r ==> P; \
clasohm@1465
   252
\       !!y.[| (a,y) : r^+;  (y,b) : r |] ==> P  \
clasohm@923
   253
\    |] ==> P";
clasohm@972
   254
by (subgoal_tac "(a::'a,b) : r | (? y. (a,y) : r^+  &  (y,b) : r)" 1);
clasohm@923
   255
by (REPEAT (eresolve_tac ([asm_rl,disjE,exE,conjE]@prems) 1));
clasohm@923
   256
by (rtac (rewrite_rule [trancl_def] major RS compEpair) 1);
clasohm@923
   257
by (etac rtranclE 1);
paulson@2891
   258
by (Blast_tac 1);
wenzelm@4089
   259
by (blast_tac (claset() addSIs [rtrancl_into_trancl1]) 1);
clasohm@923
   260
qed "tranclE";
clasohm@923
   261
clasohm@923
   262
(*Transitivity of r^+.
clasohm@923
   263
  Proved by unfolding since it uses transitivity of rtrancl. *)
wenzelm@5069
   264
Goalw [trancl_def] "trans(r^+)";
clasohm@923
   265
by (rtac transI 1);
clasohm@923
   266
by (REPEAT (etac compEpair 1));
nipkow@1122
   267
by (rtac (rtrancl_into_rtrancl RS (rtrancl_trans RS compI)) 1);
clasohm@923
   268
by (REPEAT (assume_tac 1));
clasohm@923
   269
qed "trans_trancl";
clasohm@923
   270
paulson@1642
   271
bind_thm ("trancl_trans", trans_trancl RS transD);
paulson@1642
   272
paulson@5255
   273
Goalw [trancl_def] "[| (x,y):r^*; (y,z):r^+ |] ==> (x,z):r^+";
wenzelm@4089
   274
by (blast_tac (claset() addIs [rtrancl_trans,r_into_rtrancl]) 1);
nipkow@3413
   275
qed "rtrancl_trancl_trancl";
nipkow@3413
   276
paulson@5255
   277
(* "[| (a,b) : r;  (b,c) : r^+ |]   ==>  (a,c) : r^+" *)
paulson@5255
   278
bind_thm ("trancl_into_trancl2", [trans_trancl, r_into_trancl] MRS transD);
clasohm@923
   279
nipkow@3413
   280
(* primitive recursion for trancl over finite relations: *)
wenzelm@5069
   281
Goal "(insert (y,x) r)^+ = r^+ Un {(a,b). (a,y):r^* & (x,b):r^*}";
paulson@3457
   282
by (rtac equalityI 1);
paulson@3457
   283
 by (rtac subsetI 1);
paulson@3457
   284
 by (split_all_tac 1);
paulson@3457
   285
 by (etac trancl_induct 1);
wenzelm@4089
   286
  by (blast_tac (claset() addIs [r_into_trancl]) 1);
wenzelm@4089
   287
 by (blast_tac (claset() addIs
nipkow@3413
   288
     [rtrancl_into_trancl1,trancl_into_rtrancl,r_into_trancl,trancl_trans]) 1);
paulson@3457
   289
by (rtac subsetI 1);
wenzelm@4089
   290
by (blast_tac (claset() addIs
nipkow@3413
   291
     [rtrancl_into_trancl2, rtrancl_trancl_trancl,
nipkow@3413
   292
      impOfSubs rtrancl_mono, trancl_mono]) 1);
nipkow@3413
   293
qed "trancl_insert";
nipkow@3413
   294
wenzelm@5069
   295
Goalw [trancl_def] "(r^-1)^+ = (r^+)^-1";
paulson@4746
   296
by (simp_tac (simpset() addsimps [rtrancl_converse,converse_comp]) 1);
paulson@5451
   297
by (simp_tac (simpset() addsimps [rtrancl_converse RS sym,
paulson@5451
   298
				  r_comp_rtrancl_eq]) 1);
paulson@4746
   299
qed "trancl_converse";
nipkow@3413
   300
nipkow@5771
   301
Goal "(x,y) : (r^+)^-1 ==> (x,y) : (r^-1)^+";
nipkow@5771
   302
by (asm_full_simp_tac (simpset() addsimps [trancl_converse]) 1);
nipkow@5771
   303
qed "trancl_converseI";
nipkow@5771
   304
nipkow@5771
   305
Goal "(x,y) : (r^-1)^+ ==> (x,y) : (r^+)^-1";
nipkow@5771
   306
by (asm_full_simp_tac (simpset() addsimps [trancl_converse]) 1);
nipkow@5771
   307
qed "trancl_converseD";
nipkow@5771
   308
nipkow@5771
   309
val major::prems = Goal
nipkow@5771
   310
    "[| (a,b) : r^+; !!y. (y,b) : r ==> P(y); \
nipkow@5771
   311
\       !!y z.[| (y,z) : r;  (z,b) : r^+;  P(z) |] ==> P(y) |]  \
nipkow@5771
   312
\     ==> P(a)";
nipkow@5771
   313
by (rtac ((major RS converseI RS trancl_converseI) RS trancl_induct) 1);
nipkow@5771
   314
 by (resolve_tac prems 1);
nipkow@5771
   315
 be converseD 1;
nipkow@5771
   316
by (blast_tac (claset() addIs prems addSDs [trancl_converseD])1);
nipkow@5771
   317
qed "converse_trancl_induct";
nipkow@5771
   318
paulson@5451
   319
(*Unused*)
paulson@5451
   320
qed_goal "irrefl_tranclI" Trancl.thy 
paulson@5451
   321
   "!!r. r^-1 Int r^+ = {} ==> (x, x) ~: r^+" 
paulson@5451
   322
 (K [subgoal_tac "!y. (x, y) : r^+ --> x~=y" 1,
paulson@5451
   323
     Fast_tac 1,
paulson@5451
   324
     strip_tac 1,
paulson@5451
   325
     etac trancl_induct 1,
paulson@5451
   326
     auto_tac (claset() addIs [r_into_trancl], simpset())]);
nipkow@1130
   327
paulson@5255
   328
Goal "[| (a,b) : r^*;  r <= A Times A |] ==> a=b | a:A";
paulson@5255
   329
by (etac rtrancl_induct 1);
paulson@5255
   330
by Auto_tac;
paulson@1642
   331
val lemma = result();
clasohm@923
   332
paulson@5148
   333
Goalw [trancl_def] "r <= A Times A ==> r^+ <= A Times A";
wenzelm@4089
   334
by (blast_tac (claset() addSDs [lemma]) 1);
clasohm@923
   335
qed "trancl_subset_Sigma";
nipkow@1130
   336
oheimb@4764
   337
wenzelm@5069
   338
Goal "(r^+)^= = r^*";
oheimb@4838
   339
by Safe_tac;
oheimb@4764
   340
by  (etac trancl_into_rtrancl 1);
oheimb@4764
   341
by (etac rtranclE 1);
oheimb@4772
   342
by  (Auto_tac );
oheimb@4764
   343
by (etac rtrancl_into_trancl1 1);
wenzelm@5132
   344
by (assume_tac 1);
oheimb@4764
   345
qed "reflcl_trancl";
oheimb@4764
   346
Addsimps[reflcl_trancl];
oheimb@4764
   347
wenzelm@5069
   348
Goal "(r^=)^+ = r^*";
oheimb@4838
   349
by Safe_tac;
oheimb@4764
   350
by  (dtac trancl_into_rtrancl 1);
oheimb@4764
   351
by  (Asm_full_simp_tac 1);
oheimb@4764
   352
by (etac rtranclE 1);
oheimb@4764
   353
by  Safe_tac;
oheimb@4764
   354
by  (rtac r_into_trancl 1);
oheimb@4764
   355
by  (Simp_tac 1);
oheimb@4764
   356
by (rtac rtrancl_into_trancl1 1);
oheimb@4764
   357
by (etac (rtrancl_reflcl RS equalityD2 RS subsetD) 1);
oheimb@4764
   358
by (Fast_tac 1);
oheimb@4764
   359
qed "trancl_reflcl";
oheimb@4764
   360
Addsimps[trancl_reflcl];
oheimb@4764
   361
oheimb@4764
   362
qed_goal "trancl_empty" Trancl.thy "{}^+ = {}" 
oheimb@4764
   363
  (K [auto_tac (claset() addEs [trancl_induct], simpset())]);
oheimb@4764
   364
Addsimps[trancl_empty];
oheimb@4764
   365
nipkow@5608
   366
qed_goal "rtrancl_empty" Trancl.thy "{}^* = Id" 
oheimb@4764
   367
  (K [rtac (reflcl_trancl RS subst) 1, Simp_tac 1]);
oheimb@4764
   368
Addsimps[rtrancl_empty];