Rev 16135 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !set methtit2=The square of a real number is positive or zero |
2 | !set methtit=Positivity of a square |
||
3 | !set methenv=ZZ QQ RR |
||
4 | !set methparmtype=function |
||
5 | !set methhelp=this method add a condition of the type \(U^2 >= 0) into\ |
||
16209 | bpr | 6 | the hypotheses, where \(U) is an algebraic expression of your choice. |
20 | reyssat | 7 | |
8 | !if $wims_read_parm iswordof form check |
||
16120 | bpr | 9 | !goto $wims_read_parm |
20 | reyssat | 10 | !endif |
11 | |||
12 | !exit |
||
13 | :form |
||
16209 | bpr | 14 | One applies \(U^2 >= 0), where \(U) = |
16135 | bpr | 15 | !read deduc/methparm.phtml 1 |
20 | reyssat | 16 | |
17 | !exit |
||
18 | :check |
||
16120 | bpr | 19 | !if / isin $methparm1 |
20 | reyssat | 20 | error=Division is not allowed in this method! |
21 | !exit |
||
16120 | bpr | 22 | !endif |
23 | !read deduc/sub/simplify ($methparm1)^2 |
||
24 | !if $out=$empty |
||
20 | reyssat | 25 | error=bad_data |
26 | !exit |
||
16120 | bpr | 27 | !endif |
28 | sqr=$out |
||
29 | oldobject=0 |
||
30 | newobject0=$sqr >= 0 |
||
31 | methexp=Positivity of the squre of \($methparm1) |
||
32 | |||
33 | contextlist=$ct_Onlywhen $m_U represents a real number,\ |
||
20 | reyssat | 34 | $ct_Always,\ |
35 | $ct_Onlywhen $m_U is positive or zero,\ |
||
36 | $ct_Onlywhen $m_U is an integer |
||
37 | |||
16120 | bpr | 38 | resultlist=$newobject0,\ |
20 | reyssat | 39 | $sqr > 0 |
40 | |||
41 | !exit |