```python
# This is an implementation of simpilcial homology computation.
# Written around June 4, 2020.
```


```python
import itertools
import functools
import operator
import numpy as np
import pandas as pd
import sympy as sp
```


```python
def simplicial_complex(*args):
    result = set()
    for simplex in args:
        for d in range(len(simplex) + 1):
            result.update(tuple(sorted(e)) for e in itertools.combinations(simplex, d))
    return list(sorted(result, key=lambda simplex: (len(simplex), simplex)))
```


```python
def _delta_coeff(edge, simplex):
    for i in range(len(simplex)):
        if simplex[:i] + simplex[i + 1:] == edge:
            return (-1) ** i
    return 0

def delta(sc):
    if not sc:
        return np.empty(shape=(0, 0), dtype=int)
    res = [[_delta_coeff(sc[i], sc[j]) for j in range(len(sc))] for i in range(len(sc))]
    return np.array(res, dtype=int)
```


```python
m = delta(c)
```


```python
def _permutation_matrix(n, s, t):
    result = np.identity(n)
    result[[s, t]] = result[[t, s]]
    return result


def _addition_matrix(n, s, t, k):
    result = np.identity(n)
    result[s, t] = k
    return result


def _to_smith_normal_form(mat, i_s, j_s, a, b):
    n = len(mat)

    if not i_s.size or not j_s.size:
        return

    i0 = i_s[0]
    j0 = j_s[0]

    if np.count_nonzero(mat[np.ix_(i_s, j_s)]) == 0:
        return

    g = np.gcd.reduce(mat[np.ix_(i_s, j_s)], axis=None)
    for i, j in itertools.product(i_s, j_s):
        if mat[i, j] in {g, -g}:
            mat[:] = _permutation_matrix(n, i0, i) @ mat @ _permutation_matrix(n, j0, j)
            a[:] = a @ _permutation_matrix(n, i0, i)
            b[:] = _permutation_matrix(n, j0, j) @ b
            break
    else:
        raise NotImplementedError()
        

    for i in i_s[1:]:
        k = mat[i, j0] // mat[i0, j0]
        mat[:] = _addition_matrix(n, i, i0, -k) @ mat
        a[:] = a @ _addition_matrix(n, i, i0, k)

    for j in j_s[1:]:
        k = mat[i0, j] // mat[i0, j0]
        mat[:] = mat @ _addition_matrix(n, j0, j, -k)
        b[:] = _addition_matrix(n, j0, j, k) @ b

    _to_smith_normal_form(mat, i_s[1:], j_s[1:], a, b)


def smith_normal_form(matrix, minors=None):
    mat = np.copy(matrix)
    n = len(mat)

    if minors is None:
        minors = [(np.arange(n), np.arange(n))]
    else:
        minors = [(np.array(i_s), np.array(j_s)) for i_s, j_s in minors]

    a = np.identity(n, dtype=int)
    b = np.identity(n, dtype=int)

    for i_s, j_s in minors:
        _to_smith_normal_form(mat, i_s, j_s, a, b)
    assert (a @ mat @ b == matrix).all()
    return mat, a, b
    

def list_minors(sc):
    result = []
    if not sc:
        return result
    max_d = max(len(s) for s in sc) - 1
    for d in range(max_d, -1, -1):
        this_slice = [i for i in range(len(sc)) if len(sc[i]) == d + 1]
        prev_slice = [i for i in range(len(sc)) if len(sc[i]) == d]
        result.append((prev_slice, this_slice))
    return result

def inv(mat):
    return np.linalg.inv(mat).astype(int)


def delta_normal_form(sc):
    om = delta(sc)
    m = om
    n = len(m)
    minors = list_minors(sc)

    a = np.identity(n, dtype=int)
    b = np.identity(n, dtype=int)

    for minor in minors:
        m, a_1, b_1 = smith_normal_form(m, [minor])
        assert (a_1 @ b_1 == b_1 @ a_1).all()
        a = a @ a_1
        b = b_1 @ b
        assert (a @ m @ b == om).all()
        
        m = b_1 @ m @ a_1
        a = a @ inv(b_1)
        b = inv(a_1) @ b
        assert (a @ m @ b == om).all()
        # break
    return m, a, b


def repr_simplex(simplex):
    if not simplex:
        return sp.sympify(1)
    return sp.Symbol(''.join(simplex))


def repr_k_simplex(k, simplex):
    return k * simplex


def repr_chain(sc, chain):
    return sum(repr_k_simplex(k, repr_simplex(sc[i])) for i, k in enumerate(chain) if k != 0)


def format_basis(sc, basis):
    result = []
    for j, v in enumerate(basis.T):
        result.append(repr_chain(sc, v))
    return result


f = sp.Function("Factor")
ideal = sp.Function("Span")

def display_delta(sc):
    m, a, b = delta_normal_form(c)

    a_basis = format_basis(sc, a)
    b_basis = format_basis(sc, np.linalg.inv(b).astype(int))

    df = pd.DataFrame(m, index=a_basis, columns=b_basis)
    styled = df.style
    for minor in list_minors(sc):
        styled = styled.set_properties(**{'background-color': '#CCFFDD'}, subset=(df.iloc[minor].index, df.iloc[minor].T.index))
    display(styled)

    homo = []
    for col, chain in zip(m.T, b_basis):
        if np.count_nonzero(col) == 0:
            row = m[a_basis.index(chain)]
            k = max(row, key=lambda x: abs(x))
            if k not in {-1, 1}:
                homo.append(f(ideal(chain), k * ideal(chain)))
                
    display(functools.reduce(operator.mul, homo, sp.sympify(1)))

c = simplicial_complex({'a','b','d'}, {'b', 'c'}, {'c', 'd'}, {'e'})
# c = simplicial_complex(
#     {'0', '1', '2'},
#     {'0', '2', '4'},
#     {'1', '2', '5'},
#     {'0', '1', '3'},
#     {'2', '3', '4'},
#     {'2', '3', '5'},
#     {'1', '4', '5'},
#     {'1', '4', '3'},
#     {'0', '5', '4'},
#     {'0', '5', '3'},
# )
display_delta(c)
```


<style  type="text/css" >
    #T_1f471320_a692_11ea_9a5b_52007478f001row0_col1 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row0_col2 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row0_col3 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row0_col4 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row0_col5 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row1_col6 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row1_col7 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row1_col8 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row1_col9 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row1_col10 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row2_col6 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row2_col7 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row2_col8 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row2_col9 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row2_col10 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row3_col6 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row3_col7 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row3_col8 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row3_col9 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row3_col10 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row4_col6 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row4_col7 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row4_col8 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row4_col9 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row4_col10 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row5_col6 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row5_col7 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row5_col8 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row5_col9 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row5_col10 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row6_col11 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row7_col11 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row8_col11 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row9_col11 {
            background-color:  #CCFFDD;
        }    #T_1f471320_a692_11ea_9a5b_52007478f001row10_col11 {
            background-color:  #CCFFDD;
        }</style><table id="T_1f471320_a692_11ea_9a5b_52007478f001" ><thead>    <tr>        <th class="blank level0" ></th>        <th class="col_heading level0 col0" >1</th>        <th class="col_heading level0 col1" >d</th>        <th class="col_heading level0 col2" >b - c</th>        <th class="col_heading level0 col3" >c - d</th>        <th class="col_heading level0 col4" >a - d</th>        <th class="col_heading level0 col5" >-d + e</th>        <th class="col_heading level0 col6" >ad</th>        <th class="col_heading level0 col7" >bc</th>        <th class="col_heading level0 col8" >-bc + bd</th>        <th class="col_heading level0 col9" >ab - ad + bd</th>        <th class="col_heading level0 col10" >bc - bd + cd</th>        <th class="col_heading level0 col11" >abd</th>    </tr></thead><tbody>
                <tr>
                        <th id="T_1f471320_a692_11ea_9a5b_52007478f001level0_row0" class="row_heading level0 row0" >1</th>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row0_col0" class="data row0 col0" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row0_col1" class="data row0 col1" >1</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row0_col2" class="data row0 col2" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row0_col3" class="data row0 col3" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row0_col4" class="data row0 col4" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row0_col5" class="data row0 col5" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row0_col6" class="data row0 col6" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row0_col7" class="data row0 col7" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row0_col8" class="data row0 col8" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row0_col9" class="data row0 col9" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row0_col10" class="data row0 col10" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row0_col11" class="data row0 col11" >0</td>
            </tr>
            <tr>
                        <th id="T_1f471320_a692_11ea_9a5b_52007478f001level0_row1" class="row_heading level0 row1" >d</th>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row1_col0" class="data row1 col0" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row1_col1" class="data row1 col1" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row1_col2" class="data row1 col2" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row1_col3" class="data row1 col3" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row1_col4" class="data row1 col4" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row1_col5" class="data row1 col5" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row1_col6" class="data row1 col6" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row1_col7" class="data row1 col7" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row1_col8" class="data row1 col8" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row1_col9" class="data row1 col9" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row1_col10" class="data row1 col10" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row1_col11" class="data row1 col11" >0</td>
            </tr>
            <tr>
                        <th id="T_1f471320_a692_11ea_9a5b_52007478f001level0_row2" class="row_heading level0 row2" >b - c</th>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row2_col0" class="data row2 col0" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row2_col1" class="data row2 col1" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row2_col2" class="data row2 col2" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row2_col3" class="data row2 col3" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row2_col4" class="data row2 col4" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row2_col5" class="data row2 col5" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row2_col6" class="data row2 col6" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row2_col7" class="data row2 col7" >-1</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row2_col8" class="data row2 col8" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row2_col9" class="data row2 col9" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row2_col10" class="data row2 col10" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row2_col11" class="data row2 col11" >0</td>
            </tr>
            <tr>
                        <th id="T_1f471320_a692_11ea_9a5b_52007478f001level0_row3" class="row_heading level0 row3" >c - d</th>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row3_col0" class="data row3 col0" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row3_col1" class="data row3 col1" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row3_col2" class="data row3 col2" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row3_col3" class="data row3 col3" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row3_col4" class="data row3 col4" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row3_col5" class="data row3 col5" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row3_col6" class="data row3 col6" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row3_col7" class="data row3 col7" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row3_col8" class="data row3 col8" >-1</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row3_col9" class="data row3 col9" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row3_col10" class="data row3 col10" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row3_col11" class="data row3 col11" >0</td>
            </tr>
            <tr>
                        <th id="T_1f471320_a692_11ea_9a5b_52007478f001level0_row4" class="row_heading level0 row4" >a - d</th>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row4_col0" class="data row4 col0" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row4_col1" class="data row4 col1" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row4_col2" class="data row4 col2" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row4_col3" class="data row4 col3" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row4_col4" class="data row4 col4" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row4_col5" class="data row4 col5" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row4_col6" class="data row4 col6" >-1</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row4_col7" class="data row4 col7" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row4_col8" class="data row4 col8" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row4_col9" class="data row4 col9" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row4_col10" class="data row4 col10" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row4_col11" class="data row4 col11" >0</td>
            </tr>
            <tr>
                        <th id="T_1f471320_a692_11ea_9a5b_52007478f001level0_row5" class="row_heading level0 row5" >-d + e</th>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row5_col0" class="data row5 col0" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row5_col1" class="data row5 col1" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row5_col2" class="data row5 col2" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row5_col3" class="data row5 col3" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row5_col4" class="data row5 col4" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row5_col5" class="data row5 col5" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row5_col6" class="data row5 col6" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row5_col7" class="data row5 col7" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row5_col8" class="data row5 col8" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row5_col9" class="data row5 col9" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row5_col10" class="data row5 col10" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row5_col11" class="data row5 col11" >0</td>
            </tr>
            <tr>
                        <th id="T_1f471320_a692_11ea_9a5b_52007478f001level0_row6" class="row_heading level0 row6" >ad</th>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row6_col0" class="data row6 col0" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row6_col1" class="data row6 col1" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row6_col2" class="data row6 col2" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row6_col3" class="data row6 col3" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row6_col4" class="data row6 col4" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row6_col5" class="data row6 col5" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row6_col6" class="data row6 col6" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row6_col7" class="data row6 col7" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row6_col8" class="data row6 col8" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row6_col9" class="data row6 col9" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row6_col10" class="data row6 col10" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row6_col11" class="data row6 col11" >0</td>
            </tr>
            <tr>
                        <th id="T_1f471320_a692_11ea_9a5b_52007478f001level0_row7" class="row_heading level0 row7" >bc</th>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row7_col0" class="data row7 col0" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row7_col1" class="data row7 col1" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row7_col2" class="data row7 col2" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row7_col3" class="data row7 col3" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row7_col4" class="data row7 col4" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row7_col5" class="data row7 col5" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row7_col6" class="data row7 col6" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row7_col7" class="data row7 col7" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row7_col8" class="data row7 col8" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row7_col9" class="data row7 col9" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row7_col10" class="data row7 col10" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row7_col11" class="data row7 col11" >0</td>
            </tr>
            <tr>
                        <th id="T_1f471320_a692_11ea_9a5b_52007478f001level0_row8" class="row_heading level0 row8" >-bc + bd</th>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row8_col0" class="data row8 col0" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row8_col1" class="data row8 col1" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row8_col2" class="data row8 col2" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row8_col3" class="data row8 col3" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row8_col4" class="data row8 col4" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row8_col5" class="data row8 col5" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row8_col6" class="data row8 col6" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row8_col7" class="data row8 col7" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row8_col8" class="data row8 col8" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row8_col9" class="data row8 col9" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row8_col10" class="data row8 col10" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row8_col11" class="data row8 col11" >0</td>
            </tr>
            <tr>
                        <th id="T_1f471320_a692_11ea_9a5b_52007478f001level0_row9" class="row_heading level0 row9" >ab - ad + bd</th>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row9_col0" class="data row9 col0" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row9_col1" class="data row9 col1" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row9_col2" class="data row9 col2" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row9_col3" class="data row9 col3" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row9_col4" class="data row9 col4" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row9_col5" class="data row9 col5" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row9_col6" class="data row9 col6" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row9_col7" class="data row9 col7" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row9_col8" class="data row9 col8" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row9_col9" class="data row9 col9" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row9_col10" class="data row9 col10" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row9_col11" class="data row9 col11" >1</td>
            </tr>
            <tr>
                        <th id="T_1f471320_a692_11ea_9a5b_52007478f001level0_row10" class="row_heading level0 row10" >bc - bd + cd</th>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row10_col0" class="data row10 col0" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row10_col1" class="data row10 col1" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row10_col2" class="data row10 col2" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row10_col3" class="data row10 col3" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row10_col4" class="data row10 col4" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row10_col5" class="data row10 col5" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row10_col6" class="data row10 col6" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row10_col7" class="data row10 col7" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row10_col8" class="data row10 col8" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row10_col9" class="data row10 col9" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row10_col10" class="data row10 col10" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row10_col11" class="data row10 col11" >0</td>
            </tr>
            <tr>
                        <th id="T_1f471320_a692_11ea_9a5b_52007478f001level0_row11" class="row_heading level0 row11" >abd</th>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row11_col0" class="data row11 col0" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row11_col1" class="data row11 col1" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row11_col2" class="data row11 col2" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row11_col3" class="data row11 col3" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row11_col4" class="data row11 col4" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row11_col5" class="data row11 col5" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row11_col6" class="data row11 col6" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row11_col7" class="data row11 col7" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row11_col8" class="data row11 col8" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row11_col9" class="data row11 col9" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row11_col10" class="data row11 col10" >0</td>
                        <td id="T_1f471320_a692_11ea_9a5b_52007478f001row11_col11" class="data row11 col11" >0</td>
            </tr>
    </tbody></table>



$\displaystyle \operatorname{Factor}{\left(\operatorname{Span}{\left(- d + e \right)},0 \right)} \operatorname{Factor}{\left(\operatorname{Span}{\left(bc - bd + cd \right)},0 \right)}$


84eae95c162a44ab538d317596ad918281ca66b5
ipynb
Jupyter Notebook
notebooks/homology.ipynb
tekhnus/misc
cf4c6e29434c546e3c29f24f7bb16a0ac65005f5
Unlicense
notebooks/homology.ipynb
tekhnus/misc
cf4c6e29434c546e3c29f24f7bb16a0ac65005f5
Unlicense
notebooks/homology.ipynb
tekhnus/misc
cf4c6e29434c546e3c29f24f7bb16a0ac65005f5
Unlicense
Qwen/Qwen-72B
1. YES
2. YES