<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def crispness(alpha, T, right_eigenvectors, square_map, pi):
 """Return the crispness PCCA+ objective function. Parameters alpha : ndarray Parameters of objective function (e.g. flattened A) T : csr sparse matrix Transition matrix right_eigenvectors : ndarray The right eigenvectors. square_map : ndarray Mapping from square indices (i,j) to flat indices (k). pi : ndarray Equilibrium Populations of transition matrix. Returns ------- obj : float The objective function Notes ------- Tries to make crisp state decompostion. This function is defined in [3]. """


    A, chi, mapping = calculate_fuzzy_chi(alpha, square_map,
                                          right_eigenvectors)

    # If current point is infeasible or leads to degenerate lumping.
    if (len(np.unique(mapping)) != right_eigenvectors.shape[1] or
            has_constraint_violation(A, right_eigenvectors)):
        return -1.0 * np.inf

    obj = tr(dot(diag(1. / A[0]), dot(A.transpose(), A)))

    return obj