!set methtit2=应用不等式的传递性
!set methtit=不等式的传递性
!set methenv=ZZ QQ RR
!set methparmtype=parm inequality >,parm inequality >
!set methhelp=此方法应用不等式的传递性:\
  <div class="wimscenter">\
  \(A > B) 与 \(B > C) 蕴含 \(A > C).\
 </div>\
 前两个不等式必须已经在假设中,\
而第三个则被加到假设中. \
原始不等式也可以是 \(A > B) 与 \(C < B) 的形式.

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

!exit
:form
 对不等式
 !read deduc/methparm.phtml 1
 以及
 !read deduc/methparm.phtml 2
应用传递性

!exit
:check
 !distribute items $methparmobj1 into data,left1,sign1,right1
 !distribute items $methparmobj2 into data,left2,sign2,right2
 methexp=对 \($left1 $sign1 $right1) 与 \($left2 $sign2 $right2) 应用传递性
 
 gt=>
 lt=<
 !if ($gt isin $sign1 and $lt isin $sign2) or\
    ($lt isin $sign1 and $gt isin $sign2)
  !exchange left2,right2
 !endif
 !read deduc/sub/simplify ($right1) - ($left2)\
    ($right2) - ($left1)
 !distribute lines $out into test1,test2
 !if $test1!=0
  !if $test2!=0
   error=你的不等式不能应用传递性.
   !advance penalty
   !exit
  !else
   !exchange right1,right2
   !exchange left1,left2
  !endif
 !endif

 !if $gt isin $sign1
  s_=>
 !else
  s_=<
 !endif
 eq=$empty=
 !if $eq isin $sign1 and $eq isin $sign2
  s_=$s_=
 !endif
 newobject0=$left1 $s_ $right2
 oldobject=0

!exit

