Initial implementation

Basic constructors and algabraic operators for formulas and their
elements.