0% found this document useful (0 votes)
4 views16 pages

Cour 1,2

The document discusses the foundations and applications of logic, particularly in philosophy and computer science, highlighting its role in reasoning, problem-solving, and the development of computer systems. It covers key concepts such as assertions, logical connectors, propositional logic, and the structure of logical systems, including syntax, semantics, and proof theory. Additionally, it outlines the rules of deduction and the formalization of statements using logical language.

Uploaded by

Sàboh-à Dél
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views16 pages

Cour 1,2

The document discusses the foundations and applications of logic, particularly in philosophy and computer science, highlighting its role in reasoning, problem-solving, and the development of computer systems. It covers key concepts such as assertions, logical connectors, propositional logic, and the structure of logical systems, including syntax, semantics, and proof theory. Additionally, it outlines the rules of deduction and the formalization of statements using logical language.

Uploaded by

Sàboh-à Dél
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Introduction :

Logic, in the philosophical is the sense of the term, dates back to the Greek period. The first
person to teach logic was the philosopher Aristotle.
Logic can be defined as
‘the science that studies the general rules of correct reasoning’.

The aim of the study of logic is therefore :


4. To reason correctly
5. Solve complex problems
6. Find solutions quickly

Logic in relation to computer science , 2 roles :

 founding role : Logic provides a mathematical foundation for properly defining and
dealing with the fundamental concepts of computer science. e.g.: properly defining the
notion of a problem with an algorithmic solution in the Calculability and Complexity
course in L3. It also provides good training in correct and precise reasoning, and the
description of concepts without ambiguity.
 internal role: model, specify, verify, reason automatically, provide the basis for certain
programming languages, etc.

The use of mathematical logic is not confined to the purely theoretical, but it contributed
significantly to the birth of the first computers. The binarity of truth values is the basis of all
the electronic circuits that make up a computer.
Subsequently, the foundations of mathematical logic have made a major contribution to the
applications of artificial intelligence.

 Logic is required in several courses/areas of training in computer science:


 Basis for the way logic programming languages compute (example : PROLOG, same
paradigm).
 Basis for certain AI techniques (in planning, machine learning, etc.)

1- Assertion
An assertion is a mathematical statement to which one of two logical values is assigned: true
(T) or false (F).

 Example:

Assertion 1 + 1 = 2 is true.

Assertion 2 + 2 = 5 is false

2- Connectors

There are five (5) logical connectors, the basis of all mathematical reasoning.

Let P and Q be two assertions

2.1 The negation no or ”¬”


We will call the negation of P, the assertion (not P) and which will be noted in
formalized form ¬P or

Let be the proposition P . The negation of a (true) proposition P is a false proposition. If P


(false) then P is true.

 Negation of negation

In general, a double negation often reinforces the negation, such as : do you want to go out?
no, no.

In mathematics, a double negative is considered an affirmation.

Examples

 1- If P is the proposition x = 0, ¬P is the proposition x ≠ 0

2- 05 is not even, so 05 is odd.

2.2 Conjunction and or∧

denoted P ∧ Q.
We will call the conjunction of P and Q, the assertion (P and Q) and which will be

Example
P: The earth is round (true) and Q: The sky is blue (true).
So P and Q or P Q is The earth is round AND the sky is blue. P Q is true. We say that
the proposition P Q is false if at least one of the two propositions is false. two
propositions are false. So The earth is round AND the sky is green is a false
proposition.

 The result of the conjunction is shown by the truth table


 Disjunction « or » or « ∨ »

be noted P ∨ Q
We will call the disjunction of P and Q, the assertion (P or Q) which will

 The result of the disjunction is demonstrated by the truth table

 Implication

The proposition denoted P ⇒Q corresponds to the proposition Non P or Q.

P is then called the hypothesis and Q the conclusion. P ⇒ Q is a


proposition called which we can read in different ways:

If P then Q,

For P there must be Q,

For Q to exist, P must exist,

P is a sufficient condition for Q,,

Q is a necessary condition for P.

 The result of the


implication is shown in
table
The assertion is true if P is false (whatever the truth of Q). If P is true and (P ⇒ Q) true, then
Q is true. Furthermore, the implication Q ⇒ P the reciprocal of the implication P

exqmple : If x∈{ 5,6,9} then x≤ 9 is a true assertion

 Equivalence « ⇔ »

We will say that two assertions are logically equivalent if they have the
same truth value and will be noted P ⇔ Q.

In other words, P⇔ Q is true if P and Q are both true or both false.

The proposition P ⇔ Q corresponds to the proposition (P ⇒ Q) and (Q ⇒


P).

We can express it as follows:

 P is equivalent to Q,
 For P, Q is necessary and
sufficient,
 P is a necessary and
sufficient condition for Q
 P if and only if Q.

 The result of the equivalence


is shown in table

Example

Take (P and Q) and (Not


(Not P or Not Q)). See
the result in table

 Propositional logic
 The logic of propositions (or propositional logic - is a mathematical
theory which allows part of human reasoning to be formally
modeled.

We are interested in simple statements of natural language which


are:

1. syntactically correct (respects grammar)


2. semantically correct (have meaning)
3. to which we can associate, without ambiguity, a truth value (True or
False)

 So A Logic System generally consists of three things:

1. Syntax - a formal language (such as a programming language)


that will be used to used to express (formalise) concepts

2. Semantics - the precise meaning of the formal language

3. Proof theory - purely syntactic mechanisms for obtaining or


identifying valid’ statements in the language. It provides a means of
arguing in formal language.

E xample:
The earth is spherical … True
The sun revolves around the earth … False
We say that the truth value of the first sentence = True

The proposition can be affirmative or negative


Example:
Sentence 1 is affirmative
Its negative form: the earth is not spherical
The proposition can be compound. In this case its truth value
depends on the truth values of the propositions that compose it:
“The earth is spherical and revolves around the sun”
This proposition is true because it is the conjunction of two
true propositions

There are sentences that are not informative:


How old are you?
Put your things away.
These sentences are obviously not considered as propositions
because we cannot say true or false
The paradox
It is an informative sentence But it is neither true nor false
Example: "I am lying"

The logic of propositions allows:

- The representation of propositions in a formal way using a language;

- The deduction of new propositions from a set of propositions using a


deductive system;

- The formal verification of the veracity (True or False) of propositions by


the use of truth tables (among others).

The Language of the logic of propositions

This language is composed of 2 sets

The symbols (the Alphabet)

Formulas (simple and compound) (Words and sentences)

Notation: The Language of the logic of propositions will be noted: Lp

the set of symbols (Alphabet)

Definition 1 (Alphabet): The alphabet of language p consists of three


classes of symbols :

Propositional variable symbols designated by Latin letters : P, a, R, P1,


P2,...

Logical symbols or connectors: these are the symbols that link


propositions together:

-a monary connector:‘¬’ called ‘logical NOT

-a binary connector: ‘A’ called: ‘logical AND’ or‘Conjunction’.


These are primitive (or basic) connectors. Note: Lp(¬, ^)

Auxiliary symbols: opening parenthesis “(” and closing parenthesis “)”.

Definition 2 (Formulas): the set of formulas (well formed expressions:


expressions bien formées : ebf) of the language Lp(¬, ^) A is defined
recursively in the following way:

1. Any propositional variable of the alphabet of Lp(¬, ^) is a formula,


called a simple or atomic formula;

2. If α and ß are formulas of Lp(¬, ^) then: ¬ α and α vß are formulas,


called compound formulas.

Examples of Language formulas

1. P,Q, P,, P, are simple formulas of Lp(¬, ^)

2. -P, 5P, ¬PAa, ¬ (PAa), ¬¬ (PA -Q) are: formulas composed of Lp(¬, ^)

Note The Greek letters (subdicated or not) a, B, ŏ, a, az,. symbols of the


metalanguage They are used to name and identify the formulas of the
language Lp(¬, ^)

Abbreviation connectors

We add in the language Lp(¬, ^) the following logical symbols


representing abbreviation connectors

“∨” called “logical OR” or “Disjunction”

α∨ ß=def ¬ (¬ α ^¬ß)

“→ “ called “Arrow”

α →ß =def¬ (α ^¬ß)

“↔” called “Double Arrow”

α ↔ ß=def (α → ß) ^ (ß→ α)

=def ¬ (α ^¬ß) ^¬ (ß^¬ α)


 Priority in the evaluation of connectors

Priority
between

arithmetic operators (, -, and /) Expressions are evaluated according


to a priority established in advance.

This is why the arithmetic expression: 2 53 is evaluated at 17 and not at


21! Because multiplication (") has more priority than addition (). 2+
5* 3=2 +(5µ 3) = 2+ 15 = 17 Remark: The parentheses between 5*3
are superfluous in 2+ (5*3) since multiplication (*) is evaluates before
the addition (+ ) and therefore can be deleted: 2+ (5*3) will be noted
more simply 2+5*3

 Priority in the evaluation of connects In the same way (Priority


between arithmetic operators (+, -, *and /) )

In order to simplify writing formulas in Lp, certain parentheses can


be eliminated, agreeing a priority between connects as follows:

1. Parentheses (from left to right and from the most internal to the
most external)

3. ∧ , ∨ (left to right),
2. ¬ (innermost first), le plus interne d'abord

4. →and ↔ (left to right).

Examples:

(α∨β)∧ δ) will be noted: α∨β∧ δ

((α → β) → δ) will be noted: a-→ β → δ

((α ∨ β) → δ) will be noted: α ∨ β→ δ

(α ∨ (β → δ)) will be noted: α ∨ (β → δ)

Parentheses with the color red are called “superfluous parentheses”, They
can be eliminated
Note: The external parentheses of a formula are also superfluous
parentheses: (α) will be noted α

 Example of formalisation in Lp: Ali, Brahim and Chamssou are


leaving the restaurant.
 Ali explains: "None of us had dessert".
 Brahim explains: "If Ali had dessert, then I had dessert."
 Chamssou explains: "I had dessert, but either Ali or Brahim did not
have dessert".

Use of propositional variables:

A: to express that "Ali had a dessert".

B: to express that “Brahim had a dessert”

C: to express that “Chamssou had a dessert ”

 The 03 statements are formalised in Lp

 Example of formalisation in Lp

 The 03 statements are formalised in Lp

Decomposition tree

 For each formula δ, it is possible to find the formulas used to


construct it.
 To do this, we build the decomposition tree of δ using the
parentheses used in δ as a guide.
 cut at the main connector of the formula δ
 remove the outermost brackets from each of the arguments of the
main connector
 repeat the decomposition operation for each of the arguments until
we arrive at the variables

E xamples: The decomposition tree of


 T he deductive system (¬, ∧) is a formal means which allows us to
demonstrate that we can construct a new formula β from a set of
starting formulas {α 1, ..α n} using syntactic transformation rules
(form transformation)

 The rules of the deductive system (¬, ∧) make it possible to


construct a new formula from a set of formulas and a given
situation.
 They are, in general, of the form:

 The formulas α1,..., αn, are the conditions of the rule


 Formula β is the conclusion of the rule
 (R) is the name of the deduction rule

 Representation of deduction

 The deduction will be


represented in the
form of a tree


 Definition (Deduction): A deduction in the deductive system (¬, ∧) is
a finite tree using the rules called the Natural Gentzen rules , whose
leaves are the initial premises (hypotheses) and whose root is the
Conclusion.

 For Each of the logical connectors¬ and ∧We associate:


 A rule for introducing the logical connector which makes it possible
to deduce a formula composed using this connector.note (I¬, I ∧)
 A rule for eliminating the logical connector which is used to deduce a
simpler formula by eliminating this connector. Note (E¬,E ∧)

 T he Rules of connector ∧

1- Rule of introduction of ∧, noted: ( I ∧):

 It expresses the fact that:

deduce the formula α ∧ β”.


“if we have the formula α and if we also have the formula β then we can

 The Rules of connector ∧

of ∧ ,
noted: (E ∧ )
2- Rule of elimination

I t has two (02) forms

It expresses the fact that:

“if we have the formula α ∧ β then we can deduce either the formula α (1st
Form) or the formula β (2nd Form), depending on what we wish to
have.”

 The Rules of the connector¬

1-Rule of Elimination of ¬, noted: (E ¬)

It expresses the fact that:

“if we have the formula ¬¬α then we can deduce the formula α”

“The negation of the negation is The affirmation!”

 The Rules of the connector¬


2- Rule of introduction of the ¬
, noted: (I ¬)

If from the supposed hypothesis α (and the others), we can deduce a


formula and its negation (β and ¬ β) (it is a contradiction, denoted: ┴),
then we can deduce the formula- ¬ α (negation of α ) by removing α”.

Notations

Let Γ be a set of formulas and β a formula, we note:

 Γ ├ β : if there exists a deduction D having the conclusion β and of


which all the premises (hypotheses) not eliminated are in I.
 We say that D is a deduction of β from Γ
 ├ β : if there exists a deduction D having the conclusion β and from
which all the premises (hypotheses) have been eliminated.
 In this case (Γ =Ø), We say that β is a theorem in Lp (¬, ∧) .
 If Γ is a set of formulas and B, α, α 1, ..., α n are formulas, then we
will note:
 α 1, .., α n ├ β , instead of :{ α 1, .., α n }├ β
 Γ, α ├ β instead of To Γ Ս {α} ├ β

Strategy

 Let us show that: α1,, ..., αn, ├ β?

To be able to construct β, we often assume in addition to the initial


hypotheses: ¬ β (the negation of the conclusion).

We make a demonstration by,


the Absurd

Strategy (Generalization)

α1 ,…, αn ├ β
In general, to construct β,
we often assume
in addition to the
initial hypotheses: ¬
β and possibly other
formulas δ1,, ..,
δm with (m≥0).

 Example 1:

Show that we can deduce α∨β from α : α├ α∨β ?

Given that we are in the deductive system of Lp(¬,∧ ), we must replace


the ∨ by its definition.

 Example 2:

Show the deduction ├ α∨¬α which can also be translated by showing that
├ α∨¬α is a theorem of Lp

Note: there are no initial hypotheses (this is the case Γ = Ø) Given that
we are in the deductive system of L p(¬, ∧), we must replace the ∨ by its
definition

 Example 3:
Show the following deduction:

α→β,α├β

Given that we are in the deductive system of Lp(¬ ,∧), we must replace
the → by its definition.

¬ This amounts to showing: ¬ (α∧¬β), α ├ β

 T heorem (deduction):

If Γis a set of formulas and α,β are 2


formulas

Then we have:

 Demonstration:

We must show that the two deductions D1 and D2 are equivalent.

For this, we show the implications in both directions:

1st Case: Show D2, using D1 as hypothesis D1⇒D2

: Γ, α├ β ⇒ Γ ├ α →β

2nd Case: Show D1, using D2 as hypothesis D2⇒D1

: Γ ├ α →β ⇒ Γ, α├ β

1 st Case: Show D2, using


D1 as hypothesis
D1⇒D2

: Γ, α├ β ⇒ Γ ├ α →β
 Hypothesis: DI Conclusion: D2

In the deductive system of Lp(¬ ,∧):

Γ, α├ β ⇒ Γ ├ ¬(α ∧ ¬β). We then make the deduction D2

2nd Case: Show D1, using D2 as hypothesis D2⇒D1

: Γ ├ α →β ⇒ Γ, α├ β

 Hypothesis: D2 Conclusion: D1

In the deductive system of Lp (¬ ,∧):

Γ ├ ¬(α ∧ ¬β) ⇒ Γ, α├ β. We then make


the deduction D1

 Purpose of the theorem:

Allows us to simplify deductions where the conclusion is of the form: α1 →


α2 :

According to the theorem, it is equivalent to the deduction:

δ1 ,δ2 ,….., δn , α1 ├ α2

 Application of the theorem:

Show the deduction: ├(α→β)→(¬β→¬α)

The conclusion is of the form: δ1 → δ 2

 Let us therefore use the theorem:

It is equivalent to doing: α→β├ (¬β→¬α)

 The conclusion obtained is also of the form : δ1 → δ 2 Let's use the


theorem a second time.

It's equivalent to doing: α→β, ¬β├ ¬α

Note: that the deduction obtained is simpler to make than the initial
deduction

 Application of the theorem:


 Let us therefore show the deduction obtained:

α→β, ¬β├ ¬α

 Given that we
are in the
deductive
system of
Lp(¬ ,∧) we
must
replace the →
by its definition.
 This amounts to showing: ¬(α∧¬β), ¬β ├ ¬α

 Other Deductive Systems

Other deductive systems can be defined in the Lp language of


propositional logic.

The deductive system (¬, →)

T he rules of the connector → : (E →) and (I →)

 The rules of the connector ¬ (E¬) and (1¬) It is the same rules seen
previously

The deductive system (¬, ∨)

 T he rules of the connector


∨ : (E ∨) and (I ∨)

 The rules of the connector ¬ (E¬) and (1¬) It is the same rules seen
previously

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy