Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2071 | zjchen | 1 | !set methtit=反证法 |
2 | !set methparmtype=parm predicate nocomma > |
||
3 | !set methparmrelax=1 |
||
4 | !set methhelp=把假设与目标取否定:\ |
||
5 | 即把 A \(=>) B 重写成 not(A) \(=>) not(B)).\ |
||
6 | <p>\ |
||
7 | 你可以利用这个方法导出矛盾得到证明. |
||
8 | |||
9 | !if $wims_read_parm iswordof form check |
||
10 | !goto $wims_read_parm |
||
11 | !endif |
||
12 | |||
13 | !if fixedgoal iswordof $m_options |
||
14 | !set error1=fixedgoal |
||
15 | !exit |
||
16 | !endif |
||
17 | |||
18 | !set n_=!linecnt $m_goal |
||
19 | !if $n_>1 |
||
20 | !set error1=目前情况下你有几个目标!\ |
||
21 | 反证法只能用于唯一的目标.\ |
||
22 | 请先分离目标. |
||
23 | !exit |
||
24 | !endif |
||
25 | !if $n_<1 |
||
26 | !set error1=你没有目标可施行反证. |
||
27 | !exit |
||
28 | !endif |
||
29 | |||
30 | !exit |
||
31 | :form |
||
32 | !set i_=!linecnt $mtobj1 |
||
33 | !if $i_>0 |
||
34 | 对假设 |
||
35 | !set ch_optional=无 |
||
36 | !read deduc/methparm.phtml 1 |
||
37 | 与目标 \($m_goal) 取否定. |
||
38 | !set methremark=选择 "假设=空" 以用归谬法论证. |
||
39 | !else |
||
40 | 对目标 \($m_goal) 取否定: 用归谬法论证. |
||
41 | !endif |
||
42 | !exit |
||
43 | :check |
||
44 | !if contradiction notwordof $m_goal |
||
45 | newobject0=!exec mathexp not\ |
||
46 | $m_goal |
||
47 | oldobject=0 |
||
48 | !else |
||
49 | !reset newobject, newobject0 |
||
50 | !endif |
||
51 | !if $methparm1=$empty or $methparm1<1 |
||
52 | !if contradiction iswordof $m_goal |
||
53 | error=没有假设的情形下反证导致矛盾是无意义的! |
||
54 | !exit |
||
55 | !endif |
||
56 | newgoal=矛盾 |
||
57 | methexp=反证 |
||
58 | !else |
||
59 | obj=!line $methparm1 of $mtobj1 |
||
60 | d=!item 1 of $obj |
||
61 | l=!word 1 of $d |
||
62 | obj=!item 2 to -1 of $obj |
||
63 | m_context=!replace line number $l by $ in $m_context |
||
64 | m_context=!nonempty lines $m_context |
||
65 | newgoal=!exec mathexp not\ |
||
66 | $obj |
||
67 | methexp=对 \($obj) 反证 |
||
68 | !endif |
||
69 | m_goal=$newgoal |
||
70 | !read deduc/objects.combine |
||
71 | !exit |
||
72 |