#12811: (reduced) norm of quaternion ideals is broken
-----------------------+----------------------------------------------------
   Reporter:  daniels  |             Owner:  AlexGhitza       
       Type:  defect   |            Status:  new              
   Priority:  major    |         Milestone:  sage-5.0         
  Component:  algebra  |          Keywords:  quaternion, ideal
Work issues:           |   Report Upstream:  N/A              
  Reviewers:           |           Authors:                   
  Merged in:           |      Dependencies:                   
   Stopgaps:           |  
-----------------------+----------------------------------------------------
 1.) The norm of an ideal in quaternion algebra is off by a factor of 2

 {{{
 sage: A.<i,j,k> = QuaternionAlgebra(-1,-1)
 sage: I = A.ideal([i,j,k,1/2 + 1/2*i + 1/2*j + 1/2*k])      # this is
 actually an order, so has reduced norm 1
 sage: I.left_order()
 sage: I.norm()
 2
 }}}

 The reason is that the norm is computed from d(I)=n(I)^2^  d(R) where R is
 the left- or right-order of I and d(I) = \sqrt{ abs{det(tr(x_i
 \conj{x_j}))} } for a ZZ-basis (x_i) of I. But the matrix returned by
 gram_matrix() that is actually used in the computation has as entries
 2*tr(x_i \conj{x_j}), thus the determinant is off by a factor of 16 and
 the resulting reduced norm off by a factor of 2

 2.) Omitting the line 'I.left_order()' in the previous example gives a
 RuntimeError:
 {{{
 sage: A.<i,j,k> = QuaternionAlgebra(-1,-1)
 sage: I = A.ideal([i,j,k,1/2 + 1/2*i + 1/2*j + 1/2*k])
 sage: I.norm()
 ---------------------------------------------------------------------------
 RuntimeError                              Traceback (most recent call
 last)

 /home/daniel/<ipython console> in <module>()

 /opt/sage-4.8-linux-64bit-
 ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python2.6/site-
 packages/sage/algebras/quatalg/quaternion_algebra.pyc in norm(self)
    1973         assert r.is_square(), "first is bad!"
    1974         r = r.sqrt()
 -> 1975         r/= self.quaternion_order().discriminant()
    1976         assert r.is_square(), "second is bad!"
    1977         return r.sqrt()

 /opt/sage-4.8-linux-64bit-
 ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python2.6/site-
 packages/sage/algebras/quatalg/quaternion_algebra.pyc in
 quaternion_order(self)
    1692             A = self.__right_order
    1693         else:
 -> 1694             raise RuntimeError, "unable to determine quaternion
 order of ideal without known order"
    1695         self.__quaternion_order = A
    1696         return A

 RuntimeError: unable to determine quaternion order of ideal without known
 order
 }}}

 This is because neither the left- nor the right-order of I have been
 computed at this point. There is however no mathematical reason why this
 should fail.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12811>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to