sursumCorda

1099 Reputation

13 Badges

2 years, 3 days

MaplePrimes Activity


These are questions asked by sursumCorda

According to the documentation, 

the depends modifier can be used in declaration to indicate that a parameter's type depends on the value of another parameter, the seq modifier declares that multiple arguments of a specific type within a procedure invocation will be assigned to a single parameter, and if the depends modifier is used together with the seq modifier, the declaration must be written: . 

So the code below works as expected: 

f0 := proc(x::Not(2), y::2) [[x], [y]] end:
f0(1, 2);
                           [[1], [2]]

f0(2, 2);
Error, invalid input: f0 expects its 1st argument, x, to be of type Not(2), but received 2

The code below also works as expected: 

f1 := proc(x::depends(Not(y)), y::2) [[x], [y]] end:
f1(1, 2);
                           [[1], [2]]

f1(2, 2);
Error, invalid input: f1 expects its 1st argument, x, to be of type Not(2), but received 2

The code below works as desired as well: 

f2 := proc(x::seq(Not(2)), y::2) [[x], [y]] end:
f2(0, 1, 2);
                         [[0, 1], [2]]

f2(2, 1, 2);
                           [[], [2]]

However, the following code does not work: 

f3 := proc(x::seq(depends(Not(y))), y::2) [[x], [y]] end:
f3(0, 1, 2);
Error, invalid input: NULL uses a 2nd argument, y (of type 2), which is missing
f3(2, 1, 2);
Error, invalid input: NULL uses a 2nd argument, y (of type 2), which is missing

I believe that the output of  and  should be the same as that of  and  respectively. Did I miss something? 

In the Standard interface, the length of an expression that display in the worksheet can be limited using the Options dialog: Options Dialog - Precision Tab - Maple Help. However, I would like to know if I can change this option programmatically. The closest interface variables are elisiontermsbefore, elisiontermsafter and termelisionthreshold, but as the aforementioned help page states, they control the “term elision” and are not the same as “expression length limit”. So, is this possible? 

The second result is definitely wrong, but why is this? 

MmaTranslator:-FromMma("Subscript[x, 0] -> 2 (y - z) (y - z)");
                       MmaTranslator:-FromMma(

MmaTranslator:-FromMma("Subscript[x, 0] -> 2 (y - z)^2"); # should return: x[0] = 2*(y - z)^2
                      MmaTranslator:-FromMma(

The result is still wrong even if I type an explicit multiplication sign (for instance, "Subscript[x, 0] -> 2*(y - z)^2"). 

There exists a new (?) checkbox  in the Interface tab of the Options dialog: 

But I cannot find any find any explanation about it in the corresponding help page. What is the purpose of this feature? 

If I understand correctly, both of 

int(RETURN(is(y::positive)), y = 0 .. x) assuming 0 <= x, x < 1;
int(RETURN(coulditbe(y = 1)), y = 0 .. x) assuming 0 < x, x < 1;

should output `not`(true). However, Maple simply returns true for the second one. 
Isn't this result incorrect? Or am I missing something?

1 2 3 4 5 6 7 Last Page 2 of 22