fmod NAT issorts Zero 3*Nat Nat .
subsorts Zero < 3*Nat < Nat .
op 0 : -> Zero .
op s_ : Nat -> Nat .
var M : 3*Nat .
mb s s s M : 3*Nat . endfm
t1=t'1 /\ ... /\ tn=t'n /\ u1:s1 /\ ... /\ um:smby the single equation
(t1 == t'1 and ... and tn == t'n and u1:s1 and ... and um:sm) = true,or just by the Boolean expression
t1 == t'1 and ... and tn == t'n and u1:s1 and ... and um:sm.
where P is a variable of sort Atom, _,_ is the constructor for multisets of propositions and not_ is the negation operator. However, since for applying such rules we need extra information about how the extra variables should be instantiated, rules with extra variables cannot be applied when using the default rewrite command (explained later in this section) to rewrite terms with Maude's default interpreter. They must be executed at the metalevel, using the meta-apply operator in the META-LEVEL module (see Section 2.5.5). In the present version of Maude, the condition of a conditional rule must satisfy the same requirements as those for the condition of a conditional equation explained in Section 2.1, including the requirement that all variables in the condition must appear in the rule's lefthand side. In a future version we plan to support more general conditions, involving extra variables and containing not only equalities and membership axiomss, but also rewrite conditions requiring that a term can rewrite to another term.rl [id] : empty => P not P .
However, given a command like red in NAT : s 0 . there would be two possible parses: red in |NAT| : |s 0| . and red |in NAT : s 0| .. Both of them are correct parses, but the meta-parse function returns only one of them. In case of ambiguity, one of the possible parses is arbitrarily chosen, preventing us from the possibility of taking the right one. This syntactic limitation as well as those discussed in Section 3.6 will be overcome in a future version.op red in_:_. : ModExp Bubble -> PreCommand .
r: [t] --> [t'] if [u1] --> [v1] /\ ... /\ [uk] --> [vk].This increases considerably the expressive power of rewrite theories.