Some questions on the mysteries of NAL

42 views
Skip to first unread message

corv...@gmail.com

unread,
Apr 18, 2022, 6:05:19 PM4/18/22
to open-nars
Hi folks

Forgive the long message, but I thought it would be better to put all the questions I had into one message, rather than spamming the group! 
I keep getting the feeling that NAL is a really beautiful, expressive language but I have not been able to work out some of the more difficult statements on my own! (I have read both of the NARS books and gone through the ONA examples). 

So here goes, all the mysteries I have questions on... (all ONA)

(1 ) extensional vs intensional variables

I am struggling with the difference between extensional (instances) and intensional (properties) in NAL.
I have been doing object orientated programming for 5000 years, including Smalltalk, so I am trying to map these ideas back to what I understand.

If I input the following Narsese:

<({daisy} * mouse) --> eat>. :|:

then the Narsese below gets derived:

<{daisy} --> (eat /1 mouse)>. :|:
<mouse --> (eat /2 {daisy})>. :|:

But why not this one?

<{daisy} --> (eat \1 mouse)>. :|:
<mouse --> (eat \2 {daisy})>. :|:

I presume this is because /1 and /2 are instances, rather than properties?
I also assume the '1' and '2' here refer to where the variable value sits in the argument list for the term - is this correct?

(2) independent vs dependent variables

I also have some problems with the independent and dependent variables, when should I be using '$' or '#' ?
I think this also comes back to the extensional (instances) vs intensional (properties) thing, but again I cannot be sure.
For example, if I want to ask what daisy eats, which is the correct choice?

<{daisy} --> (eat /1 #?)>?
<{daisy} --> (eat /2 $?)>?
<{daisy} --> (eat /1 #?)>?
<{daisy} --> (eat /2 ?1)>?


(3)  extensional vs intensional difference operators

The operators '-' and '~' are quite mysterious - I presume I can use these to create a set of things not in another set?
Would these be use like this?

Daisy is not an instance of a canine:
({daisy} - [canine]).

Daisy does not have wings:
({daisy} ~ [wings]).

(3)  negating a term

The ONA NAL BNF seems to suggest that I can negate a NAL statement by prepending a '!'.
So how could I say that Daisy does not eat mice, for instance?

<!({daisy} * mouse) --> eat>. :|:

When I pass this into ONA, the resulting concepts do not make sense to me :)

That's it, hopefully not too many questions.
Thanks in advance, I am really enjoying playing with ONA.

Cheers

Seamus


Patrick Hammer

unread,
Apr 26, 2022, 10:02:53 PM4/26/22
to open-nars
Dear Seamus!

Sorry for my late reply, I somehow missed this email.

"If I input the following Narsese:
<({daisy} * mouse) --> eat>. :|:
then the Narsese below gets derived:
<{daisy} --> (eat /1 mouse)>. :|:
<mouse --> (eat /2 {daisy})>. :|:
But why not this one?
<{daisy} --> (eat \1 mouse)>. :|:
<mouse --> (eat \2 {daisy})>. :|:

Because in this case it's extensional image {daisy} and mouse are on extensional side / within the left side of the inheritance in the first input statement.
If the product would be on the right side it would transform into intensional images instead.

I presume this is because /1 and /2 are instances, rather than properties?
No they are just extensional image copulas, please see following answer:

I also assume the '1' and '2' here refer to where the variable value sits in the argument list for the term - is this correct?"
Yes, for instance <(a * b) --> R> can be transformed to <a --> (R /1 b)>.    / because a is on left side of --> in the statement <(a * b) --> R>., and 1 because it's the first argument of the product (a * b).
It can thus also be transformed to <b --> (R /2 a)>., / because b is on the left side of the --> in the statement <(a * b) --> R>. and 2 because it's the second argument of the product (a * b).

"(2) independent vs dependent variables
I also have some problems with the independent and dependent variables, when should I be using '$' or '#' ?
I think this also comes back to the extensional (instances) vs intensional (properties) thing, but again I cannot be sure.
For example, if I want to ask what daisy eats, which is the correct choice?
<{daisy} --> (eat /1 #?)>?
<{daisy} --> (eat /2 $?)>?
<{daisy} --> (eat /1 #?)>?
<{daisy} --> (eat /2 ?1)>?"
<{daisy} --> (eat /1 ?1)>? usually, but to avoid confusion with images you can also ask directly in the product form, the system can transform it anyway:
<({daisy} * ?1) --> eat>?  "daisy eats what?"
Dependent variables serve a different purpose, they are like existentially-quantified variables in FOPL.
(<#1 --> bird> && <#1 --> [dive]>).   "there is a bird which can dive"
(<#1 --> bird> && <#1 --> [dive]>)?  "is there a bird which can dive?" (yes/no question)
And independent vars are like all-quantified vars:
<<$1 --> bird> ==> <$1 --> [dive]>>? "can all birds dive?"
<<$1 --> cat> ==> <($1 * mouse) --> eat>>. "all cats eat mice"

"(3)  extensional vs intensional difference operators
The operators '-' and '~' are quite mysterious - I presume I can use these to create a set of things not in another set?
Would these be use like this?
Daisy is not an instance of a canine:
({daisy} - [canine]).
Daisy does not have wings:
({daisy} ~ [wings])."
They have to be part of inheritance statements.
Example, "being able to fly is what distinguishes a magpie from a penguin":
<(magpie ~ penguin) --> [flying]>.
"A penguin is a bird which cannot fly":
<penguin --> (bird - [flying])>.

"(3)  negating a term
The ONA NAL BNF seems to suggest that I can negate a NAL statement by prepending a '!'.
So how could I say that Daisy does not eat mice, for instance?
<!({daisy} * mouse) --> eat>. :|:"
Almost right, this works:
(! <({daisy} * mouse) --> eat>). :|:

Please let me know if you have further questions!

Best regards,
Patrick

Seamus Brady

unread,
Apr 28, 2022, 4:44:15 AM4/28/22
to open...@googlegroups.com
Thanks Patrick, as usual, exceptionally clear and precise, exactly what I needed :)

Cheers!

Seamus

--
You received this message because you are subscribed to a topic in the Google Groups "open-nars" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/open-nars/Ius3mqni1Rk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to open-nars+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/open-nars/bf04a9e7-aff4-4ad5-8e41-e2ab6d6a492dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages