login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for #343 Bug in FreeAbelianGroup revision 5 of 5

1 2 3 4 5
Editor: japp
Time: 2008/10/16 11:21:36 GMT-7
Note:

changed:
-
-From japp Thu Oct 16 11:09:05 -0700 2008
-From: japp
-Date: Thu, 16 Oct 2008 11:09:05 -0700
-Subject: 
-Message-ID: <20081016110905-0700@axiom-wiki.newsynthesis.org>
-
-Status: fix proposed => fixed somewhere 
-
-
-From japp Thu Oct 16 11:21:13 -0700 2008
-From: japp
-Date: Thu, 16 Oct 2008 11:21:13 -0700
-Subject: 
-Message-ID: <20081016112113-0700@axiom-wiki.newsynthesis.org>
-
-Status: fixed somewhere => fix proposed 
-
 


Submitted by : (unknown) at: 2007-11-17T22:30:15-08:00 (17 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

The order in FreeAbelianGroup is broken and makes the domain unusable (e.g., comparison of Set FreeAbelianGroup S does not work properly) For example here is a cycle:

  ----------------------------------------
  Z2:=FreeAbelianGroup Symbol         

  a:= a::FreeAbelianGroup Symbol         
  b:= b::FreeAbelianGroup Symbol
  z:= 0::FreeAbelianGroup Symbol

  a < -b 
  -b < z
  z < a
  ----------------------------------------

thus a < -b < z < a

axiom
a:= a::FreeAbelianGroup Symbol

\label{eq1}a(1)
Type: FreeAbelianGroup(Symbol)
axiom
b:= b::FreeAbelianGroup Symbol

\label{eq2}b(2)
Type: FreeAbelianGroup(Symbol)
axiom
z:= 0::FreeAbelianGroup Symbol

\label{eq3}0(3)
Type: FreeAbelianGroup(Symbol)
axiom
(a < -b)::Boolean

\label{eq4} \mbox{\rm false} (4)
Type: Boolean
axiom
(-b < z)::Boolean

\label{eq5} \mbox{\rm true} (5)
Type: Boolean
axiom
(z < a)::Boolean

\label{eq6} \mbox{\rm true} (6)
Type: Boolean

proposed patch in the last few lines of free.spad:

  545,546c545,546
  <         ta.gen < tb.gen => true
  <         ta.gen > tb.gen => false
  ---
  >         ta.gen < tb.gen => tb.exp > 0
  >         ta.gen > tb.gen => ta.exp < 0

apparently revlex order is intended but is not achieved in the current implementation, as the sign of the trailing exponent is not taken into account.

Fixed in wh-sandbox Revision: 496 --kratt6, Mon, 09 Apr 2007 13:50:56 -0500 reply
Status: open => fix proposed

Fixed in OpenAxiom