farahamirah

10 Reputation

One Badge

9 years, 271 days

MaplePrimes Activity


These are questions asked by farahamirah

Hi, I want to ask. the maple program that i have done have something wrong somewhere.

for an example changes basis

 from e_{1}e_{1}=e_{1} , e_{1}e_{2}=e_{2} maple program reading :A1 : (1,1,1)=1,B1: (1,2,2)=1

to e_{2}e_{2}=e_{2} , e_{2}e_{1}=e_{1} maple program reading :A2: (2,2,2)=1,B2: (2,1,1)=1

these changes basis above are 2 operation, left product and right product

A1 and A2 are left product, while B1 and B2 are right product,

i need to make A1 isomorphic to A2, and B1 isomorphic to B2.

by using maple program, i should get identity in matrix form 2x2

[0 1] but i get [0         1]

[1 0],            [C_{21} 0],

For isomorphism, the determinant should not be zero

here's are my maple program:

>isom := proc (A1, A2, B1, B2, n)

local i, j, k, s, r, eqns, t, TEST, BChange, sols, m, S1, S2, C;

C := matrix(n, n);

BChange := matrix(n, n);

TEST := 0; eqns := {};

for i to n do for j to n do for m to n do

S1 := sum(A1[i, j, k]*C[k, m], k = 1 .. n); S2 := sum(C[i, r]*(sum(A2[r, s, m]*C[j, s], s = 1 .. n)), r = 1 .. n);

eqns := `union`(eqns, {S1 = S2})

end do end do end do;

for i to n do for j to n do for m to n do

S1 := sum(B1[i, j, k]*C[k, m], k = 1 .. n); S2 := sum(C[i, r]*(sum(C[j, s]*B2[r, s, m], s = 1 .. n)), r = 1 .. n);

eqns := `union`(eqns, {S1 = S2})

end do end do end do;

sols := [solve(eqns)];

t := nops(sols);

for i to t do for j to n do for k to n do

BChange[k, j] := subs(sols[i], C[k, j])

end do end do;

if simplify(linalg:-det(BChange)) <> 0 then print("BChange", BChange);

print("s1", S1); print("s2", S2); print("The det is", simplify(linalg:-det(BChange)));

TEST := 1 end if end do;

if TEST = 0 then print("These two algebras are not isomorphic")

end if end proc

input maple program:

> DENDA1 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 1) = 1]);
> DENDB1 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 2, 2) = 1]);
> DENDA2 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(2, 2, 2) = 1]);
> DENDB2 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(2, 1, 1) = 1]);
> isom(DENDA1, DENDA2, DENDB1, DENDB2, 2);

I want to compute delta but i do not want to show result for delta. i know i need to put 
delta := unassign('delta');
but i do not know where to put, i try and error so many times but the answer still the same. 
the answer should be in marix form 2x2 
[-δD11   0    ]
[0         D22]



>derivation := proc (A, n)
local i, j, k, t, s1, m, D, sols, eqns, BChange, delta; eqns := {}; D := matrix(n, n); BChange := matrix(n, n);
for i to n do
for j to n do
for m to n do
s1 := sum(0*A[i, j, k]*D[m, k], k = 1 .. n)-(sum(A[k, j, m]*D[k, i]+delta*A[i, k, m]*D[k, j], k = 1 .. n));
eqns := `union`(eqns, {s1})
end do
end do
end do;
sols := [solve(eqns)];
delta := unassign('delta');
t := nops(sols);
for i to t do
for j to n do
for k to n do
BChange[k, j] := subs(sols[i], D[k, j])
end do
end do;
print("BChange:=", BChange)
end do
end proc

> AS1 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 2) = 1]);
> derivation(AS1, 2);

I want to ask., I put delta as my constant in maple program and I want the answer are in delta as well., but the thing is., when running., it let delta=0, delta=-1, and delta=delta.,
the condition is we cannot let delta=1 or delta=0 because it is just same for s5 and s7.,.(delta is refer to the s8). How can I get answer as delta? with the condition? here I attach my maple programme..

 

> derivation := proc (A, n)
local i, j, k, t, s5, s7, s8, m, D,
sols5, sols7, sols8, eqns5, eqns7, eqns8,
BChange5, BChange7, BChange8; eqns5 := {}; eqns7 := {}; eqns8 := {};
D := matrix(n, n);
BChange5 := matrix(n, n); BChange7 := matrix(n, n); BChange8 := matrix(n, n);
for i to n do for j to n do for m to n do
s5 := sum(0*A[i, j, k]*D[m, k], k = 1 .. n)-(sum(A[k, j, m]*D[k, i]+A[i, k, m]*D[k, j], k = 1 .. n));
s7 := sum(0*A[i, j, k]*D[m, k], k = 1 .. n)-(sum(A[k, j, m]*D[k, i]+0*A[i, k, m]*D[k, j], k = 1 .. n));
s8 := sum(0*A[i, j, k]*D[m, k], k = 1 .. n)-(sum(A[k, j, m]*D[k, i]+delta*A[i, k, m]*D[k, j], k = 1 .. n));
eqns5 := `union`(eqns5, {s5}); eqns7 := `union`(eqns7, {s7}); eqns8 := `union`(eqns8, {s8})
end do end do end do;
sols5 := [solve(eqns5)]; sols7 := [solve(eqns7)]; sols8 := [solve(eqns8)];
t := nops(sols5); t := nops(sols7); t := nops(sols8);
for i to t do for j to n do for k to n do
BChange5[k, j] := subs(sols5[i], D[k, j]);
BChange7[k, j] := subs(sols7[i], D[k, j]);
BChange8[k, j] := subs(sols8[i], D[k, j])
end do end do;
print("eqns&Assign;", eqns5); print("sols:=", sols5); print("BChange5:=", BChange5);
print("eqns&Assign;", eqns7); print("sols:=", sols7); print("BChange8:=", BChange7);
print("eqns&Assign;", eqns8); print("sols:=", sols8); print("BChange8:=", BChange8)
end do end proc;

> AS1 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 2) = 1]);
> derivation(AS1, 2);

> AS2 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 1) = 1, (1, 2, 2) = 1]);
> derivation(AS2, 2);

> AS3 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 1) = 1, (2, 1, 2) = 1]);
> derivation(AS3, 2);

> AS4 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 1) = 1, (2, 2, 2) = 1]);
> derivation(AS4, 2);

> AS5 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 1) = 1, (1, 2, 2) = 1, (2, 1, 2) = 1]);
> derivation(AS5, 2);

> AS1 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 3, 2) = 1, (3, 1, 2) = 1]);
> derivation(AS1, 3);

> AS2 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 3, 2) = 1, (3, 1, 2) = alpha]);
> derivation(AS2, 3);

> AS3 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 1, 2) = 1, (1, 2, 3) = 1, (2, 1, 3) = 1]);
> derivation(AS3, 3);

> AS4 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 3, 2) = 1, (2, 3, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS4, 3);

> AS5 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(2, 3, 2) = 1, (3, 1, 1) = 1, (3, 3, 3) = 1]);
> derivation(AS5, 3);

> AS6 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(3, 1, 2) = 1, (3, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS6, 3);

> AS7 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 2, 1) = 1, (2, 2, 2) = 1, (3, 1, 1) = 1, (3, 3, 3) = 1]);
> derivation(AS7, 3);

> AS8 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 3, 1) = 1, (2, 3, 2) = 1, (3, 1, 1) = 1, (3, 3, 3) = 1]);
> derivation(AS8, 3);

> AS9 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(2, 3, 2) = 1, (3, 1, 1) = 1, (3, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS9, 3);

> AS10 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 3, 1) = 1, (2, 3, 2) = 1, (3, 1, 1) = 1, (3, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS10, 3);

> AS11 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 3, 2) = 1, (2, 3, 2) = 1, (3, 1, 2) = 1, (3, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS11, 3);

> AS12 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 1, 2) = 1, (1, 3, 1) = 1, (2, 3, 2) = 1, (3, 1, 1) = 1, (3, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS12, 3);

> AS13 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 1, 1) = 1, (2, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS13, 3);

> AS14 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 2, 1) = 1, (2, 1, 1) = 1, (2, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS14, 3);

> AS15 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 2, 1) = 1, (2, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS15, 3);

> AS16 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(2, 1, 1) = 1, (2, 2, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS16, 3);

> AS17 := array(sparse, 1 .. 3, 1 .. 3, 1 .. 3, [(1, 1, 2) = 1, (3, 3, 3) = 1]);
> derivation(AS17, 3);
>

Hi, currently im using maple 15

the coding did work but it is not the same with the answer
here, i attach the coding with the answer

coding:
derivation := proc (A, n)
local i, j, k, t, s1, s2, m, D, sols, eqns, Andre;
eqns := {};
D := matrix(n, n);
Andre := matrix(n, n);
for i to n-1 do
for j from i+1 to n do
for m to n do
s1 := sum(A[i, j, k]*D[m, k], k = 1 .. n);
s2 := sum(A[k, j, m]*D[k, i]+A[i, k, m]*D[k, j], k = 1 .. n);
eqns := `union`(eqns, {s1 = s2})
end do end do end do;
sols := [solve(eqns)];
t := nops(sols);
for i to t do
for j to n do
for k to n do
Andre[k, j] := subs(sols[i], D[k, j])
end do end do;
print(Andre)
end do end proc

the maple result showing:

> AS1 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 2) = 1]);

> derivation(AS1, 2);
[D11 0]
[D21 D22]

> AS2 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 1) = 1, (1, 2, 2) = 1]);
> derivation(AS2, 2);
[0 D12]
[D21 D22]

the maple should showing

> derivation(AS1, 2);
[D11 0]
[D21 2D11]

> AS2 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 1) = 1, (1, 2, 2) = 1]);
> derivation(AS2, 2);
[0 0]
[D21 D22]

please help., thank you

i have to compute lie algebra condition by using maple 15, but currently i have code in maple 5.,

i already try to run in maple 15 but it say 'error,unable to match delimeters'
i try to find error, but i cant find it..
the coding are here...

check[lie]:=proc(A,n)

local  i,j,k,l,m;  

for i from 1 by 1 to n do

for j from 1 by 1 to n do  

for k  from 1 by 1 to n do    

if A[i,i,k]<>0 then  

RETURN ('Input is NOT a Lie algebra (',i,i,k,')=',A[i,i,k], 'is not zero');  

elif A[i,j,k]+A[j,i,k]<>0 then  

RETURN ('Input is NOT a Lie algebra,(',i,j,k,')+(',j,i,k,')=',A[i,j,k]+A[j,i,k],'is not zero');  

else  

for 1 from 1 by 1 to n do

if  

simplify(sum(A[i,j,m]*A[m,l,k]+A[j,l,m]*A[m,i,k]+A[l,i,m]*A[m,j,k],   m=1..n))<>0  

then  

RETURN('Input is NOT a Lie algebra---the Jac(',i,j,l,') is not zero');    

fi;  

od;  

fi;  

od;  

od;  

od;  

print('Yes,input IS a Lie algebra');  

end:

can anyone help me here? Thank You..

Here, i attached the result in printscreen

Page 1 of 1