LLMs love duplicating logic. Unfortunately they are not formal systems so we actually have to read their output