src/FOL/ex/If.ML
changeset 4091 771b1f6422a8
parent 3141 2791aa6dc1bd
child 5050 e925308df78b
equal deleted inserted replaced
4090:9f1eaab75e8c 4091:771b1f6422a8
     9 open If;
     9 open If;
    10 open Cla;    (*in case structure IntPr is open!*)
    10 open Cla;    (*in case structure IntPr is open!*)
    11 
    11 
    12 val prems = goalw If.thy [if_def]
    12 val prems = goalw If.thy [if_def]
    13     "[| P ==> Q; ~P ==> R |] ==> if(P,Q,R)";
    13     "[| P ==> Q; ~P ==> R |] ==> if(P,Q,R)";
    14 by (blast_tac (!claset addIs prems) 1);
    14 by (blast_tac (claset() addIs prems) 1);
    15 qed "ifI";
    15 qed "ifI";
    16 
    16 
    17 val major::prems = goalw If.thy [if_def]
    17 val major::prems = goalw If.thy [if_def]
    18    "[| if(P,Q,R);  [| P; Q |] ==> S; [| ~P; R |] ==> S |] ==> S";
    18    "[| if(P,Q,R);  [| P; Q |] ==> S; [| ~P; R |] ==> S |] ==> S";
    19 by (cut_facts_tac [major] 1);
    19 by (cut_facts_tac [major] 1);
    20 by (blast_tac (!claset addIs prems) 1);
    20 by (blast_tac (claset() addIs prems) 1);
    21 qed "ifE";
    21 qed "ifE";
    22 
    22 
    23 
    23 
    24 goal If.thy
    24 goal If.thy
    25     "if(P, if(Q,A,B), if(Q,C,D)) <-> if(Q, if(P,A,C), if(P,B,D))";
    25     "if(P, if(Q,A,B), if(Q,C,D)) <-> if(Q, if(P,A,C), if(P,B,D))";