Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
20 reyssat 1
!set methtit2=Apply the transitivity of inequalities
2
!set methtit=Transitivity of inequalities
3
!set methenv=ZZ QQ RR
4
!set methparmtype=parm inequality >,parm inequality >
5
!set methhelp=This method applies the transitity of inequalities:\
5763 bpr 6
  <div class="wimscenter">\
20 reyssat 7
  \(A > B) and \(B > C) implies \(A > C).\
5763 bpr 8
 </div>\
20 reyssat 9
 The first two inequalities must already exist in the hypotheses, and the\
10
 third will be added into the hypotheses. You can also give the two\
11
 original inequalities under the form \(A > B) and \(C < B) for example.
12
 
13
!if $wims_read_parm iswordof form check
16120 bpr 14
  !goto $wims_read_parm
20 reyssat 15
!endif
16
 
17
!exit
18
:form
16209 bpr 19
Apply the transitivity on the inequalities
16120 bpr 20
!read deduc/methparm.phtml 1
20 reyssat 21
 and
16120 bpr 22
!read deduc/methparm.phtml 2
20 reyssat 23
 
24
!exit
25
:check
16120 bpr 26
!distribute items $methparmobj1 into data,left1,sign1,right1
27
!distribute items $methparmobj2 into data,left2,sign2,right2
28
methexp=Transitivity on \($left1 $sign1 $right1) and \($left2 $sign2 $right2)
29
 
30
gt=>
31
lt=<
32
!if ($gt isin $sign1 and $lt isin $sign2) or\
20 reyssat 33
	($lt isin $sign1 and $gt isin $sign2)
34
  !exchange left2,right2
16120 bpr 35
!endif
36
!read deduc/sub/simplify ($right1) - ($left2)\
20 reyssat 37
	($right2) - ($left1)
16120 bpr 38
!distribute lines $out into test1,test2
39
!if $test1!=0
20 reyssat 40
  !if $test2!=0
16120 bpr 41
    error=The transitivity does not apply on your inequalities.
42
    !advance penalty
43
    !exit
20 reyssat 44
  !else
16120 bpr 45
    !exchange right1,right2
46
    !exchange left1,left2
20 reyssat 47
  !endif
16120 bpr 48
!endif
20 reyssat 49
 
16120 bpr 50
!if $gt isin $sign1
20 reyssat 51
  s_=>
16120 bpr 52
!else
20 reyssat 53
  s_=<
16120 bpr 54
!endif
55
eq=$empty=
56
!if $eq isin $sign1 and $eq isin $sign2
20 reyssat 57
  s_=$s_=
16120 bpr 58
!endif
59
newobject0=$left1 $s_ $right2
60
oldobject=0
20 reyssat 61
 
62
!exit