User:Thepigdog/Values

Like the function, the value is a mechanism that assists in managing a set of axioms and laws. Value is used in simplifying the test for equality. Equality may be described as equality of value.

A value is the result of an evaluation function, which associates a value with an expression. It is a mapping from the domain of expressions to the domain of values.

For example,
 * $$\operatorname{value}[8 * 9] = 72$$
 * $$\operatorname{value}[6 * 12] = 72$$

Therefore,
 * $$\operatorname{value}[8 * 9] = \operatorname{value}[6 * 12]$$

Values and evaluation provide a guiding principle for the application axioms to identify when expressions are equal.

Literal expressions
Where as an evaluation function interprets an expression as representing a value, a literal function interprets an expression as a formula or recipe for calculating a value, which has intrinsic identity. A literal expression is the result of the literal function, which associates a literal expression with an expression.




 * Value equality || $$X = Y \iff \operatorname{value}[X] = \operatorname{value}[Y]$$
 * Literal equality || $$X \equiv Y \iff \operatorname{lit}[X] = \operatorname{lit}[Y]$$
 * }
 * Literal equality || $$X \equiv Y \iff \operatorname{lit}[X] = \operatorname{lit}[Y]$$
 * }

When we say that two expressions are equal we mean there values are equal.

When we say that two expressions are identical we mean there literal expressions are equal. For example the following two expressions are regarded as identical, because the name of subscript does not effect the meaning of the function.
 * $$\sum_{j=0}^n x_j * x_j \equiv \sum_{k=0}^n x_k * x_k$$

There are three domains described here;


 * Domain of expressions || $$3 * 7$$ || $$83$$
 * Domain of values || $$21$$|| $$83$$
 * Domain of literal expressions || $$\operatorname{lit}[3 * 7]$$|| $$\operatorname{lit}[83]$$
 * }
 * Domain of literal expressions || $$\operatorname{lit}[3 * 7]$$|| $$\operatorname{lit}[83]$$
 * }
 * }

In each domain, equality may be defined differently.

Values as literal expressions
One possibility is for values to be equated with a subset of the literal expressions. These expressions are identified by a function $$C$$
 * $$C[X] \land C[Y] \to (X = Y \iff lit[X] = lit[Y])$$

or
 * $$C[X] \land C[Y] \to (X = Y \iff X \equiv Y)$$

The function C identifies which expressions represent values. This is the approach used in arithmetic.

An example from arithmetic
Familiarity with arithmetic makes it hard to recognise the role of a value in making a calculation. To bring attention to the issue the following trivial example is taken apart in detail. Suppose C is defined so that on a number it returns true and for other functions false. Then,
 * $$C[60] = \top$$
 * $$C[5 * 12] = \bot$$
 * $$C[3 * 20] = \bot$$

For example to evaluate,
 * $$5 * 12 = 3 * 20$$
 * $$5 * (1 * 10 + 2) = 3 * (2 * 10)$$
 * $$5 * 1 * 10 + 5 * 2 = (3 * 2) * 10$$
 * $$5 * 10 + 1 * 10 = (3 * 2) * 10$$
 * $$6 * 10 = 6 * 10$$
 * $$60 = 60$$

Then,
 * $$C[60] \land C[60] \to (60 = 60 \iff 60 \equiv 60)$$
 * $$60 \equiv 60$$

And as 60 is identical to 60 the expressions are equal.

Literal expressions as values
To use literal expressions as values, a subset of literal expressions must be identified. All operators must be shown to have values already represented in the set (the set is closed under the operation). A single literal expression must be identified for each element in the set and the function C must be defined to identify those literal expressions.

From values to mappings
Once values have been defined the function may be defined as the mapping from a values to values. Functions also provide a guiding principle for evaluation.