kill(all)$

maxima : programming : Implicit Sum (product with kron_delta) and linear functions,version 1.0
peter.vlasschaert@gmail.com,02/06/2022

ref :programming
maxima : programming : Implicit Sum (with kron_delta) and linear functions,version 1.0

sum ( product with kron_delta )
========================

1e: step → declare sum linear

properties(sum);

declare(sum,linear)$

properties(sum);

properties(product);

/*declare(product,linear)$*/

properties(product);

rem : construct (sum & product)
----------------------------------------

p1:sum(product(a(i,j),j,1,i),i,1,n);

p1a:subst([n=3],p1);

p1b:ev(p1a,nouns);

------------------------------------------------------------------

we will use : tellsimp or tellsimpafter, first : matchdeclare

2e:step ,→matchdeclare

p2s:matchdeclare ([ii, jj], symbolp);
p2v:matchdeclare ([ii0, jj0], all);

3e:step ,→ tellsimp, "see: ref , above"

tellsimp ('sum ('product(a(ii,jj)-kron_delta (ii, jj),jj,1,ii0), ii, ii0, ii1), 
    if jj=ii then 
    ii1- ii0 + 1
    else 
    if ii0 <= j and j <= ii1 then 
    1 
    else
    0);    

4e:step ,→ sum & (product & kron_delta)

n:3;

'sum (E (h (i, j)), i, 1, n);

foo : subst (E (h (i, j)) = 
   product(a(i,j)-kron_delta (i, j),j,1,i), %);

5e:step ,→ evaluation  (=kron_delta (i, j) ,when i=j )

ev(foo,nouns);

-----------------------------------------------------------------------------------