Carl Love

Carl Love

28025 Reputation

25 Badges

12 years, 306 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Alejandro Jakubi Thanks for the very useful information about verify. I note that VerifyTools (used in the thread that your Reply linked to) is still undocumented. The nested verify that Alec discusses there looks like exactly what the Asker in this thread needs.

It has always amazed me how far that checking equality by address identity will get you in Maple. That's the power of automatic simplification.

@Alejandro Jakubi Thanks for the very useful information about verify. I note that VerifyTools (used in the thread that your Reply linked to) is still undocumented. The nested verify that Alec discusses there looks like exactly what the Asker in this thread needs.

It has always amazed me how far that checking equality by address identity will get you in Maple. That's the power of automatic simplification.

You could replace m with m(z/y). But if you do that, then I don't see how you could solve {f = 0, g = 0, h = 0} for {x,y,z}.

@Bendesarts You still haven't uploaded the worksheet.

So that I can read your worksheet and answer your question, How does one view the Maple code that controls an embedded component?

@Markiyan Hirnyk Oops, I misread the Asker's example call. Thanks for spotting that. I will correct the Answer above.

@Markiyan Hirnyk Oops, I misread the Asker's example call. Thanks for spotting that. I will correct the Answer above.

@Markiyan Hirnyk Any two expressions that are built from the non-mutable data structures (such as names, numbers, floats, sets,  lists, algebraics, functions), no matter how complicated, will have the property that if they "appear" mathematically identical then they will be identical to Maple (i.e., stored at the same address). I know that "appear" is not totally precise; this is a difficult concept to understand. It is easier to define it in the negative: All of the mutable structures are essentially containers (but not all container structures are mutable!). Two mutable containers are not identical even if their contents are identical and are arranged the same way in the container. Non-mutable structures do not have that property.

ex1:= [x+y, {a, [1], .2, exp(.1)}, exp(z)]:
ex2:= [x+y, {a, [1], .2, exp(.1)}, exp(z)]:
evalb(ex1 = ex2);
                              true

addressof~([ex1,ex2]);
          [18446744073908797006, 18446744073908797006]

Another way to test identity: Put into a set.
{ex1, ex2};
       {[x + y, {0.2, 1.10517091807565, a, [1]}, exp(z)]}

nops(%);
                               1

{[x-> x^2], [x-> x^2]};
                     /[      2]  [      2]\
                    { [x -> x ], [x -> x ] }
                     \                    /

nops(%);
                               2

@Markiyan Hirnyk Any two expressions that are built from the non-mutable data structures (such as names, numbers, floats, sets,  lists, algebraics, functions), no matter how complicated, will have the property that if they "appear" mathematically identical then they will be identical to Maple (i.e., stored at the same address). I know that "appear" is not totally precise; this is a difficult concept to understand. It is easier to define it in the negative: All of the mutable structures are essentially containers (but not all container structures are mutable!). Two mutable containers are not identical even if their contents are identical and are arranged the same way in the container. Non-mutable structures do not have that property.

ex1:= [x+y, {a, [1], .2, exp(.1)}, exp(z)]:
ex2:= [x+y, {a, [1], .2, exp(.1)}, exp(z)]:
evalb(ex1 = ex2);
                              true

addressof~([ex1,ex2]);
          [18446744073908797006, 18446744073908797006]

Another way to test identity: Put into a set.
{ex1, ex2};
       {[x + y, {0.2, 1.10517091807565, a, [1]}, exp(z)]}

nops(%);
                               1

{[x-> x^2], [x-> x^2]};
                     /[      2]  [      2]\
                    { [x -> x ], [x -> x ] }
                     \                    /

nops(%);
                               2

@Markiyan Hirnyk The reason that your Vector subtraction example doesn't work is because Vectors are mutable data structures; it has nothing to do with unreliabilty of is.

@Markiyan Hirnyk The reason that your Vector subtraction example doesn't work is because Vectors are mutable data structures; it has nothing to do with unreliabilty of is.

@Markiyan Hirnyk 

If you don't trust is, then use evalb or addressof instead.

evalb([x-> x^2] = [x-> x^2]);
                             false

L1:= [x-> x^2]:  L2:= [x-> x^2]:
addressof(L1), addressof(L2);
           18446744073913194702, 18446744073913194862

The addressof is the ultimate test of this, since all equality checks and membership tests in Maple are based on identity, and two structures are identical iff they have the same address.

@Markiyan Hirnyk 

If you don't trust is, then use evalb or addressof instead.

evalb([x-> x^2] = [x-> x^2]);
                             false

L1:= [x-> x^2]:  L2:= [x-> x^2]:
addressof(L1), addressof(L2);
           18446744073913194702, 18446744073913194862

The addressof is the ultimate test of this, since all equality checks and membership tests in Maple are based on identity, and two structures are identical iff they have the same address.

@Markiyan Hirnyk Procedures are mutable data structures, like tables:

is([x-> x^2] = [x-> x^2]);
                             false

I think that the complete list of mutable data structures is tables, procedures, modules (which includes Records), and rtables (which includes Matrices, Vectors, and Arrays). I am not absolutely sure if that list is complete.

Note that any structure that contains parts that are mutable will itself be mutable.

@Markiyan Hirnyk Procedures are mutable data structures, like tables:

is([x-> x^2] = [x-> x^2]);
                             false

I think that the complete list of mutable data structures is tables, procedures, modules (which includes Records), and rtables (which includes Matrices, Vectors, and Arrays). I am not absolutely sure if that list is complete.

Note that any structure that contains parts that are mutable will itself be mutable.

First 660 661 662 663 664 665 666 Last Page 662 of 708