equal
deleted
inserted
replaced
126 end; |
126 end; |
127 in |
127 in |
128 thy |
128 thy |
129 |> TheoryTarget.instantiation ([tyco], vs, @{sort random}) |
129 |> TheoryTarget.instantiation ([tyco], vs, @{sort random}) |
130 |> PrimrecPackage.add_primrec |
130 |> PrimrecPackage.add_primrec |
131 [(fst (dest_Free random'), SOME (snd (dest_Free random')), NoSyn)] |
131 [(Name.binding (fst (dest_Free random')), SOME (snd (dest_Free random')), NoSyn)] |
132 (map (fn eq => (("", [del_func]), eq)) eqs') |
132 (map (fn eq => ((Name.no_binding, [del_func]), eq)) eqs') |
133 |-> add_code |
133 |-> add_code |
134 |> `(fn lthy => Syntax.check_term lthy eq) |
134 |> `(fn lthy => Syntax.check_term lthy eq) |
135 |-> (fn eq => Specification.definition (NONE, (("", []), eq))) |
135 |-> (fn eq => Specification.definition (NONE, ((Name.no_binding, []), eq))) |
136 |> snd |
136 |> snd |
137 |> Class.prove_instantiation_instance (K (Class.intro_classes_tac [])) |
137 |> Class.prove_instantiation_instance (K (Class.intro_classes_tac [])) |
138 |> LocalTheory.exit |
138 |> LocalTheory.exit |
139 |> ProofContext.theory_of |
139 |> ProofContext.theory_of |
140 end |
140 end |
259 val t = mk_generator_expr thy prop tys; |
259 val t = mk_generator_expr thy prop tys; |
260 val eq = Logic.mk_equals (Free ("VALUE", fastype_of t), t) |
260 val eq = Logic.mk_equals (Free ("VALUE", fastype_of t), t) |
261 in |
261 in |
262 thy |
262 thy |
263 |> TheoryTarget.init NONE |
263 |> TheoryTarget.init NONE |
264 |> Specification.definition (NONE, (("", []), eq)) |
264 |> Specification.definition (NONE, ((Name.no_binding, []), eq)) |
265 |> snd |
265 |> snd |
266 |> LocalTheory.exit |
266 |> LocalTheory.exit |
267 |> ProofContext.theory_of |
267 |> ProofContext.theory_of |
268 end; |
268 end; |
269 |
269 |