src/HOL/WF_Rel.ML
changeset 3718 d78cf498a88c
parent 3484 1e93eb09ebb9
child 4089 96fba19bcbe2
equal deleted inserted replaced
3717:e28553315355 3718:d78cf498a88c
    32  * The inverse image into a wellfounded relation is wellfounded.
    32  * The inverse image into a wellfounded relation is wellfounded.
    33  *---------------------------------------------------------------------------*)
    33  *---------------------------------------------------------------------------*)
    34 
    34 
    35 goal thy "!!r. wf(r) ==> wf(inv_image r (f::'a=>'b))"; 
    35 goal thy "!!r. wf(r) ==> wf(inv_image r (f::'a=>'b))"; 
    36 by (full_simp_tac (!simpset addsimps [inv_image_def, wf_eq_minimal]) 1);
    36 by (full_simp_tac (!simpset addsimps [inv_image_def, wf_eq_minimal]) 1);
    37 by (Step_tac 1);
    37 by (Clarify_tac 1);
    38 by (subgoal_tac "? (w::'b). w : {w. ? (x::'a). x: Q & (f x = w)}" 1);
    38 by (subgoal_tac "? (w::'b). w : {w. ? (x::'a). x: Q & (f x = w)}" 1);
    39 by (blast_tac (!claset delrules [allE]) 2);
    39 by (blast_tac (!claset delrules [allE]) 2);
    40 by (etac allE 1);
    40 by (etac allE 1);
    41 by (mp_tac 1);
    41 by (mp_tac 1);
    42 by (Blast_tac 1);
    42 by (Blast_tac 1);
   128  by (etac exE 1);
   128  by (etac exE 1);
   129  by (eres_inst_tac [("x","{w. ? i. w=f i}")] allE 1);
   129  by (eres_inst_tac [("x","{w. ? i. w=f i}")] allE 1);
   130  by (Blast_tac 1);
   130  by (Blast_tac 1);
   131 by (etac swap 1);
   131 by (etac swap 1);
   132 by (Asm_full_simp_tac 1);
   132 by (Asm_full_simp_tac 1);
   133 by (Step_tac 1);
   133 by (Clarify_tac 1);
   134 by (subgoal_tac "!n. nat_rec x (%i y. @z. z:Q & (z,y):r) n : Q" 1);
   134 by (subgoal_tac "!n. nat_rec x (%i y. @z. z:Q & (z,y):r) n : Q" 1);
   135  by (res_inst_tac[("x","nat_rec x (%i y. @z. z:Q & (z,y):r)")]exI 1);
   135  by (res_inst_tac[("x","nat_rec x (%i y. @z. z:Q & (z,y):r)")]exI 1);
   136  by (rtac allI 1);
   136  by (rtac allI 1);
   137  by (Simp_tac 1);
   137  by (Simp_tac 1);
   138  by (rtac selectI2EX 1);
   138  by (rtac selectI2EX 1);