Why is assume() so slow?
Declaring assumptions using assume()
takes an awful lot of time, e.g.:
var('a b c d e f g h i')
assume([(var1, 'real') for var1 in [a, b, c, d, e, f, g, h, i]])
The same applies to declaring variables with the domain
option, e.g. var('a', domain='positive')
.
See also https://cocalc.com/projects/34b4b62a-... for an example. Does anyone know why this takes so much time and/or how this could be made faster? Thanks a lot!
This should only take long the first time, because it starts up Maxima to handle assumptions. After that it wouldn't be slow, in principle.
Thanks, but it seems to take equally long every time. Actually, if I increase the number of variables, the time needed increases more than proportionally. I updated the above worksheet to illustrate this.
Hmm, that is weird. I can't answer further but hopefully someone else can!