Added cons invariant

Signed-off-by: giorgio-v <giorgio@refactor.it>