I am checking solutions of some field equations. The check requires at some point the calculation of something like sqrt(factorial(l)*factorial(l))-factorial(l) where l is a positive integer . Sage gives |l!| - l! rather than 0. It works for explicit values of l. I have also tried declaring l as a positive integer and using .canonicalize_radical() and .simplify_full() as shown in the code snippet below, which has some of the lines commented out. I'm using Sagemath 10.5 on a MacBook Pro with Sequoia 15.3.1
version() var('l') assume(l, 'integer') assume(l>0)
l = 273
x = sqrt(factorial(l)*factorial(l))-factorial(l)
y = x.expand().canonicalize_radical().simplify_full()
z = x.expand().simplify_full().canonicalize_radical()
pretty_print('x = \t', x) pretty_print('y = \t' ,y) pretty_print('z = \t', z)
How might I get round this issue, please?