Subversion Repositories wimsdev

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
20 reyssat 1
!set methtit=Contraposer
2
!set methparmtype=parm predicate nocomma >
3
!set methparmrelax=1
4
!set methhelp=Contraposer hypothèse et but :\
5
réécrire A \(=>) B en non(A) \(=>) non(B)).\
6
<p>\
7
On peut aussi utiliser cette méthode pour faire une démonstration\
8
par contradiction.
9
 
10
!if $wims_read_parm iswordof form check
11
 !goto $wims_read_parm
12
!endif
13
 
14
!if fixedgoal iswordof $m_options
15
 !set error1=fixedgoal
16
 !exit
17
!endif
18
 
19
!set n_=!linecnt $m_goal
20
!if $n_>1
21
 !set error1=Vous avez plusieurs buts dans l'état actuel&nbsp;!\
22
 La contraposition doit se faire avec un but unique. Veuillez d'abord\
23
 séparer les buts.
24
 !exit
25
!endif
26
!if $n_<1
27
 !set error1=Vous n'avez pas d'objet pour contraposer.
28
 !exit
29
!endif
30
 
31
!exit
32
:form
33
 !set i_=!linecnt $mtobj1
34
 !if $i_>0
35
  Contraposer l'hypothèse
36
  !set ch_optional=Aucune
37
  !read deduc/methparm.phtml 1 
38
  et le but \($m_goal).
39
  !set methremark=Choisissez "hypothèse=Aucune" pour faire un raisonnement par\
40
  contradiction.
41
 !else
42
  Contraposer le but \($m_goal)&nbsp;: raisonnement par contradiction.
43
 !endif
44
!exit
45
:check
46
 !if contradiction notwordof $m_goal
47
  newobject0=!exec mathexp not\
48
$m_goal
49
  oldobject=0
50
 !else
51
  !reset newobject, newobject0
52
 !endif
53
 !if $methparm1=$empty or $methparm1<1
54
  !if contradiction iswordof $m_goal
55
   error=Contraposer une contradiction sans hypothèse n'a pas de sens !
56
   !exit
57
  !endif
58
  newgoal=contradiction
59
  methexp=Contraposer
60
 !else
61
  obj=!line $methparm1 of $mtobj1
62
  d=!item 1 of $obj
63
  l=!word 1 of $d
64
  obj=!item 2 to -1 of $obj
65
  m_context=!replace line number $l by $ in $m_context
66
  m_context=!nonempty lines $m_context
67
  newgoal=!exec mathexp not\
68
$obj
69
  methexp=Contraposer avec \($obj)
70
 !endif
71
 m_goal=$newgoal
72
 !read deduc/objects.combine
73
!exit
74