Skip to content

wedge

wedge(cochain_1, cochain_2)

Implements the wedge product between two Cochain objects.

Parameters:

Name Type Description Default
cochain_1 Cochain

The first Cochain to consider.

required
cochain_2 Cochain

The second Cochain to consider.

required

Returns:

Type Description
Cochain or None

The sought Cochain corresponding to the wedge product between the two inputs.

Notes
  • If the topological dimensions of the two provided Cochains sum up to a value above the topological dimension of the supporting complex, we return the null Cochain defined on the top simplices.
  • For now, the wedge operator is restricted to scalar-valued, primal Cochain only.
See also
  • Section 3.8 of Melvin Leok's Phd Thesis about the discretization of the Wedge product was seminal for the development of this operator.
Source code in src/dxtr/operators/wedge.py
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
def wedge(cochain_1:Cochain, cochain_2:Cochain) -> Optional[Cochain]:
    """Implements the wedge product between two `Cochain` objects.

    Parameters
    ----------
    cochain_1
        The first `Cochain` to consider.
    cochain_2
        The second `Cochain` to consider.

    Returns
    -------
    Cochain or None
        The sought `Cochain` corresponding to the wedge product between the 
        two inputs.

    Notes
    -----
      * If the topological dimensions of the two provided `Cochains` sum up to 
        a value above the topological dimension of the supporting complex, we
        return the null `Cochain` defined on the top simplices. 
      * For now, the wedge operator is restricted to scalar-valued, primal 
        `Cochain` only.

    See also
    --------
      * Section 3.8 of [Melvin Leok's Phd Thesis](https://thesis.library.caltech.edu/831/1/01_thesis_double_sided_mleok.pdf) 
      about the discretization of the Wedge product was seminal for the 
      development of this operator.

    """

    if not _are_valid(cochain_1, cochain_2): return None

    cplx = cochain_1.complex
    n, k, l = cplx.dim, cochain_1.dim, cochain_2.dim

    if k+l > n: 
        values = np.zeros(cplx[n].size)
    else:
        values = _wedge_coefficients(cochain_1, cochain_2)

    return Cochain(cplx, dim=min(k+l, n), values=values)