equal
deleted
inserted
replaced
17 DEFL : thm |
17 DEFL : thm |
18 } |
18 } |
19 |
19 |
20 val add_domaindef: bool -> binding option -> binding * (string * sort) list * mixfix -> |
20 val add_domaindef: bool -> binding option -> binding * (string * sort) list * mixfix -> |
21 term -> (binding * binding) option -> theory -> |
21 term -> (binding * binding) option -> theory -> |
22 (Typedef.info * Pcpodef.cpo_info * Pcpodef.pcpo_info * rep_info) * theory |
22 (Typedef.info * Cpodef.cpo_info * Cpodef.pcpo_info * rep_info) * theory |
23 |
23 |
24 val domaindef_cmd: (bool * binding) * (binding * (string * string option) list * mixfix) * string |
24 val domaindef_cmd: (bool * binding) * (binding * (string * string option) list * mixfix) * string |
25 * (binding * binding) option -> theory -> theory |
25 * (binding * binding) option -> theory -> theory |
26 end; |
26 end; |
27 |
27 |
84 (name: binding) |
84 (name: binding) |
85 (typ as (tname, raw_args, mx) : binding * (string * sort) list * mixfix) |
85 (typ as (tname, raw_args, mx) : binding * (string * sort) list * mixfix) |
86 (raw_defl: 'a) |
86 (raw_defl: 'a) |
87 (opt_morphs: (binding * binding) option) |
87 (opt_morphs: (binding * binding) option) |
88 (thy: theory) |
88 (thy: theory) |
89 : (Typedef.info * Pcpodef.cpo_info * Pcpodef.pcpo_info * rep_info) * theory = |
89 : (Typedef.info * Cpodef.cpo_info * Cpodef.pcpo_info * rep_info) * theory = |
90 let |
90 let |
91 val _ = Theory.requires thy "Domain" "domaindefs"; |
91 val _ = Theory.requires thy "Domain" "domaindefs"; |
92 |
92 |
93 (*rhs*) |
93 (*rhs*) |
94 val tmp_ctxt = |
94 val tmp_ctxt = |
116 |
116 |
117 (*pcpodef*) |
117 (*pcpodef*) |
118 val tac1 = rtac @{thm defl_set_bottom} 1; |
118 val tac1 = rtac @{thm defl_set_bottom} 1; |
119 val tac2 = rtac @{thm adm_defl_set} 1; |
119 val tac2 = rtac @{thm adm_defl_set} 1; |
120 val ((info, cpo_info, pcpo_info), thy) = thy |
120 val ((info, cpo_info, pcpo_info), thy) = thy |
121 |> Pcpodef.add_pcpodef def (SOME name) typ set (SOME morphs) (tac1, tac2); |
121 |> Cpodef.add_pcpodef def (SOME name) typ set (SOME morphs) (tac1, tac2); |
122 |
122 |
123 (*definitions*) |
123 (*definitions*) |
124 val Rep_const = Const (#Rep_name (#1 info), newT --> udomT); |
124 val Rep_const = Const (#Rep_name (#1 info), newT --> udomT); |
125 val Abs_const = Const (#Abs_name (#1 info), udomT --> newT); |
125 val Abs_const = Const (#Abs_name (#1 info), udomT --> newT); |
126 val emb_eqn = Logic.mk_equals (emb_const newT, cabs_const (newT, udomT) $ Rep_const); |
126 val emb_eqn = Logic.mk_equals (emb_const newT, cabs_const (newT, udomT) $ Rep_const); |