src/Provers/blast.ML
changeset 18171 c4f873d65603
parent 18146 47463b1825c6
child 18177 7041d038acb0
equal deleted inserted replaced
18170:73ce773f12de 18171:c4f873d65603
     6 Generic tableau prover with proof reconstruction
     6 Generic tableau prover with proof reconstruction
     7 
     7 
     8   SKOLEMIZES ReplaceI WRONGLY: allow new vars in prems, or forbid such rules??
     8   SKOLEMIZES ReplaceI WRONGLY: allow new vars in prems, or forbid such rules??
     9   Needs explicit instantiation of assumptions?
     9   Needs explicit instantiation of assumptions?
    10 
    10 
       
    11 Given the typeargs system, constructor Const could be eliminated, with
       
    12 TConst replaced by a constructor that takes the typargs list as an argument.
       
    13 However, Const is heavily used for logical connectives.
    11 
    14 
    12 Blast_tac is often more powerful than fast_tac, but has some limitations.
    15 Blast_tac is often more powerful than fast_tac, but has some limitations.
    13 Blast_tac...
    16 Blast_tac...
    14   * ignores wrappers (addss, addbefore, addafter, addWrapper, ...); 
    17   * ignores wrappers (addss, addbefore, addafter, addWrapper, ...); 
    15     this restriction is intrinsic
    18     this restriction is intrinsic
    46 *)
    49 *)
    47 signature BLAST_DATA =
    50 signature BLAST_DATA =
    48   sig
    51   sig
    49   type claset
    52   type claset
    50   val notE		: thm		(* [| ~P;  P |] ==> R *)
    53   val notE		: thm		(* [| ~P;  P |] ==> R *)
    51   val is_hol    : bool      (*Is this HOL or FOL/ZF?*)	
       
    52   val ccontr		: thm		
    54   val ccontr		: thm		
    53   val contr_tac 	: int -> tactic
    55   val contr_tac 	: int -> tactic
    54   val dup_intr		: thm -> thm
    56   val dup_intr		: thm -> thm
    55   val hyp_subst_tac     : bool ref -> int -> tactic
    57   val hyp_subst_tac     : bool ref -> int -> tactic
    56   val claset		: unit -> claset
    58   val claset		: unit -> claset
   154 fun mkGoal P = Const"*Goal*" $ P;
   156 fun mkGoal P = Const"*Goal*" $ P;
   155 
   157 
   156 fun isGoal (Const"*Goal*" $ _) = true
   158 fun isGoal (Const"*Goal*" $ _) = true
   157   | isGoal _                   = false;
   159   | isGoal _                   = false;
   158 
   160 
   159 val boolT = if Data.is_hol then "bool" else "o";
   161 val boolT = 
       
   162   case term_vars (hd (prems_of Data.notE)) of
       
   163       [Term.Var(_, Type(s, []))] => s
       
   164     | _ => error ("Theorem notE is ill-formed: " ^ string_of_thm Data.notE);
       
   165 
   160 val Trueprop = Term.Const("Trueprop", Type(boolT,[])-->propT);
   166 val Trueprop = Term.Const("Trueprop", Type(boolT,[])-->propT);
   161 fun mk_tprop P = Term.$ (Trueprop, P);
   167 fun mk_tprop P = Term.$ (Trueprop, P);
   162 
   168 
   163 fun isTrueprop (Term.Const("Trueprop",_)) = true
   169 fun isTrueprop (Term.Const("Trueprop",_)) = true
   164   | isTrueprop _                          = false;
   170   | isTrueprop _                          = false;