-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchap1_1propositions.html
871 lines (758 loc) · 45.5 KB
/
chap1_1propositions.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2.1. Propositional Logic — Computing for engineer 1.0 documentation</title>
<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="2.2. Binary encoding" href="chap1_2binaryEncoding.html" />
<link rel="prev" title="2. Binary logic" href="chap1_binaryLogic_Chap.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Computing for engineer
</a>
<div class="version">
1.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="Introduction.html">1. Introduction</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="chap1_binaryLogic_Chap.html">2. Binary logic</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">2.1. Propositional Logic</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#intuitive-approach">2.1.1. Intuitive approach</a></li>
<li class="toctree-l3"><a class="reference internal" href="#propositional-syntax">2.1.2. Propositional syntax</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#proposition-constant">2.1.2.1. Proposition constant</a></li>
<li class="toctree-l4"><a class="reference internal" href="#compounds-propositions">2.1.2.2. Compounds propositions</a></li>
<li class="toctree-l4"><a class="reference internal" href="#vocabulary-and-language">2.1.2.3. Vocabulary and language</a></li>
<li class="toctree-l4"><a class="reference internal" href="#tree-representation">2.1.2.4. Tree representation</a></li>
<li class="toctree-l4"><a class="reference internal" href="#operator-precedence">2.1.2.5. Operator precedence</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#propositional-semantics">2.1.3. Propositional semantics</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#truth-assignment">2.1.3.1. Truth assignment</a></li>
<li class="toctree-l4"><a class="reference internal" href="#definition-of-logical-operators">2.1.3.2. Definition of logical operators</a></li>
<li class="toctree-l4"><a class="reference internal" href="#other-notations-for-operators">2.1.3.3. Other notations for operators</a></li>
<li class="toctree-l4"><a class="reference internal" href="#evaluation-of-a-compound-proposition">2.1.3.4. Evaluation of a compound proposition</a></li>
<li class="toctree-l4"><a class="reference internal" href="#truth-tables-for-compounds-propositions">2.1.3.5. Truth tables for compounds propositions</a></li>
<li class="toctree-l4"><a class="reference internal" href="#satisfaction">2.1.3.6. Satisfaction</a></li>
<li class="toctree-l4"><a class="reference internal" href="#natural-language-and-logic">2.1.3.7. Natural language and logic</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#propositional-analysis">2.1.4. Propositional Analysis</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#logical-equivalence">2.1.4.1. Logical equivalence</a></li>
<li class="toctree-l4"><a class="reference internal" href="#logical-properties">2.1.4.2. Logical properties</a></li>
<li class="toctree-l4"><a class="reference internal" href="#full-system-of-operators">2.1.4.3. Full system of operators</a></li>
<li class="toctree-l4"><a class="reference internal" href="#normal-forms">2.1.4.4. Normal forms</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="chap1_2binaryEncoding.html">2.2. Binary encoding</a></li>
<li class="toctree-l2"><a class="reference internal" href="chap1_3digitalCircuits.html">2.3. Digital circuits</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="chap2_architecture_Chap.html">3. Computer architecture</a></li>
<li class="toctree-l1"><a class="reference internal" href="chap3_algorithm_Chap.html">4. Algorithm</a></li>
<li class="toctree-l1"><a class="reference internal" href="chap4_cLangage_Chap.html">5. C/C++ Programming Langage</a></li>
<li class="toctree-l1"><a class="reference internal" href="chap5_arduino_Chap.html">6. Arduino</a></li>
<li class="toctree-l1"><a class="reference internal" href="chap6_python_Chap.html">7. Python</a></li>
<li class="toctree-l1"><a class="reference internal" href="chap7_C++_Chap.html">8. C++</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Computing for engineer</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li><a href="chap1_binaryLogic_Chap.html">2. Binary logic</a> »</li>
<li>2.1. Propositional Logic</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/chap1_1propositions.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="propositional-logic">
<h1>2.1. Propositional Logic<a class="headerlink" href="#propositional-logic" title="Permalink to this headline">¶</a></h1>
<p>Propositional logic is a branch of logic. It helps to formalize logical problems and to solve it. It also provides the prerequisites to understand the basics of how the integrated circuits used in our computers work.
This lesson presents the logical approach and introduces the Boolean algebra.</p>
<div class="section" id="intuitive-approach">
<h2>2.1.1. Intuitive approach<a class="headerlink" href="#intuitive-approach" title="Permalink to this headline">¶</a></h2>
<p>A <strong>proposition</strong> (also named <strong>statement</strong>) can be <em>true</em> or <em>false</em>. Here are presented some examples of propositions:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>1 + 1 = 2
1 + 1 = 3
the weather is sunny today
42 is the answer
Marseille is the capital of France
</pre></div>
</div>
<div class="admonition caution">
<p class="first admonition-title">Caution</p>
<p>Following statements are not propositions:</p>
<blockquote class="last">
<div><ul class="simple">
<li>1 + x = 2 (x being a variable, it is a predicate).</li>
<li>this sentence is false (this can not be true or false).</li>
</ul>
</div></blockquote>
</div>
<p>Propositions can be assembled to form new propositions thanks to “connections”.</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>It is cloudy AND it is cold
The cat is sleeping OR the mouse is happy
</pre></div>
</div>
</div>
<div class="section" id="propositional-syntax">
<h2>2.1.2. Propositional syntax<a class="headerlink" href="#propositional-syntax" title="Permalink to this headline">¶</a></h2>
<p>The syntax gives the rules on how to form new propositions using simple statements. This can be seen as the “grammar” of propositional logic.</p>
<div class="section" id="proposition-constant">
<h3>2.1.2.1. Proposition constant<a class="headerlink" href="#proposition-constant" title="Permalink to this headline">¶</a></h3>
<p>We call <strong>proposition constant</strong> (or <strong>logical constant</strong>) a variable belonging to the <strong>Boolean domain</strong> that contains exactly two values:</p>
<div class="math">
<p><img src="_images/math/595e079474eade6d1f86acb6956c9e1f8b228876.svg" alt="\mathbf{B} = \{true, false\} = \{0, 1\}"/></p>
</div></div>
<div class="section" id="compounds-propositions">
<h3>2.1.2.2. Compounds propositions<a class="headerlink" href="#compounds-propositions" title="Permalink to this headline">¶</a></h3>
<p>If a proposition constant can be either <em>true</em> (1) or <em>false</em> (0), they can be combined to form new propositions. These new propositions are obtained thanks to different operators: <img class="math" src="_images/math/56ca123698b42bd68130e061beb1a752b81f77de.svg" alt="\lnot"/>, <img class="math" src="_images/math/3e07e4974841ed5227a4e1a71643e78e51a11530.svg" alt="\land"/>, <img class="math" src="_images/math/e9e6f60409b47ef34cda0dfa4ebf5c9493d785af.svg" alt="\lor"/>, <img class="math" src="_images/math/dba201042399067d132d07fb623ec34823682ff1.svg" alt="\Rightarrow"/>, <img class="math" src="_images/math/b6596e1e2bb4c0d8eb499f66b32b4c692e1226f9.svg" alt="\Leftrightarrow"/> and <img class="math" src="_images/math/71aa93f6f482a3c8f808373e78072d3217161411.svg" alt="\oplus"/>.</p>
<p>As example, if <img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/>, <img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/> and <img class="math" src="_images/math/d6ce91cdb456a31a526334901a14ca60775adb84.svg" alt="r"/> are three proposition constants, we can build thanks to preceeding operators a new compound proposition F also named <strong>propositional formula</strong>:</p>
<div class="math" id="equation-formula-ex">
<p><span class="eqno">(2.1)<a class="headerlink" href="#equation-formula-ex" title="Permalink to this equation">¶</a></span><img src="_images/math/f56c90f5a3956c54fe68a8409842f153f9327b4d.svg" alt="F = ((p\land q) \lor (\lnot r)) \Rightarrow p"/></p>
</div></div>
<div class="section" id="vocabulary-and-language">
<h3>2.1.2.3. Vocabulary and language<a class="headerlink" href="#vocabulary-and-language" title="Permalink to this headline">¶</a></h3>
<p>A <strong>propositional vocabulary</strong> is a set of proposition constants. The set of all compound propositions that can be formed using a vocabulary is named <strong>propositional language</strong>.</p>
<p>The propositional formula of <a class="reference internal" href="#equation-formula-ex">Eq.2.1</a>: is a compound propositions belonging to the language formed by the vocabulary <img class="math" src="_images/math/c95b29808f7f2fbc0b2f6889c764f85eadac437f.svg" alt="\{p,q,r\}"/>.</p>
</div>
<div class="section" id="tree-representation">
<h3>2.1.2.4. Tree representation<a class="headerlink" href="#tree-representation" title="Permalink to this headline">¶</a></h3>
<p>A propositional formula can also be represented by a tree structure. Here is presented the tree representation of <a class="reference internal" href="#equation-formula-ex">Eq.2.1</a>:</p>
<div class="figure align-center" id="id1">
<span id="fig-chap1-arbre"></span><a class="reference internal image-reference" href="_images/arbre.png"><img alt="_images/arbre.png" src="_images/arbre.png" style="width: 247.0px; height: 232.0px;" /></a>
<p class="caption"><span class="caption-number">Figure 2.1: </span><span class="caption-text">Tree representation for example of <a class="reference internal" href="#equation-formula-ex">Eq.2.1</a>.</span></p>
</div>
</div>
<div class="section" id="operator-precedence">
<h3>2.1.2.5. Operator precedence<a class="headerlink" href="#operator-precedence" title="Permalink to this headline">¶</a></h3>
<p>To simplify writting of propositional formulae and limit usage of parenthesis, an operator precedence is defined:</p>
<table border="1" class="docutils">
<colgroup>
<col width="65%" />
<col width="35%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">operator</th>
<th class="head">precedence</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><img class="math" src="_images/math/56ca123698b42bd68130e061beb1a752b81f77de.svg" alt="\lnot"/></td>
<td>5</td>
</tr>
<tr class="row-odd"><td><img class="math" src="_images/math/3e07e4974841ed5227a4e1a71643e78e51a11530.svg" alt="\land"/></td>
<td>4</td>
</tr>
<tr class="row-even"><td><img class="math" src="_images/math/e9e6f60409b47ef34cda0dfa4ebf5c9493d785af.svg" alt="\lor"/></td>
<td>3</td>
</tr>
<tr class="row-odd"><td><img class="math" src="_images/math/71aa93f6f482a3c8f808373e78072d3217161411.svg" alt="\oplus"/></td>
<td>2</td>
</tr>
<tr class="row-even"><td><img class="math" src="_images/math/dba201042399067d132d07fb623ec34823682ff1.svg" alt="\Rightarrow"/>, <img class="math" src="_images/math/b6596e1e2bb4c0d8eb499f66b32b4c692e1226f9.svg" alt="\Leftrightarrow"/></td>
<td>1</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="propositional-semantics">
<h2>2.1.3. Propositional semantics<a class="headerlink" href="#propositional-semantics" title="Permalink to this headline">¶</a></h2>
<p>Once the syntax being define (rules of grammar), the “meanings” of the symbol used is then defined. This is named <strong>semantics</strong>.</p>
<div class="section" id="truth-assignment">
<h3>2.1.3.1. Truth assignment<a class="headerlink" href="#truth-assignment" title="Permalink to this headline">¶</a></h3>
<p>If we consider a propositional vocabulary <img class="math" src="_images/math/701746dcc30b1fd174c1906ea020aa09715389c9.svg" alt="\mathcal{V}=\{ p_1, p_2, ..., p_n \}"/> of <img class="math" src="_images/math/fb461f04d226fe3084ad376fc3bd57ebe410c415.svg" alt="n"/> propositional constants, we call a <strong>truth assignment</strong> an application such that:</p>
<div class="math">
<p><img src="_images/math/d85f8d238d91600510d73d309585fb27280e14a2.svg" alt="\[
\begin{array}{cccc}
\sigma: & \mathcal{V} & \to & \mathbf{B} \\
& p_1 & \mapsto & ... \\
& p_1 & \mapsto & ... \\
& ... \\
& p_n & \mapsto & ...
\end{array}
\]"/></p>
</div><p>For example, we will write that <img class="math" src="_images/math/546df63b3478f1e8f7881da3433627e3510d2d1f.svg" alt="(p = 1, q=0, r=1)"/> is a possible truth assignment of vocabulary <img class="math" src="_images/math/24d3c8f335da8600c28ffe9fc526bc2a4b1d9bfd.svg" alt="\mathcal{V}=\{ p,q,r \}"/>.</p>
<ul class="simple">
<li>For <img class="math" src="_images/math/3e948a23098e8cd632bf0731e991f4a23855c9d3.svg" alt="n=1"/>, there are 2 possible truth assignments,</li>
<li>For <img class="math" src="_images/math/1a4bffec40af9d31114ddbe1347717ff82c41256.svg" alt="n=2"/>, there are 4 possible truth assignments,</li>
<li>…</li>
<li>For <img class="math" src="_images/math/fb461f04d226fe3084ad376fc3bd57ebe410c415.svg" alt="n"/>, there are <img class="math" src="_images/math/d337c3294387cc79893f21514a2b0a51e3894ed2.svg" alt="2^n"/> possible truth assignments,</li>
</ul>
<p>The complexity is exponential. To be understand here as “explosive”.</p>
</div>
<div class="section" id="definition-of-logical-operators">
<h3>2.1.3.2. Definition of logical operators<a class="headerlink" href="#definition-of-logical-operators" title="Permalink to this headline">¶</a></h3>
<p>A semantic is given to each operators: <img class="math" src="_images/math/56ca123698b42bd68130e061beb1a752b81f77de.svg" alt="\lnot"/>, <img class="math" src="_images/math/3e07e4974841ed5227a4e1a71643e78e51a11530.svg" alt="\land"/>, <img class="math" src="_images/math/e9e6f60409b47ef34cda0dfa4ebf5c9493d785af.svg" alt="\lor"/>, <img class="math" src="_images/math/dba201042399067d132d07fb623ec34823682ff1.svg" alt="\Rightarrow"/>, <img class="math" src="_images/math/b6596e1e2bb4c0d8eb499f66b32b4c692e1226f9.svg" alt="\Leftrightarrow"/> and <img class="math" src="_images/math/71aa93f6f482a3c8f808373e78072d3217161411.svg" alt="\oplus"/></p>
<div class="section" id="negation">
<h4>2.1.3.2.1. Negation<a class="headerlink" href="#negation" title="Permalink to this headline">¶</a></h4>
<p>This is the only unitary operator (working with a unique proposition) noted <img class="math" src="_images/math/240c2a15820af88bf23cd3cf397c282846c885fe.svg" alt="\lnot p"/>. The truth table for negation (NOT) is:</p>
<table border="1" class="docutils">
<colgroup>
<col width="39%" />
<col width="61%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head"><img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/></th>
<th class="head"><img class="math" src="_images/math/240c2a15820af88bf23cd3cf397c282846c885fe.svg" alt="\lnot p"/></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>0</td>
<td>1</td>
</tr>
<tr class="row-odd"><td>1</td>
<td>0</td>
</tr>
</tbody>
</table>
<p>It is interesting to remark that <img class="math" src="_images/math/6bbe0e3f8e0d8809dc886ad82e3ee963086835c2.svg" alt="\lnot\lnot p = p"/></p>
</div>
<div class="section" id="conjunction-land">
<h4>2.1.3.2.2. Conjunction <img class="math" src="_images/math/3e07e4974841ed5227a4e1a71643e78e51a11530.svg" alt="\land"/><a class="headerlink" href="#conjunction-land" title="Permalink to this headline">¶</a></h4>
<p>Conjunction of two propositions <img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/> and <img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/> is noted <img class="math" src="_images/math/364f5efb7d55511403d0cb8dbdeb08b6125c7643.svg" alt="p \land q"/>. Evaluation of this propositional formula is <em>true</em> only if <img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/> and <img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/> are <em>true</em>. The corresponding truth table for conjunction (AND) is:</p>
<table border="1" class="docutils">
<colgroup>
<col width="27%" />
<col width="27%" />
<col width="46%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head"><img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/></th>
<th class="head"><img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/></th>
<th class="head"><img class="math" src="_images/math/364f5efb7d55511403d0cb8dbdeb08b6125c7643.svg" alt="p \land q"/></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>0</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-even"><td>1</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>1</td>
<td>1</td>
<td>1</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="disjunction-lor">
<h4>2.1.3.2.3. Disjunction <img class="math" src="_images/math/e9e6f60409b47ef34cda0dfa4ebf5c9493d785af.svg" alt="\lor"/><a class="headerlink" href="#disjunction-lor" title="Permalink to this headline">¶</a></h4>
<p>Disjunction of two propositions <img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/> and <img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/> is noted <img class="math" src="_images/math/983070e8a9d9464cbf04ffac6de94bfcd65963b5.svg" alt="p \lor q"/>. Evaluation of this propositional formula is <em>false</em> only if <img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/> and <img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/> are <em>false</em>. The corresponding truth table for disjunction (OR) is:</p>
<table border="1" class="docutils">
<colgroup>
<col width="27%" />
<col width="27%" />
<col width="46%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head"><img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/></th>
<th class="head"><img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/></th>
<th class="head"><img class="math" src="_images/math/983070e8a9d9464cbf04ffac6de94bfcd65963b5.svg" alt="p \lor q"/></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>0</td>
<td>1</td>
<td>1</td>
</tr>
<tr class="row-even"><td>1</td>
<td>0</td>
<td>1</td>
</tr>
<tr class="row-odd"><td>1</td>
<td>1</td>
<td>1</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="exclusive-disjunction-oplus">
<h4>2.1.3.2.4. Exclusive disjunction <img class="math" src="_images/math/71aa93f6f482a3c8f808373e78072d3217161411.svg" alt="\oplus"/><a class="headerlink" href="#exclusive-disjunction-oplus" title="Permalink to this headline">¶</a></h4>
<p>The exclusive disjunction of two propositions <img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/> and <img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/> is noted <img class="math" src="_images/math/e7f52941504a3e11f2819671b2891298f4bfcb1a.svg" alt="p \oplus q"/>. Evaluation of this propositional formula is <em>true</em> if only one of <img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/> and <img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/> is <em>true</em>. The corresponding truth table for exclusive disjunction (XOR) is:</p>
<table border="1" class="docutils">
<colgroup>
<col width="26%" />
<col width="26%" />
<col width="49%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head"><img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/></th>
<th class="head"><img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/></th>
<th class="head"><img class="math" src="_images/math/e7f52941504a3e11f2819671b2891298f4bfcb1a.svg" alt="p \oplus q"/></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>0</td>
<td>1</td>
<td>1</td>
</tr>
<tr class="row-even"><td>1</td>
<td>0</td>
<td>1</td>
</tr>
<tr class="row-odd"><td>1</td>
<td>1</td>
<td>0</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="implication-rightarrow">
<h4>2.1.3.2.5. Implication <img class="math" src="_images/math/dba201042399067d132d07fb623ec34823682ff1.svg" alt="\Rightarrow"/><a class="headerlink" href="#implication-rightarrow" title="Permalink to this headline">¶</a></h4>
<p>Implication between two propositions <img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/> and <img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/> is noted <img class="math" src="_images/math/0bc5192bc3258325e44f598c9ce08f046cc5de41.svg" alt="p \Rightarrow q"/>. Evaluation of this propositional formula is <em>false</em> only if <img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/> is <em>true</em> and <img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/> is <em>false</em>. The corresponding truth table for implication (IMPLY) is:</p>
<table border="1" class="docutils">
<colgroup>
<col width="23%" />
<col width="23%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head"><img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/></th>
<th class="head"><img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/></th>
<th class="head"><img class="math" src="_images/math/0bc5192bc3258325e44f598c9ce08f046cc5de41.svg" alt="p \Rightarrow q"/></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>0</td>
<td>0</td>
<td>1</td>
</tr>
<tr class="row-odd"><td>0</td>
<td>1</td>
<td>1</td>
</tr>
<tr class="row-even"><td>1</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>1</td>
<td>1</td>
<td>1</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="biconditional-leftrightarrow">
<h4>2.1.3.2.6. Biconditional <img class="math" src="_images/math/b6596e1e2bb4c0d8eb499f66b32b4c692e1226f9.svg" alt="\Leftrightarrow"/><a class="headerlink" href="#biconditional-leftrightarrow" title="Permalink to this headline">¶</a></h4>
<p>Biconditional between two propositions <img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/> and <img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/> is noted <img class="math" src="_images/math/607e21b97a27adef5e455e44fa627e63a3716ec1.svg" alt="p \Leftrightarrow q"/>. Evaluation of this propositional formula is <em>false</em> if only one of <img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/> and <img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/> is <em>false</em>. The corresponding truth table for Biconditional (XNOR) is:</p>
<table border="1" class="docutils">
<colgroup>
<col width="22%" />
<col width="22%" />
<col width="57%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head"><img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/></th>
<th class="head"><img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/></th>
<th class="head"><img class="math" src="_images/math/607e21b97a27adef5e455e44fa627e63a3716ec1.svg" alt="p \Leftrightarrow q"/></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>0</td>
<td>0</td>
<td>1</td>
</tr>
<tr class="row-odd"><td>0</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-even"><td>1</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>1</td>
<td>1</td>
<td>1</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="other-notations-for-operators">
<h3>2.1.3.3. Other notations for operators<a class="headerlink" href="#other-notations-for-operators" title="Permalink to this headline">¶</a></h3>
<p>Sometimes, other notations can be found for operators:</p>
<ul class="simple">
<li><img class="math" src="_images/math/240c2a15820af88bf23cd3cf397c282846c885fe.svg" alt="\lnot p"/> can also be written <img class="math" src="_images/math/e1da7d549fc0429096f9f4e233a786ffdb89bf3b.svg" alt="\overline p"/></li>
<li><img class="math" src="_images/math/364f5efb7d55511403d0cb8dbdeb08b6125c7643.svg" alt="p \land q"/> can also be written <img class="math" src="_images/math/3758ed0a891d900624e3c167bfb27264807b3212.svg" alt="p \cdot q"/></li>
<li><img class="math" src="_images/math/983070e8a9d9464cbf04ffac6de94bfcd65963b5.svg" alt="p \lor q"/> can also be written <img class="math" src="_images/math/131f2491c22a786a6e9f835a6d60c5920ebebd67.svg" alt="p + q"/></li>
</ul>
</div>
<div class="section" id="evaluation-of-a-compound-proposition">
<h3>2.1.3.4. Evaluation of a compound proposition<a class="headerlink" href="#evaluation-of-a-compound-proposition" title="Permalink to this headline">¶</a></h3>
<p><strong>Evaluate</strong> a compound proposition consists in determining the truth value of the compound proposition given a truth assignment.</p>
<p>This is done in practice by replacing proposition constants by there values in formula. For example, the evaluation of compound proposition <a class="reference internal" href="#equation-formula-ex">Eq.2.1</a> under the truth assignment <img class="math" src="_images/math/a62d0a6a1f310550f995c76abfeb5667391b5786.svg" alt="(p = 0, q=1, r=0)"/> is :</p>
<div class="math">
<p><img src="_images/math/c5947cdb68b2a462428250ca6ce14d8ba3bbc97c.svg" alt="\[
\begin{array}{cc}
F = & ((p\land q) \lor (\lnot r)) \Rightarrow p \\
& ((0\land 1) \lor (\lnot 0)) \Rightarrow 0 \\
& (1 \lor 1) \Rightarrow 0 \\
& 1 \Rightarrow 0 \\
& 0
\end{array}
\]"/></p>
</div><p>The evaluation of <a class="reference internal" href="#equation-formula-ex">Eq.2.1</a> under the truth assignment <img class="math" src="_images/math/a62d0a6a1f310550f995c76abfeb5667391b5786.svg" alt="(p = 0, q=1, r=0)"/> is <em>false</em>.</p>
</div>
<div class="section" id="truth-tables-for-compounds-propositions">
<h3>2.1.3.5. Truth tables for compounds propositions<a class="headerlink" href="#truth-tables-for-compounds-propositions" title="Permalink to this headline">¶</a></h3>
<p>truth tables for compounds propositions allows to determine exhaustively the truth values of compounds propositions for each possible truth assignment. They are build by adding as many columns as necessary to evaluate sub-propositions. As example, let us consider the propositional formula of <a class="reference internal" href="#equation-formula-ex">Eq.2.1</a>. The corresponding truth table is:</p>
<table border="1" class="docutils" id="id2">
<caption><span class="caption-number">Table 2.1: </span><span class="caption-text">truth table for <a class="reference internal" href="#equation-formula-ex">Eq.2.1</a></span><a class="headerlink" href="#id2" title="Permalink to this table">¶</a></caption>
<colgroup>
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="17%" />
<col width="15%" />
<col width="28%" />
<col width="10%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head"><img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/></th>
<th class="head"><img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/></th>
<th class="head"><img class="math" src="_images/math/d6ce91cdb456a31a526334901a14ca60775adb84.svg" alt="r"/></th>
<th class="head"><img class="math" src="_images/math/364f5efb7d55511403d0cb8dbdeb08b6125c7643.svg" alt="p \land q"/></th>
<th class="head"><img class="math" src="_images/math/6a4cb47e0fa56f428fd486dca67c79150d10e798.svg" alt="\lnot r"/></th>
<th class="head"><img class="math" src="_images/math/a80c905114ba89b9163d41d7272fb584bc52de78.svg" alt="(p\land q)\lor\lnot r"/></th>
<th class="head"><img class="math" src="_images/math/29769ff2b024fb2a8abc2b82ca336b8941ad74c1.svg" alt="F"/></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>0</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
</tr>
<tr class="row-even"><td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
</tr>
<tr class="row-even"><td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>1</td>
</tr>
<tr class="row-odd"><td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
</tr>
<tr class="row-even"><td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
</tr>
<tr class="row-odd"><td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="satisfaction">
<h3>2.1.3.6. Satisfaction<a class="headerlink" href="#satisfaction" title="Permalink to this headline">¶</a></h3>
<p>A truth assignment is said to <strong>satisfy</strong> a proposition if and only if the proposition is evaluated as <em>true</em> under that truth assignment.</p>
<p>A truth assignment is said to <strong>falsify</strong> a proposition if and only if the proposition is evaluated as <em>false</em> under that truth assignment.</p>
<ul class="simple">
<li>A proposition is said <strong>valid</strong> if and only if it <em>satisfies</em> every truth assignment.</li>
<li>A proposition is said <strong>unsatisfiable</strong> if and only if it <em>satisfies</em> any truth assignment.</li>
<li>A proposition is said <strong>contingent</strong> if and only if some truth assignments <em>satisfies</em> it and some other <em>falsifies</em> it.</li>
</ul>
<p>Here are some examples:</p>
<ol class="arabic simple">
<li>As example, the proposition defined in <a class="reference internal" href="#equation-formula-ex">Eq.2.1</a> is <em>contingent</em> since 6 truth assignments <em>satisfies</em> the proposition and 2 <em>falsifies</em> it.</li>
<li>the formula <img class="math" src="_images/math/ffbe66af5f0a99a78a06d96d0830c26a7e607f34.svg" alt="p \lor \lnot p"/> is <em>valid</em></li>
<li>the formula <img class="math" src="_images/math/4b3c1e2ed04fa5909b2b33761ab89044d457853d.svg" alt="p \land \lnot p"/> is <em>unsatisfiable</em></li>
</ol>
</div>
<div class="section" id="natural-language-and-logic">
<h3>2.1.3.7. Natural language and logic<a class="headerlink" href="#natural-language-and-logic" title="Permalink to this headline">¶</a></h3>
<p>Propositional logic can be used to formalize natural language by encoding sentences and thus helps to solve logical problems.</p>
<p>Consider the following sentence: <em>If a student does not work hard in physics or in informatics, he will not become an engineer</em>. This sentence is composed with 3 statements:</p>
<ul class="simple">
<li>p: <em>student works hard in physics</em></li>
<li>i: <em>student works hard in informatics</em></li>
<li>e: <em>student will become an engineer</em></li>
</ul>
<p>This sentence can be easily traduced in propositional logic by the formula:</p>
<div class="math">
<p><img src="_images/math/b4d88b944b0ced612f0cacfdcf828d2e00f59081.svg" alt="\lnot p \lor \lnot i \Rightarrow \lnot e"/></p>
</div></div>
</div>
<div class="section" id="propositional-analysis">
<h2>2.1.4. Propositional Analysis<a class="headerlink" href="#propositional-analysis" title="Permalink to this headline">¶</a></h2>
<div class="section" id="logical-equivalence">
<h3>2.1.4.1. Logical equivalence<a class="headerlink" href="#logical-equivalence" title="Permalink to this headline">¶</a></h3>
<p>The logical equivalence can be intuitively understand: Two propositions are equivalent if they says the same thing.</p>
<p>Two propositions F and G are thus said <strong>logically equivalent</strong> if and only if every truth assignment that satisfies F satisfies G and every truth assignment that satisfies G satisfies F. In that case we will write:</p>
<div class="math">
<p><img src="_images/math/327668da0fbfd99e8c74e1dc2e447d32db7c472a.svg" alt="F \equiv G"/></p>
</div><p>It is possible to check the equivalence between two propositions by determining their truth tables and compare results.</p>
<div class="admonition caution">
<p class="first admonition-title">Caution</p>
<p class="last"><strong>Logical equivalence</strong> is a semantic equivalence that should not be confused with <strong>biconditional</strong> that is a syntax operator for logical propositions.</p>
</div>
</div>
<div class="section" id="logical-properties">
<span id="sec-logical-properties"></span><h3>2.1.4.2. Logical properties<a class="headerlink" href="#logical-properties" title="Permalink to this headline">¶</a></h3>
<p>It is possible to demonstrate an important number of logical properties. Thus, we have:</p>
<div class="section" id="commutation">
<h4>2.1.4.2.1. Commutation<a class="headerlink" href="#commutation" title="Permalink to this headline">¶</a></h4>
<p>conjunction and disjunction operators can commute:</p>
<div class="math">
<p><img src="_images/math/a407bc69bb3b5a732db37091d2f8168f85e6279c.svg" alt="\[
\begin{array}{ccc}
p \land q & \equiv & q \land p \\
p \lor q & \equiv & q \lor p
\end{array}
\]"/></p>
</div></div>
<div class="section" id="association">
<h4>2.1.4.2.2. Association<a class="headerlink" href="#association" title="Permalink to this headline">¶</a></h4>
<p>conjunction and disjunction operators are associative:</p>
<div class="math">
<p><img src="_images/math/0391a9b25540d85bdf5a172ad8a4c966309d1a75.svg" alt="\[
\begin{array}{ccc}
(p \land q) \land r & \equiv & p \land ( q \land r) \\
(p \lor q) \lor r & \equiv & p \lor ( q \lor r)
\end{array}
\]"/></p>
</div></div>
<div class="section" id="distribution">
<h4>2.1.4.2.3. Distribution<a class="headerlink" href="#distribution" title="Permalink to this headline">¶</a></h4>
<p>conjunction and disjunction operators are distributive:</p>
<div class="math">
<p><img src="_images/math/1ea93ca293406128bcc3188d84e90c89010f3196.svg" alt="\[
\begin{array}{ccc}
p \land (q \lor r) & \equiv & (p \land q) \lor( p \land r) \\
p \lor (q \land r) & \equiv & (p \lor q) \land( p \lor r)
\end{array}
\]"/></p>
</div></div>
<div class="section" id="neutral-elements">
<h4>2.1.4.2.4. Neutral elements<a class="headerlink" href="#neutral-elements" title="Permalink to this headline">¶</a></h4>
<p><em>true</em> is neutral for conjunction and <em>false</em> is neutral for disjunction:</p>
<div class="math">
<p><img src="_images/math/16ec7e390950d24c3d188e905b1dbf27bfee9746.svg" alt="\[
\begin{array}{ccc}
p \land true & \equiv & p \\
p \lor false & \equiv & p
\end{array}
\]"/></p>
</div></div>
<div class="section" id="absorptive-elements">
<h4>2.1.4.2.5. Absorptive elements<a class="headerlink" href="#absorptive-elements" title="Permalink to this headline">¶</a></h4>
<p><em>false</em> is absorptive for conjunction and <em>true</em> is absorptive for disjunction:</p>
<div class="math">
<p><img src="_images/math/45356ffcfb3f68394cf99d4fb07b8cb402419202.svg" alt="\[
\begin{array}{ccc}
p \land false & \equiv & false \\
p \lor true & \equiv & true
\end{array}
\]"/></p>
</div></div>
<div class="section" id="elimination-of-logical-operators">
<span id="sec-chap1-eliminateoperators"></span><h4>2.1.4.2.6. Elimination of logical operators<a class="headerlink" href="#elimination-of-logical-operators" title="Permalink to this headline">¶</a></h4>
<p>Some operators can be eliminate to the profit of others. This is the case for <em>implication</em>, <em>biconditional</em> and <em>exclusive disjunction</em>:</p>
<div class="math">
<p><img src="_images/math/53be1eaabace23cdc8bd7ad61e1ed3c295d45b77.svg" alt="\[
\begin{array}{ccc}
p \Rightarrow q & \equiv & \lnot p \lor q \\
p \Leftrightarrow q & \equiv & (p \Rightarrow q) \land (q \Rightarrow p) \\
p \oplus q & \equiv & \lnot (p \Leftrightarrow q)
\end{array}
\]"/></p>
</div></div>
<div class="section" id="morgan-s-laws">
<h4>2.1.4.2.7. Morgan’s laws<a class="headerlink" href="#morgan-s-laws" title="Permalink to this headline">¶</a></h4>
<div class="math">
<p><img src="_images/math/e63f6ac44cfa714707e07511d7958c640b2e3e23.svg" alt="\[
\begin{array}{ccc}
\lnot (p \land q) & \equiv & \lnot p \lor \lnot q \\
\lnot (p \lor q) & \equiv & \lnot p \land \lnot q
\end{array}
\]"/></p>
</div></div>
</div>
<div class="section" id="full-system-of-operators">
<span id="sec-chap1-fullsystem"></span><h3>2.1.4.3. Full system of operators<a class="headerlink" href="#full-system-of-operators" title="Permalink to this headline">¶</a></h3>
<p>A system of logical operators is said <strong>functionally complete</strong> on a propositional language if every logical formula of this language can be expressed in terms of this system’s operators.</p>
<p>If we consider a finite domain of propositional constants, ie. <img class="math" src="_images/math/bcd71b5af73d41ee896f180e182a8fa5b742ca39.svg" alt="\mathcal{V}=\{ p_1,p_2, .. p_n \}"/> and <img class="math" src="_images/math/39582768b980f0b3ec034ec29e8d710181afbd2d.svg" alt="\mathcal{F}"/> representing the domain of propositional formulas that can be build on this vocabulary.</p>
<ol class="arabic simple">
<li>We can say that the system <img class="math" src="_images/math/7f4088bc3a7f7f4d6ceeb251e289a620b46bdc8c.svg" alt="S=\{ \lnot, \land, \lor\}"/> is functionally complete. This can be demonstrate easily from properties of section <a class="reference internal" href="#sec-chap1-eliminateoperators"><span class="std std-ref">Elimination of logical operators</span></a>.</li>
<li><img class="math" src="_images/math/6c367b1b90be0442fa92ce9614f36f9884de18c6.svg" alt="\{ \lnot, \land\}"/> and <img class="math" src="_images/math/264d08e9958d6c3051b561c6ad033998167e0ae5.svg" alt="\{ \lnot, \lor\}"/> are also functionally complete systems.</li>
</ol>
<div class="section" id="the-nand-and-nor-operators">
<h4>2.1.4.3.1. The NAND and NOR operators<a class="headerlink" href="#the-nand-and-nor-operators" title="Permalink to this headline">¶</a></h4>
<p>The NAND and NOR operators respectively for ‘not and’ and ‘not or’ are defined by the following truth table:</p>
<table border="1" class="docutils">
<colgroup>
<col width="15%" />
<col width="15%" />
<col width="36%" />
<col width="35%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head"><img class="math" src="_images/math/4125d21fc2fa84618db934e33d806ba00eda7b8b.svg" alt="p"/></th>
<th class="head"><img class="math" src="_images/math/36d0fe14b74715661e99e80224981800b937f2d7.svg" alt="q"/></th>
<th class="head"><img class="math" src="_images/math/778b28e7ef4b52fd09020231e8e5b7e339ce1b39.svg" alt="p \text{ NAND } q"/></th>
<th class="head"><img class="math" src="_images/math/73b7e2971e80adea54af718c3edeaca9302718f2.svg" alt="p \text{ NOR } q"/></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
</tr>
<tr class="row-odd"><td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-even"><td>1</td>
<td>0</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
</tr>
</tbody>
</table>
<p>Systems {NAND} and {NOR} are functionally complete and are used for digital circuits.</p>
</div>
</div>
<div class="section" id="normal-forms">
<h3>2.1.4.4. Normal forms<a class="headerlink" href="#normal-forms" title="Permalink to this headline">¶</a></h3>
<p>A clause containing only the <img class="math" src="_images/math/e9e6f60409b47ef34cda0dfa4ebf5c9493d785af.svg" alt="\lor"/> connector between propositional constants (or their negation) is called a <strong>disjunctive clause</strong>, also called <strong>maxterm</strong>.</p>
<p>A clause containing only the <img class="math" src="_images/math/3e07e4974841ed5227a4e1a71643e78e51a11530.svg" alt="\land"/> connector between propositional constants (or their negation) is called a <strong>conjunctive clause</strong>, also called <strong>minterm</strong>.</p>
<p>Let us consider a propositional formulae F composed with propositional constants of vocabulary <img class="math" src="_images/math/bcd71b5af73d41ee896f180e182a8fa5b742ca39.svg" alt="\mathcal{V}=\{ p_1,p_2, .. p_n \}"/>.</p>
<p>We call <strong>disjunctive normal form</strong> (DNF) of propositional formulae F, the propositional formula <img class="math" src="_images/math/67de134e69ccfdbb6db273a9f383b4bcef430193.svg" alt="F_D"/> semantically equivalent to F and that is a disjunction of <em>conjunctive clauses</em> relative to F.</p>
<p>We call <strong>conjunctive normal form</strong> (CNF) of propositional formulae F, the propositional formula <img class="math" src="_images/math/a5a746f18497f69f0c5e3a988c1737943120c11f.svg" alt="F_C"/> semantically equivalent to F that is a disjunction of <em>conjunctive clauses</em> relative to F.</p>
<p>A propositional formulae F admit a unique CNF and a unique DNF.</p>
<p>Writing the CNF or DNF of a propositional formulae is a way to determine if it is <em>valid</em> or <em>unsatisfiable</em>. It can be easily done using properties of section <a class="reference internal" href="#sec-logical-properties"><span class="std std-ref">Logical properties</span></a></p>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="chap1_2binaryEncoding.html" class="btn btn-neutral float-right" title="2.2. Binary encoding" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="chap1_binaryLogic_Chap.html" class="btn btn-neutral float-left" title="2. Binary logic" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2019, Polytech ME Info team : LB, CM, FP, JV
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>