src/ZF/Tools/inductive_package.ML
changeset 51798 ad3a241def73
parent 51717 9e7d1c139569
child 52087 f3075fc4f5f6
equal deleted inserted replaced
51797:182454c06a80 51798:ad3a241def73
   229      if !Ind_Syntax.trace then print_tac "The type-checking subgoal:"
   229      if !Ind_Syntax.trace then print_tac "The type-checking subgoal:"
   230      else all_tac,
   230      else all_tac,
   231      REPEAT (FIRSTGOAL (        dresolve_tac rec_typechecks
   231      REPEAT (FIRSTGOAL (        dresolve_tac rec_typechecks
   232                         ORELSE' eresolve_tac (asm_rl :: @{thm PartE} :: @{thm SigmaE2} ::
   232                         ORELSE' eresolve_tac (asm_rl :: @{thm PartE} :: @{thm SigmaE2} ::
   233                                               type_elims)
   233                                               type_elims)
   234                         ORELSE' hyp_subst_tac)),
   234                         ORELSE' hyp_subst_tac ctxt1)),
   235      if !Ind_Syntax.trace then print_tac "The subgoal after monos, type_elims:"
   235      if !Ind_Syntax.trace then print_tac "The subgoal after monos, type_elims:"
   236      else all_tac,
   236      else all_tac,
   237      DEPTH_SOLVE (swap_res_tac (@{thm SigmaI} :: @{thm subsetI} :: type_intrs) 1)];
   237      DEPTH_SOLVE (swap_res_tac (@{thm SigmaI} :: @{thm subsetI} :: type_intrs) 1)];
   238 
   238 
   239   (*combines disjI1 and disjI2 to get the corresponding nested disjunct...*)
   239   (*combines disjI1 and disjI2 to get the corresponding nested disjunct...*)
   252   val dummy = writeln "  Proving the elimination rule...";
   252   val dummy = writeln "  Proving the elimination rule...";
   253 
   253 
   254   (*Breaks down logical connectives in the monotonic function*)
   254   (*Breaks down logical connectives in the monotonic function*)
   255   val basic_elim_tac =
   255   val basic_elim_tac =
   256       REPEAT (SOMEGOAL (eresolve_tac (Ind_Syntax.elim_rls @ Su.free_SEs)
   256       REPEAT (SOMEGOAL (eresolve_tac (Ind_Syntax.elim_rls @ Su.free_SEs)
   257                 ORELSE' bound_hyp_subst_tac))
   257                 ORELSE' bound_hyp_subst_tac ctxt1))
   258       THEN prune_params_tac
   258       THEN prune_params_tac
   259           (*Mutual recursion: collapse references to Part(D,h)*)
   259           (*Mutual recursion: collapse references to Part(D,h)*)
   260       THEN (PRIMITIVE (fold_rule part_rec_defs));
   260       THEN (PRIMITIVE (fold_rule part_rec_defs));
   261 
   261 
   262   (*Elimination*)
   262   (*Elimination*)
   346             (*This CollectE and disjE separates out the introduction rules*)
   346             (*This CollectE and disjE separates out the introduction rules*)
   347             REPEAT (FIRSTGOAL (eresolve_tac [@{thm CollectE}, @{thm disjE}])),
   347             REPEAT (FIRSTGOAL (eresolve_tac [@{thm CollectE}, @{thm disjE}])),
   348             (*Now break down the individual cases.  No disjE here in case
   348             (*Now break down the individual cases.  No disjE here in case
   349               some premise involves disjunction.*)
   349               some premise involves disjunction.*)
   350             REPEAT (FIRSTGOAL (eresolve_tac [@{thm CollectE}, @{thm exE}, @{thm conjE}]
   350             REPEAT (FIRSTGOAL (eresolve_tac [@{thm CollectE}, @{thm exE}, @{thm conjE}]
   351                                ORELSE' bound_hyp_subst_tac)),
   351                                ORELSE' (bound_hyp_subst_tac ctxt1))),
   352             ind_tac (rev (map (rewrite_rule part_rec_defs) prems)) (length prems)]);
   352             ind_tac (rev (map (rewrite_rule part_rec_defs) prems)) (length prems)]);
   353 
   353 
   354      val dummy =
   354      val dummy =
   355       if ! Ind_Syntax.trace then
   355       if ! Ind_Syntax.trace then
   356         writeln ("quant_induct:\n" ^ Display.string_of_thm ctxt1 quant_induct)
   356         writeln ("quant_induct:\n" ^ Display.string_of_thm ctxt1 quant_induct)