Opened 7 years ago

Last modified 5 years ago

#14125 new defect

module_morphism is too liberal on inverting

Reported by: darij Owned by: jason, was
Priority: minor Milestone: sage-6.4
Component: linear algebra Keywords: module morphism, inverse
Cc: sage-combinat Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:


Not saying this is an actual issue, since it seems to depend on bad user input.

Since I don't know how to reliably do function declarations in the console, I'm making a py file and then importing it:

PY file:

def diag_func(p):
      if len(p)==0: return 1
      else: return p[0]


sage: attach ../ #file quoted above
sage: X = CombinatorialFreeModule(ZZ, Partitions(), prefix='x'); x = X.basis();
sage: Y = CombinatorialFreeModule(ZZ, Partitions(), prefix='y'); y = Y.basis()
sage: xty = X.module_morphism(diagonal=diag_func, codomain=Y)
sage: ytx = ~xty                
sage: ytx(y[Partition([3,2,1])])
1/3*x[[3, 2, 1]]
sage: ytx(y[Partition([3,2,1])]).parent()
Free module generated by Partitions over Integer Ring

Since I'm working over ZZ, I'd have expected the "ytx(y[Partition([3,2,1])])" to throw an error, but definitely I'd have expected the parent to not be defined over ZZ.

Change History (4)

comment:1 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:2 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:3 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:4 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.