Subversion Repositories wimsdev

Rev

Rev 2071 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2071 zjchen 1
!set methtit=两个不等式相加
2
!set methenv=ZZ QQ RR
3
!set methparmtype=parm inequality >,parm inequality >
4
!set methhelp=此方法从两个已有的不等式推导出新的不等式:\
5763 bpr 5
 <div class="wimscenter">\
2071 zjchen 6
 若 \(a > b) 与 \(c > b), 则 \(a+c > b+d) .\
5763 bpr 7
</div>\
2071 zjchen 8
 得到的不等式加入假设中.
9
 
10
!if $wims_read_parm iswordof form check
11
 !goto $wims_read_parm
12
!endif
13
 
14
!exit
15
:form
16
 把不等式
17
 !read deduc/methparm.phtml 1
18
19
 !read deduc/methparm.phtml 2
20
相加
21
 
22
!exit
23
:check
24
 !distribute items $methparmobj1 into data,left1,sign1,right1
25
 !distribute items $methparmobj2 into data,left2,sign2,right2
26
 methexp=把 \($left1 $sign1 $right1) 与 \($left2 $sign2 $right2) 相加
27
 
28
 gt=>
29
 lt=<
30
 !if ($gt isin $sign1 and $lt isin $sign2) or\
31
    ($lt isin $sign1 and $gt isin $sign2)
32
  !exchange left2,right2
33
 !endif
34
 !read deduc/sub/simplify ($left1) + ($left2)\
35
    ($right1) + ($right2)
36
 !distribute lines $out into newleft, newright
37
 !if $newleft=$empty or $newright=$empty
38
  error=bad_data
39
  !exit
40
 !endif
41
 
42
 !if $gt isin $sign1
43
  s_=>
44
 !else
45
  s_=<
46
 !endif
47
 eq=$empty=
48
 !if $eq isin $sign1 and $eq isin $sign2
49
  s_=$s_=
50
 !endif
51
 newobject0=$newleft $s_ $newright
52
 oldobject=0
53
 
54
 contextlist=$ct_Always,\
55
    $ct_Onlywhen两个不等式是正的,\
56
    $ct_Onlywhen其中之一是正的,\
57
    $ct_Onlywhen其中之一同号
58
 
59
!exit