Recursive Definition

Recursive Definition of Function REV

Question:

Recursively define the function REV(x) on strings x over the alphabet tex2html_wrap_inline27 , which produces the reversal of x (i.e. x spelled backward).

Solution:

Basis Clause: tex2html_wrap_inline33 .

Induction: For any string tex2html_wrap_inline35 and any symbol tex2html_wrap_inline37 REV(xa) = aREV(x).

Note that each step mirror the recursive definition of tex2html_wrap_inline41 .