# Generalized Truth Functions

A truth function takes one or more two-value inputs and returns one of two output values.  They are most often associated with discerning truth from falsehood, but other good choices include on/off, possible/impossible, Pepsi/Coke, etc; I prefer using one/zero.  In propositional calculus, there are some ten named truth functions, which I will define after I’m done explaining the notation I use.  For this discussion, I’ll introduce the conjunction (logical AND).  The conjunction only returns one if both inputs equal one, otherwise it returns zero, as shown in this truth table:

It is virtually impossible to take a formal logic class without learning that only a couple truth functions are needed to synthesis all truth functions, with any number of inputs.  The most common choices I’ve seen are, negation () with the conditional (), and negation () with the conjunction ().  While I find the sufficiency of these functions to be novel, and often useful, they can be cumbersome, and a little restrictive.  For this reason, I use a different notation.

There are four parts to my notation: the function’s domain, condition values, parses, and operators.  The domain of a function is the sequence of inputs to that function.  In the case of the conditional, , the domain is .  The domain may all unique variables, a mix of unique and duplicate variables, and constants, but, like all sequences, the order matters.  To save space I will often simply note the sequence with a bold letter and a superscript that marks the number of members to the sequence ().  In such a case the the function’s members are individually written using the same letter with subscripts, signifying the variables in order from zero to .

When values are selected for each member of the function’s domain, they form a unique sequence of ones and zeros, like a binary number.  The binary number created by this sequence is that sequence’s condition value, calculated and denoted as follows:

With that, a parse is a variable that represents a truth function’s output for a given condition value.  Each parse is written as a variable letter with the parse’s condition value as a subscript.  If we used as our variable letter then the conjunction truth function, above, would become:

Very much like values applied to a function’s domain creates a binary number, a function’s parses, when placed in order by condition value, produce a binary number.  This value is called the function’s operator.  Function’s operator, when it is variable, is written as a letter; this letter then acts as the function’s name.  Below I’ve defined the operator for an n-dimensional truth function .

Finally, we can put all the pieces together.  A truth function, in the notation I use, is written as the function’s domain, surrounded by parentheses, followed by the function’s operator as a subscript.  The function , above, is written:

Next: Semi-Parses & Standard Operators >>