The cochain algebra \((A_{PL})_{n}\)

First, consider the free graded commutative algebra \(\bigwedge(t_0,\dots,t_n,y_0,\dots,y_n)\), where the generators \(t_i\) have degree \(0\), and the generators \(y_j\) have degree \(1\). The differential \(d\) is given by

\[\begin{split}\begin{array}{rcl} d(t_i) &=& y_i, \\ d(y_j) &=& 0. \end{array}\end{split}\]

The cochain algebra \((A_{PL})_{n}\) is defined as the quotient:

\[(A_{PL})_n:=\frac{\bigwedge(t_0,\dots,t_n,y_0,\dots,y_n)}{\langle\sum {t_i}-1,\sum{y_j}\rangle}.\]

The implementation of this algebra has been made taking into account that this algebra is equivalent to the exterior algebra \(Ext_y=\frac{\bigwedge(y_0,\dots,y_n)}{\langle\sum{y_j}\rangle}\) with coefficients in the polynomial ring \(R_t:=\frac{\mathbb{Q}[t_0,\dots,t_n]}{\langle\sum {t_i}-1\rangle}\):

\[(A_{PL})_n:=R_t \otimes Ext_y.\]

For that reason, \(R_t\) is considered the base_ring of \((A_{PL})_n\).

Note

Notice that this algebra is actually isomorphic to \(\bigwedge(t_1,\ldots,t_n,y_1,\ldots,y_n)\). That is, the relations allow us to express \(t_0\) in terms of \(t_1,\ldots, t_n\) and \(y_0\) in terms of \(y_1,\ldots, y_n\). After eliminating \(t_0,y_0\), the expression of each element is unique. However, it is sometimes more convenient to use also \(t_0,y_0\) to write certain formulas, so we will use one expression or the other depending on the context.

AUTHORS:

  • Carlos Alquézar (2026-05-01): initial version

class AplN(*args: Any, **kwargs: Any)[source]

Bases: ExteriorAlgebra, UniqueRepresentation, CachedRepresentation

The Algebra of polynomial differential forms.

INPUT:

  • n – dimension

  • labels – (optional, default: t_i, y_i); labels of the generators

EXAMPLES:

sage: A = AplN(5)
sage: A
The Commutative Differential Graded Algebra (A_{PL})_{5} defined as
the  tensor product of the Polynomial Ring QQ<t_{0},...,t_{5}> with
the Exterior Algebra generated by QQ<y_{0},...,y_{5}>.

The degrees of the generators are:

    deg(t_i)=0
    deg(y_j)=1

The differential 'd' is defined as:

    d(t_i)=y_i
    d(y_j)=0

sage: A.inject_variables()
Defining y0, y1, y2, y3, y4, y5
sage: R = A.base_ring()
sage: R.inject_variables()
Defining t0, t1, t2, t3, t4, t5
sage: p = t1*y2*y3 + t0**2*y4*y5
sage: p
t1*y2*y3 + t0^2*y4*y5

EXAMPLES:

A = AplN(5)
A.inject_variables()
R = A.base_ring()
R.inject_variables()
p = t1*y2*y3 + t0**2*y4*y5

labs = ('t2','t5','t6','y2','y5','y6')
A = AplN(n=2,labels=labs)
R = A.base_ring()
A.inject_variables()
R.inject_variables()
extended_basis(deg_y, deg_t=1, cum=False)

Considering self as a graded module, this method returns the module basis of degree deg_y with polynomial coefficients truncated by degree deg_t.

INPUT:

  • deg_y – integer ; degree of the graded module of self.

  • deg_t – integer (default: 1); coefficient's degree

  • cum – boolean (default: False); If True, the basis takes into account

    polynomial coefficients up to degree deg_t. Otherwise, the method returns the basis with homogeneous coefficients of degree deg_t.

OUTPUT: tuple of monomials of self; module generators of exterior degree deg_y.

EXAMPLES:

sage: A = AplN(2)
sage: A.extended_basis(deg_y=1,deg_t=1,cum=False)
[t0*y0, t0*y1, t0*y2, t1*y0, t1*y1, t1*y2, t2*y0, t2*y1, t2*y2]
sage: A.extended_basis(deg_y=1,deg_t=1,cum=True)
[t0*y0, t0*y1, t0*y2, t1*y0, t1*y1, t1*y2, t2*y0, t2*y1, t2*y2, y0, y1, y2]

EXAMPLES:

A = AplN(2)
A.extended_basis(deg_y=1,deg_t=1,cum=False)
A.extended_basis(deg_y=1,deg_t=1,cum=True)
extended_graded_module(deg_y, deg_t=1, cum=False)

Return the extended graded module of self of degree deg_y with coefficients in the polynomial ring \(\mathbb{Q}[t_0,\dots,t_n]\).

INPUT:

  • deg_y – integer; degree of the graded module of self.

  • deg_t – integer (default: 1); coefficient's degree.

  • cum – boolean (default: False); If True, the basis takes into account

polynomial coefficients up to degree deg_t. Otherwise, the method returns the basis with homogeneous coefficients of degree deg_t.

OUTPUT: a CombinatorialFreeModule with coefficient in the base_ring of self.

EXAMPLES:

sage: A = AplN(2)
sage: A.extended_graded_module(deg_y=1,deg_t=1,cum=True)
Free module generated by {'t0y0', 't0y1', 't0y2', 't1y0', 't1y1', 't1y2', 't2y0', 't2y1', 't2y2', 'y0',
'y1', 'y2'} over Multivariate Polynomial Ring in t0, t1, t2 over Rational Field
graded_module_endomorphism(yi, deg)

Return the reduction matrix of the variable yi as a linear endomorphism of the graded vector space of degree deg.

INPUT:

  • yi – integer;

  • deg – integer;

OUTPUT: sparse matrix;

EXAMPLES:

sage: A = AplN(3)
sage: list(A.basis(2))
[y0*y1, y0*y2, y0*y3, y1*y2, y1*y3, y2*y3]
sage: list(A.reduced_exterior_basis(yi=0, deg=2))
[y1*y2 + y1*y3, -y1*y2 + y2*y3, -y1*y3 - y2*y3, y1*y2, y1*y3, y2*y3]
sage: A._graded_face_matrix(yi=0,deg=2)
[ 1 -1  0  1  0  0]
[ 1  0 -1  0  1  0]
[ 0  1 -1  0  0  1]
reduced_exterior_basis(yi, deg)

Returns the exterior basis of the homogeneous graded module of degree deg after applying the relation \(y_i = -\sum_{j \neq i} y_j\).

INPUT:

  • yi – integer; the index of the exterior algebra generator

  • deg – integer; the degree of the graded module

OUTPUT: tuple of non-negative integers;

EXAMPLES:

sage: A = AplN(4)
sage: list(A.basis(1))
[y0, y1, y2, y3, y4]
sage: A.reduced_exterior_basis(yi=2, deg=1)
(y0, y1, -y0 - y1 - y3 - y4, y3, y4)
whitney_form()

Returns the elementary volume form (also called constant volume form) of self. The Whitney volume form on \((A_{PL})_n\) if a differential form of degree n defined as:

\[\omega_n = n! \cdot \sum_{k=0}^{n} (-1)^k t_{0} \cdot y_{0} \wedge \cdots \wedge \hat{y}_{k} \wedge \cdots \wedge y_{n}\]

OUTPUT: a differential form of degree n;

EXAMPLES:

sage: A = AplN(4)
sage: A.whitney_form()
24*t4*y0*y1*y2*y3 - 24*t3*y0*y1*y2*y4 + 24*t2*y0*y1*y3*y4 - 24*t1*y0*y2*y3*y4 + 24*t0*y1*y2*y3*y4
sage: _.reduce(0)
24*y1*y2*y3*y4
class Element(*args: Any, **kwargs: Any)[source]

Bases: Element

A polynomial differential form.

differential()

Return the differential of self.

For the \(q\)–form \(\omega \in (A_{PL})^q_n\):

\[\omega = p(\overline{t}) \;y_{j_0} \wedge\cdots\wedge y_{j_{q-1}}\]

the differential \(d: (A_{PL})^q_n \rightarrow (A_{PL})^{q+1}_n\) is defined as

\[d (\omega) = \sum_{j=0}^{n} \frac{\partial p(\overline{t})}{\partial t_j}y_{j}\wedge y_{i_0}\wedge\cdots\wedge y_{j_{q-1}}\]

where \(p(\overline{t}) \in \mathbb{Q}[t_0,\dots,t_n]\).

Let \(\omega,\theta \in (A_{PL})_n\). Then, the differential has the properties:

  • \(d \circ d = 0\),

  • \(d(\omega \wedge \theta ) = d(\omega) \wedge \theta + (-1)^{|\omega|} \omega \wedge d (\theta)\).

OUTPUT: a differential \((q+1)\) –form.

EXAMPLES:

sage: A = AplN(5)
sage: R = A.base_ring()
sage: A.inject_variables()
Defining y0, y1, y2, y3, y4, y5
sage: R.inject_variables()
Defining t0, t1, t2, t3, t4, t5
sage: p = t0*t2*y2*y3
sage: p.differential()
t2*y0*y2*y3

sage: A = AplN(5)
sage: R = A.base_ring()
sage: A.inject_variables()
Defining y0, y1, y2, y3, y4, y5
sage: R.inject_variables()
Defining t0, t1, t2, t3, t4, t5
sage: w = (t1*t2+t3**2)*y2*y3
sage: theta = t0*y4
sage: w.degree()
2
sage: w.differential()*theta+((-1)**2)*w*theta.differential() == (w*theta).differential()
True
sage: w.differential()
t2*y1*y2*y3
sage: w.differential().differential()
0

EXAMPLES:

A = AplN(5)
R = A.base_ring()
A.inject_variables()
R.inject_variables()
p = t0*t2*y2*y3
p.differential()

A = AplN(5)
R = A.base_ring()
A.inject_variables()
R.inject_variables()
w = (t1*t2+t3**2)*y2*y3
theta = t0*y4
w.degree()
w.differential()*theta+((-1)**2)*w*theta.differential() == (w*theta).differential()
w.differential()
w.differential().differential()
dif()

Alias for :meth`self.differential`

dup(i)

Alias for dupont_operator()

dupont_operator(i)

This method implements the Dupont's operator \(h_n^i: (A_{PL})^{*}_{n} \rightarrow (A_{PL})^{*-1}_{n}\) for the standard \(\Delta^n\)-simplex as it is described in [CG08] (see also [Dup76]).

Let \(\mathbb{K}\) be a field of characteristic \(0\) and let \(\Delta^n\) be the standard \(n\)-simplex. Also, let

\[A_{PL}(\Delta^n) := \{A^p_{PL}(\Delta^n)\}_{p \geq 0},\]

be the algebra of polynomial differential forms defined on \(\Delta^n\), where

\[A^p_{PL}(\Delta^n) := \{ \sigma: \Delta^n \rightarrow (A_{PL})^p_n\}\]

Notice that we can consider \(\Delta^n\) as a set with only one element so, in this case

\[A_{PL}(\Delta^n) \cong (A_{PL})_n.\]

In fact, the motivation for the construction of \((A_{PL})_n\) was precisely to model locally the algebra of polynomial differential forms on simplices and, at the same time, construct a global structure satisfying the geometrical, topological and algebraic constraints. For the same reason, being \(C^*(\Delta^n)\) the simplicial cochain complex of \(\Delta^n\), we have:

\[ C^p(\Delta^n)=\Biggl\{\begin{array}{cll} \mathbb{K}, &if \;\; p=n \\ 0, & otherwise & \end{array} \]

Let \(\int_n\) be the de Rham map (see [Dup76, FelixHT01, Whi57]):

\[\int_n: (A_{PL})_n \rightarrow \mathbb{K}\]

For a subset \(I = \{i_0,\dots,i_p\} \subseteq \{0,\dots,n\}\), with \(0 \leq i_0 < \cdots < i_p \leq n\), the Whitney map (see [LK21, Whi57])

\[\mathcal{W}^I_n: \mathbb{K} \rightarrow (A_{PL})^p_n\]

is defined as:

\[\mathcal{W}^I_n(c) = c \cdot \sum_{j=0}^{p} (-1)^j t_{i_j} y_{i_0} \wedge \cdots \wedge \hat{y_{i_j}} \wedge \cdots \wedge y_{i_p}\]

where \(\hat{}\) means the term is omitted. The elements in the image of \(\mathcal{W}\) are called the elementary differential forms or just Whitney forms.

For a generic simplicial set \(S\), and following the work of Hassler Whitney (see [Whi57]), Dupont (see [Dup76]) constructed an explicit simplicial contraction of the commutative differential graded algebra of polynomial differential forms \(A_{PL}(S)\) to \(C^*(S)\) compatible with the intrinsic affine structure of the polynomial differential forms (affine relations) and also with the wedge product of forms (up to homotopy).

This method implements step by step the description of the contraction given by Cheng et al. (see [CG08]) for the case of \(\Delta^n\) (for the case of a general simplicial set go to dupont_contraction()), with minor notation adaptations for the sake of maintain coherence with the rest of the code.

The description given by Cheng et al. is as follows:

Let \(\omega \in (A_{PL})_n\). For each vertex \(e_i\) of the \(n\)-simplex \(\Delta^n\), define the dilation map

\[\phi_i : [0,1] \times \Delta^n \to \Delta^n\]

by the formula

\[\phi_i(u,t_0, \dots, t_n) = ((1-u)t_0,\dots,(1-u)t_i+u,\dots,(1-u)t_n) .\]

Let

\[(\pi_i){}_*:A^*_{PL}([0,1]\times\Delta^n) \rightarrow (A_{PL})^{*-1}_n\]

be integration over the first factor.

The operator \(h_n^i\):

\[h_n^i : (A_{PL})^{*}_n \rightarrow (A_{PL})^{*-1}_n\]

is defined by the formula

\[h_n^i\omega = (\pi_i)_* \phi_i^* \omega.\]

where \(\phi_i^* \omega\) is the pullback of \(\omega\) respect to \(\phi_i\).

Let

\[\epsilon_n^i: A^*_{PL}(\Delta^n) \rightarrow \mathbb{K}\]

be evaluation at the vertex \(e_i\). The Poincar'e Lemma states that

\[\mathbb{1}_{A} - \epsilon_n^i = d \circ h_n^i + h_n^i \circ d .\]

See also

_dupont_operator()

integral()

INPUT:

  • p – an element of self.

  • i – integer; the vertex index to apply the operator

OUTPUT: an element of self;

EXAMPLES:

sage: A = AplN(4)
sage: R = A.base_ring()
sage: A.inject_variables()
Defining y0, y1, y2, y3, y4
sage: R.inject_variables()
Defining t0, t1, t2, t3, t4
sage: w = t0*y1*y3
sage: w.dup(0).dif()
-1/3*t3*y0*y1 + 1/3*t1*y0*y3 + (2/3*t0 + 1/3)*y1*y3
sage: w.dif().dup(0)
1/3*t3*y0*y1 - 1/3*t1*y0*y3 + (1/3*t0 - 1/3)*y1*y3
sage: w.dup(0).dif()+w.dif().dup(0) == w
True
homogeneous_components()

Return the homogeneous components of self.

OUTPUT: a dictionary indexed by degree.

EXAMPLES:

sage: A = AplN(5)
sage: R = A.base_ring()
sage: A.inject_variables()
Defining y0, y1, y2, y3, y4, y5
sage: R.inject_variables()
Defining t0, t1, t2, t3, t4, t5
sage: p = t0*t2*y2*y3
sage: p = t0*t2*y2*y3 + y1
sage: p.homogeneous_components()
{1: y1, 2: t0*t2*y2*y3}
integral(yi=0)

Returns the integral of self, defined as follows:

Let \(\int_{n}\) be the linear map:

\[\int_{n}: (A_{PL})_{n}^{n} \rightarrow \mathbb{Q}\]

by setting

\begin{split} \int_{n}t_1^{k_1}\dots t_n^{k_n}dt_1 \wedge \dots \wedge dt_n &= \int_{0}^{1} dt_1\int_{0}^{1-t_1} dt_2 \dots\\ &\dots \int_{0}^{1-\sum\limits_{1}^{n-1}t_i}t_1^{k_1}\dots t_n^{k_n}dt_n = \\ &= \frac{k_1!k_2! \dots k_n!}{(k_1+ \dots +k_n+n)!}. \end{split}

This map represents the integration \(\int_{\Delta^n}\omega\) of an n-form \(\omega \in (A_{PL})^n_n\) over the standard n-simplex \(\Delta^n\). For homogeneous elements \(\theta \in A_{PL}(p_n)\) with \(n\neq p\), the integral is set to zero. Then, the map is extended to all \((A_{PL})\) by linearity.

INPUT:

  • yi – integer (optional, default: 0); variable to reduce

self before integration

OUTPUT: a rational number;

EXAMPLES:

The integral of the Whitney form:

sage: A = AplN(4)
sage: w = A.whitney_form()
sage: w
24*t4*y0*y1*y2*y3 - 24*t3*y0*y1*y2*y4 + 24*t2*y0*y1*y3*y4 - 24*t1*y0*y2*y3*y4 + 24*t0*y1*y2*y3*y4
sage: w.integral()
1

The integral of a generic form of maximum degree:

sage: A = AplN(4)
sage: R = A.base_ring()
sage: A.inject_variables()
Defining y0, y1, y2, y3, y4
sage: R.inject_variables()
Defining t0, t1, t2, t3, t4
sage: theta = (t1**2-1)*A.whitney_form()
sage: theta
(24*t1^2*t4 - 24*t4)*y0*y1*y2*y3 + (-24*t1^2*t3 + 24*t3)*y0*y1*y2*y4 + (24*t1^2*t2 - 24*t2)*y0*y1*y3*y4 + (-24*t1^3 + 24*t1)*y0*y2*y3*y4 + (24*t0*t1^2 - 24*t0)*y1*y2*y3*y4
sage: theta.reduce(0)
(24*t1^2 - 24)*y1*y2*y3*y4
sage: theta.integral()
-14/15
sage: (factorial(4)*2)/factorial(2+4)
1/15
sage: (factorial(4)*2)/factorial(2+4)-1
-14/15

The integral of an element of degree lower than the dimension of self.parent():

sage: A = AplN(4)
sage: R = A.base_ring()
sage: A.inject_variables()
Defining y0, y1, y2, y3, y4
sage: R.inject_variables()
Defining t0, t1, t2, t3, t4
sage: theta = t1*y0
sage: theta.integral()
0

The integral of a non-homogeneous element:

sage: A = AplN(4)
sage: R = A.base_ring()
sage: A.inject_variables()
Defining y0, y1, y2, y3, y4
sage: R.inject_variables()
Defining t0, t1, t2, t3, t4
sage: theta = t1*y0 + y1*y2
sage: theta.integral()
0
sage: theta = t1*y0 + y1*y2 + A.whitney_form()
sage: theta.integral()
1
koszul()

Return the koszul differential of self.

For the \(q\)–form \(\omega \in (A_{PL})^q_n\):

\[\omega = p(\overline{t}) \;y_{j_0} \wedge\cdots\wedge y_{j_{q-1}}\]

the koszul differential \(\kappa: (A_{PL})^q_n \rightarrow (A_{PL})^{q-1}_n\) is defined as

\[\kappa (\omega) = p(\overline{t}) \sum_{j=0}^{q-1}(-1)^{j}t_{i_j}y_{i_0}\wedge\cdots\wedge\hat{y_{i_j}}\wedge\cdots\wedge y_{j_{q-1}}\]

where \(p(\overline{t}) \in \mathbb{Q}[t_0,\dots,t_n]\).

Let \(\omega,\theta \in (A_{PL})_n\), and \(\omega\) defined as before such that \(q=|\omega|\), and \(r=|p(\overline{t})|\). Then, the koszul differential has the properties:

  • \(\kappa \circ \kappa = 0\),

  • \((\kappa \circ d)(\omega) + (d \circ \kappa)(\omega) = (r+q)\omega\),

  • \(\kappa(\omega \wedge \theta ) = \kappa(\omega) \wedge \theta + (-1)^{|\omega|} \omega \wedge \kappa (\theta)\).

OUTPUT: a differential \((q-1)\) –form.

EXAMPLES:

This example illustrates the relation between the cochain differential and koszul differential:

sage: A = AplN(3)
sage: R = A.base_ring()
sage: A.inject_variables()
Defining
y0, y1, y2, y3
sage: R.inject_variables()
Defining
t0, t1, t2, t3
sage: p = t0 * t2 * y2 * y3
sage: p
t0*t2*y2*y3
sage: p.koszul().differential()+p.differential().koszul()
4*t0*t2*y2*y3
sage: (p.differential().koszul()+p.koszul().differential()).reduce(0) == (2+2)*p.reduce(0)
True

This example illustrates the koszul differential of a wedge of forms:

sage: A = AplN(4)
sage: R = A.base_ring()
sage: A.inject_variables()
Defining y0, y1, y2, y3, y4
sage: R.inject_variables()
Defining t0, t1, t2, t3, t4
sage: p = t1*y2
sage: q = t2*y3*y4
sage: print(p.koszul()*q+((-1)**p.degree())*p*q.koszul().reduce(0) == (p*q).koszul().reduce(0))
True
sage: print(p.koszul().differential()+ p.differential().koszul() == (1+1)*p)
True
sage: print(q.koszul().differential()+ q.differential().koszul() == (1+2)*q)
True
reduce(var_idx, label_ref=False)

Return the reduction of self by the relations:

  • \(t_i = 1-\sum_{j \neq i} t_j\),

  • \(y_i = -\sum_{j \neq i} y_j\).

INPUT:

  • var_idx – (integer or str). The index or the label of the variable to be reduced.

  • label_ref – boolean (default: False); If True, var_idx is considered as a string.

OUTPUT: an element of self.parent()

EXAMPLES:

sage: A = AplN(5)
sage: R = A.base_ring()
sage: A.inject_variables()
Defining y0, y1, y2, y3, y4, y5
sage: R.inject_variables()
Defining t0, t1, t2, t3, t4, t5
sage: theta = t0*y4
sage: theta.reduce(0)
(-t1 - t2 - t3 - t4 - t5 + 1)*y4
sage: theta = t1*y0
sage: theta.reduce(0)
-t1*y1 - t1*y2 - t1*y3 - t1*y4 - t1*y5