-4

Is this the correct way to encode the Liar Paradox in Prolog?

Liar Paradox in English: "This sentence is not true."

?- LP = not(true(LP)).
LP = not(true(LP)).

?- unify_with_occurs_check(LP, not(true(LP))).
false.

polcott
  • 143
  • 1
  • 13
  • @brebs The point of this is that some otherwise undecidable decision problems can be recognized and rejected as unsound rather than the current [received view] that the undecidability of these decision problems derives a fundamental limit to computation. – polcott Jul 13 '23 at 15:27
  • It's not right, though. It's not recognizing "this sentence" as a self-reference. It's just doing its simple job of recognizing that the 2 terms are different yet one refers to the other. – brebs Jul 13 '23 at 17:11
  • @brebs **** Finally, a note about how Prolog matching sometimes differs from the unification used in Resolution. Most Prolog systems will allow you to satisfy goals like: equal(X, X). ?- equal(foo(Y), Y). that is, they will allow you to match a term against an uninstantiated subterm of itself. In this example, foo(Y) is matched against Y, which appears within it. As a result, Y will stand for foo(Y), which is foo(foo(Y)) (because of what Y stands for), which is foo(foo(foo(Y))), and soon. So Y ends up standing for some kind of infinite structure. **** – polcott Jul 13 '23 at 17:20
  • I know. But, you're not giving Prolog "This sentence is not true.", for Prolog to identify that there is a self-reference through some meaningful logic. You are merely providing 2 terms for which `unify_with_occurs_check` is going to fail. You need to have an example for which you would do this task and expect `unify_with_occurs_check` to **succeed**, where you *haven't* practically given Prolog the answer yourself. – brebs Jul 13 '23 at 17:32
  • @brebs My purpose has always been to show that the pathological self-reference (PSR) that makes certain kinds of decision problems undecidable is a semantic error in the problem specification and thus not any limitation of computability. When the PSR structure of the Liar Paradox is encoded in Prolog it is rejected by Prolog as unsound. – polcott Jul 13 '23 at 17:39
  • Show a similar Prolog query which **succeeds**. Having a query always fail is of no use. Your "encoding" is merely a pretense. – brebs Jul 13 '23 at 20:41
  • @brebs I have spent years on this. Prior to finding that Prolog rejects such expressions I created Minimal Type Theory that does this same thing. https://liarparadox.org/MTT_Diagram.png The cycle that MTT detects is the same cycle that unify_with_occurs_check detects. – polcott Jul 13 '23 at 21:34
  • But you're giving Prolog the cycle. You're doing 99% of the work for Prolog. Why would you think that is useful? – brebs Jul 14 '23 at 12:45
  • @brebs It proves that decision problem instances (such as the halting problem counter-examples) having the pathological self-reference that I encoded in Prolog are merely unsound and thus place no actual limit on computation. – polcott Jul 14 '23 at 13:14
  • It does not prove that, because you haven't shown a **success**, as I keep stating. Show us how something that's not self-referencing has a different result. – brebs Jul 14 '23 at 13:39
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/254499/discussion-between-polcott-and-brebs). – polcott Jul 14 '23 at 14:00
  • Don't edit answers into your question. – Cerbrus Jul 15 '23 at 07:40

1 Answers1

-2

enter image description here

Prolog correctly rejects any expression having the same pathological self referential structure as the Liar Paradox with its unify_with_occurs_check/2.

enter image description here

polcott
  • 143
  • 1
  • 13
  • 1
    Me pointing out that the logic is daft, is being used as the answer - how ludicrous. – brebs Jul 14 '23 at 20:16
  • @brebs Your answer on the Prolog group does not say that the logic is daft. It correctly says that Prolog correctly rejects any expression having the same self-referential form as the Liar Paradox. – polcott Jul 14 '23 at 20:20
  • 1
    Without a predicate which succeeds, for comparison, it's meaningless. As I have repeatedly stated, and you have always dodged answering. – brebs Jul 14 '23 at 21:00
  • @brebs I quoted Clocksin and Mellish that explains all of the details. If you can't understand it on this basis then you can't understand it. If you knew what a directed graph is then you would know that a cycle in the directed graph of the evaluation of an expression prevents this expression from being evaluated. **The key aspect of the Liar Paradox is that it has a cycle in its evaluation graph.** – polcott Jul 14 '23 at 22:46