94 let |
94 let |
95 val ty = Type (tyco, map TFree vs); |
95 val ty = Type (tyco, map TFree vs); |
96 fun mk_side const_name = Const (const_name, ty --> ty --> HOLogic.boolT) |
96 fun mk_side const_name = Const (const_name, ty --> ty --> HOLogic.boolT) |
97 $ Free ("x", ty) $ Free ("y", ty); |
97 $ Free ("x", ty) $ Free ("y", ty); |
98 val def = HOLogic.mk_Trueprop (HOLogic.mk_eq |
98 val def = HOLogic.mk_Trueprop (HOLogic.mk_eq |
99 (mk_side @{const_name HOL.equal}, mk_side @{const_name "op ="})); |
99 (mk_side @{const_name HOL.equal}, mk_side @{const_name HOL.eq})); |
100 val def' = Syntax.check_term lthy def; |
100 val def' = Syntax.check_term lthy def; |
101 val ((_, (_, thm)), lthy') = Specification.definition |
101 val ((_, (_, thm)), lthy') = Specification.definition |
102 (NONE, (Attrib.empty_binding, def')) lthy; |
102 (NONE, (Attrib.empty_binding, def')) lthy; |
103 val ctxt_thy = ProofContext.init_global (ProofContext.theory_of lthy); |
103 val ctxt_thy = ProofContext.init_global (ProofContext.theory_of lthy); |
104 val thm' = singleton (ProofContext.export lthy' ctxt_thy) thm; |
104 val thm' = singleton (ProofContext.export lthy' ctxt_thy) thm; |