equal
deleted
inserted
replaced
706 val eqs' = map reverse_bounds eqs |
706 val eqs' = map reverse_bounds eqs |
707 val pat_eq' = reverse_bounds pat_eq |
707 val pat_eq' = reverse_bounds pat_eq |
708 val inner_t = |
708 val inner_t = |
709 fold (fn (_, T) => fn t => HOLogic.exists_const T $ absdummy T t) |
709 fold (fn (_, T) => fn t => HOLogic.exists_const T $ absdummy T t) |
710 (rev bound_vs) (fold (curry HOLogic.mk_conj) eqs' pat_eq') |
710 (rev bound_vs) (fold (curry HOLogic.mk_conj) eqs' pat_eq') |
711 val lhs = term_of redex |
711 val lhs = Thm.term_of redex |
712 val rhs = HOLogic.mk_Collect ("x", rT, inner_t) |
712 val rhs = HOLogic.mk_Collect ("x", rT, inner_t) |
713 val rewrite_rule_t = HOLogic.mk_Trueprop (HOLogic.mk_eq (lhs, rhs)) |
713 val rewrite_rule_t = HOLogic.mk_Trueprop (HOLogic.mk_eq (lhs, rhs)) |
714 in |
714 in |
715 SOME |
715 SOME |
716 ((Goal.prove ctxt [] [] rewrite_rule_t |
716 ((Goal.prove ctxt [] [] rewrite_rule_t |
717 (fn {context, ...} => tac context (rev Tis))) RS @{thm eq_reflection}) |
717 (fn {context, ...} => tac context (rev Tis))) RS @{thm eq_reflection}) |
718 end)) |
718 end)) |
719 in |
719 in |
720 make_inner_eqs [] [] [] (dest_set (term_of redex)) |
720 make_inner_eqs [] [] [] (dest_set (Thm.term_of redex)) |
721 end |
721 end |
722 |
722 |
723 end |
723 end |
724 *} |
724 *} |
725 |
725 |
1041 in |
1041 in |
1042 if list1 lastl andalso list1 lastr then rearr @{thm append1_eq_conv} |
1042 if list1 lastl andalso list1 lastr then rearr @{thm append1_eq_conv} |
1043 else if lastl aconv lastr then rearr @{thm append_same_eq} |
1043 else if lastl aconv lastr then rearr @{thm append_same_eq} |
1044 else NONE |
1044 else NONE |
1045 end; |
1045 end; |
1046 in fn _ => fn ctxt => fn ct => list_eq ctxt (term_of ct) end; |
1046 in fn _ => fn ctxt => fn ct => list_eq ctxt (Thm.term_of ct) end; |
1047 *} |
1047 *} |
1048 |
1048 |
1049 |
1049 |
1050 subsubsection {* @{const map} *} |
1050 subsubsection {* @{const map} *} |
1051 |
1051 |