CSH 6.2 Propositions MrG 2013.0205

2967 days ago by CSH2012

#3)~(~h V ~t) = h ^ t 
       
#4)~(~p V ~q) = p ^ q 
       
#5) p q ~q p V ~q print "p\tq\t~q\tpV~q" for p in range(2): for q in range(2): print bool(p),"\t",bool(q),"\t",bool(not(q)),"\t",bool(p or not(q)) 
       
p	q	~q	pV~q
False 	False 	True 	True
False 	True 	False 	False
True 	False 	True 	True
True 	True 	False 	True
p	q	~q	pV~q
False 	False 	True 	True
False 	True 	False 	False
True 	False 	True 	True
True 	True 	False 	True
#5) p q ~q p V ~q print "p\tq\t~q\tpV~q" for p in range(2): for q in range(2): print int(p),"\t",int(q),"\t",int(not(q)),"\t",int(p or not(q)) 
       
p	q	~q	pV~q
0 	0 	1 	1
0 	1 	0 	0
1 	0 	1 	1
1 	1 	0 	1
p	q	~q	pV~q
0 	0 	1 	1
0 	1 	0 	0
1 	0 	1 	1
1 	1 	0 	1
print "p" for p in range(2): print int(p) 
       
p
0
1
p
0
1
print "p\tq" for p in range(2): for q in range(2): print int(p),"\t",int(q) 
       
p	q
0 	0
0 	1
1 	0
1 	1
p	q
0 	0
0 	1
1 	0
1 	1
print "p\tq\tr" for p in range(2): for q in range(2): for r in range(2): print int(p),"\t",int(q),"\t",int(r) 
       
p	q	r
0 	0 	0
0 	0 	1
0 	1 	0
0 	1 	1
1 	0 	0
1 	0 	1
1 	1 	0
1 	1 	1
p	q	r
0 	0 	0
0 	0 	1
0 	1 	0
0 	1 	1
1 	0 	0
1 	0 	1
1 	1 	0
1 	1 	1
print "p\tq\tr\ts" for p in range(2): for q in range(2): for r in range(2): for s in range(2): print bool(p),"\t",bool(q),"\t",bool(r),"\t",bool(s) 
       
p	q	r	s
False 	False 	False 	False
False 	False 	False 	True
False 	False 	True 	False
False 	False 	True 	True
False 	True 	False 	False
False 	True 	False 	True
False 	True 	True 	False
False 	True 	True 	True
True 	False 	False 	False
True 	False 	False 	True
True 	False 	True 	False
True 	False 	True 	True
True 	True 	False 	False
True 	True 	False 	True
True 	True 	True 	False
True 	True 	True 	True
p	q	r	s
False 	False 	False 	False
False 	False 	False 	True
False 	False 	True 	False
False 	False 	True 	True
False 	True 	False 	False
False 	True 	False 	True
False 	True 	True 	False
False 	True 	True 	True
True 	False 	False 	False
True 	False 	False 	True
True 	False 	True 	False
True 	False 	True 	True
True 	True 	False 	False
True 	True 	False 	True
True 	True 	True 	False
True 	True 	True 	True
#6) p ^ (q V r) print "p\tq\tr\tqVr\tp^(qVr)" for p in range(2): for q in range(2): for r in range(2): print int(p),"\t",int(q),"\t",int(r),"\t",int(q or r),"\t",int(p and (q or r)) 
       
p	q	r	qVr	p^(qVr)
0 	0 	0 	0 	0
0 	0 	1 	1 	0
0 	1 	0 	1 	0
0 	1 	1 	1 	0
1 	0 	0 	0 	0
1 	0 	1 	1 	1
1 	1 	0 	1 	1
1 	1 	1 	1 	1
p	q	r	qVr	p^(qVr)
0 	0 	0 	0 	0
0 	0 	1 	1 	0
0 	1 	0 	1 	0
0 	1 	1 	1 	0
1 	0 	0 	0 	0
1 	0 	1 	1 	1
1 	1 	0 	1 	1
1 	1 	1 	1 	1
#7) ~(p^q) = ~p or ~q print "p\tq\t~p\t~q\tp^q\t~(p^q)\t~pV~q" for p in range(2): for q in range(2): print int(p),"\t",int(q),"\t",int(not p),"\t",int(not q),"\t",int(p and q),"\t",int(not(p and q)),"\t",int(not p or not q) 
       
p	q	~p	~q	p^q	~(p^q)	~pV~q
0 	0 	1 	1 	0 	1 	1
0 	1 	1 	0 	0 	1 	1
1 	0 	0 	1 	0 	1 	1
1 	1 	0 	0 	1 	0 	0
p	q	~p	~q	p^q	~(p^q)	~pV~q
0 	0 	1 	1 	0 	1 	1
0 	1 	1 	0 	0 	1 	1
1 	0 	0 	1 	0 	1 	1
1 	1 	0 	0 	1 	0 	0