98 val def = HOLogic.mk_Trueprop (HOLogic.mk_eq |
98 val def = HOLogic.mk_Trueprop (HOLogic.mk_eq |
99 (mk_side @{const_name eq_class.eq}, mk_side @{const_name "op ="})); |
99 (mk_side @{const_name eq_class.eq}, mk_side @{const_name "op ="})); |
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 (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; |
105 in (thm', lthy') end; |
105 in (thm', lthy') end; |
106 fun tac thms = Class.intro_classes_tac [] |
106 fun tac thms = Class.intro_classes_tac [] |
107 THEN ALLGOALS (ProofContext.fact_tac thms); |
107 THEN ALLGOALS (ProofContext.fact_tac thms); |
108 fun add_eq_thms dtco = |
108 fun add_eq_thms dtco = |