Re: function terms in Euler, n3, and RDF [was: gedcom-relation e

> > We have been playing a bit with your GEDCOM example.
> > We actually rewrote it in N3 and the relations are at
> > http://www.agfa.com/w3c/euler/gedcom-relations.n3

> The gedcom example got me looking around the Euler
> stuff again, and it reminded me of something I find odd there...
> the use of statements that seem to "return" values, ala
> functional terms; e.g.

I have to admit that I haven't thought hard enough on those ...
and we are really open to any improvement ...
From http://www.dict.org/bin/Dict and query string function:
  [[[5. (Math.) A quantity so connected with another quantity,
        that if any alteration be made in the latter there will be
        a consequent alteration in the former. Each quantity is
        said to be a function of the other. Thus, the
        circumference of a circle is a function of the diameter.
        If x be a symbol to which different numerical values can
        be assigned, such expressions as x^{2, 3^{x}, Log. x, and
        Sin. x, are all functions of x.

     Algebraic function, a quantity whose connection with the
        variable is expressed by an equation that involves only
        the algebraic operations of addition, subtraction,
        multiplication, division, raising to a given power, and
        extracting a given root; -- opposed to transcendental
        function.
  ]]]
I'm also sure that Harold can tell much more about functional/relational
matters (RELFUN etc...)

> | {<#x> :in {<#x> :list <#b>}} log:forAll <#b>, <#x>.
> -- http://www.agfa.com/w3c/euler/lists.axiom.n3

> It seems that {<#x> :list <#b>} is being used as a term, as if :list
> is a 2-place function that returns a list. That doesn't really fit
> in RDF does it? RDF only has predicates, not functions, no?

> Ah... this is actually documented:

> | Operations are described with {subject operator object} log:implies
> result. statements.
> | Operators are e:plus, e:minus, e:star, e:slash, e:lt, e:lte, e:gt, e:gte,
> e:eq, and e:neq.
> -- http://www.agfa.com/w3c/euler/

> The lt, lte, gte, eq, and neq symbols fit; they're relations. But e:plus
> doesn't;
> plus, as a relation, is ternary: plus(4, 3, 7) meaning "7 is the sum of 4
> and 3."

that's true

> In playing around with n3, we came up with a couple idioms for this.

> One is to encode "a sum of 4 and 3" as [a :Sum; :of 4; :and 3], combined
> with knowledge that there is exactly one such sum. If you make the domain
> of :of and :and be :Sum (aka :Integer) and recall that = denotes
> daml:equivalentTo,
> you can write "the sum of 4 and 3 is 7" as
>   [ :of 4; :and 3 ] = 7.

> The other idiom is somewhat more traditional, making use of the list
> syntax-sugar in n3, where (a b) denotes the same thing
> as [ daml:first a; daml:rest [ daml:first b; daml:rest daml:nil ]].
> Using that, we can write "the pair 3,4 has sum 7: as
>   (3 4) :sum 7.

> Oops... I've been using decimal numerals as terms, which isn't (yet?) part
> of n3.
> So that should actually be
>   (i:_3 i:_4) :sum i:_7.
> or some such.

Thank you Dan for these very interesting thoughts/proposals.
Once we have implemented the syntactic sugar n3 list stuff
we could try experimenting with both idioms ...

> McDermott's proposal a while ago had another approach to functional terms in
> RDF,
> but it used more than syntactic sugar...
> http://lists.w3.org/Archives/Public/www-rdf-logic/2000Dec/0044.html
> http://www.cs.yale.edu/homes/dvm/daml/proposal.html


have to have another look to that ...

> > --
> > Jos De Roo, Agfa http://www.agfa.com/w3c/jdroo/

> --
> Dan Connolly, W3C http://www.w3.org/People/Connolly/

--
Jos De Roo, Agfa http://www.agfa.com/w3c/jdroo/


[guitar playing and logic thinking can give a really wonderful feeling]

Received on Monday, 5 March 2001 06:32:22 UTC