fmod SWITCH is sorts MyItem MyList InVec . *** DT definitions (constructors) op [] : -> MyList [ctor] . op cons : MyItem MyList -> MyList [ctor] . *** defined function names (to be induced, preds, bk) op switch : MyList -> MyList [metadata "induce"] . *** input encapsulation op in : MyList -> InVec [ctor] . vars U V W X Y Z : MyItem . eq switch([]) = [] . eq switch(cons(V,[])) = cons(V,[]) . eq switch(cons(X,cons(W,[]))) = cons(W,cons(X,[])) . eq switch(cons(V,cons(Z,cons(W,[])))) = cons(Z,cons(V,cons(W,[]))) . eq switch(cons(V,cons(Z,cons(W,cons(Y,[]))))) = cons(Z,cons(V,cons(Y,cons(W,[])))) . eq switch(cons(V,cons(Z,cons(W,cons(Y,cons(X,[])))))) = cons(Z,cons(V,cons(Y,cons(W,cons(X,[]))))) . endfm