fmod REVERSE 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 reverse : MyList -> MyList [metadata "induce"] . *** input encapsulation op in : MyList -> InVec [ctor] . vars U V W X Y Z : MyItem . eq reverse([]) = [] . eq reverse(cons(Y,[])) = cons(Y,[]) . eq reverse(cons(Y,cons(X,[]))) = cons(X,cons(Y,[])) . eq reverse(cons(Y,cons(X,cons(Z,[])))) = cons(Z,cons(X,cons(Y,[]))) . endfm