{VERSION 2 3 "IBM INTEL NT" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "Hyperlink" -1 17 "" 0 1 0 128 128 1 0 0 1 0 0 0 0 0 0 } {CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 }{CSTYLE " " 0 21 "" 0 1 0 0 0 1 0 0 0 0 2 0 0 0 0 }{CSTYLE "Help Heading" -1 26 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 0 0 0 0 0 1 3 0 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 2 6 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 2 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 " " 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 0 {PARA 0 "" 0 "" {TEXT 26 8 "Advice: " }{TEXT -1 30 "Changing assumptions and names" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 186 "Strange things happen to an expression containing a variable on which assumptions ha ve been made, when those assumptions are changed or a value is assigne d to the variable. For example:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "assume(x > 0);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "a: = x+1:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "additionally(x < \+ 2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "a-x;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,(%#x|irG\"\"\"F%F%F$!\"\"" }}}{PARA 0 "" 0 "" {TEXT -1 243 "This effect is due to the fact that when an assumption i s made about a variable, the name of that variable is changed. If the \"Trailing Tildes\" option for assumed variables is being used (which is the default), the new name is printed with a " }{MPLTEXT 0 21 1 "~ " }{TEXT -1 232 ". The name change occurs even without this option (t he option has only a cosmetic effect, changing how the name is printed ) . This is an illustration of the fact that two names that look the \+ same to us can be different to Maple. " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "assume(x,integer);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "x;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#x|irG" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "about(x);" }}{PARA 6 "" 1 "" {TEXT -1 53 "Originally x, renamed x~:\n is assumed to be: integer" } }}{PARA 0 "" 0 "" {TEXT -1 86 "The old name is assigned the new name a s its value. Thus when you enter and evaluate " }{MPLTEXT 0 21 1 "x" }{TEXT -1 29 ", you obtain the new name. " }}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 6 "'x'-x;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&%\"xG\" \"\"%#x|irG!\"\"" }}}{PARA 0 "" 0 "" {TEXT -1 40 "Here we delayed eval uation of the first " }{MPLTEXT 0 21 1 "x" }{TEXT -1 46 " by putting i t in forward quotes. The second " }{MPLTEXT 0 21 1 "x" }{TEXT -1 183 " was evaluated normally. The result is the difference of two distinc t variables, instead of 0. If evaluation is allowed to occur (e.g. by recalling the last result), we do get 0. " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "\";" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"!" }}} {PARA 0 "" 0 "" {TEXT -1 121 "The new name can't be entered directly f rom the keyboard: it is not the same as what you get by entering the s tring `x~`." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "`x~`-x;" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#,&%#x|irG\"\"\"F$!\"\"" }}}{PARA 0 "" 0 "" {TEXT -1 38 "Now if a new assumption is made about " }{MPLTEXT 0 21 1 "x" }{TEXT -1 7 " using " }{MPLTEXT 0 21 6 "assume" }{TEXT -1 4 " or " }{MPLTEXT 0 21 12 "additionally" }{TEXT -1 26 ", we get another \+ new name " }{MPLTEXT 0 21 2 "x~" }{TEXT -1 56 " that is different from the previous one. The original " }{MPLTEXT 0 21 1 "x" }{TEXT -1 80 " is assigned this as a value, so when any expression that contains the original " }{MPLTEXT 0 21 1 "x" }{TEXT -1 22 " is evaluated the new \+ " }{MPLTEXT 0 21 2 "x~" }{TEXT -1 33 " will be used. But the previous " }{MPLTEXT 0 21 2 "x~" }{TEXT -1 94 " is left unchanged, so that eva luation of an expression that contains it will not use the new " } {MPLTEXT 0 21 2 "x~" }{TEXT -1 28 ". Similarly, if you assign " } {MPLTEXT 0 21 1 "x" }{TEXT -1 56 " a value you are not affecting expre ssions that contain " }{MPLTEXT 0 21 2 "x~" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 47 "A cure for these \+ problems is to assign the new " }{MPLTEXT 0 21 2 "x~" }{TEXT -1 29 " o r the new value to the old " }{MPLTEXT 0 21 2 "x~" }{TEXT -1 15 " as w ell as to " }{MPLTEXT 0 21 1 "x" }{TEXT -1 136 ". It can be done as f ollows. Note that we must save the name of the old x~ in a variable b efore changing the assumption. We then use " }{MPLTEXT 0 21 6 "assign " }{TEXT -1 13 " rather than " }{MPLTEXT 0 21 2 ":=" }{TEXT -1 55 " be cause we want to make an assignment to the value of " }{MPLTEXT 0 21 4 "oldx" }{TEXT -1 31 " (which is the name of the old " }{MPLTEXT 0 21 2 "x~" }{TEXT -1 17 ") rather than to " }{MPLTEXT 0 21 4 "oldx" } {TEXT -1 8 " itself." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "assu me(x > 0);\na:= x+1:\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "o ldx:= x:\nadditionally(x < 2);\nassign(oldx,x):\n" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 4 "a-x;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\" \"" }}}{PARA 0 "" 0 "" {TEXT -1 41 "Similarly, this technique will wor k when " }{MPLTEXT 0 21 1 "x" }{TEXT -1 99 " is being assigned a value . But the simplest thing to do in that case is to assign the value wi th " }{MPLTEXT 0 21 6 "assign" }{TEXT -1 13 " rather than " }{MPLTEXT 0 21 2 ":=" }{TEXT -1 1 "." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "assign(x,2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "a;" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"$" }}}}{SECT 0 {PARA 0 "" 0 "" {TEXT 26 9 "See also:" }{TEXT -1 1 " " }{HYPERLNK 17 "about" 2 "about " "" }{TEXT -1 2 ", " }{HYPERLNK 17 "assign" 2 "assign" "" }{TEXT -1 2 ", " }{HYPERLNK 17 "assume" 2 "assume" "" }{TEXT -1 2 ", " } {HYPERLNK 17 "Error: cannot assume on a constant object" 2 "Error:cann ot_assume_on_a_constant_object" "" }{TEXT -1 3 ", " }{HYPERLNK 17 "Ob taining properties of objects" 2 "Obtaining_properties_of_objects" "" }}}{PARA 0 "" 0 "" {HYPERLNK 17 "" 2 "Assumptions and name change" "" }}{SECT 0 {PARA 0 "" 0 "" {TEXT 26 24 "Maple Advisor Database, " } {TEXT -1 15 " R. Israel 1997" }}}}{MARK "2 0 8" 38 }{VIEWOPTS 1 1 0 1 1 1803 }