equal
deleted
inserted
replaced
1732 val eq = HOLogic.mk_Trueprop (HOLogic.mk_eq (mk_eq tyco vs extN Ts)); |
1732 val eq = HOLogic.mk_Trueprop (HOLogic.mk_eq (mk_eq tyco vs extN Ts)); |
1733 in |
1733 in |
1734 thy |
1734 thy |
1735 |> Class.instantiation ([tyco], vs, sort) |
1735 |> Class.instantiation ([tyco], vs, sort) |
1736 |> `(fn lthy => Syntax.check_term lthy eq) |
1736 |> `(fn lthy => Syntax.check_term lthy eq) |
1737 |-> (fn eq => Specification.definition NONE [] ((Binding.concealed Binding.empty, []), eq)) |
1737 |-> (fn eq => Specification.definition NONE [] [] ((Binding.concealed Binding.empty, []), eq)) |
1738 |> snd |
1738 |> snd |
1739 |> Class.prove_instantiation_exit (fn ctxt => Class.intro_classes_tac ctxt []) |
1739 |> Class.prove_instantiation_exit (fn ctxt => Class.intro_classes_tac ctxt []) |
1740 end; |
1740 end; |
1741 |
1741 |
1742 fun ensure_sort_record (sort, mk_eq) ext_tyco vs extN Ts thy = |
1742 fun ensure_sort_record (sort, mk_eq) ext_tyco vs extN Ts thy = |
1779 thy |
1779 thy |
1780 |> Code.add_datatype [ext] |
1780 |> Code.add_datatype [ext] |
1781 |> fold Code.add_default_eqn simps |
1781 |> fold Code.add_default_eqn simps |
1782 |> Class.instantiation ([ext_tyco], vs, [HOLogic.class_equal]) |
1782 |> Class.instantiation ([ext_tyco], vs, [HOLogic.class_equal]) |
1783 |> `(fn lthy => Syntax.check_term lthy eq) |
1783 |> `(fn lthy => Syntax.check_term lthy eq) |
1784 |-> (fn eq => Specification.definition NONE [] (Attrib.empty_binding, eq)) |
1784 |-> (fn eq => Specification.definition NONE [] [] (Attrib.empty_binding, eq)) |
1785 |-> (fn (_, (_, eq_def)) => |
1785 |-> (fn (_, (_, eq_def)) => |
1786 Class.prove_instantiation_exit_result Morphism.thm tac eq_def) |
1786 Class.prove_instantiation_exit_result Morphism.thm tac eq_def) |
1787 |-> (fn eq_def => fn thy => |
1787 |-> (fn eq_def => fn thy => |
1788 thy |
1788 thy |
1789 |> Code.del_eqn eq_def |
1789 |> Code.del_eqn eq_def |