Calculus on a finite set [fdip-00NV]
✍️sourceAGENTDRAFTED
- November 12, 2026
Calculus on a finite set [fdip-00NV]
✍️sourceAGENTDRAFTED
- November 12, 2026
How can the functions on a finite set carry a differential, a product rule, and an integral, when the ground ring is only assumed commutative?
The classification of first-order calculi and the product rule come first. Higher-degree forms are compared with the cochains of a torus, and the weighted integral is compared with Stokes' theorem.
Remark 1. Where the second factor is evaluated [fdip-00O8]AGENTDRAFTED
- November 12, 2026
Remark 1. Where the second factor is evaluated [fdip-00O8]AGENTDRAFTED
- November 12, 2026
On a cycle, the shifted product rule evaluates one factor at the forward neighbor. A finite set need not carry a chosen shift. An ordered pair of distinct points still has a start and an end, and the value of a function can be read at either.
Theorem 2. Ideal labels of a first-order calculus [fdip-00NT]AGENTDRAFTED
- November 12, 2026
Theorem 2. Ideal labels of a first-order calculus [fdip-00NT]AGENTDRAFTED
- November 12, 2026
Let \(X\) be a finite set and let \(k\) be a commutative unital ring. Write \(A\) for the ring of functions \(X\to k\), with pointwise addition and multiplication. For \(x\neq y\) in \(X\), let \(e_{xy}\) be a symbol, and let \(\Omega \) be the direct sum of one copy of \(k\) for each such pair. A function \(f\in A\) acts on the left and on the right by \[(f\cdot a)_{xy}=f(x)a_{xy},\qquad (a\cdot f)_{xy}=a_{xy}f(y).\] An \(A\)-sub-bimodule of \(\Omega \) is an additive subgroup closed under both actions. These sub-bimodules are exactly the sums \[N=\bigoplus _{x\neq y}I_{xy}e_{xy},\] where each \(I_{xy}\) is an ideal of \(k\). The quotient bimodule has coefficient ring \(k/I_{xy}\) on the pair \((x,y)\). When \(k\) is a field, each ideal is \(0\) or \(k\), so the quotient is the free calculus on a directed graph with no loop. That field case is the correspondence of [dimakis1994finite, pp. 3159-3178].
Proof.
- November 12, 2026
Proof.
- November 12, 2026
Let \(\delta _z\) be the function with value \(1\) at \(z\) and value \(0\) elsewhere. This small delta is the Kronecker delta, including \(\delta _x(y)=\delta _{xy}\). It corresponds to the Dirac delta at one point and to the position eigenvector there. The codifferential of continuum forms is the adjoint \(\mathrm {d}^{\dagger }\) of Notation [fdip-00PV]. For \(v\in N\) and \(x\neq y\), \[\delta _x\cdot v\cdot \delta _y=v_{xy}e_{xy}\] lies in \(N\), because \(N\) is a sub-bimodule. Thus every component of an element of \(N\) lies in \(N\). Let \(I_{xy}\) be the set of \(c\in k\) for which \(c e_{xy}\) lies in \(N\). If \(c\) and \(d\) lie in \(I_{xy}\), then so does \(c+d\). If \(r\in k\) and \(c\in I_{xy}\), the constant function of value \(r\) multiplies \(c e_{xy}\) to \((rc)e_{xy}\), so \(rc\) lies in \(I_{xy}\). Hence \(I_{xy}\) is an ideal, and \(N\) is the displayed sum.
Conversely, fix an ideal \(I_{xy}\) for each ordered pair \(x\neq y\). The displayed sum is an additive subgroup. Left multiplication by \(f\) multiplies the \((x,y)\) component by \(f(x)\), and right multiplication multiplies it by \(f(y)\). Both scalars preserve the ideal, so the sum is a sub-bimodule. The quotient on that component is \(k/I_{xy}\).
A field has exactly two ideals, \(0\) and itself. Keeping the pairs with ideal \(0\) and discarding the pairs with ideal \(k\) is a directed graph with no loop. For a ring that is not a field the same description is too small. Take \(k=\mathbb Z\) and one ordered pair with ideal \(2\mathbb Z\), and take every other ideal to be \(0\). The quotient coefficient on that pair is \(\mathbb Z/2\mathbb Z\), which is neither \(0\) nor \(\mathbb Z\).
Lemma 3. Twisted Leibniz rule on a directed graph [fdip-00NU]AGENTDRAFTED
- November 12, 2026
Lemma 3. Twisted Leibniz rule on a directed graph [fdip-00NU]AGENTDRAFTED
- November 12, 2026
Let \(k\) be a commutative unital ring and let \(X\) be finite. In the calculus of Theorem 2, take each ideal to be \(0\) or \(k\), and call a pair \((x,y)\) an edge when its ideal is \(0\). For \(f\in A\), define \[\nabla \wedge f=\sum _{(x,y)}(f(y)-f(x))e_{xy},\] the sum running over edges. Then, for all \(f,g\in A\), \[\nabla \wedge (fg)=(\nabla \wedge f)\cdot g+f\cdot (\nabla \wedge g),\] with the bimodule actions of that theorem. On the forward cycle this is the shifted formula of Lemma [fdip-0009].
The mark \(\nabla \wedge \) is the exterior derivative on cochains and equals the upright \(\mathrm {d}\). Geometric calculus writes the raising operator in this way. The correspondence is the one in Notation [fdip-00PV].
Proof.
- November 12, 2026
Proof.
- November 12, 2026
On an edge from \(x\) to \(y\), \[(fg)(y)-(fg)(x) =(f(y)-f(x))g(y)+f(x)(g(y)-g(x)).\] The first summand is the \((x,y)\) component of \((\nabla \wedge f)\cdot g\), and the second is the \((x,y)\) component of \(f\cdot (\nabla \wedge g)\). Pairs that are not edges are zero on both sides.
On \(\mathbb Z/n\mathbb Z\) with \(n\ge 2\), the forward edges run from \(i\) to \(i+1\). The coefficient \(f(i+1)-f(i)\) is the forward difference, and right multiplication by \(g\) evaluates \(g\) at \(i+1\). Those are the two factors in Lemma [fdip-0009]. For \(n=1\) there is no ordered pair of distinct points, so \(\nabla \wedge =0\), which agrees with the vanishing difference in that lemma.
Theorem 4. The maximal prolongation has square zero [fdip-00NW]AGENTDRAFTED
- November 12, 2026
Theorem 4. The maximal prolongation has square zero [fdip-00NW]AGENTDRAFTED
- November 12, 2026
Let \(k\) be a commutative unital ring, let \(X\) be a finite set, and let \(\Omega ^1\) be a free calculus in the sense of Lemma 3, with derivation \(\nabla \wedge :A\to \Omega ^1\). Form the tensor algebra of the bimodule \(\Omega ^1\) over \(A\). The maximal prolongation is the largest graded algebra \[A\oplus \Omega ^1\oplus \Omega ^2\oplus \cdots \] generated by \(A\) and \(\Omega ^1\), with the given actions of \(A\), which carries an extension of \(\nabla \wedge \) to a graded derivation of degree \(1\). In that extension \[\nabla \wedge (f\,\nabla \wedge g)=\nabla \wedge f\,\nabla \wedge g\] for all \(f,g\in A\). Products of \(1\)-forms obey only the relations forced by the vanishing already present in \(\Omega ^1\) and by the graded Leibniz rule. The identity \(\nabla \wedge ^2=0\) follows from that rule on every degree, and it is not imposed separately.
Proof.
- November 12, 2026
Proof.
- November 12, 2026
The displayed formula gives \(\nabla \wedge (\nabla \wedge f)=\nabla \wedge (1\cdot \nabla \wedge f)=\nabla \wedge (1)\,\nabla \wedge f=0\), since \(\nabla \wedge (1)=0\). Thus \(\nabla \wedge ^2\) vanishes on functions. Suppose \(\nabla \wedge ^2\) vanishes on two forms \(\alpha \) and \(\beta \), of degrees \(r\) and \(s\). Graded Leibniz gives \[\begin {aligned} \nabla \wedge ^2(\alpha \beta ) &=\nabla \wedge \bigl (\nabla \wedge \alpha \cdot \beta +(-1)^r\alpha \cdot \nabla \wedge \beta \bigr )\\ &=\nabla \wedge ^2\alpha \cdot \beta +(-1)^{r+1}\nabla \wedge \alpha \cdot \nabla \wedge \beta \\ &\quad +(-1)^r \nabla \wedge \alpha \cdot \nabla \wedge \beta +\alpha \cdot \nabla \wedge ^2\beta . \end {aligned}\] The two middle signs are opposite. The last coefficient is \(+1\), because \((-1)^r\cdot (-1)^r=1\). The outer terms vanish by the inductive hypothesis. Every form in the prolongation is a sum of products of functions and elements \(\nabla \wedge f\), so \(\nabla \wedge ^2=0\) on the whole algebra.
The same square-zero extension is the reduction of the universal envelope by a digraph in Discrete differential calculus: Graphs, topologies, and gauge theory[dimakis1994graphs]. The two calculations that follow specialize it.
Example 5. A directed triangle has no 2-forms [fdip-00NX]AGENTDRAFTED
- November 12, 2026
Example 5. A directed triangle has no 2-forms [fdip-00NX]AGENTDRAFTED
- November 12, 2026
Let \(X=\{0,1,2\}\) and let the edges of Lemma 3 be \(0\to 1\), \(1\to 2\), and \(2\to 0\). The path algebra has three words of length \(2\), \[e_{01}e_{12},\qquad e_{12}e_{20},\qquad e_{20}e_{01}.\] In the maximal prolongation of Theorem 4 each of them is zero. The calculus has no \(2\)-form, so it has no square.
The reverse edge \(1\to 0\) is absent, so \(\delta _1\,\nabla \wedge \delta _0=0\) in \(\Omega ^1\). Differentiating and using \(\nabla \wedge ^2\delta _0=0\) gives \(\nabla \wedge \delta _1\,\nabla \wedge \delta _0=0\) in \(\Omega ^2\). On this graph \[\nabla \wedge \delta _1=e_{01}-e_{12},\qquad \nabla \wedge \delta _0=e_{20}-e_{01}.\] Their product is \[(e_{01}-e_{12})(e_{20}-e_{01})=-e_{12}e_{20},\] because \(e_{01}\) does not compose with either factor on the right and \(e_{12}\) composes only with \(e_{20}\), taking the minus sign from the first factor. Thus \(-e_{12}e_{20}=0\), so \(e_{12}e_{20}=0\). The cyclic permutations give the other two words.
Example 6. A symmetric pair keeps the backtracking 2-form [fdip-00NY]AGENTDRAFTED
- November 12, 2026
Example 6. A symmetric pair keeps the backtracking 2-form [fdip-00NY]AGENTDRAFTED
- November 12, 2026
Let \(X=\{0,1\}\) and let both ordered pairs be edges. Write \(p=e_{01}e_{10}\) and \(q=e_{10}e_{01}\). In the maximal prolongation of Theorem 4 both are nonzero. An undirected edge between the same vertices has no \(2\)-cell, so these two forms are surplus.
Let \(\Omega ^2=k p\oplus k q\), set every product of total degree \(3\) or more to zero, and keep the bimodule actions of Theorem 2: a path is multiplied on the left by the value at its start and on the right by the value at its end. Set \[\nabla \wedge e_{01}=\nabla \wedge e_{10}=p+q,\qquad \nabla \wedge p=\nabla \wedge q=0,\] and let \(\nabla \wedge \) on functions be the derivation of Lemma 3. For a scalar value \(c\in k\), \[\nabla \wedge (c\,e_{01})=c(p+q).\] The graded Leibniz expansion is \[\nabla \wedge f\cdot e_{01}+f\cdot \nabla \wedge e_{01} =(f(0)-f(1))q+f(0)p+f(1)q =f(0)(p+q),\] which agrees. The identity \(\nabla \wedge (e_{01}f)=\nabla \wedge (e_{01})\cdot f-e_{01}\,\nabla \wedge f\) is the same calculation with the value \(f(1)\). The generator \(e_{10}\) is symmetric. On a product of two \(1\)-forms both sides of graded Leibniz land in degree \(3\) and vanish. Finally \[\nabla \wedge (\nabla \wedge f)=(f(1)-f(0))(p+q)+(f(0)-f(1))(p+q)=0.\] The class of \(p\) is a basis element of this extension. The maximal prolongation maps to every differential graded extension of the same first-order calculus, so \(p\) is already nonzero there. The same holds for \(q\).
Theorem 7. Forward tori prolong to cubical cochains [fdip-00NZ]AGENTDRAFTED
- November 12, 2026
Theorem 7. Forward tori prolong to cubical cochains [fdip-00NZ]AGENTDRAFTED
- November 12, 2026
Let \(k\) be a commutative unital ring, let \(n\ge 1\), and let \(N\ge 3\). Write \(X=(\mathbb Z/N\mathbb Z)^n\) and let the edges of Lemma 3 run from \(x\) to \(x+\varepsilon _i\) for \(1\le i\le n\). In the maximal prolongation of Theorem 4, every word with a repeated consecutive direction is zero, and \[e_i(x)\,e_j(x+\varepsilon _i) =-e_j(x)\,e_i(x+\varepsilon _j) \qquad (i\neq j).\] The classes of the sorted words \(e_{i_1}(x)\cdots e_{i_r}(x+\varepsilon _{i_1}+\cdots )\) with \(i_1<\cdots <i_r\) are a \(k\)-basis of the degree-\(r\) forms. Sending each such word to the dual of the corresponding oriented cube is an isomorphism onto the cubical cochains of \(X\) with values in \(k\). Under that isomorphism the differential on functions is the forward difference \[(\nabla \wedge f)(e_i(x))=f(x+\varepsilon _i)-f(x),\] and in every degree it is the cubical coboundary. For \(n=2\) that coboundary is the formula of Theorem [fdip-008Z], now over \(k\). The case \(n=1\) is the directed cycle, whose prolongation has no \(2\)-form, as in the triangle of Example 5.
Proof.
- November 12, 2026
Proof.
- November 12, 2026
Let \(y=x+2\varepsilon _i\). Then \(N\ge 3\) forces \(y\neq x\) and forces \(x\to y\) to be a non-edge, so \(\delta _x\,\nabla \wedge \delta _y=0\). Differentiating gives \(\nabla \wedge \delta _x\,\nabla \wedge \delta _y=0\). Expanding the two differentials and keeping only composable pairs leaves the single word \(e_i(x)\,e_i(x+\varepsilon _i)\), with coefficient \(-1\). That word is zero. For \(i\neq j\) the same argument with \(y=x+\varepsilon _i+\varepsilon _j\) leaves the two words \(e_i(x)\,e_j(x+\varepsilon _i)\) and \(e_j(x)\,e_i(x+\varepsilon _j)\), and no others. Their sum is zero.
An adjacent transposition is one of those relations, and a repeated consecutive direction is zero. Bubble sort therefore reduces every word to a signed sorted word or to zero. The cubical cochains, with the exterior product of cells, extend the same first-order calculus: the degree-\(1\) cochains are the edge coefficients, the coboundary of a function is the forward difference, and the coboundary is the transpose of the cellular boundary \[\partial \sigma _{ij}(x) =e_i(x)+e_j(x+\varepsilon _i) -e_i(x+\varepsilon _j)-e_j(x).\] That boundary squares to zero by cancellation of codimension-\(2\) faces, a finite count with coefficients in \(\mathbb Z\). The maximal prolongation therefore maps to this extension. The map is the identity on functions and on edges, so a sorted word is sent to the exterior product of those edges, the dual of one cube. Distinct cubes are independent, so the sorted words are independent.
The edge generator is \(e_i(x)=\delta _x\,\nabla \wedge \delta _{x+\varepsilon _i}\), so \[\nabla \wedge (e_i(x)) =\sum _p e_p(x-\varepsilon _p)\,e_i(x) +\sum _q e_i(x)\,e_q(x+\varepsilon _i).\] Reduce by the quadratic relations and evaluate on the square \(\sigma _{ab}(z)\) with \(a<b\). The coefficient is \(+1\) when the edge is the face \(e_a(z)\) or the face \(e_b(z+\varepsilon _a)\), and it is \(-1\) when the edge is \(e_a(z+\varepsilon _b)\) or \(e_b(z)\). That is \(\langle e_i(x),\partial \sigma _{ab}(z)\rangle \).
Write \(e^i=\sum _x e_i(x)\). Summing the formula for \(\nabla \wedge (e_i(x))\) and using the anticommutator gives \(\nabla \wedge (e^i)=0\). Both the prolongation differential and the cubical coboundary are graded derivations, they agree on functions, and both kill every \(e^i\). A general form is a sum of terms \(f\,e^{i_1}\cdots e^{i_r}\) with \(i_1<\cdots <i_r\), so the two differentials agree in every degree. For \(n=2\) the square formula is the coordinate formula of Theorem [fdip-008Z]. The cancellation that proves \(\nabla \wedge ^2=0\) there uses only addition in \(k\).
Remark 8. Dimension and the edge letter [fdip-00QS]AGENTDRAFTED
- November 13, 2026
Remark 8. Dimension and the edge letter [fdip-00QS]AGENTDRAFTED
- November 13, 2026
The dimension of a grid is \(n\). The edge letter stays \(e\), as in \(e_i(x)\).
Remark 9. Periods 1 and 2 [fdip-00O0]AGENTDRAFTED
- November 12, 2026
Remark 9. Periods 1 and 2 [fdip-00O0]AGENTDRAFTED
- November 12, 2026
The identification in Theorem 7 uses \(N\ge 3\). For \(N=1\) the point \(x+\varepsilon _i\) equals \(x\), so the free calculus of Lemma 3 has no edge. Its prolongation is concentrated in degree \(0\). The cubical complex still has one loop in each direction. The forward difference around that loop is zero, but the loop itself is not a form of the calculus.
For \(N=2\) the step \(x+2\varepsilon _i\) returns to \(x\). The double-step relation of Theorem 7 is not available. The word \[e_i(x)\,e_i(x+\varepsilon _i) =e_{x,\,x+\varepsilon _i}\,e_{x+\varepsilon _i,\,x}\] is a backtracking word. When \(n=1\) the graph is the symmetric pair of Example 6, so the word is nonzero and the prolongation is strictly larger than the cubical cochains. Distinct directions still anticommute, because \(x+\varepsilon _i+\varepsilon _j\) is neither \(x\) nor a neighbor when \(i\neq j\).
Theorem 10. Closed weights are the divergence-free ones [fdip-00O1]AGENTDRAFTED
- November 12, 2026
Theorem 10. Closed weights are the divergence-free ones [fdip-00O1]AGENTDRAFTED
- November 12, 2026
Let \(k\) be a commutative unital ring and let \(\Omega ^1\) be a free calculus of Lemma 3 whose maximal prolongation has no \(2\)-form, as the directed cycle of length at least \(3\) does by Theorem 7. A weight assigns \(w_{xy}\in k\) to each edge. The weighted integral of a \(1\)-form \(\omega =\sum \omega _{xy}e_{xy}\) is \[\int \omega =\sum _{x\to y}w_{xy}\omega _{xy}.\] The integral is closed when \(\int \nabla \wedge f=0\) for every function \(f\). This holds if and only if, at every vertex, the sum of the weights on incoming edges equals the sum of the weights on outgoing edges. For the actions of Theorem 2, \[\int f\omega -\int \omega f =\sum _{x\to y}w_{xy}\bigl (f(x)-f(y)\bigr )\omega _{xy}.\] The difference vanishes for all \(f\) and \(\omega \) if and only if every weight is zero. A nonzero closed integral is therefore not an untwisted graded trace in the sense of Non-commutative differential geometry[connes1985ncg]. On the directed cycle the constant weight \(1\) is closed, and the difference reduces to \(\sum _i\bigl (f(i)-f(i+1)\bigr )\omega _i\).
Proof.
- November 12, 2026
Proof.
- November 12, 2026
Substitute \(\nabla \wedge f\). The coefficient of \(f(z)\) in \(\int \nabla \wedge f\) is the incoming sum at \(z\) minus the outgoing sum at \(z\). The integral vanishes for every \(f\) exactly when each of those coefficients is zero.
Left multiplication by \(f\) multiplies the coefficient on \(x\to y\) by \(f(x)\), and right multiplication multiplies it by \(f(y)\). Their integrals differ by the displayed sum. Take \(\omega =e_{xy}\) and \(f=\delta _x\). The sum reduces to \(w_{xy}\). Thus every coefficient vanishes. The constant weight on a directed cycle has one incoming edge and one outgoing edge at each vertex, so it is closed, and the same substitution gives the cycle formula.
Theorem 11. Permutation weights are the twisted traces [fdip-00O2]AGENTDRAFTED
- November 12, 2026
Theorem 11. Permutation weights are the twisted traces [fdip-00O2]AGENTDRAFTED
- November 12, 2026
Keep the weighted integral of Theorem 10. An algebra automorphism \(\sigma \) of \(A\) is a twist of the integral when \[\int f\omega =\int \omega \,\sigma (f)\] for every function \(f\) and every \(1\)-form \(\omega \). If the support of \(w\) is contained in the graph of a permutation \(\pi \) of \(X\), the automorphism \((\sigma f)(y)=f(\pi ^{-1}y)\) is a twist. Conversely, when the only idempotents of \(k\) are \(0\) and \(1\), a twist exists only in that case. The shift of the directed cycle is the permutation \(i\mapsto i+1\). The unrestricted converse fails for a general commutative ring: on \(X=\{1,2,3\}\) with \(k=\mathbb Z\times \mathbb Z\), the weights \(w_{12}=(1,0)\) and \(w_{13}=(0,1)\) admit a twist, and vertex \(1\) has two outgoing edges in the support.
Proof.
- November 12, 2026
Proof.
- November 12, 2026
Suppose \(y=\pi (x)\) whenever \(w_{xy}\neq 0\). Then \(\sigma (f)(y)=f(x)\) on every such edge, so the two integrals agree. Off the support both sides have coefficient zero.
Now suppose the only idempotents of \(k\) are \(0\) and \(1\), and suppose a twist \(\sigma \) exists. The primitive idempotents of \(A\) are the functions \(\delta _x\). Thus \(\sigma \) permutes them: \(\sigma (\delta _x)=\delta _{\pi (x)}\) for a permutation \(\pi \) of \(X\). The twist identity says \(w_{xy}f(x)=w_{xy}(\sigma f)(y)\) for every \(f\). If \(y\neq \pi (x)\), take \(f=\delta _x\). Then \((\sigma f)(y)=0\), so the right side is zero and the left side is \(w_{xy}\). Hence \(w_{xy}=0\). The support is contained in the graph of \(\pi \).
For the product ring, split a function into a pair \((f_+,f_-)\) of integer-valued functions. Let \(\pi _+\) exchange \(1\) and \(2\) and fix \(3\), and let \(\pi _-\) exchange \(1\) and \(3\) and fix \(2\). The rule \[(\sigma f)_+=f_+\circ \pi _+^{-1},\qquad (\sigma f)_-=f_-\circ \pi _-^{-1}\] is an algebra automorphism. On the edge \(1\to 2\) the weight \((1,0)\) retains only the first component, and \((\sigma f)_+(2)=f_+(1)\). On the edge \(1\to 3\) the weight \((0,1)\) retains only the second component, and \((\sigma f)_-(3)=f_-(1)\). Both edges satisfy the twist identity, and no permutation of \(X\) contains both pairs.
The twisted identity is the degree-one case of the cocycle condition in Differential calculi over quantum groups and twisted cyclic cocycles[kustermans2003twisted].
Theorem 12. Stokes' theorem for a cell subcomplex [fdip-00O3]AGENTDRAFTED
- November 12, 2026
Theorem 12. Stokes' theorem for a cell subcomplex [fdip-00O3]AGENTDRAFTED
- November 12, 2026
Let \(k\) be a commutative unital ring and let \(X\) be the torus of Theorem 7, with \(N\ge 3\). A cell subcomplex is a set of cubes, of any dimensions, closed under taking faces, each cube carrying the coordinate orientation of that torus. Let \(M\) be the chain which sums the maximal cubes of such a set, and let \(\partial M\) be its cellular boundary. For a form \(\omega \) of the matching degree, integration over a chain is the evaluation pairing of Theorem 7. Then \[\int _M \nabla \wedge \omega =\int _{\partial M}\omega .\] On a directed cycle of length at least \(3\), an arc of edges from \(a\) to \(b\) has boundary the endpoints \(+b\) and \(-a\), and the identity is the telescoping sum \[\sum _{i=a}^{b-1}\bigl (f(i+1)-f(i)\bigr )=f(b)-f(a).\]
Proof.
- November 12, 2026
Proof.
- November 12, 2026
The isomorphism of Theorem 7 identifies \(\nabla \wedge \) with the transpose of the cellular boundary, in the sense that \(\langle \nabla \wedge \omega ,c\rangle =\langle \omega ,\partial c\rangle \) for every chain \(c\). The case \(c=M\) is \(\int _M \nabla \wedge \omega =\int _{\partial M}\omega \).
On the cycle the same pairing sums the forward differences along the arc. Consecutive terms cancel, and the two endpoints remain.