Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8218739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:54:24+00:00 2026-06-07T12:54:24+00:00

What is the difference between A \= B and not(A==B) in Prolog? I found

  • 0

What is the difference between A \= B and not(A==B) in Prolog?

I found this http://www.learnprolognow.org/lpnpage.php?pagetype=html&pageid=lpn-htmlse5
and this wiki page
http://en.wikibooks.org/wiki/Prolog/Built-in_predicates
but it didn’t help me since there is no clarification to the difference, nor short meaning for \=.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T12:54:25+00:00Added an answer on June 7, 2026 at 12:54 pm

    A \= B is equivalent to not (A = B)

    So lets compare =/2 and ==/2 first; from the swi-prolog manual:

    ?Term1 = ?Term2
    Unify Term1 with Term2. True if the unification succeeds

    @Term1 == @Term2
    True if Term1 is equivalent to Term2.

    Notice that =/2 tries to unify the terms and if it succeeds it’s true while ==/2 just performs a check:

    ?- X = 1.
    X = 1.
    (implicit true.)
    

    while

    ?- X == 1.
    false.
    

    and also:

    ?- X = Y.
    X = Y.
    
    ?- X == Y.
    false.
    

    now, not/1 will invert the result and be true if =/2 or ==/2 was false.
    for==/2 there is nothing complicated; if the terms were equivalent now it will return false otherwise true.
    for =/2 you should remember that all unifications will be temporary:

    ?- \+ (\+ X = 1), print(X).
    _G399
    true.
    

    (_G399 indicates that X is non-instantiated)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not php expert and I don't know what's the difference(1) between a and
I'm not clear on the difference between SMS Sent & Delivered status. Can anyone
I do not know much about the difference between a HTTP Get and a
Note: This is not about the difference between Database first, Model first, and Code
What's the difference between this code: CREATE TABLE samples ( sampleid INT(11) NOT NULL
I am not clear on the actual difference between these two styles of class
I'm not able to understand the difference between Thread vs ThreadPool. Consider i've to
Possible Duplicate: What is the difference between app.config file and XYZ.settings file? I'm not
Ok, so I'm not quite sure the difference between these languages. Could someone clarify?
What is the difference between DataGrid (not GridView) and Grid controls in wpf?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.