Opened 3 months ago

Closed 3 months ago

#30254 closed enhancement (fixed)

TensorFreeModule._an_element_: Create a default basis in the base module if necessary

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.2
Component: linear algebra Keywords:
Cc: egourgoulhon, tscrim, gh-mjungmath Merged in:
Authors: Matthias Koeppe Reviewers: Eric Gourgoulhon
Report Upstream: N/A Work issues:
Branch: eec19fd (Commits) Commit: eec19fd6d722ebc27f0f559b1d473f4409c09d72
Dependencies: Stopgaps:

Description

Likewise for ExtPowerFreeModule etc.

The current code creates an element without components if the base module has no default basis. Such elements are not useful for running the test suite because adding them gives a "no common basis" error.

That currently all tests work depends in a subtle way on the order in which modules are created.

In this ticket, we propose to change the _an_element_ method to create a default basis in the base module if none already exists -- this matches what FiniteRankFreeModule._an_element_ already does.

This will simplify further refactoring of the code, such as the identification of modules discussed in #30241.

Change History (7)

comment:1 Changed 3 months ago by mkoeppe

  • Branch set to u/mkoeppe/tensorfreemodule__an_element___create_a_default_basis_in_the_base_module_if_necessary

comment:2 Changed 3 months ago by git

  • Commit set to d2d7f425ee4a33c9030d9bc8b08228762e042886

Branch pushed to git repo; I updated commit sha1. New commits:

d2d7f42ExtPowerDualFreeModule._an_element_: Make sure a default basis is available

comment:3 Changed 3 months ago by git

  • Commit changed from d2d7f425ee4a33c9030d9bc8b08228762e042886 to eec19fd6d722ebc27f0f559b1d473f4409c09d72

Branch pushed to git repo; I updated commit sha1. New commits:

9e739e5FreeModuleLinearGroup._an_element_: Make sure a default basis is available
eec19fdTensorFreeModule._an_element_: Make sure a default basis is available

comment:4 Changed 3 months ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Status changed from new to needs_review

comment:5 Changed 3 months ago by egourgoulhon

  • Reviewers set to Eric Gourgoulhon
  • Status changed from needs_review to positive_review

Thanks for fixing this!

comment:6 Changed 3 months ago by mkoeppe

Thanks!

comment:7 Changed 3 months ago by vbraun

  • Branch changed from u/mkoeppe/tensorfreemodule__an_element___create_a_default_basis_in_the_base_module_if_necessary to eec19fd6d722ebc27f0f559b1d473f4409c09d72
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.