Differenze tra le versioni di "Logica fuzzy"
(completezza) |
(→Semantic) |
||
Riga 103: | Riga 103: | ||
and it can be read as "if and only if". | and it can be read as "if and only if". | ||
− | Exercise. Prove that the following formulas are tautologies for | + | Exercise. Prove that the following formulas are tautologies for all <math>\alpha, \beta \in FORM</math><br> |
''Hint: use the truth table''<br> | ''Hint: use the truth table''<br> | ||
#<math>\alpha \or \neg\alpha</math> | #<math>\alpha \or \neg\alpha</math> | ||
Riga 118: | Riga 118: | ||
#<math>(\alpha \to \beta) \to (\neg \alpha \to \beta)</math> | #<math>(\alpha \to \beta) \to (\neg \alpha \to \beta)</math> | ||
#<math>\neg((\alpha \to \beta) \to (\neg \beta) to \neg \alpha)</math> | #<math>\neg((\alpha \to \beta) \to (\neg \beta) to \neg \alpha)</math> | ||
+ | |||
+ | ====Relationship between syntax and semantic==== | ||
Definition (Axioms of LPC (Classical propositional logic)). For all <math>\alpha, \beta, \gamma \in FORM</math>, let's consider the following formulas. | Definition (Axioms of LPC (Classical propositional logic)). For all <math>\alpha, \beta, \gamma \in FORM</math>, let's consider the following formulas. | ||
Riga 134: | Riga 136: | ||
The formulas between 1 and 11 <math>\in AXIOM \subset FORM</math>.<br><math>AXIOM</math> is called '''set of the axioms of the classical propositional logic'''.<br> | The formulas between 1 and 11 <math>\in AXIOM \subset FORM</math>.<br><math>AXIOM</math> is called '''set of the axioms of the classical propositional logic'''.<br> | ||
The cardinality of <math>AXIOM</math> is <math>\infty</math> because <math>\alpha, \beta, \gamma</math> can be other formulas. For example:<br> | The cardinality of <math>AXIOM</math> is <math>\infty</math> because <math>\alpha, \beta, \gamma</math> can be other formulas. For example:<br> | ||
− | Let <math>\alpha := \beta \and \gamma</math> and substitute in the first axiom; it | + | Let <math>\alpha := \beta \and \gamma</math> and substitute in the first axiom; it becomes<br> |
<math>(\beta \and \gamma) \to (\beta \to (\beta \and \gamma)) \in AXIOM</math><br> | <math>(\beta \and \gamma) \to (\beta \to (\beta \and \gamma)) \in AXIOM</math><br> | ||
+ | It is important to understand that the axioms are defined only through syntax, because we don't speak about values of formulas. Axioms, for definition, are demostrable without demonstration. | ||
+ | Think about syntax and semantic as two different worlds. In "syntax world" there are <math>AXIOM \subset FORM</math> but even <math>THM</math>, the set of theorems. So we have<br> | ||
+ | <math>AXIOM \subset THM \subset FORM</math><br> | ||
+ | The elements of <math> THM</math> are the demonstrable formulas. <br>We say that a formula <math>\alpha</math> is demonstrable (or '''syntactic consequence'''), <math>\vdash \alpha</math>if exist a finite sequence of formulas <math>\alpha_1, \alpha_2, ... , \alpha_n\quad n \in \mathbb{N}</math> such that <math>\alpha_n = \alpha, \forall i \in \{1, .. , n\}</math>one of the following conditions is true. | ||
+ | *<math>\alpha_i \in AXIOM</math> | ||
+ | *Exist indexes <math>j, k \in {1, .. , n}\quad j, k \le i</math> such that <math>\alpha_i</math> is deducible from <math>\alpha_j</math> and <math>\alpha_k</math> through '''modus ponens'''. | ||
+ | A sequence of formulas like that is a formal demonstration of <math>\alpha</math>. |
Versione delle 10:54, 20 ott 2012
Questa è una pagina di introduzione al corso: contiene i turni, le modalità d'insegnamento, alcune informazioni generali ed eventuali giudizi sul corso in questione. Se sei giunto qui passando da un link, puoi tornare indietro e correggerlo in modo che punti direttamente alla voce appropriata. |
Indice
A.A. passati
Information
Course's website
Times and classrooms:
Monday 15:30 - 17:30 - Room 5 (Ground floor - via comelico 39)
Friday 10:30 - 12:30 - Room 5
Lessons' notes
This notes are written in english to help foreign students to follow this course.
Classical Propositional Logic
We are going to describe the classical propositional logic (L.P.C) language.
Syntax
The syntax of a language is the set of rules that specify how the elements of the language are formed regardless their meaning.
Let be the set of the natural numbers and an alphabet of symbols.
is the set of strings on this alphabet. For example .
We have now to define the set of the "well formed formula" , that is the set of the elements of the L.P.C.
Definition (well formed formulas). is defined with some conditions:
, where | is taken n times. For example:- if , then .
- if , then .
- if , then .
- if , then .
Well formed formulas is often abbreviated with f.b.f.
The strings in condition (2) are called "propositional variables" or "atomic formulas" or "propositional letters" or simply "variables". They are abbreviated with this notation:
(In other books p, q, r, .., are used to refer to variables).
The set of variables is .
Example of well formed formulas:
Instead
In this notes we omit (, ) where it is clear the precedence of the connectives. (Connectives are )
Why don't we use directly or ?
Because it is important that the alphabet is a finited set. Although, in this notes, we use notation.
It is essential, even, that the L.P.C. language is decidable, that is it must exist an algorithm that tell us if a string is or not.
For this reason it is crucial the
Unique readability of well formed formulas. For all one (and only one) of the following sentences must be true:
- or but not both.
- Exists an unique such that .
- Exists an unique such that .
- Exist unique such that .
- Exist unique such that .
- Exist unique such that .
Let's, infact, consider the parser of the algorithm we talked above: When it find, for example, , to decide if the string belongs to FORM, it have to decide (for the unique readability of well formed formulas) if . But how can it do this? Deciding if and . This is what the above theorem tell us. Try to draw the parser tree. It is unique thanks to, again, that theorem.
Formally, a string is a finite sequence of elements:
A substring of is a string in the form , where and .
A subformula is a substring .
For example:
are both substring of but only is a subformula.
With we indicate the set of variables that are subformulas of .
With we denote a formula whose variables are a subset of .
Semantic
The semantic of a language is the relation between the elements of that language and their meaning.
The set {0,1} is called truth values set. 0 means false and 1 means true.
Definition(Assignment). An atomic assignment is any function
.
An assignment (or interpretation) is a function
that extends and respects the following rules for every .
- and
Informally we can say that the variables represent propositions with one verb and one or more complement. For example:
"It rains";
"I go to school".
"I don't go to school"
"It rains and I go to school"
"it rains or I go to school"
"If it rains then I will go to school"
I can choose such as and
Consequently we have
Proposition (Unique extendibility of atomic assignment): Every atomic assignment admits exactly one extension to an assignment
More informally, as you can see in the example above, when we choose the values of the variables we determinate the values of the formulas within those variables.
Definition (truth and falsehood). Let . When we have we say that is true in the interpretation of , or is a model of . Instead, when we have we say that is false in the interpretation of , or is an anti-model of .
In symbols:
when
when .
When is true for every we say that is a tautology. Instead when we have false for every assignment we say that is a contradiction.
When exists a such as we say that is satisfiable; instead when exists a such as we say that is refutable.
In symbols:
tautology
refutable
In these notes we abbreviate
with
and it can be read as "if and only if".
Exercise. Prove that the following formulas are tautologies for all
Hint: use the truth table
- (De Morgan rule I)
- (De Morgan rule II)
Exercise. Prove that exist for those the following formulas aren't tautologies. Which of these are contradiction?
Hint: to prove that a formula isn't a tautology is sufficient an counter-example but to prove that it is a contradiction it isn't sufficient. You can use the truth table again.
Relationship between syntax and semantic
Definition (Axioms of LPC (Classical propositional logic)). For all , let's consider the following formulas.
The formulas between 1 and 11 .
is called set of the axioms of the classical propositional logic.
The cardinality of is because can be other formulas. For example:
Let and substitute in the first axiom; it becomes
It is important to understand that the axioms are defined only through syntax, because we don't speak about values of formulas. Axioms, for definition, are demostrable without demonstration.
Think about syntax and semantic as two different worlds. In "syntax world" there are but even , the set of theorems. So we have
The elements of are the demonstrable formulas.
We say that a formula is demonstrable (or syntactic consequence), if exist a finite sequence of formulas such that one of the following conditions is true.
- Exist indexes such that is deducible from and through modus ponens.
A sequence of formulas like that is a formal demonstration of .