**1.0 Introduction**
Consider a partial equilibrium model in which:

- Consumers demand to buy a certain quantity of a commodity, given its price.
- Firms produce (supply) a certain quantity of that commodity, given its price.

This is a model of perfect competition, since the consumers and producers take the price
as given. In this post, I try to present a model of the supply curve in which the
managers of firms do not make systematic mistakes.

This post is almost purely exposition. The exposition is concrete, in the sense that
it is specialized for the economic model. I expect that many will read this as still
plenty abstract. (I wish I had a better understanding of mathematical notation in HTML.)
Maybe I will update this post with illustrations of approximations to integrals.

**2.0 Firms Indexed on the Unit Interval**
Suppose each firm is named (indexed) by a real number on the (closed) unit interval.
That is, the set of firms, **X**, producing the given commodity is:

**X** = (0, 1) = {*x* | *x* is real and 0 < *x* < 1}

Each firm produces a certain quantity, *q*, of the given quantity. I let
the function, *f*, specify the quantity of the commodity that each firm produces.
Formally, *f* is a function that maps the unit interval to the set of non-negative
real numbers. So *q* is the quantity produced by the firm *x*, where:

*q* = *f*(*x*)

**2.1 The Number of Firms**
How many firms are there? An infinite number of decimal numbers exist between zero
and unity. So, obviously, an infinite number of firms exist in this model.

But this is not sufficient to specify the number of firms. Mathematicians
have defined an infinite number
of different size infinities. The smallest infinity is called *countable infinity*.
The set of natural numbers, {0, 1, 2, ...};
the set of integers, {..., -2, -1, 0, 1, 2, ...}; and the set of rational numbers
can all be be put into a one-to-one correspondence. Each of these sets contain a countable
infinity of elements.

But the number of firms in the above model is more than that. The firms can be put into
a one-to-one correspondence with the set of real numbers. So there exist, in the model,
a uncountable infinity of firms.

**2.2 To Know**
Cantor's diagonalization argument, power sets, cardinal numbers.

**3.0 The Quantity Supplied**
Consider a set of firms, **E**, producing the specified commodity, not necessarily
all of the firms. Given the amount produced by each firm, one would like to be able to
say what is the total quantity supplied by these firms. So I introduce a notation
to designate this quantity. Suppose *m*(**E**, *f*) is the quantity supplied
by the firms in **E**, given that each firm in (0, 1) produces the quantity
defined by the function *f*.

So, given the quantity supplied by each firm (as specified by the function *f*)
and a set of firms **E**, the aggregate quantity supplied by those firms
is given by the function *m*. And, if that set of firms is all firms,
as indexed by the interval (0, 1), the function *m* yields the
total quantity supplied on the market.

Below, I consider for which set of firms *m* is defined, conditions that
might be reasonable to impose on *m*, a condition that is necessary for
perfect competition, and two realizations of *m*, only one of is correct.

You might think that *m* should obviously be:

*m*(**E**, *f*) = ∫_{E}*f*(*x*) d*x*

and that the total quantity supplied by all firms is:

*Q* = *m*((0,1), *f*) = ∫_{(0, 1)} *f*(*x*) d*x*

Whether or not this answer is correct depends on what you mean by an integral.
Most introductory calculus classes, I gather, teach the Riemann integral. And, with
that definition, the answer is wrong. But it takes quite a while to explain why.

**3.1 A Sigma Algebra**
One would like the function *m* to be defined for all subsets of (0, 1) and for
all functions mapping the unit interval to the set of non-negative real numbers.
Consider a "nice" function *f*, in some hand-waving sense. Let *m*
be defined for a set of subsets of (0, 1) in which the following conditions are
met:

- The empty set is among the subsets of (0, 1) for which
*m* is defined.
*m* is defined for the interval (0, 1).
- Suppose
*m* is defined for **E**, where **E** is a subset of (0, 1).
Let **E**^{c} be those elements of (0, 1) which are not in **E**.
Then *m* is defined for **E**^{c}.
- Suppose
*m* is defined for **E**_{1} and **E**_{2},
both being subsets of (0, 1). Then *m* is defined for the union
of **E**_{1} and **E**_{2}.
- Suppose
*m* is defined for **E**_{1} and **E**_{2},
both being subsets of (0, 1). Then *m* is defined for the intersection
of **E**_{1} and **E**_{2}.

One might extend the last two conditions to a countable infinity of subsets of (0, 1).
As I understand it, any set of subsets of (0, 1) that satisfy these conditions
is a σ-*algebra*.
A mathematical question arises: can one define the function *m* for the
set of all subsets of (0, 1)?
At any rate, one would like to define *m* for a maximal set of subsets of (0, 1),
in some sense.
I think this idea has something to do with
Borel sets.

**3.2 A Measure**
I now present some conditions on this function, *m*, that specifies
the quantity supplied to the market by aggregating over sets of firms:

- No output is produced by the empty set of firms:
*m*(∅, *f*) = 0.

- For any set of firms in the sigma algebra, market output is non-negative:
*m*(**E**, *f*) ≥ 0.

- For disjoint sets of firms in the sigma algebra, the market output of the union of firms is the sum of market outputs:
If **E**_{1} ∩ **E**_{1} = ∅, then *m*(**E**_{1} ∪ **E**_{1}, *f*) = *m*(**E**_{1}, *f*) + *m*(**E**_{2}, *f*)

The last condition can be extended to a countable set of disjoint sets in the sigma algebra. With this extension,
the function *m* is
a measure.
In other words, given firms indexed by the unit interval and a function specifying the quantity supplied by
each firm, a function mapping from (certain) sets of firms to the total quantity supplied to a market by a set
of firms is a measure, in this mathematical model.

One can specify a couple other conditions that seem reasonable to impose on this model of market supply.
A set of firms indexed by an interval is a particularly simple set. And the aggregate quantity supplied to
the market, when each of these firms produce the same amount is specified by the following condition:

Let **I** = (*a*, *b*) be an interval in (0, 1). Suppose for all *x* in **I**:

*f*(*x*) = *c*

Then the quantity supplied to the market by the firms in this interval, *m*(**I**, *f*),
is (*b* - *a*)*c*.

**3.3 Perfect Competition**
Consider the following condition:

Let **G** be a set of firms in the sigma algebra. Define the function
*f*_{G}(*x*) to be *f*(*x*) when *x*
is not an element of **G** and to be 1 + *f*(*x*) when *x*
is in **G**. Suppose **G** has either a finite number of elements or
a countable infinity number of elements. Then:

*m*((0,1), *f*) = *m*((0,1), *f*_{G})

One case of this condition would be when **G** is a singleton. The
above condition implies that when the single firm increases its output
by a single unit, the total market supply is unchanged.

Another case would be when **G** is the set of firms indexed by
the rational numbers in the interval (0, 1). If all these firms increased
their individual supplies, the total market supply would still be unchanged.

Suppose the demand price for a commodity depends on the total quantity
supplied to the market. Then the demand price would be unaffected by
both one firm changing its output and up to a countably infinite number
of firms changing their output. In other words, the above condition
is a formalization of *perfect competition* in this model.

**4.0 The Riemann Integral: An Incorrect Answer**
I now try to describe why the usual introductory
presentation of an integral cannot be used for this model of
perfect competition.

Consider a special case of the model above.
Suppose *f*(*x*) is zero for all *x*. And
suppose that **G** is the set of rational numbers
in (0, 1). So *f*_{G} is unity for
all rational numbers in (0, 1) and zero otherwise.
How could one
define ∫_{(0, 1)}*f*_{G}(*x*) d*x*
from a definition of the integral?

Define a *partition*, *P*, of (0, 1) to be a
set {*x*_{0}, *x*_{1}, *x*_{2}, ..., *x*_{n}}, where:

0 = *x*_{0} < *x*_{1} < *x*_{2} < ... < *x*_{n} = 1

The rational numbers are dense in the reals. This implies that, for any partition, each
subinterval, [*x*_{i - 1}, *x*_{i}] contains a rational number.
Likewise, each subinterval contains an irrational real number.

Define, for *i* = 1, 2, ..., *n* the two following quantities:

*u*_{i} = supremum over [*x*_{i - 1}, *x*_{i}] of *f*_{G}(*x*)

*l*_{i} = infimum over [*x*_{i - 1}, *x*_{i}] of *f*_{G}(*x*)

For the function *f*_{G} defined above, *u*_{i} is always one, for all partitions
and all subintervals. For this function, *l*_{i} is always zero.

A partition can be pictured as defining the bases of successive rectangles along the X axis. Each *u*_{i}
specifies the height of a rectangle that just includes the function whose integral is being sought. For a smooth function (not
our example), a nice picture could be drawn. The sum of the areas of these rectangles is an upper bound on the desired integral.
Each partition yields a possibly different upper bound. The Riemann upper sum is the sum of the rectangles, for
a given partition:

*U*(*f*_{G}, *P*) = (*x*_{1} - *x*_{0}) *u*_{1} + ... + (*x*_{n} - *x*_{n - 1}) *u*_{n}

For the example, with a function that takes on unity for rational numbers, the Riemann upper sum is one for all
partitions. The Riemann lower
sum is the sum of another set of rectangles.

*L*(*f*_{G}, *P*) = (*x*_{1} - *x*_{0}) *l*_{1} + ... + (*x*_{n} - *x*_{n - 1}) *l*_{n}

For the example, the Riemann lower sum is zero, whatever partition is taken.

The Riemann integral is defined in terms of the least upper bound and greatest lower bound on the
integral, where the upper and lower bounds are given by Riemann upper and lower sums:

**Definition:** Suppose the infimum, over all partitions of (0, 1), of the set of Riemann upper sums is equal to the supremum,
also over all partitions, of the set of Riemann lower sums. Let *Q* designate this common value. Then *Q* is
the value of the *Riemann integral*:

*Q* = ∫_{(0, 1)}*f*_{G}(*x*) d*x*

If the infimum of Riemann upper sums is not equal to (exceeds) the supremum of the Riemann lower sums, then the Riemann integral
of *f*_{G} is not defined.

In the case of the example, the Riemann integral is not defined. One cannot use
the Riemann integral to calculate the changed market supply from a countably
infinite firms each increasing their output by one unit.

**5.0 Lebesque Integration**
The Riemann integral is based on partitioning the X axis. The Lebesque integral,
on the other hand, is based on partitioning the Y axis, in some sense. Suppose
one has some measure of the size of the set in the domain of a function where
the function takes on some designated value. Then the contribution to the
integral for that designated value can be seen as the product of that
value and that size. The integral of a function can then be defined as the sum,
over all possible values of the function, of such products.

**5.1 Lebesque Outer Measure**
Consider an interval, **I** = (*a*, *b*), in the real numbers.
The (Lebesque) measure of that set is simply the length of the interval:

*m**(**I**) = *b* - *a*

Let **E** be a set of real numbers. Let {**I**_{n}}
be a set of an at most countable infinite number of open intervals such
that

**E** is a subset of ∪ **I**_{n}

In other words, {**I**_{n}} is an open cover
of **E**. The *(Lebesque) measure* of **E** is defined to be:

*m**(**E**) = inf [*m**(**I**_{1}) + *m**(**I**_{2}) + ...]

where the infimum is taken over the set of countably infinite sets
of intervals that cover **E**.

The Lebesque measure of any set that is at most countably infinite is zero. So
the rational numbers is a set of Lebesque measure zero. So is a set containing
a singleton.

A measurable set **E** can be used to decompose any other set **A** into
those elements of that set that are also in **E** and those elements that
are not. And the measure of **A** is the sum of the measures of
those two set.

If a set is not measurable, there exists some set **A** where that sum does
not hold. Given
the axiom of choice
non-measurable sets exist. As I understand it, the set of all
measurable subsets of the real numbers is a sigma algebra.

**5.2 Lebesque Integral for Simple Functions**
Let **E** be a measurable subset of the real numbers. Define the characteristic
function, χ_{E}(*x*), for **E**,
to be one, if *x* is an element of **E**, and zero,
if *x* is not an element of **E**.

Suppose the function *g* takes on a finite number of
values {*a*_{1}, *a*_{2}, ..., *a*_{n}}.
Such a function is called a *simple function*.
Let **A**_{i} be the set of real numbers where *g*_{i} = *a*_{i}.
The function *g* can be represented as:

*g*(*x*) = *a*_{1} χ_{A1}(*x*) + ... + *a*_{n} χ_{An}(*x*)

The integral of such a simple function is:

∫*g*(*x*) d*x* = *a*_{1} *m**(**A**_{1}) + ... + *a*_{n} *m**(**A**_{n})

This definition can be extended to non-simple functions by another limiting process.

**5.3 Lebesque Upper and Lower Sums and the Integral**
The Lebesque upper sum of a function *f* is:

*UL*(**E**, *f*) = sup over simple functions *g* ≥ *f* of ∫_{E}*g*(*x*) d*x*

One function is greater than or equal to another function if the value of the first function is greater
than or equal to the value of the second function for all points in the common domain of the functions.
The Lebesque lower sum is:

*LL*(**E**, *f*) = inf over simple functions *g* ≤ *f* of ∫_{E}*g*(*x*) d*x*

Suppose the Lebesque upper and lower sums are equal for a function. Denote that common quantity
by *Q*. Then this is the value of the Lebesque integral of the function.

*Q* = ∫_{E}*f*(*x*) d*x*

When the Riemann integral exists for a function, the Lebesque integral takes on the same value.
The Lebesque integral exists for more functions, however. The statement of the fundamental
theorem of calculus is more complicated for the Lebesque integral than it is for the Riemann integral.
Royden (1968) introduces the concept of a function of bounded variation in this context.

**5.4 The Quantity Supplied to the Market**
So the quantity supplied to the market by the firms indexed by the
set **E**, when each firm produces the quantity specified by
the function *f* is:

*m*(**E**, *f*) = ∫_{E}*f*(*x*) d*x*

where the integral is the Lebesque integral.
In the special case, where the firms indexed by the rational
numbers in the interval (0, 1) each supply one
more unit of the commodity, the total quantity supplied to
the market is unchanged:

*Q* = ∫_{(0, 1)}*f*_{G}(*x*) d*x* = ∫_{(0, 1)}*f*(*x*) d*x*

Here is a model of perfect competition, in which a countable
infinity of firms can vary the quantity they produce and, yet,
the total market supply is unchanged.

**6.0 Conclusion**
I am never sure about these sort of expositions. I suspect that
most of those who have the patience to read through this have
already seen this sort of thing. I learn something, probably,
by setting them out.

I leave many questions above. In particular, I have not specified
any process in which the above model of perfect competition
is a limit of models with *n* firms. The above model
certainly does not result from taking the limit at infinity of the number
of firms in the Cournot model of systematically mistaken firms.
That limit contains a countably infinite number of firms, each
producing an infinitesimal quantity - a different model entirely.

I gather that economists have gone on from this sort of model.
I think there are some models in which firms are indexed by
the hyperreals.
I do not know what theoretical problem inspired such models
and have never studied non-standard analysis.

Another set of questions I have ignored arises in the
philosophy of mathematics. I do not know how intuitionists
would treat the multiplication of entities required to
make sense of the above. Do considerations of
computability apply, and, if so, how?

Some may be inclined to say that the above model has no
empirical applicability to any possible actually existing market.
The above mathematics is not specific to the economics model. It
is very useful in understanding probability. For example,
the probability density function for any continuous random
variable is only defined up to a set of Lebesque measure zero.
And probability theory is very useful empirically.

**Appendix: Supremum and Infimum**
I talk about the
supremum and the
infimum
of a set above. These are sort of like the maximum and minimum of the
set.

Let **S** be a subset of the real numbers. The supremum of **S**,
written as sup **S**,
is the least upper bound of **S**, if an upper bound exists.
The infimum of **S** is written as inf **S**. It is
the greatest lower bound of **S**, if a lower bound exists.

**References**
- Robert Aumann (1964). Markets with a continuum of traders.
*Econometrica*, V. 32, No. 1-2: pp. 39-50.
- H. L. Royden (1968).
*Real Analysis*, second edition.