Support for algebra in operations

Signed-off-by: Gavin Gassmann <gassmann.gavin@gmail.com>