Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Distinguishing Between ANDed and ORed Premises
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Chris  
View profile  
 More options Dec 12 2009, 9:46 pm
From: Chris <chriss...@gmail.com>
Date: Sat, 12 Dec 2009 18:46:23 -0800 (PST)
Local: Sat, Dec 12 2009 9:46 pm
Subject: Distinguishing Between ANDed and ORed Premises
How do you differentiate between ANDed and ORed premises in Pyke,
especially with negation?

For example, how would I represent the following rule?

"Combine ingredients A and B if A is not vinegar and B is not baking
soda."

After reading through the docs, the closest thing I could come up with
is:

combine_ingredients
    foreach
        ingredients($A,$B)
        notany
            is($A,vinegar)
            is($B,baking_soda)
    assert
        combine($A,$B)

However, I'm not clear how multiple statements under the notany
keyword are interpreted. I'm assuming they're ORed, which means that
that representation would not fire for the statement ingredients
(vinegar,vinegar), even though it should.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruce Frederiksen  
View profile  
 More options Dec 13 2009, 6:29 pm
From: Bruce Frederiksen <dangy...@gmail.com>
Date: Sun, 13 Dec 2009 18:29:36 -0500
Local: Sun, Dec 13 2009 6:29 pm
Subject: Re: Distinguishing Between ANDed and ORed Premises

Multiple clauses under a notany are AND-ed (like multiple clauses everywhere
else).

  notany
    clause_A
    clause_B

means that there is "not any" proof for "clause_A and clause_B".

So the rule that you have should do what you want.  (And, as stated, would
combine baking soda with vinegar, just not the other way around).

Two things that you might consider with this example.

First, if the ingredients don't conceptually come in pairs you could use one
list of single ingredients twice.  Second, you could use a check clause with
Python's != operator:

combine_ingredients
  foreach
    ingredient($A)
    check $A != 'vinegar'
    ingredient($B)
    check $B != 'baking_soda'
  assert
    combine($A, $B)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »