The frame ontology defines the terms that capture conventions used in object-centered knowledge representation systems. Since these terms are built upon the semantics of KIF, one can think of KIF plus the frame-ontology as a specialized representation language. The frame ontology is the conceptual basis for the Ontolingua translators.One purpose of this ontology is to enable people using different representation systems to share ontologies that are organized along object-centered, term-subsumption lines. Translators of ontologies written in KIF using the frame ontology, such as those provided by Ontolingua, allow one to work from a common source format and yet continue to use existing representation systems.
The definitions in this ontology are based on common usage in the computer science and mathematics literatures. However, there is no claim that these definitions capture the semantics of existing, implemented systems in full detail. Nuances of the meaning of terms that depend on the algorithms for inheritance, for instance, are not addressed in this ontology. See the acknowledgements at the end of the file.
This ontology is specified using the definitional forms provided by Ontolingua. All of the embedded sentences are in KIF 3.0, and the whole thing can be translated into pure KIF top level forms without loss of information.
The basic ontological commitments of this ontology are
- Relations are sets of tuples -- named by predicates
- Functions are a special case of relations
- Classes are unary relations -- no special syntax for types
- Extensional semantics for classes -- defined as sets, not descriptions
- No special treatment of slots, just binary relations and unary functions
- KL-ONE style specs are relations on relations (second-order relations, not metalinguistic or modal)
Kif-Relations Kif-Sets Kif-Lists Kif-Numbers
Vt-Domain Vt-Example Configuration-Design Vt-Design Simple-Bikes Vt-Domain ... Physical-Quantities Unary-Scalar-Functions Cml Thermodynamics Dme Thermodynamics Standard-Units Simple-Bikes Cml ... Vt-Design ... Unary-Scalar-Functions ... Scalar-Quantities Vt-Design ... Vector-Quantities Abstract-Algebra Physical-Quantities ... Jat-Generic Job-Assignment-Task Generic-Bibliography Slot-Constraint-Sugar Generic-Bibliography
Class-Partition Relation Function Unary-Function One-To-One-Relation Single-Valued Many-To-One-Relation Class N-Ary-Relation Unary-Relation Binary-Relation Unary-Function ... Single-Valued Asymmetric-Relation Antisymmetric-Relation Partial-Order-Relation Total-Order-Relation Antireflexive-Relation Irreflexive-Relation Reflexive-Relation Equivalence-Relation Partial-Order-Relation ... Symmetric-Relation Equivalence-Relation Transitive-Relation Equivalence-Relation Partial-Order-Relation ... Weak-Transitive-Relation Many-To-One-Relation One-To-Many-Relation Many-To-Many-Relation Thing
The following constants were used from included theories:
All constants that were mentioned were defined.
A relation is a set of tuples that represents a relationship among objects in the universe of discourse. Each tuple is a finite, ordered sequence (i.e., list) of objects. A relation is also an object itself, namely, the set of tuples. Tuples are also entities in the universe of discourse, and can be represented as individual objects, but they are not equal to their symbol-level representation as lists.By convention, relations are defined intensionally by specifying constraints that must hold among objects in each tuple. That is, a relation is defined by a predicate which holds for sequences of arguments that are in the relation.
Relations are denoted by relation constants in KIF. A fact that a particular tuple is a member of a relation is denoted by (<relation-name> arg_1 arg_2 .. arg_n), where the arg_i are the objects in the tuple. In the case of binary relations, the fact can be read as `arg_1 is <relation-name> arg_2' or `a <relation-name> of arg_1 is arg_2.' The relation constant is a term as well, which denotes the set of tuples.
(<=> (Relation ?Relation) (And (Set ?Relation) (Forall (?Tuple) (=> (Member ?Tuple ?Relation) (List ?Tuple)) )))
A function is a mapping from a domain to a range that associates a domain element with exactly one range element. The elements of the domain are tuples, as in relations. The range is a class -- a set of singleton tuples -- and element of the range is an instance of the class. Functions are also first-class objects in the same sense that relations are objects: namely, functions can be viewed as sets of tuples.
(<=> (Function ?Relation) (And (Relation ?Relation) (Forall (?Tuple1 ?Tuple2) (=> (Member ?Tuple1 ?Relation) (Member ?Tuple2 ?Relation) (= (Butlast ?Tuple1) (Butlast ?Tuple2)) (= (Last ?Tuple1) (Last ?Tuple2)) ))))
A class can be thought of as a collection of individuals. Formally, a class is a unary relation, a set of tuples (lists) of length one. Each tuple contains an object which is said to be an instance of the class. An individual, or object, is any identifiable entity in the universe of discourse (anything that can be denoted by a object constant in KIF), including classes themselves.The notion of CLASS is introduced in addition to the relation vocabulary because of the importance of classes and types in knowledge representation practice. The notion of class and relation are merged to unify relational and object-centered representational conventions. Classes serve the role of `sorts' and `types'.
There is no first-order distinction between classes and unary relations. One is free to define a second-order predicate that makes the distinction. For example, (predicate C) could mean that the unary relation C should be thought of more as a property than as a collection of individuals over which one might quantify some statement. Logically, all such predicates would still be instances of the metaclass CLASS.
The fact that an object i is an instance of class C is denoted by the sentence (C i). One may also use the equivalent form (INSTANCE-OF i C). This is not equivalent to (MEMBER i C).
An instance of a class is not a set-theoretic member of the class; rather, the tuple containing the instance is a element of the set of tuples which is a relation.The definition of a class is a predicate over a single free variable, such that the predicate holds for instances of the class. In other words, classes are defined intentionally. Two separately-defined classes may have the same extension (in this case they are = to each other). It is possible to define a class by enumerating its instances, using KIF's set operations. For example, (define-class primary-color (?color)
(member ?color (set red green blue)))
Slots Of Instances:
(<=> (Class ?Class) (And (Relation ?Class) (= (Arity ?Class) 1)))
THING is the class of everything in the universe of discourse that can be in a class. This includes all the relations and objects defined in the KIF specification, plus all other objects defined in user ontologies. Every THING is either a set or an individual.
An object is an instance-of a class if it is a member of the set denoted by that class. One would normally state the fact that individual i is an instance of class C with with the relational form (C i), but it is equivalent to say (INSTANCE-OF i C). Instance-of is useful for defining the second-order relations and classes that are about class/instance networks.An individual may be an instance of many classes, some of which may be subclasses of others. Thus, there is no assumption in the meaning of instance-of about specificity or uniqueness. See DIRECT-INSTANCE-OF.
(<=> (Instance-Of ?Individual ?Class) (And (Class ?Class) (Holds ?Class ?Individual)) )
The instances of some classes may be specified extensionally. That is, one can list all of the instances of the class by definition. For this case we say (= (all-instances C) (setof V_1 V_2 ... V_n)), where C is a class and the V_i are its instances.ALL-INSTANCES imposes a monotonic constraint. Any subclass of C cannot have any instances outside of the ALL-INSTANCES of C. Note that this is not indexical or modal: whether something is in all-instances is a property of the modeled world and does not depend on the facts currently stored in some knowledge base.
(<=> (All-Instances ?Class ?Set-Of-Instances) (And (Class ?Class) (Set ?Set-Of-Instances) (Forall (?Instance) (<=> (Member ?Instance ?Set-Of-Instances) (Instance-Of ?Instance ?Class) ))))
ONE-OF is a function for defining classes by enumerating their instances. It takes a variable number of terms as arguments, and denotes the class whose instances are exactly those terms.For example, (one-of yes no) denotes the class containing the objects called yes or no. (instance-of yes (One-of yes no)) is true, and (instance-of maybe (one-of yes no) is false. A common use for one-of is in defining type restrictions. For example, the relation value-type takes a class as an argument. To specify a finite set of possible values for a slot, one can use (value-type ?instance ?slot (one-of a b c)).
(Undefined (Arity One-Of)) (<=> (One-Of @Members ?Class) (Forall (?Instance) (<=> (Instance-Of ?Instance ?Class) (Member ?Instance (Setof @Members)) )))
Class C is a subclass of parent class P if and only if every instance of C is also an instance of P. A class may have multiple superclasses and subclasses. Subclass-of is transitive: if (subclass-of C1 C2) and (subclass-of C2 C3) then (subclass-of C1 C3).Object-centered systems sometimes distinguish between a subclass-of relationship that is asserted and one that is inferred. For example, (subclass-of C1 C3) might be inferred from asserting (subclass-of C1 C2)
and (subclass-of C2 C3). The functional interfaces to such systems might call the asserted form something like `parents' and the inferred form `ancestors'. However, both are logically identical to subclass-of; distinctions based on inference procedures and the current state of the knowledge base are not captured in this ontology.
(<=> (Subclass-Of ?Child-Class ?Parent-Class) (And (Class ?Parent-Class) (Class ?Child-Class) (Forall (?Instance) (=> (Instance-Of ?Instance ?Child-Class) (Instance-Of ?Instance ?Parent-Class) ))))
Superclass-of is the inverse of the subclass-of relation. It is useful to create an explicit inverse because there are efficient ways to assert and query superclass and subclass relationships separately.In Cyc, superclass-of is called #%allSpecs because it is a slot from a collection to all of its specializations (subclasses).
A relation R is a subrelation-of relation R' if, viewed as sets, R is a subset of R'. In other words, every tuple of R is also a tuple of R'. In some more words, if R holds for some arguments arg_1, arg_2, ... arg_n, then R' holds for the same arguments. Thus, a relation and its subrelation must have the same arity, which could be undefined.In CycL, subrelation-of is called #%genlSlots.
(<=> (Subrelation-Of ?Child-Relation ?Parent-Relation) (And (Relation ?Child-Relation) (Relation ?Parent-Relation) (Forall (?Tuple) (=> (Member ?Tuple ?Child-Relation) (Member ?Tuple ?Parent-Relation) ))))
An individual i is an DIRECT-INSTANCE-OF class C if i is an instance-of C and there is no other subclass of C defined in the current ontology of which i is also an instance-of. Such a class C is a `minimal' or `most-specific' parent class for the individual i. The direct class is not necessarily unique; an individual can have several most-specific classes. Note that this relation is indexical -- its truth depends the contents of the current knowledge base rather than the world.The distinction between INSTANCE-OF and DIRECT-INSTANCE-OF is not the same as the relationship between asserting instance-of directly and having the system infer it. The meanings of both instance-of and direct-instance-of, and every other object-level relation in a knowledge base mean, are independent of whether they are asserted explicitly or inferred.
Cyc makes the distinction between #%instanceOf and #%allInstanceOf. #%allInstanceOf means the same thing as INSTANCE-OF in our ontology. However, #%instanceOf is subtlely different from direct-instance-of. When someone asserts (#%instanceOf i C) to Cyc, it means the same thing as (#%allInstanceOf i C), but Cyc creates a pointer between an instance unit and a collection unit. Later, someone may define a subclass C_sub of C and assert (#%instanceOf i C_sub), and this is consistent with the earlier #%instanceOf assertion.
Direct-instance-of is useful for maintaining a class hierarchy in a modular, canonical form. It is defined here because some systems maintain direct-instance-of and some applications depend on this.
DIRECT-SUBCLASS-OF is the same thing as SUBCLASS-OF with an additional constraint: there is no other class `between' child and parent class in the subclass hierarchy of the current knowledge base. In other words, if (direct-subclass-of C P) then there is no other defined class P' in
the current knowledge base that is a superclass of C and also a subclass of P.Note that this relation is indexical -- its truth depends the contents of the current knowledge base rather than the world. There certaintly might be a set of tuples in the world that is a superset of C and a subset of P, but it can't have been defined as a class in the current knowledge base if (direct-subclass-of C P) is true for that knowledge base.
The direct-subclass-of of a class is not necessarily unique.
In systems with term classifiers, direct-subclass-of relations are usually inferred, rather than asserted.
Arity is the number of arguments that a relation can take. If a relation can take an arbitrary number of arguments, its arity is undefined. For example, a function such as `+' is of undefined arity; its last formal argument is specified with a sequence variable. The arity of a function is one more than the number of arguments it can take, in keeping with the unified treatment of functions and relations. The arity of the empty relation (i.e., with no tuples) is undefined.
(<=> (Arity ?Relation ?N) (And (Relation ?Relation) (Not (Empty ?Relation)) (Integer ?N) (Forall (?Tuple) (=> (Member ?Tuple ?Relation) (Length ?Tuple ?N)) )))
The EXACT-DOMAIN of a relation is a relation whose tuples (all of them) are mapped by the relation to instances of the range. A binary relation R is defined as a set of tuples of form <x,y>. If we say (= (exact-domain R) D) then all of the x's must be in the class D, and for each instance x of class D, the relation maps x to some y. The exact-domain of a relation of arity other than 2 is the relation that represents a cross product. For example, the notation F:A x B -> C, means that function F maps pairs <a,b> onto c's where a is an instance of A, b is an instance of B, and c is an instance of C. The exact-domain of F is the set of pairs <a,b> that occur in some triple <a,b,c> in F.Some treatments of functions define a function as a mapping from a domain to a range. This ontology treats functions as relations, and relations as sets of tuples. Thus, functions and relations are not defined relative to domains and ranges; the exact-domain is a function of the set of tuples. It follows that all functions are `total' with respect to their exact-domains and `onto' with respect to their exact-ranges.
The exact-domain of a variable-arity relation is another variable-arity relation; the lengths of the tuples in the exact-domain of R is one less than the corresponding tuples in the relation R. The exact-domain of a unary relation, or a relation that contains a tuple of length one, is undefined.
(<=> (Exact-Domain ?Relation ?Domain-Relation) (And (Relation ?Relation) (Relation ?Domain-Relation) (Forall (?Tuple) (=> (Member ?Tuple ?Relation) (Not (Empty (Butlast ?Tuple))) )) (Forall (?Tuple @Args) (<=> (Holds ?Domain-Relation @Args) (And (Member ?Tuple ?Relation) (= (Listof @Args) (Butlast ?Tuple)) )))))
A relation maps elements of a domain onto element of a range. For each tuple in the relation, the last item is in the range, and the tuple formed by the preceeding items is in the domain. The EXACT-RANGE is the class whose instances are exactly those that appear in the last item of some tuple in the relation.The EXACT-RANGE of a relation is always a class, while the exact-domain may be a relation of any arity, including variable arity (e.g., the + function can take 0 or more arguments, but its exact-range is some subset of the class NUMBER).
In KIF, functions are a special case of relations. This definition is based on relational terminology, but applies to functions as well. In discussions of functions, one often sees the notation f:X -> Y. Usually, X and Y are sets of elements x and y. In this ontology, the unary function f is also a binary relation, where X is the exact-domain of f and Y is the exact-range of f. This generalizes to cross products. For the function g:A x B x C -> D, the domain is the ternary relation of tuples (a, b, c) and the range is the unary relation of tuples (d). The exact-range of just those d's that are actually the value of g on some (a, b, c).
The EXACT-RANGE of a function is unique, and every function f maps (exact-domain f) onto (exact-range f). Sometimes the EXACT-RANGE of f is called the ``image of (exact-domain f) under d.''
The relation RANGE is a constraint on the possible values of a function. It is a superclass of the EXACT-RANGE, and is not unique.
(<=> (Exact-Range ?Relation ?Range-Class) (And (Relation ?Relation) (Class ?Range-Class) (Forall (?Range-Instance) (<=> (Instance-Of ?Range-Instance ?Range-Class) (Exists (?Tuple) (And (Member ?Tuple ?Relation) (Last ?Tuple ?Range-Instance) ))))))
A relation R is TOTAL-ON a domain class C if there are tuples in the relation (x,y) for every instance x of C. If the domain is a relation D, it represents a Cartesian product, and the relation is total on D if for every tuple (x1, x2, ... xn) in D there is a tuple (x1, x2, ... xn, y) in R.
(<=> (Total-On ?Relation ?Domain-Relation) (Subrelation-Of (Exact-Domain ?Relation) ?Domain-Relation) )
A relation R is ONTO range class C iff for every element y in C there is a tuple in R (x1, x2, ... y).
(<=> (Onto ?Relation ?Range-Class) (Subclass-Of (Exact-Range ?Relation) ?Range-Class) )
An N-ary relation is a relation with some FIXED arity.
(<=> (N-Ary-Relation ?Relation) (And (Relation ?Relation) (Not (Undefined (Arity ?Relation)))) )
A unary relation is a relation of arity 1. Unary relations are the same thing as classes. In this ontology there is no logical distinction between a monadic predicate (unary relation) and a type (class).
Slots Of Instances:
(<=> (Unary-Relation ?Relation) (And (Relation ?Relation) (= (Arity ?Relation) 1)) )
A binary relation maps instances of a class to instances of another class. Its arity is 2. Binary relations are often shown as slots in frame systems.
Slots Of Instances:
(<=> (Binary-Relation ?Relation) (And (Relation ?Relation) (= (Arity ?Relation) 2)) )
A unary function is a functional mapping from instances of a class to instances of another class. It is a relation of arity 2. Binary relations are often shown as slots in frame systems.
(<=> (Unary-Function ?F) (And (Binary-Relation ?F) (Function ?F)))
Single-valued relations are binary relations that are functional. The predicate SINGLE-VALUED is useful for asserting that a slot will have at most one value without using a function-defining form. It is restricted to binary relations because it is defined only for slots. Note that specifying a relation as single valued says that it is function for all subclasses of its domain.
(<=> (Single-Valued ?Relation) (And (Binary-Relation ?Relation) (Function ?Relation)) )
One binary relation is the inverse of another if they are equivalent when their arguments are swapped.
(<=> (Inverse ?Binary-Relation ?Inverse-Relation) (And (Binary-Relation ?Binary-Relation) (Binary-Relation ?Inverse-Relation) (<=> (Holds ?Binary-Relation ?X ?Y) (Holds ?Inverse-Relation ?Y ?X) )))
The projection of an N-ary relation on column i is the class whose instances are the ith items of each tuple in the relation.
(Nth-Domain Projection 3 Class) (Nth-Domain Projection 2 Positive-Integer) (Nth-Domain Projection 1 N-Ary-Relation) (<=> (Projection ?Relation ?Column ?Projection-Relation) (And (N-Ary-Relation ?Relation) (Positive-Integer ?Column) (=< ?Column (Arity ?Relation)) (Class ?Projection-Relation) (Forall (?Projection-Instance) (<=> (Instance-Of ?Instance ?Projection-Relation) (Exists (?Tuple) (And (Member ?Tuple ?Relation) (Nth ?Tuple ?Column ?Instance) ))))))
The composition of binary relations R_1 and R_2 is a relation R_3 such that R_1(x,y) and R_2(y,z) implies R_3(x,z).
(Nth-Domain Composition 3 Binary-Relation) (Nth-Domain Composition 2 Binary-Relation) (Nth-Domain Composition 1 Binary-Relation) (= (Composition ?R1 ?R2) (Setofall (Listof ?X ?Z) (Exists (?Y) (And (Holds ?R1 ?X ?Y) (Holds ?R2 ?Y ?Z))) ))
A binary relation R is a COMPOSITION-OF a sequence of binary relations R_1, R_2, ... R_N iff there exists a relation R' that is a COMPOSITION-OF the sequence R_1 ... R_{N-1}, and R is the (COMPOSITION R_1 R').Relations are composed right to left. For example, if (composition-of R (listof a b c d)) then R = (composition d (composition c (composition b a))).
When the relations are unary functions, the sequence corresponds to nested parentheses in functional notation. For example, if F is composition-of functions a, b, and c, (COMPOSITION-OF F (listof a b c)) means (f ?x) is equal to (a (b (c ?x))).
(<=> (Composition-Of ?Binary-Relation ?List-Of-Relations) (And (Binary-Relation ?Binary-Relation) (List ?List-Of-Relations) (Not (Null ?List-Of-Relations)) (=> (Item ?R ?List-Of-Relations) (Binary-Relation ?R)) (Or (And (Single ?List-Of-Relations) (= ?Binary-Relation (First ?List-Of-Relations)) ) (And (Double ?List-Of-Relations) (= ?Binary-Relation (Composition (Second ?List-Of-Relations) (First ?List-Of-Relations) ))) (Exists (?Left-Sub-Relation) (And (= ?Binary-Relation (Composition (Last ?List-Of-Relations) ?Left-Sub-Relation)) (Composition-Of ?Left-Sub-Relation (Butlast ?List-Of-Relations)))))))
arbitrary-arity version of COMPOSITION. The left-to-right argument order composes relations outside-in. e.g., (COMPOSE f g h) means (composition h (composition g f)). If the relations are unary functions, then the composition order corresponds to nested function terms. For example, if f,g,h are functions, then (value (COMPOSE f g h) ?arg) is equivalent to (f (g (h ?arg))).
(Undefined (Arity Compose)) (<=> (Compose @Binary-Relations ?Composed-Relation) (Composition-Of ?Composed-Relation (Listof @Binary-Relations)) )
Alias is a way to specify that two relations have the same extension. It is logically equivalent to the = relation, except that it is restricted to relations.
(<=> (Alias ?Relation-1 ?Relation-2) (And (Relation ?Relation-1) (Relation ?Relation-2) (= ?Relation-1 ?Relation-2) ))
DOMAIN is short for ``domain restriction''. A domain restriction of a binary relation is a constraint on the exact-domain of the relation. A domain restriction is superclass of the exact-domain; that is, all instances of the exact-domain of the relation are also instances of the DOMAIN restriction. Thus, the DOMAIN of a relation is not unique.In an ontology, specifying a domain restriction of a binary relation is a way to specify partial information about the objects to which the relation applies. For example, one can state that favorite-beer is a relation from beer drinkers to beers as (domain favorite-beer person). This says that all people who have
a favorite-beer are instances of person, even though there may be some instances of person who do not have a favorite beer.Representation systems can use these specifications to classify terms and check integrity constraints.
(<=> (Domain ?Relation ?Restriction) (And (Binary-Relation ?Relation) (Class ?Restriction) (Subclass-Of (Exact-Domain ?Relation) ?Restriction) ))
DOMAIN-OF is the inverse of the DOMAIN relation; i.e., (domain-of D R) means that D is a domain restriction of R. A DOMAIN-OF a binary relation is a class to which the binary relation can be meaningfully applied; i.e., it is possible, but not assured, that there are instances d of D for which R(d,v) holds. Of course, every instance i for which R(i,v) does hold is an instance of D.One interpretation of the assertion (DOMAIN-OF my-class my-relation) is `the slot my-relation may apply to some of the instances of my-class.' A less precise but common paraphrase is `my-class has the slot my-relation'. User interfaces to frame and object systems often have some symbol-level heuristic for showing slots that `have' or `make sense for' the class. Keep in mind that DOMAIN-OF is a constraint on the logically consistent use of the relation, not a relevance assertion. There are many classes that are DOMAINs-OF a given relation; namely, all superclasses of the exact-domain. (THING, for example, is a DOMAIN-OF all relations.) Therefore, it is quite possible that most of the instances of a domain-of a relation do not `make sense' for that relation.
Whereever one uses (domain-of D R) it is equivalent to adding D to the list of domain restrictions on the definition of R. In other words if R was defined as (define-relation R (?x ?y) :def (and (A ?x) (B ?y))) then the statement (DOMAIN-OF D R) has the same meaning as changing the definition to (define-relation R (?x ?y) :def (and (A ?x) (D ?x) (B ?y))). For modularity reasons DOMAIN-OF is preferred only when R is not given its own definition in an ontology.
RANGE is short for ``range restriction.'' Specifying a RANGE restriction of a relation is a way to constrain the class of objects which participate as the last argument to the relation. For any tuple <d1 d2 ...dn r> in the relation, if class T is a RANGE restriction of the relation, r must be an instance of T.RANGE restrictions are very helpful in maintaining ontologies. One can think of a range restriction as a type constraint on the value of a function or range of a relation. Representation systems can use these specifications to classify terms and check integrity constraints.
If the restriction on the range of the relation is not captured by a named class, one can use specify the constraint with a predicate that defines the class implicitly, coerced into a class. For example, (kappa (?x) (and (prime ?x) (< ?x 100)))
denotes the class of prime numbers under 100.It is consistent to specify more than one RANGE restriction for a relation, as long as they all include the EXACT-RANGE of the relation.
Note that range restriction is true regardless of what the restricted relation is applied to. For class-specific range constraints, use slot-value-type.
(<=> (Range ?Relation ?Type) (And (Relation ?Relation) (Class ?Type) (Subclass-Of (Exact-Range ?Relation) ?Type) ))
The inverse of RANGE. A class C is a range-of a relation R if C is a superclass-of the exact range of R.
Domain restrictions generalized to n-ary relations. The sentence (nth-domain rel 3 type-class) says that the 3rd element of each tuple in the relation REL is an instance of type-class.
(Nth-Domain Nth-Domain 3 Class) (Nth-Domain Nth-Domain 2 Positive-Integer) (Nth-Domain Nth-Domain 1 N-Ary-Relation) (<=> (Nth-Domain ?Relation ?N ?Type) (And (N-Ary-Relation ?Relation) (Positive-Integer ?N) (Class ?Type) (Forall (?Tuple) (=> (Member ?Tuple ?Relation) (And (>= (Length ?Tuple) ?N) (Instance-Of (Nth ?Tuple ?N) ?Type) )))))
A relation-universe of a relation of any arity is a class from which is drawn every item in every tuple of the relation. Like EXACT-DOMAIN, it is exactly those items and no other. Thus, to state that the universe of a relation is covered by some class, one can state that the relation-universe is a subclass of the covering class.
(<=> (Relation-Universe ?Relation ?Type-Class) (And (Relation ?Relation) (Class ?Type-Class) (Forall (?X) (<=> (Exists (?Tuple) (And (Member ?Tuple ?Relation) (Item ?X ?Tuple) )) (Instance-Of ?X ?Type-Class) ))))
HAS-VALUE is a way to state that an instance has a value on some slot. Its third argument is a single value; one may use HAS-VALUE repeatedly for each value of a multiple-valued relation.For example, (HAS-VALUE i R v_1), (HAS-VALUE i R v_2) means that slot R applied to domain instance i maps to values v_1 and v_2. In other words, R(i,v_1) and R(i,v_2) hold.
There is no closed-world assumption implied; there may be other values for the specified slot on a given domain instance.
(Nth-Domain Has-Value 2 Binary-Relation) (<=> (Has-Value ?Instance ?Binary-Relation ?Value) (And (Binary-Relation ?Binary-Relation) (Holds ?Binary-Relation ?Instance ?Value) ))
ALL-VALUES is a way to state all of the the values of a slot on an instance. Its third argument is a set. If all-values are given for a slot on an instance, there cannot be any other values for that slot on that instance. For example, (= (ALL-VALUES i R) (setof v_1 v_2 v_3)) means that R(i,v_1), R(i,v_2), and R(i,v_3) hold, and there is no other unique v_i for which R(i,v_i) holds.
(Nth-Domain All-Values 2 Binary-Relation) (<=> (All-Values ?Instance ?Binary-Relation ?Set-Of-Values) (And (Binary-Relation ?Binary-Relation) (Forall (?Value) (<=> (Member ?Value ?Set-Of-Values) (Holds ?Binary-Relation ?Instance ?Value) ))))
The VALUE-TYPE of a binary relation R with respect to a given instance d is a constraint on the values of R when R is applied to d. The constraint is specified as a class T such that when R(d,t) holds, t is an instance of T.
(Nth-Domain Value-Type 3 Class) (Nth-Domain Value-Type 2 Binary-Relation) (<=> (Value-Type ?Instance ?Binary-Relation ?Type) (And (Binary-Relation ?Binary-Relation) (Class ?Type) (Forall (?Value) (=> (Holds ?Binary-Relation ?Instance ?Value) (Instance-Of ?Value ?Type) ))))
Two binary relations R1 and R2 have the SAME-VALUES on instance i if whenever R1(i,v) holds for some value v, then R2(i,v) holds for the same domain instance i and value v.
(Nth-Domain Same-Values 3 Binary-Relation) (Nth-Domain Same-Values 2 Binary-Relation) (<=> (Same-Values ?Instance ?Slot1 ?Slot2) (And (Binary-Relation ?Slot1) (Binary-Relation ?Slot2) (<=> (Holds ?Slot1 ?Instance ?Value) (Holds ?Slot2 ?Instance ?Value) )))
The VALUE-CARDINALITY of a binary-relation with respect to a given domain instance is the number of range-elements to which the relation maps the domain-element. For a function (single-valued relation), the VALUE-CARDINALITY is 1 on all domain instances for which the function is defined. It is 0 for those instances outside the exact domain of the function.VALUE-CARDINALITY may be used within the definition of a class to specify a slot cardinality if its first argument is the class's instance variable.
(Nth-Domain Value-Cardinality 3 Nonnegative-Integer) (Nth-Domain Value-Cardinality 2 Binary-Relation) (= (Value-Cardinality ?Instance ?Binary-Relation) (Cardinality (Setofall ?Y (Holds ?Binary-Relation ?Instance ?Y))) )
Minimum value cardinality is a constraint on the number of values to which a binary relation can map a domain instance. It implies the existence of at least N values for a given relation on an instance.
(Nth-Domain Minimum-Value-Cardinality 3 Nonnegative-Integer) (Nth-Domain Minimum-Value-Cardinality 2 Binary-Relation) (<=> (Minimum-Value-Cardinality ?Instance ?Binary-Relation ?N) (And (Binary-Relation ?Binary-Relation) (Nonnegative-Integer ?N) (>= (Value-Cardinality ?Instance ?Binary-Relation) ?N) ))
Maximum value cardinality is a constraint on the number of values to which a binary relation can map a domain instance. It restrict the relation to AT MOST N values for a given a domain instance. A cardinality of 0 means that the relation does not hold for that instance.
(Nth-Domain Maximum-Value-Cardinality 3 Nonnegative-Integer) (Nth-Domain Maximum-Value-Cardinality 2 Binary-Relation) (<=> (Maximum-Value-Cardinality ?Instance ?Binary-Relation ?N) (And (Binary-Relation ?Binary-Relation) (Nonnegative-Integer ?N) (=< (Value-Cardinality ?Instance ?Binary-Relation) ?N) ))
The SLOT-VALUE-TYPE of a relation R with respect to a domain class C is a constraint on the values of R when R is applied to instances of C. The constraint is specified as a class T such that for any instance c of C, when R(c,t), t is an instance of T.
(Nth-Domain Slot-Value-Type 3 Class) (Nth-Domain Slot-Value-Type 2 Binary-Relation) (Nth-Domain Slot-Value-Type 1 Class) (<=> (Slot-Value-Type ?Class ?Binary-Relation ?Type) (And (Class ?Class) (Binary-Relation ?Binary-Relation) (Class ?Type) (Forall (?Instance) (=> (Instance-Of ?Instance ?Class) (=> (Holds ?Binary-Relation ?Instance ?Slot-Value) (Instance-Of ?Slot-Value ?Type) )))))
If a SLOT-CARDINALITY of relation R with respect to a domain class C is N, then for all instances c of class C, R maps c to exactly N individuals in the range. For single-valued relations, the slot-cardinality is 1. Specifying a SLOT-CARDINALITY is a constraint between classes and binary-relations which does not always hold; there need not be any fixed value-cardinality for R on all instances of C.
(Nth-Domain Slot-Cardinality 3 Nonnegative-Integer) (Nth-Domain Slot-Cardinality 2 Binary-Relation) (Nth-Domain Slot-Cardinality 1 Class) (<=> (Slot-Cardinality ?Domain-Class ?Binary-Relation ?N) (=> (Instance-Of ?Instance ?Domain-Class) (Value-Cardinality ?Instance ?Binary-Relation ?N) ))
MINIMUM-VALUE-CARDINALITY specifies a lower bound on the number of range elements to which a given relation can map instance of a given domain class. In other words, it is the minimum number of slot values for a slot local to a class.
(Nth-Domain Minimum-Slot-Cardinality 3 Nonnegative-Integer) (Nth-Domain Minimum-Slot-Cardinality 2 Binary-Relation) (Nth-Domain Minimum-Slot-Cardinality 1 Class) (<=> (Minimum-Slot-Cardinality ?Domain-Class ?Relation ?N) (=> (Instance-Of ?Instance ?Domain-Class) (>= (Value-Cardinality ?Instance ?Relation) ?N) ))
MAXIMUM-VALUE-CARDINALITY specifies an upper bound on the number of range elements associated with any instance of a given domain class.It is inspired by the CLASSIC and Loom `at-most' operator.
(Nth-Domain Maximum-Slot-Cardinality 3 Nonnegative-Integer) (Nth-Domain Maximum-Slot-Cardinality 2 Binary-Relation) (Nth-Domain Maximum-Slot-Cardinality 1 Class) (<=> (Maximum-Slot-Cardinality ?Domain-Class ?Relation ?N) (=> (Instance-Of ?Instance ?Domain-Class) (=< (Value-Cardinality ?Instance ?Relation) ?N) ))
SINGLE-VALUED-SLOT is a constraint on the second argument of a binary relation that is conditional on the first argument to the relation being an instance of a given class. It is like single-valued, except it is local to the values of the relation on instances of the given subset of the domain.
(<=> (Single-Valued-Slot ?Class ?Binary-Relation) (= (Slot-Cardinality ?Class ?Binary-Relation) 1) )
AN inherited-slot-value of binary relation R on class C is value V for which R(i,v) holds on each instance i of C. There is no closed-world assumption; there may exist other values v_i for which R(i,v_i) holds. Inherited values are monotonic, not default.
(Nth-Domain Inherited-Slot-Value 2 Binary-Relation) (Nth-Domain Inherited-Slot-Value 1 Class) (<=> (Inherited-Slot-Value ?Class ?Binary-Relation ?Value) (And (Class ?Class) (Binary-Relation ?Binary-Relation) (Forall (?Instance ?Value) (=> (Instance-Of ?Instance ?Class) (Holds ?Binary-Relation ?Instance ?Value) ))))
The all-inherited-slot-values of binary relation R on class C is the set V of values for which R(c,s) holds on each instance i of C and member v of V. Unlike inherited-slot-values, there may not exist any other value v_i for which R(i,v_i) holds. Inherited values are monotonic, not default.
(Nth-Domain All-Inherited-Slot-Values 2 Binary-Relation) (Nth-Domain All-Inherited-Slot-Values 1 Class) (<=> (All-Inherited-Slot-Values ?Class ?Binary-Relation ?Set-Of-Values) (And (Class ?Class) (Binary-Relation ?Binary-Relation) (Forall (?Instance ?Value) (=> (Instance-Of ?Instance ?Class) (<=> (Member ?Value ?Set-Of-Values) (Holds ?Binary-Relation ?Instance ?Value) )))))
Let class C be in the domain of two binary relations R_1 and R_2. The relation (same-values C R_1 R_2) means that the values of the two relations are the same when applied to instances of the class.
(Nth-Domain Same-Slot-Values 3 Binary-Relation) (Nth-Domain Same-Slot-Values 2 Binary-Relation) (Nth-Domain Same-Slot-Values 1 Class) (<=> (Same-Slot-Values ?Class ?Slot1 ?Slot2) (And (Class ?Class) (Binary-Relation ?Slot1) (Binary-Relation ?Slot2) (Forall (?Instance ?Value) (=> (Instance-Of ?Instance ?Class) (<=> (Holds ?Slot1 ?Instance ?Value) (Holds ?Slot2 ?Instance ?Value) )))))
A set of mutually disjoint classes. Disjointness of classes is a special case of disjointness of sets.
(<=> (Class-Partition ?Set-Of-Classes) (And (Set ?Set-Of-Classes) (Forall (?C) (=> (Member ?C ?Set-Of-Classes) (Class ?C))) (Forall (?C1 ?C2) (=> (And (Member ?C1 ?Set-Of-Classes) (Member ?C2 ?Set-Of-Classes) (Not (= ?C1 ?C2)) ) (Forall (?I) (=> (Instance-Of ?I ?C1) (Not (Instance-Of ?I ?C2)) ))))))
A subclass-partition of a class C is a set of subclasses of C that are mutually disjoint.
(<=> (Subclass-Partition ?C ?Class-Partition) (And (Class ?C) (Class-Partition ?Class-Partition) (Forall (?Subclass) (=> (Member ?Subclass ?Class-Partition) (Subclass-Of ?Subclass ?C) ))))
A subrelation-partition of a class C is a set of mutually-disjoint classes (a subclass partition) which covers C. Every instance of C is is an instance of exactly one of the subclasses in the partition.
(<=> (Exhaustive-Subclass-Partition ?C ?Class-Partition) (And (Subclass-Partition ?C ?Class-Partition) (Forall (?Instance) (=> (Instance-Of ?Instance ?C) (Exists (?Subclass) (And (Member ?Subclass ?Class-Partition) (Member ?Instance ?Subclass) ))))))
Relation R is asymmetric if it is not symmetric.
(<=> (Asymmetric-Relation ?R) (And (Binary-Relation ?R) (Not (Symmetric-Relation ?R))) )
Relation R is antisymmetric if for distinct x and y, R(x,y) implies not R(y,x). In other words, for all x,y, R(x,y) and R(y,x) => x=y.
(<=> (Antisymmetric-Relation ?R) (And (Binary-Relation ?R) (=> (And (Holds ?R ?X ?Y) (Holds ?R ?Y ?X)) (= ?X ?Y)) ))
Relation R is antireflexive if R(a,a) never holds.
(<=> (Antireflexive-Relation ?R) (And (Binary-Relation ?R) (Not (Holds ?R ?X ?X))) )
Relation R is irreflexive if it is not reflexive.
(<=> (Irreflexive-Relation ?R) (And (Binary-Relation ?R) (Not (Reflexive-Relation ?R))) )
Relation R is reflexive if R(x,x) for all x in the domain of R.
(<=> (Reflexive-Relation ?R) (And (Binary-Relation ?R) (=> (Instance-Of ?X (Exact-Domain ?R)) (Holds ?R ?X ?X)) ))
Relation R is symmetric if R(x,y) implies R(y,x).
(<=> (Symmetric-Relation ?R) (And (Binary-Relation ?R) (=> (Holds ?R ?X ?Y) (Holds ?R ?Y ?X)) ))
Relation R is transitive if R(x,y) and R(y,z) implies R(x,z).
(<=> (Transitive-Relation ?R) (And (Binary-Relation ?R) (=> (And (Holds ?R ?X ?Y) (Holds ?R ?Y ?Z)) (Holds ?R ?X ?Z) )))
Relation R is weak-transitive if R(x,y) and R(y,z) and x /= z implies R(x,z).
(<=> (Weak-Transitive-Relation ?R) (And (Binary-Relation ?R) (=> (And (Holds ?R ?X ?Y) (Holds ?R ?Y ?Z) (Not (= ?X ?Z))) (Holds ?R ?X ?Z) )))
Slots Of Instances:
(<=> (One-To-One-Relation ?R) (And (Unary-Function ?R) (Value-Type ?R Inverse Function)) )
(<=> (Many-To-One-Relation ?R) (And (Binary-Relation ?R) (Function ?R)) )
Slots Of Instances:
(<=> (One-To-Many-Relation ?R) (And (Binary-Relation ?R) (Value-Type ?R Inverse Function)) )
(<=> (Many-To-Many-Relation ?R) (And (Binary-Relation ?R) (Not (Function ?R)) (Not (Function (Inverse ?R))) ))
A relation is an equivalence relation if it is reflexive, symmetric, and transitive.
(<=> (Equivalence-Relation ?R) (And (Reflexive-Relation ?R) (Symmetric-Relation ?R) (Transitive-Relation ?R) ))
A relation is an partial-order if it is reflexive, antisymmetric, and transitive.
(<=> (Partial-Order-Relation ?R) (And (Reflexive-Relation ?R) (Antisymmetric-Relation ?R) (Transitive-Relation ?R) ))
A relation R is an total-order if it is partial-order for which either R(x,y) or R(y,x) for every x or y in its domain.
(<=> (Total-Order-Relation ?R) (And (Partial-Order-Relation ?R) (=> (And (Instance-Of ?X (Exact-Domain ?R)) (Instance-Of ?Y (Exact-Domain ?R)) ) (Or (Holds ?R ?X ?Y) (Holds ?R ?Y ?X)) )))
Documentation is a relation between objects in the domain of discourse and strings of natural language text. The domain of DOCUMENTATION is not constants (names), but the objects themselves. This means that one does not quote the names when associating them with their documentation.