src/ZF/Tools/inductive_package.ML
changeset 13627 67b0b7500a9d
parent 12902 a23dc0b7566f
child 13747 bf308fcfd08e
equal deleted inserted replaced
13626:282fbabec862 13627:67b0b7500a9d
   321 
   321 
   322      (*Minimizes backtracking by delivering the correct premise to each goal.
   322      (*Minimizes backtracking by delivering the correct premise to each goal.
   323        Intro rules with extra Vars in premises still cause some backtracking *)
   323        Intro rules with extra Vars in premises still cause some backtracking *)
   324      fun ind_tac [] 0 = all_tac
   324      fun ind_tac [] 0 = all_tac
   325        | ind_tac(prem::prems) i =
   325        | ind_tac(prem::prems) i =
   326              DEPTH_SOLVE_1 (ares_tac [prem, refl] i) THEN
   326              DEPTH_SOLVE_1 (ares_tac [prem, refl] i APPEND hyp_subst_tac i) 
       
   327              THEN
   327              ind_tac prems (i-1);
   328              ind_tac prems (i-1);
   328 
   329 
   329      val pred = Free(pred_name, Ind_Syntax.iT --> FOLogic.oT);
   330      val pred = Free(pred_name, Ind_Syntax.iT --> FOLogic.oT);
   330 
   331 
   331      val ind_prems = map (induct_prem (map (rpair pred) rec_tms))
   332      val ind_prems = map (induct_prem (map (rpair pred) rec_tms))
   360              full_simp_tac (min_ss addsimps [Part_Collect]) 1,
   361              full_simp_tac (min_ss addsimps [Part_Collect]) 1,
   361              (*This CollectE and disjE separates out the introduction rules*)
   362              (*This CollectE and disjE separates out the introduction rules*)
   362              REPEAT (FIRSTGOAL (eresolve_tac [CollectE, disjE])),
   363              REPEAT (FIRSTGOAL (eresolve_tac [CollectE, disjE])),
   363              (*Now break down the individual cases.  No disjE here in case
   364              (*Now break down the individual cases.  No disjE here in case
   364                some premise involves disjunction.*)
   365                some premise involves disjunction.*)
   365              REPEAT (FIRSTGOAL (eresolve_tac [CollectE, exE, conjE]
   366              REPEAT (FIRSTGOAL (eresolve_tac [CollectE, exE, conjE])),
   366                                 ORELSE' hyp_subst_tac)),
       
   367              ind_tac (rev prems) (length prems) ]);
   367              ind_tac (rev prems) (length prems) ]);
   368 
   368 
   369      val dummy = if !Ind_Syntax.trace then
   369      val dummy = if !Ind_Syntax.trace then
   370                  (writeln "quant_induct = "; print_thm quant_induct)
   370                  (writeln "quant_induct = "; print_thm quant_induct)
   371              else ();
   371              else ();