This site is devoted to mathematics and its applications. Created and run by Peter Saveliev.

# Integer-valued calculus

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

God made the integers, all else is the work of man. -- Leopold Kronecker

First question: does the universe have a hole (or tunnel) in it? Is it possible to travel in a straight line and arrive at the starting point from the opposite direction? Like this:

Second question: is the universe orientable? Can one go on a trip and then come back as a mirror image of himself? Including the internal organs, like this:

Since we can't step outside the universe and take a look, these questions are about intrinsic, topological properties of our universe.

Can calculus, as we know it, help to answer these two questions?

Let's start at a simple place, Calculus 3, dimension $2$: all vector fields on a plane region with a zero rotor (aka curl) are gradient -- provided the region is simply-connected. So, if we know all gradients of all functions and all line integrals of all vector fields, we can tell if there is a hole in the region. Thus, we can say that calculus on the plane is different from calculus on the punctured plane.

Let's look at the details... Consider a “rotation” vector field: $$V=<y,\ -x>,$$ and then its multiple defined on the punctured plane: $$F=\frac{V}{||V||^2}=\frac{1}{x^2+y^2}<y,\ -x>=\left< \frac{y}{x^2+y^2},\ -\frac{x}{x^2+y^2}\right>=<p,q>.$$

We compute the rotor of the latter first: $$\operatorname{rot}F=q_x-p_y=0.$$ The vector field is, therefore, irrotational. Next, suppose $C$ is the unit circle and $X=X(t)$ is its counterclockwise parametrization. Then $F(X(t))$ is parallel to $X'(t)$. Therefore, $F(X(t))\cdot X'(t)>0$. It follows that the line integral along the circle is positive: $$0=\oint_C F\cdot dX=\int_a^b F(X(t))\cdot X'(t)\, dt>0.$$ On the other hand, the line integral over a closed path of a gradient vector field would be $0$ according to the Fundamental Theorem of Calculus for gradient vector fields. A contradiction!

Because there is a hole in the space, there is a vector field that is irrotational but not gradient. And vice versa!

This point is easier to make if we switch to manifolds...

As an example, the analog of the punctured plane is the cylinder. We make it from the square by gluing together two of its opposite edges:

Consider a constant horizontal vector field defined on the cylinder: $$F=<p,q>=<1,0>.$$

We go through the same steps now. Compute the rotor first: $$\operatorname{rot}F=q_x-p_y=0.$$ The vector field is irrotational. Next, suppose $C$, parametrized by $X=X(t)$, is a path along the top edge of the cylinder. Then $F(X(t))$ is parallel to $X'(t)$. Therefore, $F(X(t))\cdot X'(t)>0$. It follows that the line integral along the circle is positive: $$0=\oint_C F\cdot dX=\int_a^b F(X(t))\cdot X'(t)\, dt>0.$$ On the other hand, the line integral over a closed path of a gradient vector field would be $0$ according to the Fundamental Theorem of Calculus for gradient vector fields on manifolds. A contradiction! Therefore, we have a vector field that is irrotational but not gradient.

Now we recast this construction in the language of differential forms.

Differential forms come from the integral theorems of $2$-dimensional calculus. First, Green's Theorem: $$\oint_C F\cdot dX=\iint_D \operatorname{rot}F\, dxdy,$$ where a loop $C$ is the boundary of a region $D$, $$\partial D=C.$$ Here, the integrand of the line integral on the left is a form of degree $1$ (with $X=<x,y>,\ dX=<dx,dy>$), while the integrand of the area integral on the right is a form of degree $2$: $$\phi=F\cdot dX\ \text{ and } \Psi=\operatorname{rot}F\, dxdy.$$ The latter is called the exterior derivative of the former: $$d\phi=\Psi.$$ In the particular case of the cylinder, the latter form is $0$. And the form $\phi$ is called closed.

Second, the Fundamental Theorem of Calculus of line integrals states: $$f(B)-f(A)=\int_C \operatorname{grad} f\cdot dX,$$ where $C$ is a path from $A$ to $B$, i.e., $$\partial C=B-A.$$ Every function $f$ on the plane is a form of degree $0$ and its exterior derivative $df$ is a form of degree $1$. This new form is given by the gradient of $f$: $$\phi=df=\operatorname{grad} f\cdot dX.$$ In the particular case of the cylinder, there is always such an $f$. And the form $\phi$ is called exact.

So, calculus on the plane is different from calculus on the cylinder, calculus on the sphere is different from calculus on the torus and so on. Suppose we have derivatives and integrals of all functions, on the former and on the latter, how can we tell the two apart? We state the idea above in the language of differential forms:

• “all vector fields with zero rotor are gradient” means
• “all closed $1$-forms are exact”.

This is true if and only if there are no tunnels. This happens on the plane and the sphere.

Discrete calculus makes things simpler. First, there are no limits. Second, the infinite-dimensional spaces of functions and forms are replaced with finite-dimensional ones. Third, the algebra of integers becomes a valid option...

We first decompose the square into cells. The simplest choice is: four $0$-cells (vertices), four $1$-cells (edges), and one $2$-cell (a face):


Differential forms assign -- via integration -- a number to points, curves, surfaces, and solids, according to their degrees. Similarly, a discrete $k$-form simply assigns a number to each of the $k$-cells. They are dual of the chains and are called cochains. The main ones correspond to each cell and assign $1$ to the cell and $0$ to the rest. If the cell is $a$, this discrete form is denoted by $a^*$: $$a^*(a)=1\ \text{ and }\ a^*(b)=0.$$ The boundaries above give rise to the coboundaries, the replacements of the exterior derivatives, $$d=\partial^*,$$ of the cochains according to the following rule: $$\partial^*(a^*)(\tau)=a^*(\partial \tau).$$ These are the results: $$\begin{array}{ccrclclcccc} & & 2\text{-forms} &\partial^* & 1\text{-forms} &\partial^* & 0\text{-forms} \\ \hline & & \partial^*(a^*)=\tau^* & \leftarrowtail & a^* & & \\ & & \partial^*(b^*)=\tau^* & \leftarrowtail & b^* & & \\ & & \partial^*(c^*)=-\tau^* & \leftarrowtail & c^* & & \\ & & \partial^*(d^*)=-\tau^* & \leftarrowtail & d^* & & \\ & & & & \partial^*(A^*)=-d^*-a^* & \leftarrowtail & A^* \\ & & & & \partial^*(B^*)=a^*-b^* & \leftarrowtail & B^* \\ & & & & \partial^*(C^*)=b^*+c^* & \leftarrowtail & C^* \\ & & & & \partial^*(D^*)=-c^*+d^* & \leftarrowtail & D^* \\ \end{array}$$

The meaning of a $1$-form is a flow along the edges and the meaning of its rotor, a $2$-form, is the amount of rotation of a ball placed in the flow:


• “all closed $1$-forms are exact”.

For other cell decompositions, this conclusion will remain the same (according to Invariance of Cohomology).

Instead of decomposing the cylinder into cells, we create it from the square by an equivalence relation of its nine cells: $$a \sim c;\ A \sim D,\ B \sim C.$$


• not all closed $1$-forms are exact”.

In fact, it's easy to point out a non-exact closed $1$-form: $b^*+d^*$.

So, both calculus and discrete calculus detect, and are affected by, the tunnel of the cylinder.

Now, the second question, the orientability of the surfaces... While a tunnel is a $1$-dimensional topological feature, this one is $2$-dimensional. We will, therefore, concentrate on another part of the cochain complex.

Here's a simple computation on the plane: $$\operatorname{rot} <-y,0>=\operatorname{rot} <0,x> =1.$$ So, the constant function is the rotor of some vector field. We jump to the conclusion that all functions are. We can restate this idea in terms of differential forms, as follows:

• “all functions are rotors” means
• “all $2$-forms are exact”.

Does this hold for the projective plane? We make it from the square by gluing its edge to itself by identifying all pairs of antipodal points:

Is, this time, $1$ the rotor of some vector field? Even though neither $<-y,0>$ nor $<0,x>$ is properly defined on the projective plane, we can get another one: $$F= \left< -\frac{1}{2}y,\ \frac{1}{2}x \right>.$$ It is made from a rotation vector field $V=<-y,x>$ via division...

Its rotor is our constant function: $$\operatorname{rot}F=\operatorname{rot} \left< -\frac{1}{2}y,\ \frac{1}{2}x \right> =1.$$ We jump to the conclusion here that

• “all $2$-forms are exact”.

Now discrete calculus... The equivalence relation that makes the projective plane from the square is: $$p \sim q,$$ where $p=a+b$, $q=d+c$.


• “all $2$-forms are exact”.

This is the same as what we have for the plane. The topological difference is the non-orientability of the former but the forms behave the same way on both surfaces! Calculus will, therefore, fail to tell the projective plane from the plane.

So, we have shown that the real-valued calculus and discrete calculus fail to detect the non-orientability and tell the plane from the projective plane (or the cylinder from the Klein bottle, etc.).

Let's consider the integer-valued discrete calculus. First, because of the nature of the boundary operators and, therefore, coboundary operators, their matrices are integer-valued! Does the move from the reals to the integers make any difference then?


• “all $2$-forms are exact”, over ${\bf Z}$.


• not all $2$-forms are exact”, over ${\bf Z}$.

In fact, it is easy to point out a non-exact $2$-chain: $\tau^*$.

For other cell decompositions, the conclusion will continue to hold: some of the $2$-forms don't come from the rotors of flows.

Specifically, the constant function on the $2$-cells with the smallest non-zero value, $1$, isn't one of them. Therefore, the balls on the projective plane can't rotate in unison at that speed. One will reach the same conclusion by simply following the rotations of the balls while making a full circle around the projective plane:

If we take a trip along an appropriate strip -- it's the Mobius strip -- of the projective plane, there will always be a conflict of directions at the end!

Thus, in contrast to the real-valued calculus, there is a difference between integer-valued calculus on the plane and integer-valued calculus on the projective plane. We have detected the non-orientability of the latter!

So, we needed the algebra of integers to detect non-orientability. Can we have “calculus over the integers”? Well, if the integral of a constant function over an interval is $1$, then what is the integral over a half of the interval? An infinite divisibility of the space implies an infinite divisibility of the ring of numbers...

Our conclusion is that calculus, as we know it, is unable to tell an orientable space from non-orientable!

Let's recast these results in the language of cohomology...

We use the cochain complex to find, over ${\bf R}$:

• the vector spaces of cocycles (the kernels of the coboundary operators) and
• the vector spaces of coboundaries (the images of the coboundary operators).


The de Rham cohomology $H^*_{dR}$ is defined the same way for the cochain complex of differential forms. It is known -- according to de Rham Theorem -- that the two cohomologies are isomorphic: $$H^*_{dR}(M;{\bf R})=H^*(M;{\bf R}),$$ for any smooth manifold $M$. So, the topological conclusions we derive from calculus, as we know it, are identical to those derived from discrete calculus over the reals.



The conclusions remain true for higher dimensions. For example, we have the following for a $3$-dimensional space. This is the $3$rd cohomology for the orientable Euclidean space vs. the non-orientable projective space: $$H^3_{dR}({\bf R}^3;{\bf R})=H^3_{dR}({\bf RP}^3;{\bf R})=0=H^3({\bf RP}^3;{\bf R})=H^3({\bf R}^3;{\bf R})=0.$$ Same, for the reals! But different for the integers: $$H^3({\bf R}^3;{\bf Z})=0 \ \ne\ H^3({\bf RP}^3;{\bf Z})={\bf Z}_2.$$ Once again, calculus, as we know it, cannot tell an orientable space from non-orientable, but the integer-valued one can.

There is a more interesting $3$-dimensional example. It is about electromagnetism.

If $E$ is the electric field and $B$ is the magnetic field (as functions of position and time), then the Maxwell–Faraday equation states: $$\operatorname{curl} E = − B',$$ where $B'$ is the time-derivative of $B$. In terms of differential forms, we have: $$de=-b',$$ where $e$ is a $1$-form and $b$ is a $2$-form (over space). So, for every choice of an electric field, there is a magnetic field. Conversely, in ${\bf R}^3$, every $2$-form is exact, therefore, there is an electric field for every magnetic field. In summary, they are paired up: there is an electromagnetic field. As we know, the reason for this is the fact that the de Rham $2$-cohomology of this space (and others such as the $3$-sphere) is trivial: $$H^2_{dR}({\bf R}^3;{\bf R})=0=H^2_{dR}({\bf S}^3;{\bf R})=0.$$ Otherwise, some choices of magnetic fields won't produce electric fields.

There are many spaces with a non-trivial $2$-cohomology, but let's take the product of the projective plane and the circle. From our previous computations for the projective plane and what we know about the circle, $$H^0({\bf S}^1;{\bf Z})={\bf Z},\quad H^1({\bf S}^1;{\bf Z})={\bf Z},$$ we derive, according to the Künneth Theorem: $$H^2({\bf RP}^2\times {\bf S}^1;{\bf R})=0 \ \ne\ H^2({\bf RP}^2\times {\bf S}^1;{\bf Z})={\bf Z}_2.$$ Once again, calculus, as we know it, cannot tell an orientable space from non-orientable, but the integer-valued one can.

Notes:

• The algebraic topology background is presented in my book Topology Illustrated.
• Discrete calculus (over any ring) is also presented in this book, including the part that requires a metric in order to handle lengths, areas, volumes, etc.
• On an elementary level, an exposition of discrete (real-valued) calculus is found in the draft of my other book Calculus Illustrated, along with calculus-as-we-know-it, starting with calculus of sequences (Chapter 1).
• In the preface to this book, I am making a case for teaching discrete calculus along or before calculus-as-we-know-it.
• Finally, how much do we really need to teach addition of fractions in elementary school?