Now extracts the predicate variable from induct0 insteead of trying to
authorpaulson
Thu, 05 Jun 1997 13:21:41 +0200
changeset 3402 9477a6410fe1
parent 3401 862e153afc12
child 3403 6cc663f6d62e
Now extracts the predicate variable from induct0 insteead of trying to predict its name. The new "freeze" function requires this.
src/HOL/indrule.ML
--- a/src/HOL/indrule.ML	Thu Jun 05 13:20:18 1997 +0200
+++ b/src/HOL/indrule.ML	Thu Jun 05 13:21:41 1997 +0200
@@ -213,20 +213,20 @@
 
 (** Uncurrying the predicate in the ordinary induction rule **)
 
-(*The name "x.1" comes from the "RS spec" !*)
-val xvar = cterm_of sign (Var(("x",1), elem_type));
+val xvar = cterm_of sign (Var(("x",0), elem_type));
 
 (*strip quantifier and instantiate the variable to a tuple*)
 val induct0 = quant_induct RS spec RSN (2,rev_mp) |>
+              zero_var_indexes |>
               freezeT |>     (*Because elem_type contains TFrees not TVars*)
               instantiate ([], [(xvar, cterm_of sign elem_tuple)]);
 
+val Const ("Trueprop", _) $ (pred_var $ _) = concl_of induct0
+
+
 in
   struct
-  val induct = standard 
-                  (Prod_Syntax.split_rule_var
-                    (Var((pred_name,2), elem_type --> Ind_Syntax.boolT),
-                     induct0));
+  val induct = standard (Prod_Syntax.split_rule_var (pred_var, induct0));
 
   (*Just "True" unless there's true mutual recursion.  This saves storage.*)
   val mutual_induct = Prod_Syntax.remove_split mutual_induct_split