#15916: Tensors on free modules of finite rank
-------------------------------------+-------------------------------------
       Reporter:  egourgoulhon       |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.4
      Component:  linear algebra     |   Resolution:
       Keywords:  free module,       |    Merged in:
  tensor, tensor product             |    Reviewers:  Travis Scrimshaw
        Authors:  Eric Gourgoulhon,  |  Work issues:
  Michal Bejger                      |       Commit:
Report Upstream:  N/A                |  6e53a8d3c92d405541e2a21dff5a867d402937e6
         Branch:                     |     Stopgaps:
  public/tensor_modules-15916        |
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by egourgoulhon):

 Replying to [comment:38 tscrim]:
 >
 > Some questions:
 >
 > - Do we need the class `FormattedExpansion`? It doesn't seem to be used.

 Yes, we need it: it is used by the method `view()` of classes
 `FreeModuleTensor` and `FreeModuleAltForm`, to have a nice output, either
 text formatted or LaTeX formatted (notebook).

 > - Why do you have `_new_instance`, couldn't you use `__copy__`?

 Actually `_new_instance` is not performing a copy: it simply creates an
 instance of the same type and same general characteristics (e.g. tensor
 type), but leave it empty (i.e. it does not perform any copy of stored
 data, like components).

 > - Should we make the morphisms inherit from `Morphism` and/or have their
 parents be some kind of `Homset`?

 This is done in the new commit. It introduces free module homomorphisms,
 via
 - the parent class `FreeModuleHomset` (subclass of
 `sage.categories.homset.Homset`)
 - the element class `FiniteRankFreeModuleMorphism` (subclass of
   `sage.categories.morphism.Morphism`)
 Coercions to/from type-(1,1) tensors have been introduced as well.


 > - Could we expand out some of the names, ex. `comp()` to `components()`
 (perhaps with aliases for the short names)?

 This is done in the new commit, with `comp()` as an alias to
 `components()` (since it is really usefull to have a short name to access
 to components).

 > - I'm not too happy about the name `basis_change` as I would try
 `change_of_basis` first,

 Yes, you are right: `change_of_basis` is a better name. The change has
 been performed in the new commit.

 > but within that method, could we also check transitivity (there's a
 method which does this already, but I forget what it's called)?

 Not done yet. Note however that transitivity is implemented in the method
 `FreeModuleTensor.common_basis()`.

 > - In Sage, the `view` function outputs as a pdf. So the name of the
 `view()` method is confusing to me. Do you think we could change the name
 to something else like `expand`?

 We thought quite a lot about the name of this method; here we really need
 a short name, because it is used very often in interactive mode
 (notebook). The idea is to display tensors in a nice human readable form,
 but not to change their state, which something like `expand` might
 suggest. `display` was too long. An alternative was `show` but we
 eliminated it because in Sage it is used for graphic outputs. So the short
 name that we ended with was `view`. We may also wonder why `view` should
 be reserved for pdf output. Wouldn't `view_pdf` or `make_pdf` be more
 suggestive ?
 >
 > Some things to do:
 >
 > - Implement a `_matrix_` method so (1,1)-tensors `t` can be passed as
 `matrix(t)`.

 This is done in the new commit, but on components instead of tensors
 (indeed, constructing a matrix from a tensor would have required an extra
 argument: the basis, to define which components are used). So currently,
 if `t` is a type-(1,1) tensor and `e` is a module basis, we have
 `matrix(t.components(e))` yielding a matrix of base ring elements
 representing the components of `t` w.r.t. basis `e`.


 > - Fix all failures from the `TestSuite` or justify why we can skip
 certain tests.

 Done. Some fixes consisted in initializing the objects (e.g. by setting
 some components) prior to the !TestSuite. Note that `_test_category` had
 to be skipped when constructing the object by a direct call to `__init__`,
 since the correct construction must be performed by a call to
 `parent().element_class`. In the latter case, `_test_category` passed.

--
Ticket URL: <http://trac.sagemath.org/ticket/15916#comment:41>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" 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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to