src/HOL/ex/Acc.ML
changeset 1642 21db0cf9a1a4
parent 1465 5d7a7e439cec
child 1820 e381e1c51689
equal deleted inserted replaced
1641:46d2d4a249ca 1642:21db0cf9a1a4
    35 by (fast_tac set_cs 2);
    35 by (fast_tac set_cs 2);
    36 by (etac (Int_lower1 RS Pow_mono RS subsetD) 1);
    36 by (etac (Int_lower1 RS Pow_mono RS subsetD) 1);
    37 qed "acc_induct";
    37 qed "acc_induct";
    38 
    38 
    39 
    39 
    40 val [major] = goal Acc.thy "r <= Sigma (acc r) (%u. acc(r)) ==> wf(r)";
    40 val [major] = goal Acc.thy "r <= (acc r) Times (acc r) ==> wf(r)";
    41 by (rtac (major RS wfI) 1);
    41 by (rtac (major RS wfI) 1);
    42 by (etac acc.induct 1);
    42 by (etac acc.induct 1);
    43 by (rewtac pred_def);
    43 by (rewtac pred_def);
    44 by (fast_tac set_cs 1);
    44 by (fast_tac set_cs 1);
    45 qed "acc_wfI";
    45 qed "acc_wfI";
    49 by (rtac (impI RS allI) 1);
    49 by (rtac (impI RS allI) 1);
    50 by (rtac accI 1);
    50 by (rtac accI 1);
    51 by (fast_tac set_cs 1);
    51 by (fast_tac set_cs 1);
    52 qed "acc_wfD_lemma";
    52 qed "acc_wfD_lemma";
    53 
    53 
    54 val [major] = goal Acc.thy "wf(r) ==> r <= Sigma (acc r) (%u. acc(r))";
    54 val [major] = goal Acc.thy "wf(r) ==> r <= (acc r) Times (acc r)";
    55 by (rtac subsetI 1);
    55 by (rtac subsetI 1);
    56 by (res_inst_tac [("p", "x")] PairE 1);
    56 by (res_inst_tac [("p", "x")] PairE 1);
    57 by (fast_tac (set_cs addSIs [SigmaI,
    57 by (fast_tac (set_cs addSIs [SigmaI,
    58                              major RS acc_wfD_lemma RS spec RS mp]) 1);
    58                              major RS acc_wfD_lemma RS spec RS mp]) 1);
    59 qed "acc_wfD";
    59 qed "acc_wfD";
    60 
    60 
    61 goal Acc.thy "wf(r)  =  (r <= Sigma (acc r) (%u. acc(r)))";
    61 goal Acc.thy "wf(r)  =  (r <= (acc r) Times (acc r))";
    62 by (EVERY1 [rtac iffI, etac acc_wfD, etac acc_wfI]);
    62 by (EVERY1 [rtac iffI, etac acc_wfD, etac acc_wfI]);
    63 qed "wf_acc_iff";
    63 qed "wf_acc_iff";