Martin Baker wrote:
> 
> On 27/08/16 17:05, Waldek Hebisch wrote:
> > Martin, what gave you idea that cochain complex is obtained
> > by inverting matrices?  Chain complex requires that product
> > of two consequtive matrices is 0, so normally matrices
> > are noninvertible (some may be invertible, but this is an
> > exception).
> 
> I eventually worked that out (especially since the matrices are not even 
> square). I guess my thinking was that, to turn something into 
> cosomething, I need to reverse the arrows and, in this case the arrows 
> are linear maps, so I need to reverse the linear maps and since the 
> linear maps are represented by matrices I need to invert the matrix.
> 
> BTW I do remember writing something about inverting the matrix but I 
> can't find it now. It does not matter if its in this forum but if its in 
> the code then I should correct it.

'cochainComplex' in ChainComplex is doing this.  I think
that ATM it is best to delete this routine.  Of course
if you later work out working version, then we can re-add it.

> > You could obtain cochain complex by transposing matrices,
> > or more generally applying HOM functor with fixed second
> > argument, but that is not the only way to produce
> > cochain complexes.
> 
> How can I work with hom functors in FriCAS?
> 
> Let me take a very simple example of a cochain complex. Say we have a 
> simple electrical network consisting of resistors and batteries (a 
> discrete version Maxwells equations in Kurt s excellent tutorial).
>
> In the chain the nodes are represented by indexes:NNI in the Rep.

I am affraid that this example is misleading.  Insted let me
recall some basic linear algebra.  Given a vector space V
over field K the adjoint space V^* consists of K-linear
functions from V to K.  If V has basis S = {1, 2, ..., n} then
elements of V may be identified with functions from S to K:
when f : S -> K then vector corresponding to f is given
by the formula v = \sum f(i)e_i when e_i is i-th element of
the basis.  Now, how we can represnt elements of V^*?
In the same way!  Namely if phi is elemnts of V^*, then
we have

   phi(v) = phi(\sum f(i)e_i) = \sum f(i)\phi(e_i)

so, once \phi(e_i) are known phi is uniquely determined.
But mapping i -> \phi(e_i) is a mapping from S to K, and
it is easy to see that anu such mapping corresponds to
some phi.   So, if you work with fixed basis the distinction
between V and V^* is obscured, they look the same.

Now consider second vector space W, with basis T={1, 2, ..., m}
and a linear mapping A from V to W.  It is known that
any such mapping may be represented by a matrix.  Namely
let  m_ij be i-th coordinate of Ae_j, that is

  Ae_j = \sum_i m_ijw_i

where w_i is i-th basis vector in W.

Then for v = \sum_j f(j)e_j whe have

   Av = \sum_j f(j)Ae_j = \sum_j f(j)\sum_i m_ijw_i
      = \sum_i (\sum_j m_ij f(j))w_i

As you see coordinates of Av are given by matrix-vector
producat of m_ij and f.  Similarly, composition of
linear operators correspond to product of matrices.

Now, given psi in W^*, that is linear map from W to K
we can form composition of A with psi getting linear
map from V to K.  Explicitely, if

psi(\sum g(i)w(i)) = \sum g(i)psi(w_i)

and v = \sum_j f(j)e_j then

psi(Av) = psi(\sum_i (\sum_j m_ij f(j))w_i) =
        = \sum_j f_j(\sum_i m_ij psi(w_i))

so psi(Ae_j) = \sum_i m_ij psi(w_i).  This means that coordinates
of composition of psi with A are given by product of _transpose_
of m with coordinates of psi.  In other words composition
with A gives us linear map from W^* to V^* with matrix which
is transpose of matrix of A.  Now you see that replacing
V by V^* means that "arrow are inverted": mapping go in
opposite direction and corresponding matrices are given
by transpose of original matrices.

Concerning Hom: linear mappings are homomorphisms from
V to K, that is V^* = Hom(V, K).  If you replace K by
a ring R and V by a R-module M, then Hom(M, R) makes
sense.  If M is not free, then things get more compilcated,
but if M is a free module with finite basis than
calculations above remain valid: we can represent
linear mapping between finitely generated free modules
by matrices, Hom(M, R) is a finitely generated free
module and mapping between Hom(N, R) and Hom(M, R)
corresponding to mapping A : M -> N has matrix
which is transpose of matrix of A.

Note that mapping from M to N represents a somewhat
trivial complex, with two nodes and single arrow.
In general complex you have several nodes and arrows.
So for each node you have R-module (or a vector space)
and for each arrow you have a linear map.  Now,
replacing module M by Hom(M, R) and mapping from
M to N by compose mapping from Hom(N, R) to Hom(M, R)
has effect of "inverting arrows": new mappings
go in opposite direction.

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to