Using transitivity in a proof:传递性证明的小技巧
If we need to demonstrate an inequality, like A<B
1. Show A<C for some C
2. Show C <B
3. By transitivity, therefore A<B
Example:
· For all a b x y in R set if a<b and x<y than a+x < b+y
Proof:
Assume a<b and x<y
a+x<b+x by O3&& based on a<b
x+b<y+b byO3 && based on x<y
a+x<b+Y byO2(transitivity)
therefore…
· For all x y in R set, if 0<x and x<y ,thenx^2 < y^2
Assume 0<x and x<y
x*x<y*x by O4 based on x<yand x>0
x^2<yx
y>0 byO2 since 0<x andx<y
x*y <y*y by O4 and based ony>0
yx<y^2
x^2<y^2 by O2(transitivity)
therefore…
another different type ofexample:
· For all x in R set if x^2<=x then x<=1(suppose use the equivalent Boolean exp:if p then z == NEG(p) OR z)
Using the concept of contrapositive:
If p then z is equivalent to if NEG(Z) thenNEG(p)
So we can change statement to For all x inR set if x>1 then x^2>x
Assume x>1
Since 1>0 by pervious prop.
x>0 by O2(tran)
x*x>1*x by O4
x^2>x
therefore…
另一部分:
direct proof review:
to prove all x in set U, p(x)
let x in set U
//x is arbitrary value
Demonstrate p(x)
To prove at least x in set U, p(x)
Put x to assign a specific value
Demonstrate p(x) //where x is assigned
直接证明:当if语句有全称量词时...
Example:
All ain set R if all x in set R ax=a then a=0
Proof let all a in set R
Assume all x in set R,ax=a
Since 0 is in set R a*(0)=a
Therefore,0=a
Threrfore…
***在if statement 里如果有全称量词,因为证明时if条件是假设为True的 所以可以举例一个x使其满足--(这个不好理解啊--)
All a in set R if all x in set R,ax<=x, then a=1
Proof leta in set R
Assume all x in set R ax<=x
Since a*1<=1 ;have a<=1
Since a*(-1)<=-1;-a+(a+1)<=-1+a+1
Have 1<=a
Now since a<=1 and 1<=a by trichotomy this imples a=1
Therefore…
All a in set R if at least x in set R,x!=0 and ax=x thena=1
Proof: let a in set R
Assume at least x in set R x!=0 and ax=x
Choose b in set R with b!=0 and ab=b
Then abb^-1=b^-1 so a=1
Therefore…
All a in set R if at least x in set R a+x=x then all y inset R ay=a
Proof let all a in set R
Assume at least x in set R, a+x=x
Choose b in set R with a+b=b
Let all y in set R
Since a+b=b, (a+b)-b=b-b
So, a=0
Therefore ay=0*y=0=a
Therefore…
All a in set R if all x in set R,a+x=x then at least y inset R,ay=a
Proof let all a in set R
Assume all x in set R,a+x=x
//since 0 inset R a+0=0
//so, a=0
Put y=1
Then ay=a(1)=a
Therefore…
总结:
· if->全程量词 ,假设时举例套用
· If->存在量词,假设时选一个代表变量
· Then->全局量词,相当于选代表 但是用原变量就行
· Then->存在变量,选一个合适的特定的数值赋值给该变量