Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Artificial Intelligence
  3. What does this mean in Prolog?

What does this mean in Prolog?

Scheduled Pinned Locked Moved Artificial Intelligence
databasequestion
1 Posts 1 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    polcott
    wrote on last edited by
    #1

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

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

    Here is the answer from ChatGPT Please explain this in English: ?- LP = not(true(LP)). LP = not(true(LP)). ?- unify_with_occurs_check(LP, not(true(LP))). false. ChatGPT The first statement in Prolog is an assignment where LP is defined as the negation of the truth value of LP itself. This means that LP is the logical negation of LP, indicating that LP is false if it is true, and true if it is false. The second statement is a query that checks if there exists a unification between LP and not(true(LP)). It attempts to find a consistent value for LP that satisfies the equation. In this case, the result of the query is false, indicating that there is no valid unification between LP and not(true(LP)). In other words, there is no consistent value that can simultaneously satisfy the equation LP = not(true(LP)). This suggests that there is a contradiction in the logic, as the equation cannot hold true for any value of LP. ======================================= It turns out that ChatGPT is incorrect because Prolog is merely recognizing the pathological self-reference of LP. "true" and "not" in the above context are meaningless placeholders to Prolog. Prolog equally rejects this expression: X = foo(bar(X)). I was trying to show that Prolog recognizes and rejects the Liar Paradox. It turns out the Prolog recognizes and rejects every expression that is isomorphic to the Liar Paradox.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups