#10963: More functorial constructions
-------------------------------------+-------------------------------------
       Reporter:  nthiery            |        Owner:  stumpc5
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.1
      Component:  categories         |   Resolution:
       Keywords:  days54             |    Merged in:
        Authors:  Nicolas M. Thiéry  |    Reviewers:  Simon King, Frédéric
Report Upstream:  N/A                |  Chapoton
         Branch:                     |  Work issues:
  public/ticket/10963                |       Commit:
   Dependencies:  #11224, #8327,     |  dbb17b11bb9e8f94b5d9d3424cd34c5efc82564c
  #10193, #12895, #14516, #14722,    |     Stopgaps:
  #13589, #14471, #15069, #15094,    |
  #11688, #13394, #15150, #15506     |
-------------------------------------+-------------------------------------

Comment (by nthiery):

 Replying to [comment:331 nbruin]:
 > Replying to [comment:330 nthiery]:
 > Right. I was expecting something like that. The fact that each has to
 refer to the other is suspicious to me. What is the scenario that makes
 this absolutely necessary to be there right from the start? Wouldn't it be
 possible for there to be only one link? Perhaps when that link is actually
 exercised the other one can be put in place.
 >
 > My default reaction would be that !FiniteDimensionalAlgebras needs to
 know about Algebras because it needs to inherit the properties of
 Algebras, but is it absolutely necessary for Algebras to know about a
 !FiniteDimensional version, even before it is instantiated? In general I
 expect the !LazyImport to be a bad sign. !LazyImports have trouble getting
 resolved in the first place. In fact, in the traceback that Volker
 produced, you can see there are is a !LazyImport involved in the deep
 recursion, so I suspect that the !LazyImport in this case indeed does not
 get cleared properly.
 >

 > My default would be that `FiniteDimensionalAlgebras` only registers
 itself with `Algebras` when it gets instantiated, if that is necessary at
 all. That requires finding a solution for `Algebras().FiniteDimensional()`
 (is that how you call it?) when that happens before
 `FiniteDimensionalAlgebras` gets imported. Does that happen at all? If so,
 what's the scenario? Perhaps we can solve that scenario.

 As pointed by Simon, {{{Algebras().FiniteDimensional()}}} is usually
 the default scenario. And it was an important design goal for me that
 importing Algebras did not trigger the import of all its axiom
 subcategories, because there can be many. For example, with my
 upcoming patch on semigroups, I would not want that importing
 semigroups (which is done at startup time) would trigger the import of
 the categories of respectively LTrivial, RTrivial, JTrivial, DTrivial,
 HTrivial, and Band semigroups, and their finite variants, since those
 are only relevant to a small public.

 The reverse scenario (where FiniteDimensionalAlgebras is called first)
 is not as important but still is a nice and natural feature. One would
 not usually think of using {{{DivisionRings().Commutative()}}} for
 {{{Fields()}}} :-)

 We could think of FiniteDimensionalAlgebras triggering the import of
 Algebra, with some magic to put in place the link in
 FiniteDimensionalAlgebras from that in Algebra. But it sounds to me
 that this logic would be somewhat more complicated (searching through
 the code to get the link) and not necessarily more robust than the
 current name mangling.

 Cheers,
                            Nicolas

--
Ticket URL: <http://trac.sagemath.org/ticket/10963#comment:337>
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/groups/opt_out.

Reply via email to