Download Basic Logic - Progetto e

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Foundations of mathematics wikipedia , lookup

Abductive reasoning wikipedia , lookup

Axiom wikipedia , lookup

Statistical inference wikipedia , lookup

Axiom of reducibility wikipedia , lookup

Tractatus Logico-Philosophicus wikipedia , lookup

History of the function concept wikipedia , lookup

Fuzzy logic wikipedia , lookup

Willard Van Orman Quine wikipedia , lookup

Meaning (philosophy of language) wikipedia , lookup

First-order logic wikipedia , lookup

Curry–Howard correspondence wikipedia , lookup

Mathematical logic wikipedia , lookup

Jesús Mosterín wikipedia , lookup

Boolean satisfiability problem wikipedia , lookup

History of logic wikipedia , lookup

Propositional formula wikipedia , lookup

Catuṣkoṭi wikipedia , lookup

Analytic–synthetic distinction wikipedia , lookup

Inquiry wikipedia , lookup

Laws of Form wikipedia , lookup

Quantum logic wikipedia , lookup

Modal logic wikipedia , lookup

Intuitionistic logic wikipedia , lookup

Argument wikipedia , lookup

Natural deduction wikipedia , lookup

Law of thought wikipedia , lookup

Propositional calculus wikipedia , lookup

Principia Mathematica wikipedia , lookup

Truth-bearer wikipedia , lookup

Transcript
Basic Logic Logic is, very roughly, the study of correct reasoning. It is concerned with the study of patterns of inference, i.e. the relation incurring between premises (evidence, or what we take for granted) and conclusions (what we want to demonstrate or justify). For example, we may take for granted that “if Socratis is a man then he is mortal” and that “Socratis is a man” and hence conclude “Socratis is mortal”. In this case, the logical inference is from two premises (“if Socratis is a man then he is mortal” and “Socratis is a man”) towards the conclusion that “Socratis is mortal”. Inferences are usually classified between: •
•
deductive inference (or deduction, or valid inference): when there is certainty that the conclusion is true, if the premises are true. A deductive inference grants that if the premises are true, also the conclusion has to be true. In a sense, deductive inferences “transmit the truth” from the premises to the conclusion; inductive inference (or induction): when there is no certainty that the conclusion is true, also whether the premises are true. Sometimes, Sometimes, inferences in this class are further divided into two more classes (of which we are not concerned here), that is between strict induction and abduction. Clearly, deductive inferences are the best ones, and constitute the main objective of logic studies, given the certainty they provide. A standard way of writing deductions is: “if Socratis is a man then he is mortal”, “Socratis is a man” ⊢ “Socratis is mortal” But also inductive inferences have a great importance, because also if the required certainty is missing, the premises may render the conclusion likely. Thus, in this case, the problem becomes to analyze how much the conclusion is likely, given the truth of the premises. We make inferences in different ways, so that they cannot be easily organized into a unique system of analysis. This difficulty leads to the construction of different logic systems for studying both the reasoning we make and the behavior we observe in nature. This is why there are many systems, from first order logic to higher order logic, polivalent and fuzzy logic, modal and paraconsistent logic, and so on. Each of them allows to study different properties of the systems where they are eventually applied. In this sense, propositional and predicate logic are the basic and the most fundamental logic systems. Propositional Logic Propositional logic is a mathematical model that allows us to reason about the truth or falsehood of logical expressions where only propositions are involved. The basic elements of propositional logic are propositions, defined to be those statements that can be unambiguously determined to be either true or false. For example: “Socratis is a man” and “Socratis is a sheep” are propositions because they can be unambiguously determined to be true or false, while “What time is it?” and “My shirt is grue” are not propositions because they miss this property. Simple propositions (props, in the following) can be then connected through some logical operators, called connectives, with the aim of obtaining compound propositions: Connective symbol meaning example Compound proposition is true when conjunction & And P and Q both P, Q are true disjunction v Or P or Q at least one prop (between P,Q) is true negation ∼ Not conditional ⟶ If … then biconditional ⟷ If and only if not Q if P then Q P if and only if Q Q is false always, except when P true ad Q false
P, Q are both true or both false This behavior can be simply expressed by some truth tables, one for each connective (the possible values of P and Q are given, while the other columns give the results of all the basic logical connections of P and Q): P true true false false Q true false true false P & Q true false false false P v Q true true true false P ⟶ Q true false true true P ⟷ Q true false false true ∼ Q false true Notice that this logical operators can be expressed in natural language also in different ways; and, sometimes, the presence of the same expressions may express a different meaning. For example: •
•
•
a conjunction is expressed as “P and Q” but can be also expressed by “P, but Q”, and “P, however Q”, “P, although Q”, “P, while Q” given that the compound meaning is just given by the connection of independent propositions (for example “John listens to music while studying” is not a conjunction, while “John listens to jazz, while does not listen rock” is) a disjunctions, that is also called “inclusive disjunction” is expressed by “P or Q”, but “either P or Q” has a different meaning (“exclusive”, i.e. when both are true the compound proposition is false, while in the other situations the meaning is the same as inclusive disjunction) the conditional “if P then Q” captures what is called the “material conditional”, stating an implication between facts (not a causal connection, neither hypotethical or counterfactual situations, i.e. referring to situations that did not or does not really exist). Anyway, the material conditional can be also expressed in natural language by: “if P, Q”, “Q, if P”, “P, only if Q”, “only if Q, P”, “P is a sufficient condition for Q”, “Q is a necessary condition for P”. In the propositional model, a series of results can be easily demonstrated. Here is a short list, along with the name they are known. (modus ponens) (modus tollens) (hypothetical sillogism) (disjuntive sillogism) (constructive dilemma) (simplification) (conjunction) (addition) P⟶Q, P ⊢ Q P⟶Q, ∼Q ⊢ ∼P P⟶Q, Q⟶R ⊢ P⟶R P or Q, ∼P ⊢ ∼Q (P⟶Q) & (R⟶S), P v R ⊢ Q v S P & Q ⊢ P P, Q ⊢ P & Q P ⊢ P v Q Furthermore, some equivalences (also known as rules of replacement) can be demonstrated. Here is a short list. (De Morgan’s rule) (commutativity) ⊢ ∼(P & Q) ⟷ ∼P v ∼Q ⊢ ∼(P v Q) ⟷ ∼P & ∼Q ⊢ (P v Q) ⟷ (Q v P) ⊢ (P & Q) ⟷ (Q & P) (associativity) (distribution) (double negation) (transposition) (material implication) ⊢ (P v (Q v S)) ⟷ ((P v Q) v S) ⊢ (P & (Q & S)) ⟷ ((P & Q) & S) ⊢ (P v (Q & S)) ⟷ ((P v Q) & (P v S)) ⊢ (P & (Q v S)) ⟷ ((P & Q) v (P & S)) ⊢ P ⟷ ∼∼P ⊢ (P⟶Q) ⟷ (∼Q⟶∼P) ⊢ (P⟶Q) ⟷ (∼P v Q) From Propositional to Predicate Logic Propositional logic is a useful tool for reasoning, but it is limited because it cannot see inside propositions and take advantage of relationships among inner elements. For example, we may assume that “All men are mortal” and that “Socratis is a man” and hence conclude “Socratis is mortal”. Here, it is intuitively clear that, if the premises are true, then also the conclusion must be true. But we cannot formalize it in propositional logic in a way that outline the relationships among the inner parts of the propositions. Propositional logic talks about propositions as a whole. Predicate logic can be considered an extension of propositional logic. It allows to decompose simple propositions into smaller parts, taking into accounts the individuals about which we talk, and the predicates we state, that is properties of and relations between individuals. For example, the proposition “every dog is sleeping”, in predicate logic can be seen as the statement that for all individuals x, if x is a dog then x is sleeping; or, more formally, that ∀x(Dx⟶Sx) . The process is the following. Firstly, we are talking about all the individual that are dogs, thus we may use a variable x and interpret it as any individual of the universe. Secondly, we can interpret “being a dog” and “being sleeping” as properties that individuals may have or not. What we say, then, is something like: if we take any individual, call it x, if this individual has the property of “being a dog”, then the same individual x has also the property of “being sleeping”. Now, if we formalize with Dx the assertion “x has the property of being a dog”, with Sx the assertion “x has the property of being sleeping”, and if we use the symbol ∀ to express the quantification that all the individuals are involved, we have that the original assertion in English language can be initially interpreted as “for any x, Dx entails Sx”, and then translated into ∀x(Dx⟶Sx). As the example shows, predicate logic provide a tool to handle propositions in which there is a quantification on individual satisfying certain predicates, and allow also to connect them through the propositional connectives. The quantification operators that permit the new logical interpretation in terms of predicates are: Quantifications symbol example Compound proposition is true when existential ∃ ∃xPx it exists at least an individual having property P ∃x∃yQxy it exists at least two individual being in relation Q universal ∀ ∀xPx each individual has property P ∀x∀yQxy however taken two individuals, they are in relation Q ∃x∀yQxy it exists an individual being in relation Q with all individuals ∀x(Px⟶Sx) each individual having property P has also property S ∃x(Px&Sx) it exists an individual having property P that has also property S