Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !set methtit2=Appliquer la transitivité des inégalités |
2 | !set methtit=Transitivité des inégalités |
||
3 | !set methenv=ZZ QQ RR |
||
4 | !set methparmtype=parm inequality >,parm inequality > |
||
5 | !set methhelp=Cette méthode applique la transitivité sur deux inégalités\ |
||
6 | du style \(a > b) et \(b > c), pour déduire une troisième \(a > c) qu'elle\ |
||
7 | mettra dans les hypothèses. Les deux inégalités de départ peuvent être\ |
||
8 | données sous forme \(a > b) et \(c < b) par exemple. |
||
9 | |||
10 | !if $wims_read_parm iswordof form check |
||
11 | !goto $wims_read_parm |
||
12 | !endif |
||
13 | |||
14 | !exit |
||
15 | :form |
||
16 | Appliquer la transitivité sur les inégalités |
||
17 | !read deduc/methparm.phtml 1 |
||
18 | et |
||
19 | !read deduc/methparm.phtml 2 |
||
20 | |||
21 | !exit |
||
22 | :check |
||
23 | !distribute items $methparmobj1 into data,left1,sign1,right1 |
||
24 | !distribute items $methparmobj2 into data,left2,sign2,right2 |
||
25 | methexp=Transitivité sur \($left1 $sign1 $right1) et \($left2 $sign2 $right2) |
||
26 | |||
27 | gt=> |
||
28 | lt=< |
||
29 | !if ($gt isin $sign1 and $lt isin $sign2) or\ |
||
30 | ($lt isin $sign1 and $gt isin $sign2) |
||
31 | !exchange left2,right2 |
||
32 | !endif |
||
33 | !read deduc/sub/simplify ($right1) - ($left2)\ |
||
34 | ($right2) - ($left1) |
||
35 | !distribute lines $out into test1,test2 |
||
36 | !if $test1!=0 |
||
37 | !if $test2!=0 |
||
38 | error=La transitivité ne s'applique pas sur vos inégalités. |
||
39 | !advance penalty |
||
40 | !exit |
||
41 | !else |
||
42 | !exchange right1,right2 |
||
43 | !exchange left1,left2 |
||
44 | !endif |
||
45 | !endif |
||
46 | |||
47 | !if $gt isin $sign1 |
||
48 | s_=> |
||
49 | !else |
||
50 | s_=< |
||
51 | !endif |
||
52 | eq=$empty= |
||
53 | !if $eq isin $sign1 and $eq isin $sign2 |
||
54 | s_=$s_= |
||
55 | !endif |
||
56 | newobject0=$left1 $s_ $right2 |
||
57 | oldobject=0 |
||
58 | |||
59 | !exit |
||
60 |