Leren wrote:denis_berthier wrote: .... We have transformed a problem statement in logic into a problem statement in arithmetics. ... How do we use this for any inference.
It wasn't my intention to transform the problem statement into one of arithmetic, but for it to remain in the realm of set theory.
I may have misinterpreted your intention. But it suggested me another encoding where everything can be interpreted in terms of division.
Any consistent encoding can be used to check that a grid is a solution of a puzzle.
Leren wrote:As to your alternative formulation, perhaps it would be best for you to just explain why it is not possible to characterise a cell with no givens, since, as you say, the answer involves only very basic logic.
Yes, it's very basic and I have already given the main lines.
You need a predicate value(n, r, c) to mean that rc=n is in any solution. You also need a predicate linked(n, r, c, n2, r2, c2) to express that two potential candidates are linked. (predicate linked is structural; it doesn't depend on the grid content)
With these two predicates, you can express the 4 basic rules of Sudoku.
Typically, during resolution, the "value" predicate can be used for eliminating candidates:
value(n, r, c) and linked(n, r, c, n2, r2, c2) => not candidate(n2, r2, c2)
It can also be used to assert other values, using Singles.
With only these two basic resolution rules, you can already solve almost 30% of the puzzles.
For more detail, see HLS or PBCS.
Now, suppose you have a predicate given(n, r, c) with the intended meaning suggested by the name. What can you do with it?
First thing is, you know that every given will be in any solution. So, you'll have the axiom: given(n, r, c) => value(n, r, c). This will be used during resolution to initialise the "value" predicate.
Second thing is, for any puzzle, you can introduce the relevant data as a set of given(ni, ri, ci) assertions.
Now, considering the already defined axioms for value, this expresses everything one can do with "given". It'd be useless to re-write the same axioms for "given", as they would be less general. And "given(n, r, c) itself cannot be deleted or asserted for new candidates. It stays there, overlooking what happens, but never participating in any further inferential event after initialisation.
Now, to the point of introducing a "not-given" predicate. There's no way for doing this in any useful way. Of course, you can always define formally not-given(n, r, c) as the opposite of "given" : not given(n, r , c); but this leads to nothing new.
You can't write an axiom such as not-given(n, r, c) => not value(n, r, c); that'd be false.
You can't use "not-given" either for asserting any candidate. In short, there's nothing you can do with "not-given" at a basic level.
If "not-given" cannot appear in any basic rule of Sudoku, how could it magically appear in complex rules derived from the basic rules only? This can only be possible by using extra-logical arguments.
(*) I omitted the universal quantifiers for clarity
Leren wrote:Also thanks for the complement, I'll put my dunce cap in the cupboard for the moment.
I realise the way it was written might have been ambiguous. I modified it.