Declarative theory of statehood