321 Associativity as Equality of Two Composites

The diagonal of an object \(X\) is

\begin{equation} \Delta _X:X\longrightarrow X\times X, \qquad \Delta _X(x)=(x,x), \tag{20340}\end{equation}
and it is compatible with the identity, in the sense that the square
\begin{equation} \begin {CD} X @>{\Delta _X}>> X\times X\\ @V{\mathrm {id}}VV @VV{\mathrm {id}\times \mathrm {id}}V\\ X @>{\Delta _X}>> X\times X \end {CD} \tag{20341}\end{equation}
commutes. The diagonal is what \(A=A\) supplies: it is the identity written as a map into the product.

A binary operation on \(X\) is a map

\begin{equation} m:X\times X\longrightarrow X . \tag{20342}\end{equation}
On the triple product there are two ways to reduce three factors to one — combine the first pair, or combine the last pair — and these are the two paths around the square
\begin{equation} \begin {CD} X\times X\times X @>{\mathrm {id}_X\times m}>> X\times X\\ @V{m\times \mathrm {id}_X}VV @VV{m}V\\ X\times X @>{m}>> X \end {CD} \tag{20343}\end{equation}
Associativity is the statement that this square commutes:
\begin{equation} m\circ (m\times \mathrm {id}_X)=m\circ (\mathrm {id}_X\times m). \tag{20344}\end{equation}
It is therefore not an independent axiom about the operation but an equality of two composites built from \(m\), the identity and the product. Written through the diagonal, the two composites agree exactly when, for every triple, the pair of their values lies in \(\Delta _X\); that is, when the equaliser of \(m\circ (m\times \mathrm {id}_X)\) and \(m\circ (\mathrm {id}_X\times m)\), which is the pullback of \(\Delta _X\) along the pair of composites, is all of \(X\times X\times X\).

A monoid is a triple

\begin{equation} \text {Monoid}=(X,m,e), \qquad e:1\longrightarrow X, \tag{20345}\end{equation}
in which the associativity square commutes and the unit laws
\begin{equation} m\circ (e\times \mathrm {id}_X)=\mathrm {id}_X, \qquad m\circ (\mathrm {id}_X\times e)=\mathrm {id}_X \tag{20346}\end{equation}
hold, under the canonical identifications \(1\times X\cong X\cong X\times 1\). Both conditions are equalities of composites, and both are read off the diagonal: associativity as the coincidence of the two reductions of a triple, the unit laws as the coincidence of a composite with the identity, which is the diagonal itself.

Condition Equality of composites Read through the diagonal
associativity \(m\circ (m\times \mathrm {id})=m\circ (\mathrm {id}\times m)\) equaliser is all of \(X^{3}\)
left unit \(m\circ (e\times \mathrm {id})=\mathrm {id}\) composite equals \(\Delta \)-identity
right unit \(m\circ (\mathrm {id}\times e)=\mathrm {id}\) composite equals \(\Delta \)-identity

321.1 The Leibniz Rule

The Leibniz rule is the statement that the second-order cross term of a product vanishes. A square-zero element is supplied by the partition itself — the off-diagonal block between \(O\) and \(U\) — and with it the rule, the chain rule and the logarithmic form follow algebraically, without limits. The two structural ingredients the derivation uses, associativity and the insertion of \(A-A=0\), are themselves obtained here: associativity from the diagonal in general, and from idempotence, involution and nilpotence on the generators.

Associativity from the diagonal

Evaluating both bracketings of a composite at a point,

\begin{equation} \bigl ((h\circ g)\circ f\bigr )(x)=h\bigl (g(f(x))\bigr ) =\bigl (h\circ (g\circ f)\bigr )(x), \tag{20347}\end{equation}
so for every \(x\) the pair of values lies on the diagonal,
\begin{equation} \Bigl (\bigl ((h\circ g)\circ f\bigr )(x),\ \bigl (h\circ (g\circ f)\bigr )(x)\Bigr )\in \Delta . \tag{20348}\end{equation}
Since the equaliser is the pullback of the diagonal, \(\operatorname {Eq}(f_1,f_2)=\Delta ^{-1}(f_1,f_2)\), this reads
\begin{equation} \operatorname {Eq}\bigl ((h\circ g)\circ f,\ h\circ (g\circ f)\bigr )=A , \tag{20349}\end{equation}
which is associativity. Dually, the diagonal is coassociative,
\begin{equation} (\Delta \times \operatorname {id})\circ \Delta =(\operatorname {id}\times \Delta )\circ \Delta :\ x\longmapsto (x,x,x), \tag{20350}\end{equation}
because the triple diagonal is unique and leaves no bracketing to choose.
Associativity on the generators

The generators produced by the partition satisfy

\begin{equation} \Pi ^2=\Pi , \qquad \vartheta ^2=e\ \ (\neg \neg a=a), \qquad E^2=0 , \tag{20351}\end{equation}
and in each case a product of \(n\) copies depends only on \(n\):

Generator Relation Value of an \(n\)-fold product
\(\Pi \) \(\Pi ^2=\Pi \) \(\Pi \) for every \(n\ge 1\)
\(\vartheta \) \(\vartheta ^2=e\) \(\vartheta ^{\,n\bmod 2}\)
\(E\) \(E^2=0\) \(I\) if \(n=0\), \(E\) if \(n=1\), \(0\) if \(n\ge 2\)

Rebracketing a product does not change the number of factors, so every bracketing gives the same value. Associativity on these generators is therefore the invariance of a count under rebracketing — the same erasure of arrangement that defines multisets and makes \(8\times 5\) and \(5\times 8\) one value.

What the rule asserts

Expanding a product to first order,

\begin{equation} f(x+h)\,g(x+h) =(f+\Delta f)(g+\Delta g) =fg+\Delta f\,g+f\,\Delta g+\Delta f\,\Delta g . \tag{20352}\end{equation}
The Leibniz rule holds exactly precisely when the cross term \(\Delta f\,\Delta g\) is absent; it is a statement about an increment whose square is zero.
A square-zero element from the partition

With \(\Pi _O=\operatorname {diag}(1,0)\) and \(\Pi _U=\operatorname {diag}(0,1)\), the off-diagonal block

\begin{equation} E=\Pi _O\,E\,\Pi _U=\begin {pmatrix}0&1\\0&0\end {pmatrix} \tag{20353}\end{equation}
satisfies
\begin{equation} E^2=\Pi _O E\,(\Pi _U\Pi _O)\,E\,\Pi _U=0, \tag{20354}\end{equation}
by the computation that gave \(d^2=0\) from \(\Pi _O\Pi _U=0\). Hence
\begin{equation} \operatorname {span}\{I,E\}\ \cong \ \mathbb {R}[\varepsilon ]/(\varepsilon ^2), \tag{20355}\end{equation}
and the dual numbers are the algebra generated by the identity and the transition between the two parts. Their associativity is the \(E\)-row of the table above.
The rule

Define \(D\) by the first-order expansion

\begin{equation} f(x+\varepsilon )=f(x)+\varepsilon \,Df(x), \tag{20356}\end{equation}
exact on polynomials since \((x+\varepsilon )^n=x^n+n\,x^{n-1}\varepsilon \). Then
\begin{equation} (fg)(x+\varepsilon ) =(f+\varepsilon \,Df)(g+\varepsilon \,Dg) =fg+\varepsilon \,(Df\,g+f\,Dg)+\varepsilon ^2\,Df\,Dg , \tag{20357}\end{equation}
and \(\varepsilon ^2=0\) gives
\begin{equation} D(fg)=Df\,g+f\,Dg . \tag{20358}\end{equation}
No limit is taken; limits enter only in extending \(D\) from polynomials to functions defined by their expansions.
The chain rule
\begin{equation} f\bigl (g(x+\varepsilon )\bigr ) =f\bigl (g+\varepsilon \,Dg\bigr ) =f(g)+\varepsilon \,Dg\cdot Df(g), \qquad D(f\circ g)=(Df\circ g)\cdot Dg . \tag{20359}\end{equation}
The logarithmic form
\begin{equation} \text {multiplicative law} \xrightarrow {\ \log \ } \text {additive law} \xrightarrow {\ D\ } \text {Leibniz rule}: \qquad \frac {D(fg)}{fg}=\frac {Df}{f}+\frac {Dg}{g}, \tag{20360}\end{equation}
obtained by applying \(D\) and the chain rule to \(\log (fg)=\log f+\log g\); multiplying by \(fg\) recovers the rule. This route requires \(f,g>0\), which the dual-number route does not.
The commutator is a derivation

In an associative algebra,

\begin{equation} [X,ab]=Xab-abX =(Xa-aX)\,b+a\,(Xb-bX) =[X,a]\,b+a\,[X,b], \tag{20361}\end{equation}
the middle step inserting \(aXb-aXb=0\). The ingredients are the associativity derived above and the identity \(A-A=0\). Hence \(\hat \partial =-i[D,\Pi ]\) satisfies the Leibniz rule by construction.
The difference quotient
\begin{equation} f(x+h)g(x+h)-f(x)g(x) =\bigl [f(x+h)-f(x)\bigr ]g(x+h)+f(x)\bigl [g(x+h)-g(x)\bigr ], \tag{20362}\end{equation}
by adding and subtracting \(f(x)g(x+h)\); after dividing by \(h\) the cross term \(\Delta f\,\Delta g/h=O(h)\) vanishes in the limit, the analytic counterpart of \(\varepsilon ^2=0\).
The graded rule
\begin{equation} d(\alpha \wedge \beta )=d\alpha \wedge \beta +(-1)^{|\alpha |}\,\alpha \wedge d\beta , \tag{20363}\end{equation}
with \((-1)^{|\alpha |}\) the \(\mathbb {Z}_2\)-grading — the \(\vartheta \)-row of the table — and compatibility with \(d^2=0\) the \(E\)-row.
The chain

Step Source What vanishes or is preserved
associativity diagonal; counts on generators bracketing
dual numbers \(\Pi _O\Pi _U=0\Rightarrow E^2=0\) \(\varepsilon ^2\)
Leibniz first-order product \(\varepsilon ^2\,Df\,Dg\)
commutator associativity, \(A-A=0\) \(aXb-aXb\)
difference quotient limit \(h\to 0\) \(\Delta f\,\Delta g/h\)
logarithm \(\log (fg)=\log f+\log g\) valid for \(f,g>0\)
\begin{align} A=A &\;\Longrightarrow \;\Delta \;\Longrightarrow \;\text {associativity} \;\Longrightarrow \;\Pi _O\Pi _U=0 \;\Longrightarrow \;E^2=0 \nonumber \\ &\;\Longrightarrow \;D(fg)=Df\,g+f\,Dg \;\Longrightarrow \;D(f\circ g)=(Df\circ g)\,Dg . \tag{20364}\end{align}

321.2 Translations, the Exponential and the Logarithm

Thesis. Groups, translations, the exponential and the logarithm are not introduced as primitives. The group of a structure is the invertible part of its endomorphism monoid, translations are the image of an abelian group in that monoid, the exponential is the unique solution of \(Df=f\) with \(f(0)=1\) and is a homomorphism by the Leibniz rule, the logarithm is its inverse, and the correspondence between translation and multiplication is the statement that \(\exp \) intertwines the two actions. Translation is moreover the exponential of the derivative, and the Leibniz rule is the infinitesimal form of the fact that translation preserves products.

321.3 Groups from the identity

The identity \(A=A\) supplies \(\operatorname {id}_X\) and composition, and composition is associative (Section 321). Hence \((\operatorname {End}(X),\circ ,\operatorname {id}_X)\) is a monoid, and its invertible elements

\begin{equation} \operatorname {Aut}(X)=\{\,g\in \operatorname {End}(X)\ :\ \exists h,\ g\circ h=h\circ g=\operatorname {id}_X\,\} \tag{20365}\end{equation}
form a group. A group is therefore a monoid in which every element has a two-sided inverse, and the first examples are automorphism groups. The number systems used below arise as follows:

Object Construction Source
\(\mathbb {N}\) free monoid on one generator iterated composition
\(\mathbb {Z}\) \((\mathbb {N}\times \mathbb {N})/\!\sim \), \(a+d=b+c\) pair construction, additive
\(\mathbb {Q}\) pairs \((a,b)\), \(b\neq 0\), \(ad=bc\) pair construction, multiplicative
\(\mathbb {R}\) cuts in \(\mathbb {Q}\) completion of the cone order

In each pair construction the inverse is coordinate exchange, \((a,b)\mapsto (b,a)\), which is the involution \(\vartheta \).

321.4 The translation operator

For an abelian group \((X,+,0)\) define

\begin{equation} T_a:X\to X, \qquad T_a(x)=x+a . \tag{20366}\end{equation}
Then
\begin{equation} T_0=\operatorname {id}_X, \qquad T_a\circ T_b=T_{a+b}, \qquad T_a^{-1}=T_{-a}, \tag{20367}\end{equation}
the first from the unit law, the second from \(T_a(T_b(x))=(x+b)+a=x+(a+b)\) by associativity and commutativity, the third from \(T_a\circ T_{-a}=T_0\). Each \(T_a\) is therefore invertible and lies in \(\operatorname {Aut}(X)\).

321.5 The translation group

The assignment

\begin{equation} \rho :(X,+)\to \operatorname {Aut}(X), \qquad \rho (a)=T_a, \qquad \rho (a+b)=\rho (a)\,\rho (b), \tag{20368}\end{equation}
is a homomorphism, and it is injective because \(T_a(0)=a\) recovers \(a\). Thus \((X,+)\) is isomorphic to its image, the translation group, and the group law \(+\) becomes composition \(\circ \). This is the regular representation: every group is a group of transformations, and its operation is the composition that \(A=A\) supplied.

321.6 The exponential

Let \(D\) be the derivation of Subsection 321.1, and let \(f\) satisfy

\begin{equation} Df=f, \qquad f(0)=1 . \tag{20369}\end{equation}
Existence on power series follows from \(D x^n=n\,x^{n-1}\): \(f(x)=\sum _{n\ge 0}x^n/n!\).

Homomorphism. Fix \(y\) and set \(\varphi (x)=f(x+y)\,f(-x)\). By the Leibniz and chain rules,

\begin{equation} D\varphi =f(x+y)\,f(-x)-f(x+y)\,f(-x)=0, \tag{20370}\end{equation}
so \(\varphi \) is constant, equal to \(\varphi (0)=f(y)\). Taking \(y=0\) gives \(f(x)\,f(-x)=1\), and therefore
\begin{equation} f(x+y)=f(x)\,f(y). \tag{20371}\end{equation}

The unit is an idempotent. Setting \(x=y=0\) gives \(f(0)=f(0)^2\). In a group the only idempotent is the identity, so the condition \(f(0)=1\) is the projector equation \(\Pi ^2=\Pi \) in the one place where it has a single invertible solution.

Positivity and bijectivity. Since \(f(x)=f(x/2)^2\ge 0\) and \(f(x)f(-x)=1\), \(f>0\) everywhere. Then \(Df=f>0\), so \(f\) is strictly increasing; \(f(n)=f(1)^n\) with \(f(1)>1\) is unbounded and \(f(-n)=f(1)^{-n}\to 0\), so by continuity \(f\) is onto \(\mathbb {R}_{>0}\). Writing \(\exp :=f\),

\begin{equation} \exp :(\mathbb {R},+)\xrightarrow {\ \sim \ }(\mathbb {R}_{>0},\times ), \qquad \exp (x+y)=\exp (x)\exp (y), \quad \exp (0)=1, \quad \exp '=\exp . \tag{20372}\end{equation}

321.7 The logarithm

Define \(\ln =\exp ^{-1}\). Every property is the homomorphism read backwards:

\begin{equation} \ln (ab)=\ln a+\ln b, \qquad \ln 1=0, \qquad \ln (a^{-1})=-\ln a , \tag{20373}\end{equation}
so
\begin{equation} \ln :(\mathbb {R}_{>0},\times )\xrightarrow {\ \sim \ }(\mathbb {R},+). \tag{20374}\end{equation}
For \(r\in \mathbb {Z}\) the rule \(\ln (a^r)=r\ln a\) follows by induction, for \(r\in \mathbb {Q}\) by division, and for \(r\in \mathbb {R}\) it is the definition \(a^r:=\exp (r\ln a)\). The two inversions correspond: \(\ln \) carries \(a\mapsto a^{-1}\) to \(x\mapsto -x\), both instances of \(\vartheta \).

321.8 The translation–multiplication correspondence

With \(M_a(y)=ay\),

\begin{equation} \exp \bigl (T_c(x)\bigr )=e^{x+c}=e^c\,e^x, \tag{20375}\end{equation}
so
\begin{equation} \exp \circ T_c=M_{e^c}\circ \exp , \qquad \ln \circ M_a=T_{\ln a}\circ \ln , \tag{20376}\end{equation}
that is, the square
\begin{equation} \begin {CD} (\mathbb {R},+) @>{T_c}>> (\mathbb {R},+)\\ @V{\exp }V{\cong }V @VV{\exp }V\\ (\mathbb {R}_{>0},\times ) @>>{M_{e^c}}> (\mathbb {R}_{>0},\times ) \end {CD} \tag{20377}\end{equation}
commutes. Equivalently \(M_{e^c}=\exp \circ T_c\circ \exp ^{-1}\): the multiplication action of \((\mathbb {R}_{>0},\times )\) is the translation action of \((\mathbb {R},+)\) conjugated by \(\exp \), and
\begin{equation} \text {translation} \ \overset {\exp }{\longleftrightarrow }\ \text {multiplication} \ \overset {\ln }{\longleftrightarrow }\ \text {addition}. \tag{20378}\end{equation}

321.9 Translation is the exponential of the derivative

On polynomials the Taylor series is a finite sum, and

\begin{equation} \bigl (e^{aD}f\bigr )(x)=\sum _{n\ge 0}\frac {a^n}{n!}\,D^nf(x)=f(x+a), \tag{20379}\end{equation}
so \(T_a^{*}=e^{aD}\) acting on functions: the translation group is the exponential of its generator. Since translation preserves products,
\begin{equation} e^{aD}(fg)=\bigl (e^{aD}f\bigr )\bigl (e^{aD}g\bigr ), \tag{20380}\end{equation}
and differentiating at \(a=0\) gives \(D(fg)=Df\,g+f\,Dg\). Conversely, if \(D\) satisfies the Leibniz rule then \(D^n(fg)=\sum _k\binom nk D^kf\, D^{n-k}g\) and the exponential is multiplicative. Thus
\begin{equation} D\ \text {is a derivation} \iff e^{aD}\ \text {is an algebra automorphism}, \tag{20381}\end{equation}
and the Leibniz rule of Subsection 321.1 is the infinitesimal form of the statement that translations are automorphisms.

321.10 The chain

Step Statement Source
group \(\operatorname {Aut}(X)\subset \operatorname {End}(X)\) composition, inverses
translation \(T_a\circ T_b=T_{a+b}\) associativity, commutativity
regular representation \(\rho \) injective \(T_a(0)=a\)
exponential \(Df=f\), \(f(0)=1\) Leibniz and chain rules
unit \(f(0)=f(0)^2\) idempotent, \(\Pi ^2=\Pi \)
logarithm \(\ln =\exp ^{-1}\) homomorphism inverted
inversions \(a^{-1}\leftrightarrow -x\) \(\vartheta \)
correspondence \(\exp \circ T_c=M_{e^c}\circ \exp \) conjugation
generator \(T_a^{*}=e^{aD}\) Taylor on polynomials
\begin{equation} A=A \;\Longrightarrow \;\circ \;\Longrightarrow \;\operatorname {Aut}(X) \;\Longrightarrow \;T_a \;\Longrightarrow \;D \;\Longrightarrow \;\exp \;\Longrightarrow \;\ln \;\Longrightarrow \;\exp \circ T_c=M_{e^c}\circ \exp \;\Longrightarrow \;T_a^{*}=e^{aD}. \tag{20382}\end{equation}

Path 3: Homotopy type theory (\(\pi _1\)).

The identity type \(\Omega (A,a):=(a=a)\) carries a group structure:

\begin{equation} \mathrm {refl}_a:a=a,\qquad \mathrm {Id}_A(a,a),\qquad p:a=a,\quad q:a=a \;\Longrightarrow \; p\cdot q:a=a. \tag{20383}\end{equation}
The fundamental group:
\begin{equation} \Pi _1(A,a) = [\Omega (A,a)],\qquad [p]\cdot [q]=[p\cdot q],\qquad [p^{-1}]\cdot [p]=1. \tag{20384}\end{equation}
At \(A=S^1\):
\begin{equation} \Pi _1(S^1)\cong \mathbb {Z},\qquad n\leftrightarrow \gamma ^n,\qquad \gamma ^{m+n}=\gamma ^m\gamma ^n. \tag{20385}\end{equation}
The chain from \(a=a\) to the Leibniz rule:
\begin{equation} \Omega (A,a)\to \Pi _1(A,a)\to \mathbb {Z} \to (\mathbb {R},+)\to (\mathbb {R}_{>0},\times ). \tag{20386}\end{equation}

Group homomorphism \(\Rightarrow \) Lie algebra linearity.

For \(\phi :G\to H\) a group homomorphism with \(g=e^X\), \(h=e^Y\):

\begin{equation} \phi (g_1g_2)=\phi (g_1)\phi (g_2),\qquad [X,Y]=0\;\Longrightarrow \;\log (gh)=X+Y. \tag{20387}\end{equation}
Differentiating \(\phi \):
\begin{equation} D\phi (X+Y) = D\phi (X)+D\phi (Y),\qquad D\phi :\mathfrak {g}\to \mathfrak {h}\text { linear}. \tag{20388}\end{equation}
\begin{equation} \boxed {\phi (g_1g_2)=\phi (g_1)\phi (g_2) \;\Longrightarrow \; D\phi (X+Y)=D\phi (X)+D\phi (Y).} \tag{20389}\end{equation}
\begin{equation} \boxed {\log :(\mathbb {R}_{>0},\times )\cong (\mathbb {R},+).} \tag{20390}\end{equation}
\begin{equation} \boxed { \text {multiplicative law} \;\xrightarrow {\log }\; \text {additive law} \;\xrightarrow {D}\; \text {Leibniz rule.} } \tag{20391}\end{equation}

Complete chain.

\begin{equation} \boxed { a=a \;\Longrightarrow \; \mathrm {Id} \;\Longrightarrow \; \Omega \;\Longrightarrow \; \Pi _1 \;\Longrightarrow \; \text {group} \;\Longrightarrow \; \log \;\Longrightarrow \; D \;\Longrightarrow \; D(XY)=D(X)Y+XD(Y). } \tag{20392}\end{equation}

Remark 321.1 (Leibniz rule as \(A=A\)). The Leibniz rule \(D(XY)=D(X)Y+XD(Y)\) has two independent derivations from \(A=A\), both converging on the same formula:

(i)
Translation operator: \(T_h(XY)=(T_hX)(T_hY)\) is \(a=a\) applied to the product — the product of translated functions equals the translation of the product. Expanding to first order in \(h\) gives Leibniz.
(ii)
Logarithm: \(\log (XY)=\log X+\log Y\) converts multiplication to addition; differentiating gives \(D(XY)/XY=D(X)/X+D(Y)/Y\), which is Leibniz after multiplying by \(XY\).

The deeper origin is the group homomorphism \(\phi (g_1g_2)=\phi (g_1)\phi (g_2)\): differentiating gives \(D\phi (X+Y)=D\phi (X)+D\phi (Y)\) (Lie algebra linearity), and the Leibniz rule is the special case \(\phi =\mathrm {id}\), \(\log \circ \,\mathrm {mult}=\mathrm {add}\circ \,(\log \times \log )\). The homotopy path \(a=a\Rightarrow \Omega (A,a)\Rightarrow \Pi _1\Rightarrow \mathbb {Z} \Rightarrow (\mathbb {R},+)\Rightarrow (\mathbb {R}_{>0},\times )\) shows that the multiplicative structure of \(\mathbb {R}_{>0}\) traces back to the identity type \(a=a\) in homotopy type theory. Leibniz is \(A=A\) differentiated.