Alphabet

0:d
f:[a] ⟶ a
g:[b → d → e × b × e] ⟶ f
s:[c] ⟶ e

Variables

X:a
Z:b → d → e
U:b
V:c

Rules

f(X)X
g(Z, U, s(V))g(Z, U, Z · U · 0)