On Jun 09, Matthias Koeppe wrote:
SeeĀ [1]https://trac.sagemath.org/ticket/19448

With the patch in this ticket I find this:

sage: V = CombinatorialFreeModule(QQ, Partitions())
sage: M = V.submodule([V.an_element()])
sage: M.reduce(V.an_element())
0

so far so good.
sage: v = V([3,2,1]); v
B[[3, 2, 1]]
sage: M.reduce(v)
Traceback (most recent call last):
...
ValueError: tuple.index(x): x not in tuple

Without this patch but forcing the orders as in my previous e-mail this worked:

sage: P = Partitions()
sage: V = CombinatorialFreeModule(QQ, P)
sage: V._order = P.rank
sage: V._rank_basis = P.rank
sage: M = V.submodule([V.an_element()], already_echelonized=True)
sage: v = V([3,2,1]); v
B[[3,2,1]]
sage: M.reduce(v)
B[[3,2,1]]
sage: M.reduce(V.an_element())
0

So I suppose the quotient could be implemented in some cases. Is the above ValueError expected with this patch?

Best,
R.

On Tuesday, June 9, 2020 at 2:43:04 PM UTC-7, Reimundo Heluani wrote:

   I am trying to reuse the code already in place in combinat/freemodule and
   modules/with_basis/subquotients to construct a finite dimensional submodule
   of
   an infinite dimensional one. I think that there are places where the basis
   of
   the ambient space is assumed to be a list without needing it. The following
   is
   a minimal example of what I mean:

   sage: RPT = PartitionTuples(level=4)
   sage: V = CombinatorialFreeModule(QQ, RPT)
   sage: M = V.submodule([V.an_element()], already_echelonized=True)
   sage: M.lift(M.an_element())
   Traceback (most recent call last):
   ...
   NotImplementedError: cannot list an infinite set

   However this can be forced into working by simply:

   sage: V._rank_basis = RPT.rank
   sage: V._order = RPT.rank
   sage: M.lift(M.an_element())
   2*B[([], [], [], [])] + 6*B[([], [1], [], [])] + 2*B[([], [1], [2], [3])] +
   4*B[([1], [], [], [])]

   The exception is being raised because V._order is set to None and the first
   call to get_order simply forces it to be self.basis().keys().list() which
   fails on an infinite set.

   A call to set_order() would also fail, because it sets correctly
   self._order
   but then it calls rank_from_list on it to produce self._rank_basis.

   I haven't tested much but it seems that just setting these two orders
   correctly in the infinite set I can produce a working finite dimensional
   submodule without trouble. This must be something that has arisen before,
   so
   perhaps someone here can point me to some part of the library which deals
   with
   these situations?

   Best,

   R.


--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [2]sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit [3]https://groups.google.com/d/msgid/
sage-devel/1a6a6a07-99f7-4d42-8516-6ba212088ca1o%40googlegroups.com.

References:

[1] https://trac.sagemath.org/ticket/19448
[2] mailto:sage-devel+unsubscr...@googlegroups.com
[3] 
https://groups.google.com/d/msgid/sage-devel/1a6a6a07-99f7-4d42-8516-6ba212088ca1o%40googlegroups.com?utm_medium=email&utm_source=footer

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/20200612120724.GA777628%40vertex.

Attachment: signature.asc
Description: PGP signature

Reply via email to