On Tue, Mar 18, 2025 at 01:59:47PM +0100, 'Ralf Hemmecke' via FriCAS - computer algebra system wrote: > > In fact, I find it a bit strange that in the design of AN it was decided to > internally build on Kernel(Expression(INT)). Well, maybe it was not decided, > but just happened (for most of the cases), because many functions from > ExpressionSpace are just inherited from Rep:=Expression(INT).
It was natural to inherit representation and operations from Expression(Integer). But operations in Expression(Integer) produce kernels from Kernel(Expression(Integer)). Also, AlgebraicNumber has operations like norm and subst which take kernels as arguments. Those operations are defined in ExpressionSpace, so we make AlgebraicNumber into ExpressionSpace. Oops, now the kernels live in two caches :( There seem to be two possible ways to solve this. We have now ExpressionSpace2 which can express fact that kernels are not from Kernel(AlgebraicNumber), so we could declare that AlgebraicNumber is ExpressionSpace2(SomeNewKernel) and implement SomeNewKernel as Kernel(Expression(Integer)). Alternatively, we can give some new signatures to 'norm' and 'subst'. Actually, 'norm' could be declared in some Category and implemented in Expression. But trouble is that currently there in Kernel in signature of 'norm'. -- Waldek Hebisch -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/fricas-devel/Z9m-DZyhSFlqQdtG%40fricas.org.