Excursus C A GT GRAMMAR FOR THE FUNCTIONAL CALCULUS


PS-rules for the functoral calculus.  
One may construct a GT grammar to describe the functoral calculus by giving a few rules differently from what was necessary to give for the predicate calculus. The simple functor expression consists in a functor symbol together with an argument placed between opening and closing parens, followed by an equal sign and finally by the value expression. The operator is the same but has two arguments.
The value expression for a functor consists in either a plus or minus sign for Boolean functors, a signed integer (actually a whole number), a real number, or an argument expression. The GT linguist describes these in turn in their own ways in such rules as follow:
The argument is a single lower-case letter (LC), the functor a series.
The real number consists of two strings of digits having a decimal point between. These are morphological elements of lexical items, and so are written in rose colored boxes.
Understandably the UML diagram for the functor expression is similar to, but more complex than, the one for predicate expressions given above.
Transformations for the functoral calculus.  
Understandably the analogous transformations needed for the propositional and predicate calculi can easily be stated in functoral terms.
MODUS PONENDO PONENS (MPP)
base1:P1
base2:entailment(P1, P2) = +
transform:P2
DEFINITION 1 (DEF-1)
base1:P1
base2:definition(P1, P2) = +
transform:P2
DEFINITION 2 (DEF-2)
base1:P1
base2:definition(P2, P1) = +
transform:P2
PS-rules for the metric calculus.  
In a similar fashion it is possible to construct a GT grammar to describe the metric calculus. The metric expression consists in a measure symbol (M) together with an argument (A) placed between opening and closing parens (OP, CP), followed by an equal sign and finally by the number and unit expressions. The distance metric requires two arguments in its expression.
The argument is a single lower-case letter, but the measure and units are like the functor — both a string of lower case letters (that make sense in English).
The description of a real number as a value in the functor expression above is rather rigid. In describing the metric we take the opportunity to be more precise and make it consist in a plus or minus sign and a real number expression. In practice the mathemetician interprets a missing sign as plus and a missing decimal as though present but followed by a string of zeros (as long as precision requires). The GT linguist may describe these in the language used to describe the functor calculus:
The UML diagram for the metric expression is similar to the one for the functor expressions given above, except for the more involved morphology of the real number value.

Transformations for the metric calculus.  
The same transformations useful for propostions in the other calculi may be given here as well. Because the metric calculus is fully contained in the functor calculus it is also possible to give transformations that will translate from the former to the latter, and (under the right conditions) vice versa.
METRIC FUNCTOR (MET-FUNC)
base1:[ ]Measure ( X ) = [ [ ]Real Number ]Number [ ]Unit
base2:[ ]Functor ( X ) = [ [ ]Real Number ]Value
transform:[ ]Measure-Unit ( X ) = [ [ ]Real Number ]Number
condition:[ ]Functor r   f     [ ]Measure-Unit r   f

This transformation relates the grammatical descriptions of the two languages holding the semantics constant. The syntactic descriptions use brackets to enclose segments and the semantic uses the variable f. The relationship between syntax and semantics makes use of the r sign, described in ¶5-5-3.
There are also transformations related to the interpretation mathematicians have when abbreviating certain real numbers. These might also be written to apply in the reverse, with the transform as the base and vice versa. Here the interpretations of the base and transform are held constant.
UNSIGNED POSITIVE NUMBER REPRESENTATION (POS-REP)
base:[ [ ]Real Number + X ]Number r   r
transform:[ [+Plus]Sign + [ ]Real Number + X ]Number r   r
WHOLE NUMBER REPRESENTATION (WHOLE-REP)
base:[ X + [ ]Integer String ]Real Number r   r
transform:[ X + [ ]Integer String + Decimal + [ [ +Zero ]Integer]nInteger String ]Real Number r   r
condition:n is the desired precision
PRECISE REAL NUMBER REPRESENTATION (PREC-REP)
base:[ X + [ ]Integer String + Decimal + [ [ –Zero ]Integer]nInteger String ]Real Number r   r
transform:[ X + [ ]Integer String + Decimal + [ [ –Zero ]Integer]n + [ +Zero ]Integer]mInteger String ]Real Number r   r
condition:m > n and m is the desired precision
The first allows you to write “6.275” when “+6.275” is meant and the last allows it to mean “6.27500” when more precision is needed. The second interprets a whole number as a variety of real number having a certain precision. It is the more involved morphology of the metric calculus that requires transformations to provide for a unified set of interpretations.