src/Tools/isac/BaseDefinitions/rewrite-order.sml
author wneuper <Walther.Neuper@jku.at>
Mon, 01 Jan 2024 11:31:16 +0100
changeset 60789 8fa678b678e8
parent 60594 439f7f3867ec
permissions -rw-r--r--
Doc/Specify_Phase 4: start use antiquotations from isar-ref
     1 (* Title:  BaseDefinitions/rewrite-order.sml
     2    Author: Walther Neuper
     3    (c) due to copyright terms
     4 *)
     5 signature REWRITE_ORDER =
     6 sig
     7   type id = Rule_Def.rew_ord_id
     8   val id_empty: id
     9 
    10   type function = Rule_Def.rew_ord_function
    11   val function_empty: function
    12 
    13   type T = Rule_Def.rew_ord_T
    14   val empty: T
    15 
    16   val to_string: T -> string
    17   val equal: T * T -> bool
    18 end
    19 
    20 (**)
    21 structure Rewrite_Ord(**): REWRITE_ORDER(**) =
    22 struct
    23 (**)
    24 
    25 type id = Rule_Def.rew_ord_id
    26 val id_empty = "Rewrite_Ord.id_empty";
    27 
    28 type function = Rule_Def.rew_ord_function;
    29 fun function_empty (_: Proof.context) (_: LibraryC.subst) (_: term, _: term) = true;
    30 
    31 type T = Rule_Def.rew_ord_T
    32 val empty = (id_empty, function_empty)
    33 
    34 fun to_string (rew_ord, _) = "(" ^ rew_ord ^ ", _: fn)"
    35 fun equal ((id1, _), (id2, _)) = id1 = id2
    36 
    37 end