src/HOL/meson_lemmas.ML
changeset 14733 3eda95792083
parent 11460 e5fb885bfe3a
equal deleted inserted replaced
14732:967db86e853c 14733:3eda95792083
     6 Lemmas for Meson.
     6 Lemmas for Meson.
     7 *)
     7 *)
     8 
     8 
     9 (* Generation of contrapositives *)
     9 (* Generation of contrapositives *)
    10 
    10 
    11 (*Inserts negated disjunct after removing the negation; P is a literal*)
    11 (*Inserts negated disjunct after removing the negation; P is a literal.
       
    12   Model elimination requires assuming the negation of every attempted subgoal,
       
    13   hence the negated disjuncts.*)
    12 val [major,minor] = Goal "~P|Q ==> ((~P==>P) ==> Q)";
    14 val [major,minor] = Goal "~P|Q ==> ((~P==>P) ==> Q)";
    13 by (rtac (major RS disjE) 1);
    15 by (rtac (major RS disjE) 1);
    14 by (rtac notE 1);
    16 by (rtac notE 1);
    15 by (etac minor 2);
    17 by (etac minor 2);
    16 by (ALLGOALS assume_tac);
    18 by (ALLGOALS assume_tac);
    27 by (rtac notE 1);
    29 by (rtac notE 1);
    28 by (etac minor 1);
    30 by (etac minor 1);
    29 by (ALLGOALS assume_tac);
    31 by (ALLGOALS assume_tac);
    30 qed "make_pos_rule";
    32 qed "make_pos_rule";
    31 
    33 
       
    34 (** Versions of make_neg_rule and make_pos_rule that don't insert new 
       
    35     assumptions, for ordinary resolution. **)
       
    36 
       
    37 val make_neg_rule' = make_refined_neg_rule;
       
    38 
       
    39 Goal "[|P|Q; ~P|] ==> Q";
       
    40 by (Blast_tac 1);
       
    41 qed "make_pos_rule'";
    32 
    42 
    33 (* Generation of a goal clause -- put away the final literal *)
    43 (* Generation of a goal clause -- put away the final literal *)
    34 
    44 
    35 val [major,minor] = Goal "~P ==> ((~P==>P) ==> False)";
    45 val [major,minor] = Goal "~P ==> ((~P==>P) ==> False)";
    36 by (rtac notE 1);
    46 by (rtac notE 1);