witri

64 Reputation

2 Badges

18 years, 180 days

MaplePrimes Activity


These are replies submitted by witri

I've use your new programme but the result not same as yours, why?. I'm use Maple 11.

> isom := proc (A, B) local C, c, e, i, j, k, l, n, p, r, s; n := Size(A, 1); if Size(B, 1) <> n then return Typesetting:-mtext("These two algebras have different dimensions.") end if; C := Matrix(n, symbol = c); s := remove*(attributes, map(proc (x) options operator, arrow; setattribute(x, Determinant(x) = 0) end proc, map2(eval, C, [solve({seq(seq(seq(add(A[i, j, k]*c[l, k], k = 1 .. n) = add(add(c[p, i]*c[r, j]*B[p, r, l], r = 1 .. n), p = 1 .. n), i = 1 .. n), j = 1 .. n), l = 1 .. n)}, {seq(e, `in`(e, C))}, Explicit)]))); if s <> [] then map(proc (x) options operator, arrow; mrow(Typeset(x), mtext(" with determinant "))*Typeset*`~`*lhs(attributes(x)) end proc), s[] else Typesetting:-mtext("These two algebras are not isomorphic.") end if end proc;
> A16 := Array(1 .. 5, 1 .. 5, 1 .. 5, {(1, 1, 1) = 1, (2, 2, 2) = 1, (2, 3, 3) = 1, (3, 1, 3) = 1, (4, 4, 4) = 1, (4, 5, 5) = 1, (5, 1, 5) = 1}, datatype = integer[4], storage = sparse);
> A17 := Array(1 .. 5, 1 .. 5, 1 .. 5, {(1, 3, 3) = 1, (1, 5, 5) = 1, (3, 2, 3) = 1, (5, 4, 5) = 1, (1, 1, 1) = 1, (2, 2, 2) = 1, (4, 4, 4) = 1}, datatype = integer[4], storage = sparse);
>
> isom(A16, A16);
Error, (in Matrix) dimension parameters are required for this form of initializer
> isom(A16, A17);
These two algebras have different dimensions.
>
> A1 := Array(1 .. 2, 1 .. 2, 1 .. 2, {(1, 1, 1) = 1, (1, 2, 2) = 1, (2, 1, 2) = 1, (2, 2, 1) = -1}, datatype = integer[4], storage = sparse);
> A2 := Array(1 .. 2, 1 .. 2, 1 .. 2, {(1, 1, 1) = 1, (2, 2, 1) = alpha, (2, 2, 2) = beta, (1, 2, 2) = 1, (2, 1, 2) = 1});
>
> isom(A1, A1, 2);
Error, (in Matrix) dimension parameters are required for this form of initializer
> isom(A2, A1);
These two algebras have different dimensions.
 

Thank you.

I've use your new programme but the result not same as yours, why?. I'm use Maple 11.

> isom := proc (A, B) local C, c, e, i, j, k, l, n, p, r, s; n := Size(A, 1); if Size(B, 1) <> n then return Typesetting:-mtext("These two algebras have different dimensions.") end if; C := Matrix(n, symbol = c); s := remove*(attributes, map(proc (x) options operator, arrow; setattribute(x, Determinant(x) = 0) end proc, map2(eval, C, [solve({seq(seq(seq(add(A[i, j, k]*c[l, k], k = 1 .. n) = add(add(c[p, i]*c[r, j]*B[p, r, l], r = 1 .. n), p = 1 .. n), i = 1 .. n), j = 1 .. n), l = 1 .. n)}, {seq(e, `in`(e, C))}, Explicit)]))); if s <> [] then map(proc (x) options operator, arrow; mrow(Typeset(x), mtext(" with determinant "))*Typeset*`~`*lhs(attributes(x)) end proc), s[] else Typesetting:-mtext("These two algebras are not isomorphic.") end if end proc;
> A16 := Array(1 .. 5, 1 .. 5, 1 .. 5, {(1, 1, 1) = 1, (2, 2, 2) = 1, (2, 3, 3) = 1, (3, 1, 3) = 1, (4, 4, 4) = 1, (4, 5, 5) = 1, (5, 1, 5) = 1}, datatype = integer[4], storage = sparse);
> A17 := Array(1 .. 5, 1 .. 5, 1 .. 5, {(1, 3, 3) = 1, (1, 5, 5) = 1, (3, 2, 3) = 1, (5, 4, 5) = 1, (1, 1, 1) = 1, (2, 2, 2) = 1, (4, 4, 4) = 1}, datatype = integer[4], storage = sparse);
>
> isom(A16, A16);
Error, (in Matrix) dimension parameters are required for this form of initializer
> isom(A16, A17);
These two algebras have different dimensions.
>
> A1 := Array(1 .. 2, 1 .. 2, 1 .. 2, {(1, 1, 1) = 1, (1, 2, 2) = 1, (2, 1, 2) = 1, (2, 2, 1) = -1}, datatype = integer[4], storage = sparse);
> A2 := Array(1 .. 2, 1 .. 2, 1 .. 2, {(1, 1, 1) = 1, (2, 2, 1) = alpha, (2, 2, 2) = beta, (1, 2, 2) = 1, (2, 1, 2) = 1});
>
> isom(A1, A1, 2);
Error, (in Matrix) dimension parameters are required for this form of initializer
> isom(A2, A1);
These two algebras have different dimensions.
 

Thank you.

Thanks for your attension. That is binary operator. So, what should I do?
Thanks for your attension. That is binary operator. So, what should I do?
Page 1 of 1