Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.prolog > #12857
| From | Aleksy Grabowski <hurufu@gmail.com> |
|---|---|
| Newsgroups | comp.lang.prolog, comp.theory, comp.ai.philosophy |
| Subject | Re: Is this correct Prolog? |
| Date | 2022-05-02 13:49 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <t4ogft$8dt$1@dont-email.me> (permalink) |
| References | (1 earlier) <t4ivm8$c4v$1@dont-email.me> <t4jubn$r31$1@dont-email.me> <rcadndtC6vGrOPD_nZ2dnUU7_83NnZ2d@giganews.com> <t4ljnn$5k0$1@dont-email.me> <KtadnUFsIcTQ9fP_nZ2dnUU7_8xh4p2d@giganews.com> |
Cross-posted to 3 groups.
Wow, I went offline for a weekend, because we had such a nice weather,
and this thread exploded to enormous size 😲. I didn't read the whole
thread it's just too big.
On 5/1/22 13:00, olcott wrote:
> On 5/1/2022 4:26 AM, Mikko wrote:
>> On 2022-04-30 21:08:05 +0000, olcott said:
>>
>>> negation, not, \+
>>> The concept of logical negation in Prolog is problematical, in the
>>> sense that the only method that Prolog can use to tell if a
>>> proposition is false is to try to prove it (from the facts and rules
>>> that it has been told about), and then if this attempt fails, it
>>> concludes that the proposition is false. This is referred to as
>>> negation as failure.
>>
>> Note that the negation discussed above is not present in LP =
>> not(true(LP)).
>>
>> Mikko
>>
>
> Is says that it is. It says that "not" is synonymous with \+.
I don't want to undermine your knowledge in formal logic, but still
allow me to re-iterate my point, because it looks like it didn't come
through.
1. Prolog is *not* an automated theorem prover; it is a programming
language. Nevertheless you can /implement/ one in Prolog.
2. Prolog's syntax is somewhat original and requires some
understanding.
Let me elaborate on the 2nd point. Prolog is a homoiconic language that
means that same syntactical constructs (terms) can express data, or be
executable.
Consider this knowledge base¹:
foo :- not(true).
The following query will fail:
?- foo.
false.
When we asked the program to refute `foo/0` it *executed* predicates
`not/1` and `true/0`.
But, given this knowledge base:
bar(X) :- X = not(true).
The following query does succeed:
?- bar(X).
X = not(true).
Why? — Here, both `not/1` and `true/0` were *not* executed, they were
used as a mere symbols, data without *any* meaning whatsoever. Also
please note that this has nothing to do with cyclic terms, they are
completely separate things, and the problem with your Prolog code
doesn't lie in cyclic term handling, but in basic misconception when
terms are executed and when they aren't. In your example:
> LP := ~True(LP) is translated to Prolog:
>
> ?- LP = not(true(LP)).
> LP = not(true(LP)).
>
> ?- unify_with_occurs_check(LP, not(true(LP))).
> false
None (!) of the predicates where executed in both unifications (with and
without occurs check).
Basically what I was trying to say is that `LP = not(true(LP))` is
incorrect encoding of the stated logical formula. What you have written
just tells to Prolog to unify variable `LP` with the term
`not(true(LP))`, it is similar to this query (`not` is used only as an
atom it isn't executed):
?- X = [not|X].
X = [not|X].
?- unify_with_occurs_check(X, [not|X]).
false.
I've skimmed through your paper and you encode logical formula G = ¬(F ⊢
G) as:
G = not(provable(F, G)).
Which is not correct for all the reasons I've laid down previously, at
least it is not correct with the default semantics of `=` operator.
I hope this will clear some thing out.
[¹] As a side note, according to the SWI-Prolog documentation `not/1`
predicate is deprecated and should be replaced with `'\+'/1`.
https://www.swi-prolog.org/pldoc/doc_for?object=not/1
--
Alex Grabowski
Back to comp.lang.prolog | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-04-30 02:02 -0500
Re: Is this correct Prolog? Mikko <mikko.levanto@iki.fi> - 2022-04-30 12:31 +0300
Re: Is this correct Prolog? Aleksy Grabowski <hurufu@gmail.com> - 2022-04-30 20:15 +0200
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-04-30 16:08 -0500
Re: Is this correct Prolog? Mikko <mikko.levanto@iki.fi> - 2022-05-01 12:26 +0300
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 06:00 -0500
Re: Is this correct Prolog? Aleksy Grabowski <hurufu@gmail.com> - 2022-05-02 13:49 +0200
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 08:09 -0500
Re: Is this correct Prolog? Aleksy Grabowski <hurufu@gmail.com> - 2022-05-02 15:35 +0200
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 08:55 -0500
Re: Is this correct Prolog? Aleksy Grabowski <hurufu@gmail.com> - 2022-05-02 16:28 +0200
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 10:24 -0500
Re: Is this correct Prolog? Aleksy Grabowski <hurufu@gmail.com> - 2022-05-02 17:44 +0200
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 11:04 -0500
Re: Is this correct Prolog? Aleksy Grabowski <hurufu@gmail.com> - 2022-05-02 18:38 +0200
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 11:49 -0500
Re: Is this correct Prolog? Julio Di Egidio <julio@diegidio.name> - 2022-05-02 09:51 -0700
Re: Is this correct Prolog? Aleksy Grabowski <hurufu@gmail.com> - 2022-05-02 19:38 +0200
Re: Is this correct Prolog? Julio Di Egidio <julio@diegidio.name> - 2022-05-02 11:04 -0700
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 14:22 -0500
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 14:14 -0500
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 14:24 -0500
Re: Is this correct Prolog? Aleksy Grabowski <hurufu@gmail.com> - 2022-05-02 21:43 +0200
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 15:10 -0500
Re: Is this correct Prolog? Aleksy Grabowski <hurufu@gmail.com> - 2022-05-02 22:37 +0200
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 15:58 -0500
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 16:30 -0500
Re: Is this correct Prolog? Aleksy Grabowski <hurufu@gmail.com> - 2022-05-02 23:33 +0200
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 16:42 -0500
Re: Is this correct Prolog? Aleksy Grabowski <hurufu@gmail.com> - 2022-05-03 00:13 +0200
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 19:35 -0500
Re: Is this correct Prolog? Jeff Barnett <jbb@notatt.com> - 2022-05-02 11:28 -0600
Re: Is this correct Prolog? Mr Flibble <flibble@reddwarf.jmc> - 2022-05-02 19:41 +0100
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 14:26 -0500
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 14:32 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-02 18:28 -0400
Re: Is this correct Prolog? Aleksy Grabowski <hurufu@gmail.com> - 2022-05-03 00:41 +0200
Re: Is this correct Prolog? Julio Di Egidio <julio@diegidio.name> - 2022-05-02 16:00 -0700
Re: Is this correct Prolog? Aleksy Grabowski <hurufu@gmail.com> - 2022-05-03 01:39 +0200
Re: Is this correct Prolog? Julio Di Egidio <julio@diegidio.name> - 2022-05-02 17:26 -0700
Re: Is this correct Prolog? Ben <ben.usenet@bsb.me.uk> - 2022-05-03 00:43 +0100
Re: Is this correct Prolog? Julio Di Egidio <julio@diegidio.name> - 2022-05-02 17:20 -0700
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 19:57 -0500
Re: Is this correct Prolog? Ben <ben.usenet@bsb.me.uk> - 2022-05-03 03:21 +0100
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 22:01 -0500
Re: Is this correct Prolog? Julio Di Egidio <julio@diegidio.name> - 2022-05-03 01:18 -0700
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-03 08:05 -0400
Re: Is this correct Prolog? [ Tarski ] olcott <polcott2@gmail.com> - 2022-05-04 21:30 -0500
Re: Is this correct Prolog? [ Tarski ] Richard Damon <Richard@Damon-Family.org> - 2022-05-04 22:46 -0400
Re: Is this correct Prolog? [ Tarski ] olcott <polcott2@gmail.com> - 2022-05-04 22:02 -0500
Re: Is this correct Prolog? [ Tarski ] Richard Damon <Richard@Damon-Family.org> - 2022-05-05 07:41 -0400
Re: Is this correct Prolog? [ Tarski ] olcott <polcott2@gmail.com> - 2022-05-05 12:57 -0500
Re: Is this correct Prolog? [ Tarski ] André G. Isaak <agisaak@gm.invalid> - 2022-05-05 12:06 -0600
Re: Is this correct Prolog? [ Tarski ] olcott <polcott2@gmail.com> - 2022-05-05 16:23 -0500
Re: Is this correct Prolog? [ Tarski ] Richard Damon <Richard@Damon-Family.org> - 2022-05-05 22:24 -0400
Re: Is this correct Prolog? [ Tarski ] olcott <polcott2@gmail.com> - 2022-05-05 21:37 -0500
Re: Is this correct Prolog? [ Tarski ] Richard Damon <Richard@Damon-Family.org> - 2022-05-06 07:43 -0400
Re: Is this correct Prolog? [ Tarski ] olcott <polcott2@gmail.com> - 2022-05-06 15:29 -0500
Re: Is this correct Prolog? Ben <ben.usenet@bsb.me.uk> - 2022-05-03 15:59 +0100
Re: Is this correct Prolog? André G. Isaak <agisaak@gm.invalid> - 2022-05-03 09:18 -0600
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-03 11:08 -0500
Re: Is this correct Prolog? André G. Isaak <agisaak@gm.invalid> - 2022-05-03 10:52 -0600
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-03 12:05 -0500
Re: Is this correct Prolog? André G. Isaak <agisaak@gm.invalid> - 2022-05-03 11:17 -0600
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-03 12:33 -0500
Re: Is this correct Prolog? André G. Isaak <agisaak@gm.invalid> - 2022-05-03 12:23 -0600
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-03 13:59 -0500
Re: Is this correct Prolog? André G. Isaak <agisaak@gm.invalid> - 2022-05-03 14:03 -0600
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-03 22:24 -0500
Re: Is this correct Prolog? André G. Isaak <agisaak@gm.invalid> - 2022-05-03 21:54 -0600
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-04 07:27 -0400
Re: Is this correct Prolog? [ André didn't lie after all ] olcott <polcott2@gmail.com> - 2022-05-03 12:08 -0500
Re: Is this correct Prolog? Jeff Barnett <jbb@notatt.com> - 2022-05-03 12:33 -0600
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-03 14:12 -0500
Re: Is this correct Prolog? André G. Isaak <agisaak@gm.invalid> - 2022-05-03 13:22 -0600
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-03 21:53 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-03 23:12 -0400
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-03 22:53 -0500
Re: Is this correct Prolog? André G. Isaak <agisaak@gm.invalid> - 2022-05-03 22:06 -0600
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-04 01:17 -0500
Re: Is this correct Prolog? André G. Isaak <agisaak@gm.invalid> - 2022-05-04 08:02 -0600
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-04 14:01 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-04 19:48 -0400
Re: Is this correct Prolog? Jeff Barnett <jbb@notatt.com> - 2022-05-03 15:58 -0600
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-03 17:13 -0500
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 19:11 -0500
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 19:35 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-02 20:47 -0400
Re: Is this correct Prolog? Julio Di Egidio <julio@diegidio.name> - 2022-05-02 07:59 -0700
Re: Is this correct Prolog? Aleksy Grabowski <hurufu@gmail.com> - 2022-05-02 17:15 +0200
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 10:45 -0500
Re: Is this correct Prolog? Julio Di Egidio <julio@diegidio.name> - 2022-05-02 09:02 -0700
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 11:26 -0500
Re: Is this correct Prolog? Mikko <mikko.levanto@iki.fi> - 2022-05-01 12:24 +0300
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 05:58 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 07:12 -0400
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 06:45 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 08:07 -0400
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 07:15 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 13:49 -0400
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-04-30 15:48 -0500
Re: Is this correct Prolog? Mikko <mikko.levanto@iki.fi> - 2022-05-01 12:38 +0300
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 06:06 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 07:26 -0400
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 06:54 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 08:11 -0400
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 07:19 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 14:00 -0400
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-04-30 21:08 -0400
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-04-30 20:42 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-04-30 22:00 -0400
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-04-30 21:21 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-04-30 22:38 -0400
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-04-30 21:56 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-04-30 23:11 -0400
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-04-30 22:15 -0500
Re: Is this correct Prolog? Jeff Barnett <jbb@notatt.com> - 2022-04-30 23:24 -0600
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 06:35 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 13:16 -0400
Re: Is this correct Prolog? Mr Flibble <flibble@reddwarf.jmc> - 2022-05-01 13:19 +0100
Re: Is this correct Prolog? polcott <polcott2@gmail.com> - 2022-05-01 07:51 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 13:19 -0400
Re: Is this correct Prolog? Jeff Barnett <jbb@notatt.com> - 2022-05-01 11:22 -0600
Re: Is this correct Prolog? Mikko <mikko.levanto@iki.fi> - 2022-05-01 12:45 +0300
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 06:28 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 08:01 -0400
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 07:09 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 08:16 -0400
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 07:18 -0400
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 06:50 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 13:26 -0400
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-04-30 20:47 -0500
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-04-30 23:49 -0500
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 11:08 -0500
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 13:28 -0500
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 14:00 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 15:19 -0400
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 14:32 -0500
Re: Is this correct Prolog? André G. Isaak <agisaak@gm.invalid> - 2022-05-01 13:44 -0600
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 14:48 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 16:01 -0400
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 15:42 -0500
Re: Is this correct Prolog? André G. Isaak <agisaak@gm.invalid> - 2022-05-01 14:51 -0600
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 17:04 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 18:08 -0400
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-01 17:39 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 19:18 -0400
Re: Is this correct Prolog? André G. Isaak <agisaak@gm.invalid> - 2022-05-01 17:26 -0600
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-01 19:58 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 21:32 -0400
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-01 20:53 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 22:14 -0400
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-01 21:18 -0500
Re: Is this correct Prolog? André G. Isaak <agisaak@gm.invalid> - 2022-05-01 20:37 -0600
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 22:47 -0400
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-01 22:04 -0500
Re: Is this correct Prolog? André G. Isaak <agisaak@gm.invalid> - 2022-05-01 22:10 -0600
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-02 07:10 -0400
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-02 08:19 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-02 18:38 -0400
Re: Is this correct Prolog? André G. Isaak <agisaak@gm.invalid> - 2022-05-01 16:37 -0600
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-01 17:44 -0500
Re: Is this correct Prolog? André G. Isaak <agisaak@gm.invalid> - 2022-05-01 17:15 -0600
Re: Is this correct Prolog? [ André is proven to be a liar ] olcott <NoOne@NoWhere.com> - 2022-05-01 18:33 -0500
Re: Is this correct Prolog? [ André is proven to be a liar ] André G. Isaak <agisaak@gm.invalid> - 2022-05-01 17:44 -0600
Re: Is this correct Prolog? [ André is proven to be a liar ] olcott <NoOne@NoWhere.com> - 2022-05-01 18:53 -0500
Re: Is this correct Prolog? [ André is proven to be a liar ] olcott <polcott2@gmail.com> - 2022-05-01 18:15 -0500
Re: Is this correct Prolog? [ André is proven to be a liar ] Richard Damon <Richard@Damon-Family.org> - 2022-05-01 19:21 -0400
Re: Is this correct Prolog? [ André is proven to be a liar ] olcott <polcott2@gmail.com> - 2022-05-01 19:56 -0500
Re: Is this correct Prolog? olcott <polcott2@gmail.com> - 2022-05-01 17:05 -0500
Re: Is this correct Prolog? Richard Damon <Richard@Damon-Family.org> - 2022-05-01 16:55 -0400
Re: Is this correct Prolog? olcott <NoOne@NoWhere.com> - 2022-05-01 11:57 -0500
Re: Is this correct Prolog? André G. Isaak <agisaak@gm.invalid> - 2022-05-01 11:21 -0600
csiph-web