Project

General

Profile

Bug #1552

subst: not checking args properly

Added by John Abbott over 3 years ago. Updated over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
bug
Target version:
Start date:
13 Dec 2020
Due date:
% Done:

0%

Estimated time:
Spent time:

Description

The following shows that subst can behave wrongly:

use QQ[x];
f := x;
use ZZ/(2)[x];
subst(f,x,x+2); --> NO ERROR !?!?

The call to subst should produce an error because x belongs to a different ring from f.
For instance subst(f,x,x+1) does produce an error.

Rectify.

History

#1 Updated by John Abbott over 3 years ago

subst is defined in package misc.

The real problem appears to be in Subst2_top:
x+2 is evaluated in ZZ/(2)[x], so produces x; then Subst2_top cleverly removes "identity" substitutions without checking that they are for indets in the right ring.

#2 Updated by John Abbott over 2 years ago

  • Target version changed from CoCoA-5.4.0 to CoCoA-5.4.2

The impl is rather messy.
I suppose the bus is not so terribly bad: it has not (apparently) caused trouble, and the code works with correct inputs.

Postponing... since I'm hoping to get 5.3.4 out before too long (otherwise the release will slip to next year).

Also available in: Atom PDF