equal
deleted
inserted
replaced
587 |
587 |
588 val copy_strict = |
588 val copy_strict = |
589 let |
589 let |
590 val _ = trace " Proving copy_strict..."; |
590 val _ = trace " Proving copy_strict..."; |
591 val goal = mk_trp (strict (dc_copy `% "f")); |
591 val goal = mk_trp (strict (dc_copy `% "f")); |
592 val rules = [abs_strict, rep_strict] @ @{thms domain_fun_stricts}; |
592 val rules = [abs_strict, rep_strict] @ @{thms domain_map_stricts}; |
593 val tacs = [asm_simp_tac (HOLCF_ss addsimps rules) 1]; |
593 val tacs = [asm_simp_tac (HOLCF_ss addsimps rules) 1]; |
594 in pg [ax_copy_def] goal (K tacs) end; |
594 in pg [ax_copy_def] goal (K tacs) end; |
595 |
595 |
596 local |
596 local |
597 fun copy_app (con, args) = |
597 fun copy_app (con, args) = |
602 then Domain_Axioms.copy_of_dtyp (proj (%:"f") eqs) (dtyp_of arg) ` (%# arg) |
602 then Domain_Axioms.copy_of_dtyp (proj (%:"f") eqs) (dtyp_of arg) ` (%# arg) |
603 else (%# arg); |
603 else (%# arg); |
604 val rhs = con_app2 con one_rhs args; |
604 val rhs = con_app2 con one_rhs args; |
605 val goal = lift_defined %: (nonlazy_rec args, mk_trp (lhs === rhs)); |
605 val goal = lift_defined %: (nonlazy_rec args, mk_trp (lhs === rhs)); |
606 val args' = filter_out (fn a => is_rec a orelse is_lazy a) args; |
606 val args' = filter_out (fn a => is_rec a orelse is_lazy a) args; |
607 val stricts = abs_strict :: rep_strict :: @{thms domain_fun_stricts}; |
607 val stricts = abs_strict :: rep_strict :: @{thms domain_map_stricts}; |
608 fun tacs1 ctxt = map (case_UU_tac ctxt stricts 1 o vname) args'; |
608 fun tacs1 ctxt = map (case_UU_tac ctxt stricts 1 o vname) args'; |
609 val rules = [ax_abs_iso] @ @{thms domain_fun_simps}; |
609 val rules = [ax_abs_iso] @ @{thms domain_map_simps}; |
610 val tacs2 = [asm_simp_tac (HOLCF_ss addsimps rules) 1]; |
610 val tacs2 = [asm_simp_tac (HOLCF_ss addsimps rules) 1]; |
611 in pg (ax_copy_def::con_appls) goal (fn ctxt => (tacs1 ctxt @ tacs2)) end; |
611 in pg (ax_copy_def::con_appls) goal (fn ctxt => (tacs1 ctxt @ tacs2)) end; |
612 in |
612 in |
613 val _ = trace " Proving copy_apps..."; |
613 val _ = trace " Proving copy_apps..."; |
614 val copy_apps = map copy_app cons; |
614 val copy_apps = map copy_app cons; |