logoalt Hacker News

thaumasiotes • today at 5:51 AM • 1 reply • view on HN

> It's analogous to using proof by contradiction in mathematics.

Well, the argument here is:

1. The solution is unique.

2. If [this square had value X], the solution wouldn't be unique.

3. Therefore, [this square does not have value X].

That isn't a proof by contradiction. It's just contraposition: step 2 says P ⟶ Q, step 1 says ¬Q, and our conclusion in step 3 says ¬P. You can do the whole thing constructively. The relevant proof (that from any implication you can derive the contrapositive) is the 7th exercise in session 4 at https://incredible.pm/ . Classical reasoning starts in session 5. (And the principle of a proof by contradiction is the fourth exercise there, sort of. You could make a strong argument that the principle of a proof by contradiction is inherent in the definitional choice that equates "P ⟶ ⊥" with "¬P".)

Sudoku has a much more direct equivalent of the concept of proof by contradiction. A sudoku proof by contradiction is just trial and error: "If this square is 3, then... [a constraint is violated]. Therefore, this square isn't 3."

Even that is still just contraposition, though, because the rules of sudoku tell you what the constraints are and guarantee that they aren't violated. You don't need to assume the law of the excluded middle when it's given to you explicitly.


Replies

gsinclair • today at 6:05 AM

I think contradiction versus contraposition is often a matter of style or taste. I don’t think “this can be expressed as contraposition, therefore it’s not contradiction” is valid.

But I operate at a high school level, so I could be wrong.

➕ show 1 reply