# Schema for CWM's mathematical built-ins, SBP 2001-12
#
# $Id: math.n3,v 1.12 2010/03/30 15:18:08 timbl Exp $
@prefix owl: .
@prefix rdf: .
@prefix rdfs: .
# @prefix daml: .
@prefix log: .
@prefix math: .
@prefix string: .
math:StrictProperty a rdfs:Class;
rdfs:label "StrictProperty";
rdfs:subClassOf rdf:Property.
# daml:intersectionOf (daml:UnambiguousProperty daml:UniqueProperty) .
# This would be very restrictive - only for 1:1 relationships.
# Also note daml:UnambiguousProperty daml:UniqueProperty are in terms of daml:equivalentTo
# not math:equalTo
math:Value a rdfs:Class; rdfs:label "Value";
rdfs:subClassOf string:String;
rdfs:comment "The class of things that are numeric float values as in Python." .
math:Function a rdfs:Class;
rdfs:subClassOf rdf:Property;
rdfs:label "Function";
rdfs:comment "A math:Function is unique in terms of math:EqualTo. ".
math:ReverseFunction a rdfs:Class;
rdfs:subClassOf rdf:Property;
rdfs:comment "A math:ReverseFunction is unambiguous in terms of math:EqualTo. ".
math:LogicalOperator a rdfs:Class; rdfs:subClassOf math:Function, math:ReverseFunction;
rdfs:comment """a logical operator allows evaluation eihter way, or testing relationship
between two values""".
math:List a rdfs:Class; rdfs:label "List";
rdfs:subClassOf rdf:LIst;
rdfs:comment """The class of things that are DAML lists were all of the
members are math:Value items.""" .
math:TwoMemberedList a rdfs:Class; rdfs:label "TwoMemberedList";
rdfs:subClassOf math:List;
rdfs:comment
"This is the class of things that are math lists with only two members." .
# Reverse functions: (obsolete - we stdize on forwrad ones i think -tbl)
#
#math:differenceOf a math:ReverseFunction; rdfs:label "differenceOf";
# rdfs:domain math:Value; rdfs:range math:TwoMemberedList;
# rdfs:comment "The difference of the list members. (obsolete)" .
#
#math:factors a math:ReverseFunction; rdfs:label "factors";
# rdfs:domain math:Value; rdfs:range math:List;
# daml:inverse math:product;
# rdfs:comment "A list of values which multiply to produce the subject. (obsolete)" .
#
#math:quotientOf a math:ReverseFunction; rdfs:label "quotientOf";
# rdfs:domain math:Value; rdfs:range math:TwoMemberedList;
# rdfs:comment "The quotient of the list members (obsolete)" .
#
#math:remainderOf a math:ReverseFunction; rdfs:label "remainderOf";
# rdfs:domain math:Value; rdfs:range math:TwoMemberedList;
# rdfs:comment "The remainder of the list members (obsolete)" .
#
#math:negationOf a math:Function, math:ReverseFunction;
# rdfs:label "negation";
# rdfs:domain math:Value; rdfs:range math:Value;
# rdfs:comment "The subject is the negotation of the object (obsolete)" .
#
#math:exponentiationOf a math:ReverseFunction; rdfs:label "exponentiationOf";
# rdfs:domain math:Value; rdfs:range math:TwoMemberedList;
# rdfs:comment "For exponOf(x, (y, z)), x = y^z (obsolete)" .
# Forward function
math:memberCount a math:Function; rdfs:label "memberCount";
rdfs:domain math:List; rdfs:range math:Value;
rdfs:comment """The number of items in a list. The subject is a list,
the object is calculated as the number of members.""" .
# Logical operators:
math:greaterThan a math:StrictProperty; rdfs:label "greaterThan";
rdfs:comment """True iff the subject is a string representation of a number which is greater than the number of which the object is a string representation.""";
rdfs:domain math:Value; rdfs:range math:Value .
math:notGreaterThan a math:StrictProperty;
rdfs:label "notGreaterThan";
rdfs:comment """True iff the subject is a string representation of a number which is NOT greater than the number of which the object is a string representation.""";
rdfs:domain math:Value; rdfs:range math:Value .
math:lessThan a math:StrictProperty; rdfs:label "lessThan";
rdfs:comment """True iff the subject is a string representation of a number which is LESS than a number of which the object is a string representation.""";
rdfs:domain math:Value; rdfs:range math:Value .
math:notLessThan a math:StrictProperty; rdfs:label "notlessThan";
rdfs:comment """True iff the subject is a string representation of a number which is NOT LESS than a number of which the object is a string representation.""";
rdfs:domain math:Value; rdfs:range math:Value .
math:equalTo a math:StrictProperty; rdfs:label "equalTo";
rdfs:comment """True iff the subject is a string representation of a number which is EQUAL TO a number of which the object is a string representation.""";
rdfs:domain math:Value; rdfs:range math:Value .
math:notEqualTo a math:StrictProperty; rdfs:label "notEqualTo";
rdfs:comment """True iff the subject is a string representation of a number which is NOT EQUAL to a number of which the object is a string representation.""";
rdfs:domain math:Value; rdfs:range math:Value .
math:sum a rdf:Property;
rdfs:label "sum";
rdfs:range math:Value;
rdfs:comment
"""The subject is a list of numbers.
The object is calculated as the arithmentic sum of those numbers.
""".
math:difference a rdf:Property;
rdfs:label "difference";
rdfs:range math:Value;
rdfs:comment
"""The subject is a pair of numbers. The object
is calculated by subtracting the second number of the pair from the first.
""".
math:product a rdf:Property;
rdfs:label "product";
rdfs:range math:Value;
rdfs:comment
"""The subject is a list of numbers.
The object is calculated as the arithmentic product of those numbers.
""".
math:quotient a rdf:Property;
rdfs:label "quotient";
rdfs:range math:Value;
rdfs:comment
"""The subject is a pair of numbers. The object
is calculated by dividing the first number of the pair by the second.
""".
math:integerQuotient a rdf:Property;
rdfs:label "integerQuotient";
rdfs:range math:Value;
rdfs:comment
"""The subject is a pair of integer numbers. The object
is calculated by dividing the first number of the pair by the second, ignoring remainder.
""".
math:remainder a rdf:Property;
rdfs:label "remainder";
rdfs:range math:Value;
rdfs:comment
"""The subject is a pair of integers. The object
is calculated by dividing the first number of the pair by the second and taking the remainder.
""".
math:exponentiation a rdf:Property;
rdfs:label "exponentiation";
rdfs:range math:Value;
rdfs:comment
"""The subject is a pair of numbers. The object
is calculated by raising the first number of the power of the second.
""".
math:negation a rdf:Property;
rdfs:label "negation";
rdfs:range math:Value;
rdfs:domain math:Value;
rdfs:comment
"""The subject or object is calculated to be the negation of the other.""".
math:absoluteValue a rdf:Property;
rdfs:label "negation";
rdfs:range math:Value;
rdfs:domain math:Value;
rdfs:comment
"""The object is calulated as the absolute value of the subject.""".
math:rounded a rdf:Property;
rdfs:label "rounded";
rdfs:range math:Value;
rdfs:domain math:Value;
rdfs:comment
"""The object is calulated as the subject rounded to the nearest integer.""".
#
# Here start the trigonometric functions - karl dubost
#
# Inverse functions are implemented by using the function backwards
# eg for x math:asin y say x is math:sin of y
#math:acos a rdf:Property;
# rdfs:label "acos";
# rdfs:range math:Value;
# rdfs:domain math:Value;
# rdfs:comment
#"""The object is calulated as the arc cosine value of the subject.""".
#math:asin a rdf:Property;
# rdfs:label "asin";
# rdfs:range math:Value;
# rdfs:domain math:Value;
# rdfs:comment
#"""The object is calulated as the arc sine value of the subject.""".
#math:atan a rdf:Property;
# rdfs:label "atan";
# rdfs:range math:Value;
# rdfs:domain math:Value;
# rdfs:comment
#"""The object is calulated as the arc tangent value of the subject.""".
math:atan2 a rdf:Property;
rdfs:label "atan2";
rdfs:range math:Value;
rdfs:domain math:Value;
rdfs:comment
"""The subject is a pair of numbers. The object is calulated as the arc tangent value of the ratio of the two subject values.""".
math:cos a rdf:Property;
rdfs:label "cos";
rdfs:range math:Value;
rdfs:domain math:Value;
rdfs:comment
"""The subject is an angle expressed in radians. The object is calulated as the cosine value of the subject.""".
##math:cosh a rdf:Property;
# rdfs:label "cosh";
# rdfs:range math:Value;
# rdfs:domain math:Value;
# rdfs:comment
#"""The subject is an angle expressed in radians. The object is calulated as the #hyperbolic cosine value of the subject.""".
math:degrees a rdf:Property;
rdfs:label "degrees";
rdfs:range math:Value;
rdfs:domain math:Value;
rdfs:comment
"""The subject is an angle expressed in radians. The object is calulated as the conversion in degrees of the value of the subject.""".
math:sin a rdf:Property;
rdfs:label "sin";
rdfs:range math:Value;
rdfs:domain math:Value;
rdfs:comment
"""The subject is an angle expressed in radians. The object is calulated as the sine value of the subject.""".
math:sinh a rdf:Property;
rdfs:label "sinh";
rdfs:range math:Value;
rdfs:domain math:Value;
rdfs:comment
"""The subject is an angle expressed in radians. The object is calulated as the hyperbolic sine value of the subject.""".
math:tan a rdf:Property;
rdfs:label "tan";
rdfs:range math:Value;
rdfs:domain math:Value;
rdfs:comment
"""The subject is an angle expressed in radians. The object is calulated as the tangent value of the subject.""".
math:tanh a rdf:Property;
rdfs:label "tanh";
rdfs:range math:Value;
rdfs:domain math:Value;
rdfs:comment
"""The subject is an angle expressed in radians. The object is calulated as the hyperbolic tangent value of the subject.""".
#ends