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.Notes:
- What about nth-range?
A range restriction of a function is the same thing as an nth-domain restriction on the last element of each tuple, i.e., the values of the function. Therefore there is no nth-range relation.
(=> (Nth-Domain ?Relation ?N ?Type) (Forall (?Tuple) (=> (Member ?Tuple ?Relation) (And (>= (Length ?Tuple) ?N) (Instance-Of (Nth ?Tuple ?N) ?Type)))))
(<=> (Nth-Domain ?Relation ?N ?Type) (And (Defined (Arity ?Relation)) (Positive-Integer ?N) (Class ?Type) (Forall (?Tuple) (=> (Member ?Tuple ?Relation) (And (>= (Length ?Tuple) ?N) (Instance-Of (Nth ?Tuple ?N) ?Type))))))
(Positive-Integer ?N) (Defined (Arity ?Relation)) (Nth-Domain Nth-Domain 3 Class) (Nth-Domain Nth-Domain 2 Positive-Integer)
(Nth-Domain Value-Cardinality 3 Nonnegative-Integer) (Nth-Domain Value-Cardinality 2 Binary-Relation) (Nth-Domain Slot-Cardinality 3 Nonnegative-Integer) (Nth-Domain Slot-Cardinality 2 Binary-Relation) (Nth-Domain Slot-Cardinality 1 Class)