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))))))
(Forall (?Tuple1 ?Tuple2) (=> (Member ?Tuple1 ?Relation) (Member ?Tuple2 ?Relation) (= (Butlast ?Tuple1) (Butlast ?Tuple2)) (= (Last ?Tuple1) (Last ?Tuple2)))) (Relation ?Relation)
(<- (Value ?F @Args) (If (And (Function ?F) (Member ?List ?F) (= (Butlast ?List) (Listof @Args))) (Last ?List))) (<- (Apply ?F ?List) (If (And (Function ?F) (= ?List (Listof @Args))) (Value ?F @Args))) (Inherited-Facet-Value Slot-Value-Type One-One Inverse Function) (<=> (One-One ?R) (And (Binary-Relation ?R) (Function ?R) (Value-Type ?R Inverse Function) (Value-Cardinality ?R Inverse 1))) (<=> (Many-One ?R) (And (Binary-Relation ?R) (Function ?R))) (Inherited-Facet-Value Slot-Value-Type One-Many Inverse Function) (<=> (One-Many ?R) (And (Binary-Relation ?R) (Value-Type ?R Inverse Function) (Value-Cardinality ?R Inverse 1))) (Instance-Of (Function (Inverse ?R)) Not) (Not (Function (Inverse ?R))) (Instance-Of (Function ?R) Not) (Not (Function ?R)) (<=> (Many-Many ?R) (And (Binary-Relation ?R) (Not (Function ?R)) (Not (Function (Inverse ?R))))) (<=> (Unary-Function ?F) (And (Function ?F) (Binary-Relation ?F))) (<=> (Binary-Function ?F) (And (Function ?F) (Not (Empty ?F)) (Forall (?List) (=> (Member ?List ?F) (Triple ?List))))) (<=> (Function ?Relation) (And (Relation ?Relation) (Forall (?Tuple1 ?Tuple2) (=> (Member ?Tuple1 ?Relation) (Member ?Tuple2 ?Relation) (= (Butlast ?Tuple1) (Butlast ?Tuple2)) (= (Last ?Tuple1) (Last ?Tuple2))))))