src/Pure/morphism.ML
changeset 77902 01d6b2a44df8
parent 74282 c2ee8d993d6a
child 78057 9439ae944a00
equal deleted inserted replaced
77901:5728d5ebce34 77902:01d6b2a44df8
    20   val morphism: string ->
    20   val morphism: string ->
    21    {binding: (binding -> binding) list,
    21    {binding: (binding -> binding) list,
    22     typ: (typ -> typ) list,
    22     typ: (typ -> typ) list,
    23     term: (term -> term) list,
    23     term: (term -> term) list,
    24     fact: (thm list -> thm list) list} -> morphism
    24     fact: (thm list -> thm list) list} -> morphism
       
    25   val is_identity: morphism -> bool
    25   val pretty: morphism -> Pretty.T
    26   val pretty: morphism -> Pretty.T
    26   val binding: morphism -> binding -> binding
    27   val binding: morphism -> binding -> binding
    27   val binding_prefix: morphism -> (string * bool) list
    28   val binding_prefix: morphism -> (string * bool) list
    28   val typ: morphism -> typ -> typ
    29   val typ: morphism -> typ -> typ
    29   val term: morphism -> term -> term
    30   val term: morphism -> term -> term
    79     names = if a = "" then [] else [a],
    80     names = if a = "" then [] else [a],
    80     binding = map (pair a) binding,
    81     binding = map (pair a) binding,
    81     typ = map (pair a) typ,
    82     typ = map (pair a) typ,
    82     term = map (pair a) term,
    83     term = map (pair a) term,
    83     fact = map (pair a) fact};
    84     fact = map (pair a) fact};
       
    85 
       
    86 (*syntactic test only!*)
       
    87 fun is_identity (Morphism {names, binding, typ, term, fact}) =
       
    88   null names andalso null binding andalso null typ andalso null term andalso null fact;
    84 
    89 
    85 fun pretty (Morphism {names, ...}) = Pretty.enum ";" "{" "}" (map Pretty.str (rev names));
    90 fun pretty (Morphism {names, ...}) = Pretty.enum ";" "{" "}" (map Pretty.str (rev names));
    86 
    91 
    87 val _ = ML_system_pp (fn _ => fn _ => Pretty.to_polyml o pretty);
    92 val _ = ML_system_pp (fn _ => fn _ => Pretty.to_polyml o pretty);
    88 
    93