Logic and formal systems