State Algebra for Propositional Logic