Generic representation of logic terms/formulas (algebraic expressions), and some associated structures