equal
deleted
inserted
replaced
248 val intrs = |
248 val intrs = |
249 (intr_tms, map intro_tacsf (mk_disj_rls (length intr_tms))) |
249 (intr_tms, map intro_tacsf (mk_disj_rls (length intr_tms))) |
250 |> ListPair.map (fn (t, tacs) => |
250 |> ListPair.map (fn (t, tacs) => |
251 Goal.prove_global thy1 [] [] t |
251 Goal.prove_global thy1 [] [] t |
252 (fn _ => EVERY (rewrite_goals_tac part_rec_defs :: tacs))) |
252 (fn _ => EVERY (rewrite_goals_tac part_rec_defs :: tacs))) |
253 handle MetaSimplifier.SIMPLIFIER (msg, thm) => (print_thm thm; error msg); |
253 handle MetaSimplifier.SIMPLIFIER (msg, thm) => (Display.print_thm thm; error msg); |
254 |
254 |
255 (********) |
255 (********) |
256 val dummy = writeln " Proving the elimination rule..."; |
256 val dummy = writeln " Proving the elimination rule..."; |
257 |
257 |
258 (*Breaks down logical connectives in the monotonic function*) |
258 (*Breaks down logical connectives in the monotonic function*) |
323 intr_tms; |
323 intr_tms; |
324 |
324 |
325 val dummy = if !Ind_Syntax.trace then |
325 val dummy = if !Ind_Syntax.trace then |
326 (writeln "ind_prems = "; |
326 (writeln "ind_prems = "; |
327 List.app (writeln o Syntax.string_of_term ctxt1) ind_prems; |
327 List.app (writeln o Syntax.string_of_term ctxt1) ind_prems; |
328 writeln "raw_induct = "; print_thm raw_induct) |
328 writeln "raw_induct = "; Display.print_thm raw_induct) |
329 else (); |
329 else (); |
330 |
330 |
331 |
331 |
332 (*We use a MINIMAL simpset. Even FOL_ss contains too many simpules. |
332 (*We use a MINIMAL simpset. Even FOL_ss contains too many simpules. |
333 If the premises get simplified, then the proofs could fail.*) |
333 If the premises get simplified, then the proofs could fail.*) |
354 REPEAT (FIRSTGOAL (eresolve_tac [@{thm CollectE}, @{thm exE}, @{thm conjE}] |
354 REPEAT (FIRSTGOAL (eresolve_tac [@{thm CollectE}, @{thm exE}, @{thm conjE}] |
355 ORELSE' bound_hyp_subst_tac)), |
355 ORELSE' bound_hyp_subst_tac)), |
356 ind_tac (rev (map (rewrite_rule part_rec_defs) prems)) (length prems)]); |
356 ind_tac (rev (map (rewrite_rule part_rec_defs) prems)) (length prems)]); |
357 |
357 |
358 val dummy = if !Ind_Syntax.trace then |
358 val dummy = if !Ind_Syntax.trace then |
359 (writeln "quant_induct = "; print_thm quant_induct) |
359 (writeln "quant_induct = "; Display.print_thm quant_induct) |
360 else (); |
360 else (); |
361 |
361 |
362 |
362 |
363 (*** Prove the simultaneous induction rule ***) |
363 (*** Prove the simultaneous induction rule ***) |
364 |
364 |
429 [rewrite_goals_tac part_rec_defs, |
429 [rewrite_goals_tac part_rec_defs, |
430 REPEAT (rewrite_goals_tac [Pr.split_eq] THEN lemma_tac 1)])) |
430 REPEAT (rewrite_goals_tac [Pr.split_eq] THEN lemma_tac 1)])) |
431 else (writeln " [ No mutual induction rule needed ]"; @{thm TrueI}); |
431 else (writeln " [ No mutual induction rule needed ]"; @{thm TrueI}); |
432 |
432 |
433 val dummy = if !Ind_Syntax.trace then |
433 val dummy = if !Ind_Syntax.trace then |
434 (writeln "lemma = "; print_thm lemma) |
434 (writeln "lemma = "; Display.print_thm lemma) |
435 else (); |
435 else (); |
436 |
436 |
437 |
437 |
438 (*Mutual induction follows by freeness of Inl/Inr.*) |
438 (*Mutual induction follows by freeness of Inl/Inr.*) |
439 |
439 |