Hey Amit,

I think I've found a (rather alarming) bug regarding Iwahori-Hecke algebras:
>

That is not true; you've found a very subtle behavior with matrices and 
coercion. There's nothing wrong with the Iwahori-Hecke algebra.

>
> sage: L.<q>=LaurentPolynomialRing(ZZ)
> sage: H=IwahoriHeckeAlgebra('A1',q^2)
> sage: T=H.T(); Cp=H.Cp()
> sage: T(q*Cp[1])
> T[1] + 1
> sage: M=MatrixSpace(H,1,1)
> sage: M(q)*M(Cp[1])
> [q*T[1]]
> sage: q*T[1]==T[1]+1
> False
>
> Briefly, sage does not appear to multiply in the Iwahori-Hecke algebra 
> correctly when doing matrix multiplication! This affects larger matrices 
> too. The bug goes away if everything is in the T() basis or in the Cp() 
> basis.
>
> This is likely a bug, but there's some subtleties going on. The first is 
that H is not an actual parent:

sage: H(q).parent()
Iwahori-Hecke algebra of type A1 in q^2,-1 over Univariate Laurent 
Polynomial Ring in q over Integer Ring in the T-basis

That is why I am hesitant to say that this is an honest bug.
There is also a cmp running around behind the scenes being called, which 
(at least in 7.5.beta2) is being deprecated:

sage: M(Cp(q)) * M(Cp[1])
/home/travis/sage-build/local/lib/python2.7/site-packages/sage/categories/
modules_with_basis.py:1647: DeprecationWarning: the 'cmp' keyword is 
deprecated, use 'key' instead
See http://trac.sagemath.org/21043 for details.
  return min_cmp(self.support(), *args, **kwds)
[T[1] + 1]

There is also an issue with what basis the elements are considered in and 
the coercions involved. The fact that the above output is being forced into 
the T basis is indicative of this. The short version is the matrix code was 
not designed to handle entries in a multiple realization parent like H. I'm 
glad that it is now working for non-Ring subclass parents (I believe my 
thank you goes to Jeroen for weakening type restrictions).

TL;DR Be explicit about what basis you want the entries of the matrix to be 
in.

Best,
Travis



-- 
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 post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to