app#(app(times, app(s, x)), y) | → | app#(app(plus, app(app(times, x), y)), y) | | app#(app(app(fold, f), x), app(app(cons, y), z)) | → | app#(app(fold, f), x) |
app#(app(app(fold, f), x), app(app(cons, y), z)) | → | app#(app(f, y), app(app(app(fold, f), x), z)) | | app#(app(app(fold, f), x), app(app(cons, y), z)) | → | app#(app(app(fold, f), x), z) |
app#(app(plus, app(s, x)), y) | → | app#(plus, x) | | prod# | → | app#(app(fold, mul), app(s, 0)) |
app#(app(app(fold, f), x), app(app(cons, y), z)) | → | app#(f, y) | | app#(app(times, app(s, x)), y) | → | app#(plus, app(app(times, x), y)) |
app#(app(times, app(s, x)), y) | → | app#(times, x) | | app#(app(plus, app(s, x)), y) | → | app#(s, app(app(plus, x), y)) |
sum# | → | app#(app(fold, add), 0) | | app#(app(times, app(s, x)), y) | → | app#(app(times, x), y) |
prod# | → | app#(fold, mul) | | prod# | → | app#(s, 0) |
app#(app(app(fold, f), x), app(app(cons, y), z)) | → | app#(fold, f) | | sum# | → | app#(fold, add) |
app#(app(plus, app(s, x)), y) | → | app#(app(plus, x), y) |
app(app(app(fold, f), x), nil) | → | x | | app(app(app(fold, f), x), app(app(cons, y), z)) | → | app(app(f, y), app(app(app(fold, f), x), z)) |
app(app(plus, 0), y) | → | y | | app(app(plus, app(s, x)), y) | → | app(s, app(app(plus, x), y)) |
app(app(times, 0), y) | → | 0 | | app(app(times, app(s, x)), y) | → | app(app(plus, app(app(times, x), y)), y) |
sum | → | app(app(fold, add), 0) | | prod | → | app(app(fold, mul), app(s, 0)) |
app#(app(times, app(s, x)), y) → app#(plus, app(app(times, x), y)) | app#(app(times, app(s, x)), y) → app#(app(plus, app(app(times, x), y)), y) |
app#(app(app(fold, f), x), app(app(cons, y), z)) → app#(app(fold, f), x) | app#(app(times, app(s, x)), y) → app#(times, x) |
app#(app(plus, app(s, x)), y) → app#(s, app(app(plus, x), y)) | app#(app(app(fold, f), x), app(app(cons, y), z)) → app#(app(f, y), app(app(app(fold, f), x), z)) |
app#(app(times, app(s, x)), y) → app#(app(times, x), y) | app#(app(app(fold, f), x), app(app(cons, y), z)) → app#(app(app(fold, f), x), z) |
app#(app(app(fold, f), x), app(app(cons, y), z)) → app#(fold, f) | app#(app(plus, app(s, x)), y) → app#(plus, x) |
app#(app(plus, app(s, x)), y) → app#(app(plus, x), y) | app#(app(app(fold, f), x), app(app(cons, y), z)) → app#(f, y) |