April 27, 2015

# Functions

#\$Function-Denotational   functions (relationships) (mathematical concepts)    **COMMENT NOT REVIEWED**    **GAFs NOT REVIEWED**

#\$Function-Denotational is the collection of functions the CycL expressions for which can be used to form non-atomic terms (NATs). Specifically, when such a function-denoting expression is appropriately combined with other expressions (i.e. the former is in the 0th argument position and the latter are of the correct number and type) the resulting expression is a new CycL term — a NAT — that may then freely appear as a component in other CycL expressions. The NAT will itself denote the value (if any) of the function denoted by the former expression for the sequence of arguments denoted, respectively, by the latter expressions. For example, #\$GovernmentFn is a unary denotational function, and so the CycL constant ‘#\$GovernmentFn’ requires one (syntactic) argument (such as the constant ‘#\$France’) to form a NAT (in this case, the expression ‘(#\$GovernmentFn #\$France)’). This NAT, which denotes the government of France, can in turn serve as a (syntactic) argument in any CycL expression in which (a term for) an instance of #\$RegionalGovernment can occur. Alternatively, we could have created a specific new term `GovernmentOfFrance’, asserted that its denotation is an instance of #\$RegionalGovernment, and so on. But two related advantages to having NATs in CycL are that they (i) allow for a drastic reduction in the total number of constant terms needed in the CycL vocabulary and (ii) provide a convenient and systematic way to form appropriate new terms as needed out of existing vocabulary (which terms can then inherit from various existing rules and other assertions involving the terms’ component expressions). Important subcollections of #\$Function-Denotational include #\$IndividualDenotingFunction (whose instances always return instances of #\$Individual), #\$CollectionDenotingFunction, #\$SetDenotingFunction, and #\$FunctionDenotingFunction (which is itself a subcollection of the first). NATs formed using terms that denote instances of #\$FunctionDenotingFunction often denote instances of #\$Function-Denotational themselves. Thus, like most other things, denotational functions can be denoted in CycL either by constants (e.g. ‘#\$GovernmentFn’) or — although this is less common — by NATs (e.g. ‘(#\$FunctionToArg 2 #\$biologicalMother)’). Note that the collection #\$Function-Denotational does _not_ include all functions whatsoever. Functions that, given their natures and the nature of the CycL language, could not sensibly be denoted by any NAT-forming CycL expression are not denotational functions. Examples include certain provably-existing exotic mathematical functions, such as (probably) any one-to-one function from the positive integers to the rational numbers. (For a more general collection that does include such functions, and for a more general explication of the notion of function itself, see #\$Function-MathematicalObject and its comment). Note also that #\$Function-Denotational does not include any of the so-called #\$TruthFunctions (q.v.): #\$Predicates, #\$Quantifiers, or #\$LogicalConnectives. For these relations (as construed in CycL) are not really functions at all, even though it can be heuristically useful to think of them as if they were functions from sequences of arguments to truth values.

direct instance of: #\$FunctionCategory #\$AtemporalNecessarilyEssentialCollectionType

direct specialization of: #\$StrictlyFunctionalRelation

direct generalization of: #\$EvaluatableFunction #\$BinaryFunction #\$QuintaryFunction #\$UnaryFunction #\$MicrotheoryDesignatingFunction-Denotational #\$QuaternaryFunction #\$VariableArityFunction #\$TernaryFunction #\$FixedArityFunction #\$CollectionDenotingFunction #\$SetDenotingFunction #\$PartialDenotationalFunction #\$ReifiableFunction #\$TotalDenotationalFunction #\$IndividualDenotingFunction #\$UnreifiableFunction

#\$resultIsa   result isa

A #\$MetaRelation that holds between relations and collections. #\$resultIsa is primarily used to indicate that any value returned by a given function is an instance of a given collection. Where FUNC is a #\$Function-Denotational, (#\$resultIsa FUNC COL) means that FUNC returns an instance of COL for any sequence of arguments for which FUNC is defined. That is, (#\$isa (FUNC ARG1 … ARGn) COL) holds for any sequence for which FUNC has a value (see #\$valueOfFunctionForArgs and #\$relationDomain). For example, `(#\$resultIsa #\$PlusFn #\$ScalarInterval)’ holds, and it entails (e.g.) `(#\$isa (#\$PlusFn 2 2) #\$ScalarInterval)’. #\$resultIsa can also be used with a #\$LogicalConnective or #\$Quantifier to make a syntactic claim about the type of expression (see #\$CycLExpressionType) that can be built from connective-denoting or quantifier-denoting expressions. Where CONN is a #\$LogicalConnective, (#\$resultIsa CONN EXPR-TYPE) means that any semantically well-formed expression constructed by combining a term that denotes CONN with the correct number and type of other terms will itself be an instance of EXPR-TYPE. For example, the sentence `(#\$resultIsa #\$and #\$ELSentence-Assertible)’ entails that an expression consisting of `#\$and’ followed by one or more #\$ELSentence-Assertibles (the required argument-types for #\$and), with the whole expression-sequence enclosed in parentheses, is itself an #\$ELSentence-Assertible. (An analogous account can be given for the case where #\$resultIsa is applied to a #\$Quantifier.) See also #\$resultGenl.

direct instance of: #\$OpenCycDefinitionalPredicate #\$DefaultMonotonicPredicate #\$MetaRelation #\$RuleMacroPredicate #\$BinaryPredicate

#\$IndividualDenotingFunction   individual-denoting functions

The subcollection of #\$Function-Denotational whose instances, when applied to any appropriate (sequence of) arguments, return instances of #\$Individual. Examples include #\$PerimeterFn, #\$GovernmentFn, and #\$CavityInteriorRegionFn. See also the collections #\$CollectionDenotingFunction and #\$SetDenotingFunction.

direct instance of: #\$FunctionCategory #\$AtemporalNecessarilyEssentialCollectionType

direct specialization of: #\$Function-Denotational

direct generalization of: #\$FunctionFromQuantitiesToQuantities #\$MetricUnitPrefix #\$AnimalPartRegionFunction #\$AttributeDenotingFunction #\$ShapeFunction #\$PredicateDenotingFunction #\$FunctionDenotingFunction #\$DateDenotingFunction #\$DerivedWordFormingFunction #\$UnitOfMeasure

#\$CollectionDenotingFunction   collection-denoting functions

The subcollection of #\$Function-Denotational whose instances return instances of #\$Collection. Examples include #\$SwimmingEventFn, #\$GroupFn, and #\$MoleculeFn. For example, (#\$MoleculeFn #\$Oxygen) denotes the collection of all oxygen molecules. See also the collections #\$IndividualDenotingFunction and #\$SetDenotingFunction.

direct instance of: #\$FunctionCategory #\$AtemporalNecessarilyEssentialCollectionType

direct specialization of: #\$Function-Denotational

#\$resultGenl   result genl

A #\$MetaRelation that is used to specify that a given collection is a supercollection of any value returned by a given #\$CollectionDenotingFunction. (#\$resultGenl COLFUNC COL) means that when COLFUNC is applied to any sequence of arguments for which it is defined, the resulting value will be a subcollection of COL. That is, (#\$genls (COLFUNC ARG1 … ARGn) COL) holds. For example, (#\$resultGenl #\$UsingAFn #\$Action) implies that the collection of acts done using any given type of object is a type of action, (#\$resultGenl #\$AttemptingFn #\$PurposefulAction) implies that the attempts at a given type of action constitute a type of purposeful act, and (#\$resultGenl #\$JointTypeBetweenFn #\$Joint-Physical) means that the collection of joints between two given types of things is a type of physical joint. See also #\$resultIsa.

direct instance of: #\$OpenCycDefinitionalPredicate #\$DefaultMonotonicPredicate #\$MetaRelation #\$RuleMacroPredicate #\$BinaryPredicate

#\$FunctionToArg   function to arg    **COMMENT NOT REVIEWED**    **GAFs NOT REVIEWED**

#\$FunctionToArg and #\$Kappa are special functions that generate relationships – #\$FunctionToArg generates a function from a predicate. (#\$FunctionToArg N PRED) denotes the function generated from the #\$FunctionalPredicate PRED, where the N-th argument is taken as the result. Therefore the arity of (#\$FunctionToArg N PRED) is one less than the arity of PRED. For example, the term (#\$FunctionToArg 2 #\$age) denotes the function that returns the age of a person; in other words, because (#\$age PERSON AGE) the term ((#\$FunctionToArg 2 #\$age) PERSON) denotes AGE. To work properly the predicate PRED must be functional in the N-th argument. In some cases, however, determining whether (#\$functionalInArgs PRED N) may be very difficult – in particular for uses of #\$Kappa. For this reason this functionality constraint is not fully supported by code.