There is a common misconception about the application of the theory of utilitarianism. Many attempt to apply it to events that have happened in history. The purpose of utilitarianism is, really, an attempt to establish a choice function on a set of options. Since events in history presumably happened precisely because of their sets of antecedents, there are no other choices of events; so utilitarian analysis of them is trivial. It can be usefully applied to psychology in the form of decision making. One must decide which behaviors to commit in a given set of circumstances based upon predicted costs and benefits. To approach this rigorously, we will work in ZF theory with special functions.

**Definition 1**. Let be a set and be a function called a **utility function**. The pair will be called a **utilitarian set**. A **sub utilitarian set** is a pair where and .

We will also define the **trivial utilitarian set** as the pair where .

Note that the motivation for closing the codomain on the left is that a behavior bringing death is assumed to be of minimal utility. This allows us to put a choice function on iff (i.e. iff the map is injective). This choice function is defined by

The only problem is that the choice function will pick the “worst” option, and we want to pick the “best”. Let us define

,

.

If is finite and is injective, then for all for some . In this case is a singleton consisting of the “best” element. If is not injective, then we may have . This isn’t a problem for the worst elements; if worst elements all go to the same value, we can just take them all out. But there is also the possibility of having best elements with the same utility.

Define a relation where . This is clearly an equivalence relation. Now consider the set . We have an induced utility function on defined by . By definition of the equivalence relation, we have that any induced utility function on is injective. Hence for any finite , we have a best element of . This is just the set of best elements of .

**Definition 2**. If is a utilitarian set, we call the **class utilitarian set** of .

One can easily see an isomorphism (in the sense that ) between and where and so on. We thus limit ourselves to utilitarian sets where is injective as it always will be on the class set.

Now assume the Axiom of Choice (for purposes of ordering elements of , and note this still doesn’t allow us to pick a “best” element of it trivially, since best is defined by the element taking largest value, if it exists). Let be a utilitarian set with denumerable. Then injectivity of allows for a set to be a bounded strictly monotonically increasing sequence in which in turn contains a convergent subsequence . Note we cannot say the sequence is bounded in the codomain, but it is of course bounded in .

**Definition 3**. Let be a denumerable utilitarian set with injective and an ordering of . We say is a **decidable set** if

where the max is taken over all convergent subseqences of . If is decidable, then the supremum above can be replaced with a maximum (otherwise its value would have been a limit over which the max on the left was taken, and hence, the maximum of them). Hence if is decidable, we define the **best choice** as

.

A utilitarian set is **undecidable** if it is not decidable.

Consider the function defined by

.

This is a semimetric on an arbitrary and a metric when is injective. We can make a modification and define the **opportunity cost of** **with respect to ** by

.

If one assumes that behaviors consume resources proportional to the utility acquired, then the above describes a proportional number of resources lost (or gained if negative) by choosing behavior over .

**Definition 4.** A **discrete path** in is a sequence in , say . A **path** is a continuous map where is endowed with its topology induced by . We can define the **marginal utility of a path** at time and respectively for the type of path by

.

Note the second one may not exist. If one interprets this by defining a sequence for a behavior called “consuming a good” and where represents the number of units of that good consumed, then marginal utility simply represents the change of utility in consuming one additional unit of that good.

If we can accept that all decision making of individuals (i.e. psychology, where biological and environmental factors determine the utility function) models this theory, then aggregately so does that of groups of individuals–making this the foundation of social science.