src/HOL/WF.ML
changeset 5452 b38332431a8c
parent 5337 2f7d09a927c4
child 5521 7970832271cc
equal deleted inserted replaced
5451:08ca6e067ee6 5452:b38332431a8c
    34 fun wf_ind_tac a prems i = 
    34 fun wf_ind_tac a prems i = 
    35     EVERY [res_inst_tac [("a",a)] wf_induct i,
    35     EVERY [res_inst_tac [("a",a)] wf_induct i,
    36            rename_last_tac a ["1"] (i+1),
    36            rename_last_tac a ["1"] (i+1),
    37            ares_tac prems i];
    37            ares_tac prems i];
    38 
    38 
    39 Goal "[| wf(r);  (a,x):r;  (x,a):r |] ==> P";
    39 Goal "wf(r) ==> ! x. (a,x):r --> (x,a)~:r";
    40 by (subgoal_tac "! x. (a,x):r --> (x,a):r --> P" 1);
       
    41 by (Blast_tac 1);
       
    42 by (wf_ind_tac "a" [] 1);
    40 by (wf_ind_tac "a" [] 1);
    43 by (Blast_tac 1);
    41 by (Blast_tac 1);
    44 qed "wf_asym";
    42 qed_spec_mp "wf_not_sym";
       
    43 
       
    44 (* [| wf(r);  (a,x):r;  ~P ==> (x,a):r |] ==> P *)
       
    45 bind_thm ("wf_asym", wf_not_sym RS swap);
    45 
    46 
    46 Goal "[| wf(r);  (a,a): r |] ==> P";
    47 Goal "[| wf(r);  (a,a): r |] ==> P";
    47 by (blast_tac (claset() addEs [wf_asym]) 1);
    48 by (blast_tac (claset() addEs [wf_asym]) 1);
    48 qed "wf_irrefl";
    49 qed "wf_irrefl";
    49 
    50 
   217 Goalw [acyclic_def]
   218 Goalw [acyclic_def]
   218  "wf r ==> acyclic r";
   219  "wf r ==> acyclic r";
   219 by (blast_tac (claset() addEs [wf_trancl RS wf_irrefl]) 1);
   220 by (blast_tac (claset() addEs [wf_trancl RS wf_irrefl]) 1);
   220 qed "wf_acyclic";
   221 qed "wf_acyclic";
   221 
   222 
   222 Goalw [acyclic_def]
   223 Goalw [acyclic_def] "acyclic(insert (y,x) r) = (acyclic r & (x,y) ~: r^*)";
   223   "acyclic(insert (y,x) r) = (acyclic r & (x,y) ~: r^*)";
       
   224 by (simp_tac (simpset() addsimps [trancl_insert]) 1);
   224 by (simp_tac (simpset() addsimps [trancl_insert]) 1);
   225 by (blast_tac (claset() addEs [make_elim rtrancl_trans]) 1);
   225 by (blast_tac (claset() addIs [rtrancl_trans]) 1);
   226 qed "acyclic_insert";
   226 qed "acyclic_insert";
   227 AddIffs [acyclic_insert];
   227 AddIffs [acyclic_insert];
   228 
   228 
   229 Goalw [acyclic_def] "acyclic(r^-1) = acyclic r";
   229 Goalw [acyclic_def] "acyclic(r^-1) = acyclic r";
   230 by (simp_tac (simpset() addsimps [trancl_converse]) 1);
   230 by (simp_tac (simpset() addsimps [trancl_converse]) 1);