equal
deleted
inserted
replaced
704 (* main predicate definition function *) |
704 (* main predicate definition function *) |
705 |
705 |
706 fun define_preds binding parms (((exts, exts'), (ints, ints')), defs) thy = |
706 fun define_preds binding parms (((exts, exts'), (ints, ints')), defs) thy = |
707 let |
707 let |
708 val ctxt = Proof_Context.init_global thy; |
708 val ctxt = Proof_Context.init_global thy; |
709 val defs' = map (cterm_of thy #> Assumption.assume ctxt #> Drule.abs_def) defs; |
709 val defs' = map (Thm.cterm_of thy #> Assumption.assume ctxt #> Drule.abs_def) defs; |
710 |
710 |
711 val (a_pred, a_intro, a_axioms, thy'') = |
711 val (a_pred, a_intro, a_axioms, thy'') = |
712 if null exts then (NONE, NONE, [], thy) |
712 if null exts then (NONE, NONE, [], thy) |
713 else |
713 else |
714 let |
714 let |
805 val hyp_spec = filter is_hyp body_elems; |
805 val hyp_spec = filter is_hyp body_elems; |
806 |
806 |
807 val notes = |
807 val notes = |
808 if is_some asm then |
808 if is_some asm then |
809 [("", [((Binding.conceal (Binding.suffix_name ("_" ^ axiomsN) binding), []), |
809 [("", [((Binding.conceal (Binding.suffix_name ("_" ^ axiomsN) binding), []), |
810 [([Assumption.assume pred_ctxt (cterm_of thy' (the asm))], |
810 [([Assumption.assume pred_ctxt (Thm.cterm_of thy' (the asm))], |
811 [(Attrib.internal o K) Locale.witness_add])])])] |
811 [(Attrib.internal o K) Locale.witness_add])])])] |
812 else []; |
812 else []; |
813 |
813 |
814 val notes' = |
814 val notes' = |
815 body_elems |
815 body_elems |