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

Re: help with understand equality ?

From: Michael Kifer <kifer@cs.stonybrook.edu>
Date: Tue, 6 Sep 2011 12:58:16 -0400
To: Lena Lau <llau@vistology.com>
CC: <public-rif-dev@w3.org>
Message-ID: <20110906125816.03782a6d@kiferlap>

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
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 Tuesday, 6 September 2011 16:58:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:07:05 UTC