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.
Notes:
- See-Also: domain exact-range
- Doesn't it have to be a class?
Only for binary relations.
- Why require that the complete domain be included; why not allow for a superset of the true domain?
We need to know the exact-domain of a relation for describing properties such as reflexivity. Supersets of an exact domain are specified with DOMAIN.
- Commented-out: ; :lambda-body (cond ((relation ?relation) ; (setofall (butlast ?tuple) ; (and (member ?tuple ?relation) ; (not (empty (butlast ?tuple))))))) ; ; :constraints (relation ?domain-relation)
(<=> (Exact-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)))))))
(=> (= (Exact-Domain ?Relation) ?Domain-Relation) (Forall (?Tuple @Args) (<=> (Holds ?Domain-Relation @Args) (And (Member ?Tuple ?Relation) (= (Listof @Args) (Butlast ?Tuple)))))) (=> (= (Exact-Domain ?Relation) ?Domain-Relation) (Forall (?Tuple) (=> (Member ?Tuple ?Relation) (Not (Empty (Butlast ?Tuple)))))) (=> (= (Exact-Domain ?Relation) ?Domain-Relation) (Relation ?Domain-Relation)) (=> (= (Exact-Domain ?Relation) ?Domain-Relation) (Relation ?Relation)) (=> (Domain ?Relation ?Restriction) (Subclass-Of (Exact-Domain ?Relation) ?Restriction))
(<=> (Total-On ?Relation ?Domain-Relation) (Subrelation-Of (Exact-Domain ?Relation) ?Domain-Relation)) (<=> (Domain ?Relation ?Restriction) (And (Binary-Relation ?Relation) (Class ?Restriction) (Subclass-Of (Exact-Domain ?Relation) ?Restriction))) (<=> (Reflexive-Relation ?R) (And (Binary-Relation ?R) (=> (Instance-Of ?X (Exact-Domain ?R)) (Holds ?R ?X ?X)))) (<=> (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))))) (<=> (Cannot-Have@Ol-User%Slot-Constraint-Sugar ?Instance ?Binary-Relation) (Not (Instance-Of ?Instance (Exact-Domain ?Binary-Relation))))