Opened 5 years ago

# Equality in quotient of a free algebra is broken — at Version 4

Reported by: Owned by: Thierry Monteil major sage-8.2 algebra mathexp2018 Alec Edgington, ​tscrim, ​SimonKing N/A

### Description (last modified by Thierry Monteil)

As reported in this ask question:

```sage: A.<x,y> = FreeAlgebra(QQbar)
sage: I = A.ideal([x*x - 1, y*y, x*y + y*x])
sage: I
Twosided Ideal (-1 + x^2, y^2, x*y + y*x) of Free Algebra on 2 generators (x, y) over Algebraic Field
sage: H = A.quotient(I)
sage: H
Quotient of Free Algebra on 2 generators (x, y) over Algebraic Field by the ideal (-1 + x^2, y^2, x*y + y*x)
sage: H.inject_variables()
Defining xbar, ybar
sage: xbar.lift()
x
sage: xbar*xbar
xbar^2
sage: xbar*xbar == 1
False
```

```sage: R.<x,y,z> = FreeAlgebra(QQ, 3)
sage: Q = R.quotient(z-x*y)
sage: Q
Quotient of Free Algebra on 3 generators (x, y, z) over Rational Field by the ideal (z - x*y)
sage: Q(x*y) == Q(z)
False
```

### comment:1 Changed 5 years ago by John Palmieri

Is this just a bug with equality, or is it a bug with elements of quotient algebras in general? I would hope that either `xbar * ybar` or `ybar * xbar` would be simplified, but neither is:

```sage: xbar*ybar
xbar*ybar
sage: ybar*xbar
ybar*xbar
```

As you might expect, `xbar * ybar + ybar * xbar` does not simplify to 0, either.

### comment:2 Changed 5 years ago by Thierry Monteil

I don't know about simplification, i did not dig into the code of `FreeAlgebra`. Sometimes Sage is lazy and shows simplified result only when it knows it already, so that representation does not cost possibly useless computation, e.g.

```sage: a = sqrt(QQbar(3))^2
sage: a
3.000000000000000?
sage: a == 3
True
sage: a
3
```

### comment:3 Changed 5 years ago by Alec Edgington

Cc: Alec Edgington added

### comment:4 Changed 4 years ago by Thierry Monteil

Cc: ​tscrim ​SimonKing added modified (diff) mathexp2018 added

This bug just reappeared at mathexp2018:

```sage: R.<x,y,z> = FreeAlgebra(QQ, 3)
sage: Q = R.quotient(z-x*y)
sage: Q
Quotient of Free Algebra on 3 generators (x, y, z) over Rational Field by the ideal (z - x*y)
sage: Q(x*y) == Q(z)
False
```
Note: See TracTickets for help on using tickets.