Opened 14 years ago

Closed 14 years ago

# lpMult creates monomials that are not letterplace monomials

Reported by: Owned by: Simon King levandov major 3-1-2 and higher singular-lib-doc 3-1-1 lpMult, letterplace, distributivity levandov@…

### Description

I try to work in a free associative algebra using letterplace. Unfortunately, the law of distributivity does not hold when the letterplace algebra is equipped with the multiplication `lpMult`:

```> LIB "freegb.lib";
> ring r=0,(a,b),dp;
> def R = makeLetterplaceRing(5);
> setring R;
> poly p = a(1);
> poly q = b(1);
> poly p2 = lpPower(p,2);
> lpMult(p2+q,q)-lpMult(p2,q)-lpMult(q,q);
-b(1)*b(2)+b(1)*b(3)
```

Aparently, in the free associative algebra, one would expect that the result is zero.

If I understand the manual chapter 7.6.3, in order to have the free associative algebra, we need to thoroughly work with letterplace monomials, i.e., a monomial with places 1,2,3,...,m. But lpMult(p2+q,q) contains a monomial `b(1)*b(3)` that is not a letterplace monomial. Is that a bug?

### comment:1 follow-up:  2 Changed 14 years ago by Simon King

Is it perhaps assumed that we thoroughly work with homogeneous data? In the homogeneous case, the implementation of `lpMult` seems ok to me. But the documentation does not mention the need of homogeneous data, although the examples of `lpMult`, `lpPower` and `freeGBasis` all happen to be homogeneous.

### comment:2 in reply to:  1 Changed 14 years ago by Simon King

Is it perhaps assumed that we thoroughly work with homogeneous data? In the homogeneous case, the implementation of `lpMult` seems ok to me. But the documentation does not mention the need of homogeneous data, although the examples of `lpMult`, `lpPower` and `freeGBasis` all happen to be homogeneous.

Viktor Levandovskyy wrote me an e-mail, stating that my guess was correct: It is indeed assumed that all input is homogeneous.

So, one should add a check for homogeneity, and it should also be mentioned in the documentation (this is currently not the case - at least not in the documentation of `freeGBasis`, `lpMult` or `freegb.lib`).

### comment:3 Changed 14 years ago by Oleksandr

Component: dontKnow → singular-lib-doc changed from somebody to levandov

### comment:4 Changed 14 years ago by levandov

Hi, now it has been fixed by me. The problem was that we implicitly had the homogeneity assumptions; now it works fine for any input.
Besides, I have implemented a new procedure letplaceGBasis, which is user friendlier than both system("freegb",_) call and freeGBasis (which uses alternative presentation possibilities).

Last edited 14 years ago by levandov (previous) (diff)

### comment:5 Changed 14 years ago by levandov

Resolution: → fixed new → closed
Note: See TracTickets for help on using tickets.