#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 | 5fba412cef169dc7bbc1c32b7d254ab0bf185d4a
Branch: | Stopgaps:
public/tensor_modules-15916 |
Dependencies: |
-------------------------------------+-------------------------------------
Changes (by tscrim):
* status: needs_review => needs_work
* reviewer: => Travis Scrimshaw
Comment:
Okay, I've made a first pass of changes. So overall it looks really good,
but there's currently some issues that need addressing. Here's what I've
changed:
- Removed trailing whitespace.
- Corrected some indentations.
- Changed lowercase `repr` output into Uppercase.
- Added an `__eq__` method to `TensorWithIndices`.
- Fixed some doc formatting (there's a likely more to do on this). However
you have 2 conventions, {{{type-`(a,b)` tensor}}} and {{{type `(a,b)`
tensor}}} and IMO you should pick one and stick with it.
- Added `TestSuite` to all classes.
- Changed some `TypeError`'s to `ValueError`'s because the data type was
correct but the values within were not.
- Made `_an_element_` of the finite rank free module return an element
with a basis.
- Made the `__eq__` test of tensors check first by identity because it was
really annoying to me that `t == t` raised an error.
- Removed the `__hash__` and `__eq__` of `FiniteRankFreeModule` since
`UniqueRepresentation` takes care of it.
- Changed errors from `This is an error message.` to `this is an error
message` as I believe it more standard.
- Some other misc. changes on some doctests and things like `l != []` for
`not l` (it's marginally faster).
Some questions:
- Do we need the class `FormattedExpansion`? It doesn't seem to be used.
- Why do you have `_new_instance`, couldn't you use `__copy__`?
- Should we make the morphisms inherit from `Morphism` and/or have their
parents be some kind of `Homset`?
- Could we expand out some of the names, ex. `comp()` to `components()`
(perhaps with aliases for the short names)?
- I'm not too happy about the name `basis_change` as I would try
`change_of_basis` first, but within that method, could we also check
transitivity (there's a method which does this already, but I forget what
it's called)?
- 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`?
Some things to do:
- Implement a `_matrix_` method so (1,1)-tensors `t` can be passed as
`matrix(t)`.
- Fix all failures from the `TestSuite` or justify why we can skip certain
tests.
There will be more to do I think, but it probably won't be too major.
--
Ticket URL: <http://trac.sagemath.org/ticket/15916#comment:38>
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.