!set methtit=不等式两边加代数式
!set methenv=ZZ QQ RR
!set methparmtype=function,parm inequality
!set methhelp=此方法把不等式 \(a > b)\
 转化成等价不等式 \(a + f > b + f), 其中 \(f) 是代数式.

!if $wims_read_parm iswordof form check
 !goto $wims_read_parm
!endif

!exit
:form
 把代数式
 !read deduc/methparm.phtml 1,15
 加到以下不等式的两边
 !read deduc/methparm.phtml 2

!exit
:check
 !distribute items $methparmobj2 into data,left,sign,right
 methexp=把 \($methparm1) 加到 \($left $sign $right) 的两边

 !read deduc/sub/simplify $left + ($methparm1)\
    $right + ($methparm1)
 !distribute lines $out into newleft,newright
 !if $newleft=$empty or $newright=$empty
  error=bad_data
  !exit
 !endif
 newsign=$sign
 newobject2=$newleft $newsign $newright
 oldobject=2

 contextlist=$ct_Always,\
    $ct_Onlywhen所加代数式有固定符号,\
    $ct_Onlywhen所加代数式是正的,\
    $ct_Onlywhen不等式是严格的,\
    $ct_Onlywhen不等式不是严格的

 !if $askresult>1
  !read deduc/sub/simplify $left - ($methparm1)\
    $right - ($methparm1)
  !distribute lines $out into badleft, badright
  badsign=!translate internal <> to >< in $newsign
 
  resultlist=$newobject2,\
    $newleft $newsign $badright,\
    $badleft $newsign $newright,\
    $newleft $badsign $newright,\
    $newleft $badsign $badright
 !endif

!exit

