(extended comment)
probably you want to use min_symbolic
: the top-level min function that you are calling refers to Python's built-in min
(which is ok for numeric values).
in this case i get:
sage: var('i, k, la, lb')
(i, k, la, lb)
sage: sum(i, i, 0, min_symbolic(k-1, la+lb))
1/2*min(k - 1, la + lb)^2 + 1/2*min(k - 1, la + lb)
(of course you could have just substituted in $n(n+1)/2$ for $n=\text{min_symbolic}(k-1, la+lb)$).
PS: it's in the reference manual as Symbolic Maximum and Minimum, and there is some work on updating that section in ticket #11258.
probably you want to use
min_symbolic
: the top-levelmin
function that you are calling refers to Python's built-in min (which is ok for numeric values).Want to add that as an answer?