  E. Sk\"oldberg's Morse Theory from an Algebraic Viewpoint and M.
J\"ollenbeck's Algebraic Discrete Morse Theory and Applications to Commutative
Algebra, which is the algebraic generalization of R. Forman's discrete Morse
Theory for Cell Complexes, is discussed in the context of general chain
complexes of free modules.
  Using this, we compute the Chevalley-Eilenberg (co)homology of the Lie
algebra of all triangular matrices $\frak{sol}_n$ over $\mathbb{Q}$ or
$\mathbb{Z}_p$ for large enough prime $p$. We determine the column and row in
the table of $H_k(\frak{sol}_n;\mathbb{Z})$ where the $p$-torsion first
appears. Every $\mathbb{Z}_{p^k}$ appears as a direct summand of some
$H_k(\frak{sol}_n;\mathbb{Z})$. Module $H_k(\frak{sol}_n;\mathbb{Z}_p)$ is
expressed by the homology of a chain subcomplex for the Lie algebra of all
strictly triangular matrices $\frak{nil}_n$, using the K\"unneth formula. All
conclusions are accompanied by computer experiments.
  Then we generalize some results to the more general Lie algebras of
(strictly) triangular matrices $\frak{gl}_n^\prec$ and $\frak{gl}_n^\preceq$
with respect to any partial ordering $\preceq$ on $[n]$. Furthermore, the
matchings used can be analogously defined for other Lie algebra families and
are useful for theoretical as well as computational purposes.
