#5242: [with patch, needs review] generic_power can now handle semi-groups
---------------------------+------------------------------------------------
 Reporter:  hivert         |        Owner:  tbd          
     Type:  enhancement    |       Status:  new          
 Priority:  major          |    Milestone:  sage-combinat
Component:  algebra        |   Resolution:               
 Keywords:  generic power  |  
---------------------------+------------------------------------------------
Old description:

> The former implementation of generic_power_c made two assumptions
>  - {{{not a}}} is well defined for any element a
>  - There is a one
> These two assumptions do not always always hold. So I reorganized the
> initial code which handle particular cases so that:
>  - it does not call "not a" when the exponent n is different from zero
>  - it delegates to ~a the responsability of raising an error when the
> exponent n is negative and a is not invertible. This allows for monoids
> with partialy defined inversion (e.g. the multiplicative monoid of
> Z/12Z).
>
> This modification revealed a problem in matrices: the empty matrix 0x0
> modulo 2 was tested to be non invertible! I changed the test to the
> correct value.
>
> Investigating this revealled many other inconsistencies with matrices;
> those will
> be taken care of in a subsequent patch.

New description:

 The former implementation of generic_power_c made two assumptions
  - {{{not a}}} is well defined for any element a
  - There is a one
 These two assumptions do not always always hold. So I reorganized the
 initial code which handle particular cases so that:
  - it does not call "not a" when the exponent n is different from zero
  - it delegates to ~a the responsibility of raising an error when the
 exponent n is negative and a is not invertible. This allows for monoids
 with partially defined inversion (e.g. the multiplicative monoid of
 Z/12Z).

 This modification revealed a problem in matrices: the empty matrix 0x0
 modulo 2 was tested to be non invertible! I changed the test to the
 correct value.

 Investigating this revealed many other inconsistencies with matrices;
 those will be taken care of in a subsequent patch.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5242#comment:2>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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