--- a/src/Pure/Isar/proof_context.ML Sat Apr 14 00:46:20 2007 +0200
+++ b/src/Pure/Isar/proof_context.ML Sat Apr 14 00:46:20 2007 +0200
@@ -921,7 +921,7 @@
Context.mapping_result
(Sign.add_abbrev Syntax.internalM arg') (add_abbrev Syntax.internalM arg')
#-> (fn (lhs, _) =>
- Term.equiv_types (rhs, rhs') ? target_notation prmode [(lhs, mx)] Morphism.identity)
+ Term.equiv_types (rhs, rhs') ? Morphism.form (target_notation prmode [(lhs, mx)]))
end;
fun local_abbrev (x, rhs) =
--- a/src/Pure/morphism.ML Sat Apr 14 00:46:20 2007 +0200
+++ b/src/Pure/morphism.ML Sat Apr 14 00:46:20 2007 +0200
@@ -37,6 +37,8 @@
val thm_morphism: (thm -> thm) -> morphism
val identity: morphism
val compose: morphism -> morphism -> morphism
+ val transform: morphism -> (morphism -> 'a) -> morphism -> 'a
+ val form: (morphism -> 'a) -> 'a
end;
structure Morphism: MORPHISM =
@@ -76,6 +78,9 @@
fun phi1 $> phi2 = compose phi2 phi1;
+fun transform phi f = fn psi => f (phi $> psi);
+fun form f = f identity;
+
end;
structure BasicMorphism: BASIC_MORPHISM = Morphism;