W3C home > Mailing lists > Public > public-rif-dev@w3.org > September 2011

Re: help with understand equality ?

From: Lena Lau <llau@vistology.com>
Date: Tue, 6 Sep 2011 20:58:35 -0400
Message-ID: <CAB=EOC2J+vB8w4kdwgFi6Z0zzdgmx1KRM5bJ69HyKrMLVjEyEg@mail.gmail.com>
To: kifer@cs.stonybrook.edu
Cc: public-rif-dev@w3.org
Thank you for your explanation.  I'll cycle back as you suggest.


On Tue, Sep 6, 2011 at 12:58 PM, Michael Kifer <kifer@cs.stonybrook.edu> wrote:
>
>
>
> On Tue, 6 Sep 2011 11:20:06 -0400
> Lena Lau <llau@vistology.com> wrote:
>
>> Hi
>>
>> I am new to RIF and I am trying to follow the example 8, in section
>> 4.2 of  http://www.w3.org/TR/2010/REC-rif-bld-20100622/
>>
>> In this example, the usage of equality is unclear to me. It seems like
>> in the example,
>> the ?diffduration is assigned the value of a function.
>
> There is no such thing in logic as assigning a value to a
> variable. ?diffduration is an existential variable so ?diffduration = ... is a
> test of whether there is an value for ?diffduration that satisfies that
> formula.
> It can sometimes be thought of as an assignment of a value, but you should
> understand what it really is.
>
>> However, I am under the impression (from the rest of the document)
>> that equality is testing whether 2 terms are equal.
>
> ?diffduration is a term and so is External(...). But you need to
> keep in mind that  "testing whether 2 terms
> are equal" is a meaningless statement if the terms have variables. They might be equal for some values of those variables but not for others.
>
>>
>> Forall ?item ?deliverydate ?scheduledate ?diffduration ?diffdays (
>>        cpt:reject(<John> ?item) :-
>>            And(cpt:perishable(?item)
>>                cpt:delivered(?item ?deliverydate <John>)
>>                cpt:scheduled(?item ?scheduledate)
>>                ?diffduration =
>> External(func:subtract-dateTimes(?deliverydate ?scheduledate))
>>                ?diffdays = External(func:days-from-duration(?diffduration))
>>                External(pred:numeric-greater-than(?diffdays 10)))
>>    )
>>
>> I hope that this is the right mailing list to post to.
>> Could someone help me understand how equality is used.
>
>
> Yes, it is a proper list for that. Hope the above explanation helps. Note that
> your question is really not about RIF but about a basic aspect of predicate
> logic. It might help if you cycle back to the semantics (as presented in that
> RIF document or in a textbook on predicate logic).
>
>
Received on Wednesday, 7 September 2011 00:59:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 September 2011 00:59:13 GMT