src/HOL/Trancl.ML
changeset 10196 4d1af711cf7b
parent 10186 499637e8f2c6
child 10202 9e8b4bebc940
equal deleted inserted replaced
10195:325b6279ae4f 10196:4d1af711cf7b
    36 (*rtrancl of r contains r*)
    36 (*rtrancl of r contains r*)
    37 Goal "!!p. p : r ==> p : r^*";
    37 Goal "!!p. p : r ==> p : r^*";
    38 by (split_all_tac 1);
    38 by (split_all_tac 1);
    39 by (etac (rtrancl_refl RS rtrancl_into_rtrancl) 1);
    39 by (etac (rtrancl_refl RS rtrancl_into_rtrancl) 1);
    40 qed "r_into_rtrancl";
    40 qed "r_into_rtrancl";
       
    41 
       
    42 AddIs [r_into_rtrancl];
    41 
    43 
    42 (*monotonicity of rtrancl*)
    44 (*monotonicity of rtrancl*)
    43 Goalw [rtrancl_def] "r <= s ==> r^* <= s^*";
    45 Goalw [rtrancl_def] "r <= s ==> r^* <= s^*";
    44 by (REPEAT(ares_tac [lfp_mono,Un_mono,comp_mono,subset_refl] 1));
    46 by (REPEAT(ares_tac [lfp_mono,Un_mono,comp_mono,subset_refl] 1));
    45 qed "rtrancl_mono";
    47 qed "rtrancl_mono";
   101 
   103 
   102 (*** More r^* equations and inclusions ***)
   104 (*** More r^* equations and inclusions ***)
   103 
   105 
   104 Goal "(r^*)^* = r^*";
   106 Goal "(r^*)^* = r^*";
   105 by Auto_tac;
   107 by Auto_tac;
   106 by (etac r_into_rtrancl 2);
       
   107 by (etac rtrancl_induct 1);
   108 by (etac rtrancl_induct 1);
   108 by (rtac rtrancl_refl 1);
   109 by (rtac rtrancl_refl 1);
   109 by (blast_tac (claset() addIs rtranclIs) 1);
   110 by (blast_tac (claset() addIs rtranclIs) 1);
   110 qed "rtrancl_idemp";
   111 qed "rtrancl_idemp";
   111 Addsimps [rtrancl_idemp];
   112 Addsimps [rtrancl_idemp];
   222 Goalw [trancl_def]
   223 Goalw [trancl_def]
   223    "!!p. p : r ==> p : r^+";
   224    "!!p. p : r ==> p : r^+";
   224 by (split_all_tac 1);
   225 by (split_all_tac 1);
   225 by (REPEAT (ares_tac [prem,compI,rtrancl_refl] 1));
   226 by (REPEAT (ares_tac [prem,compI,rtrancl_refl] 1));
   226 qed "r_into_trancl";
   227 qed "r_into_trancl";
       
   228 AddIs [r_into_trancl];
   227 
   229 
   228 (*intro rule by definition: from rtrancl and r*)
   230 (*intro rule by definition: from rtrancl and r*)
   229 Goalw [trancl_def] "[| (a,b) : r^*;  (b,c) : r |]   ==>  (a,c) : r^+";
   231 Goalw [trancl_def] "[| (a,b) : r^*;  (b,c) : r |]   ==>  (a,c) : r^+";
   230 by Auto_tac;
   232 by Auto_tac;
   231 qed "rtrancl_into_trancl1";
   233 qed "rtrancl_into_trancl1";
   334 qed "converse_trancl_induct";
   336 qed "converse_trancl_induct";
   335 
   337 
   336 Goal "(x,y):R^+ ==> ? z. (x,z):R & (z,y):R^*";
   338 Goal "(x,y):R^+ ==> ? z. (x,z):R & (z,y):R^*";
   337 be converse_trancl_induct 1;
   339 be converse_trancl_induct 1;
   338 by Auto_tac;
   340 by Auto_tac;
   339 br exI 1;
   341 by (blast_tac (claset() addIs [rtrancl_trans]) 1);
   340 be conjI 1;
       
   341 be (r_into_rtrancl RS rtrancl_trans) 1;
       
   342 ba 1;
       
   343 qed "tranclD";
   342 qed "tranclD";
   344 
   343 
   345 (*Unused*)
   344 (*Unused*)
   346 Goal "r^-1 Int r^+ = {} ==> (x, x) ~: r^+";
   345 Goal "r^-1 Int r^+ = {} ==> (x, x) ~: r^+";
   347 by (subgoal_tac "!y. (x, y) : r^+ --> x~=y" 1);
   346 by (subgoal_tac "!y. (x, y) : r^+ --> x~=y" 1);