Logic is the study of the principles of reasoning. The word logic comes from logos or λόγος in Greek (which means "the word" or "what is spoken" but can mean also mean thought, speech, reason, principle, standard, or logic). A logician studies logic, argument, or reasoning. Logic is the art of inference (drawing up a conclusion), especially how to make distinctions between valid, fallacious, and paradoxical arguments.
The basic idea of logic is to take a one or more premises (statements), and infer (derive) a conclusion. The whole line of reasoning (premises and conclusion) is considered an argument. EG: Here is a three step argument: 1. Men are mortal. 2. Elvis is a man. 3. Therefore, infer that Elvis is mortal.
A fallacy is a bad argument. If an argument has good form/structure/syntax, then it is invalid (a formal fallacy). However if an argument is valid, and it is still bad, then it has an informal fallacy. An informal fallacy usually concerns false premises. EG: 1. Cows are Fish. 2. Joe is a Cow. 3. Therefore Joe is a Fish.
Truth irrelevant argument.
Valid argument, but
are statements true?
The only sound argument of these four:
Men are mortal.
Elvis is a man.
Elvis is mortal.
Elvis has wings.
All winged creatures can fly.
Elvis can fly.
Wisconsinites claim "all Chicagoans stink".
Many Wisconsinites each cheese.
All Chicagoans do not stink.
Wisconsinites claim "Chicagoans stink".
All Wisconsinites each cheese.
all Chicagoans do not stink.
Informal logic is concerned with natural language arguments. If an argument can be abstracted (reduced to form/class and not tied to the particulars/instance), then it is falls under the jurisdiction of formal logic. If an argument is further analyzed using symbolic abstractions, then it falls under the jurisdiction of symbolic logic.
Before continuing it is worthwhile to briefly summarize the symbols used in symbolic logic since they are pretty simple and do much for conciseness. See also List of logic symbols [W].
⇒ (⇒ \Rightarrow), → (⇒ \to), ⊃ (⊃ \supset). Material implication ("if ... then"; "implies"). A ⇒ B is true just in the case that either A is false or B is true, or both. EG: x = 2 ⇒ x2 = 4 is true, but x2 = 4 ⇒ x = 2 is in general false (since x could be −2). → may mean the same as ⇒ (the symbol may also indicate the domain and co-domain of a function). ⊃ may mean the same as ⇒ (the symbol may also mean superset).
⇔ (⇔ \Leftrightarrow), ↔ (↔ \iff), ≡ (≡ \equiv). Material equivalence ("if and only if"; "iff"; "means the same as"). A ⇔ B is true just in case either both A and B are false, or both A and B are true. EG: x + 5 = y + 2 ⇔ x + 3 = y.
¬ (¬ \lnot; \neg), ˜ (˜ \sim), ! (!). Logical negation ("not"). The statement ¬A is true if and only if A is false. EG: ¬(¬A) ⇔ A. A slash placed through another operator is the same as "¬" placed in front. EG: x ≠ y ⇔ ¬(x = y).
∧ (∧ \wedge \land), & (& \&), && (&&). Logical conjunction ("and"). The statement A ∧ B is true if A and B are both true; else it is false. EG: n < 4 ∧ n > 2 ⇔ n = 3 when n is a natural number.
∨ (∨ \lor \vee), || (||). Logical disjunction ("or"). The statement A ∨ B is true if A or B (or both) are true; if both are false, the statement is false. EG: n ≥ 4 ∨ n ≤ 2 ⇔ n ≠ 3 when n is a natural number.
⊕ (⊕ \oplus), ⊻ (⊻ \veebar). Exclusive disjunction or exclusive or ("xor"). The statement A ⊕ B is true when either A or B, but not both, are true. A ⊻ B means the same. EG: (¬A) ⊕ A is always true, A ⊕ A is always false.
⊤ (⊤ T \top), T (T), 1 (1). Tautology ("top", "verum"). The statement ⊤ is unconditionally true. EG: A ⇒ ⊤ is always true.
⊥ (⊥ \bot), F (F), 0 (0). Contradiction ("bottom", "falsum"). The statement ⊥ is unconditionally false. EG: ⊥ ⇒ A is always true.
∀ (∀ \forall). Universal quantification ("for all", "for any", "for each"). ∀ x: P(x) or (x) P(x) menas P(x) is true for all x. EG: ∀ n ∈ N: n2 ≥ n.
∃ (∃ \exists). Existential quantification ("there exists"). ∃ x: P(x) means there is at least one x such that P(x) is true. EG: ∃ n ∈ N: n is even.
∃! (∃! \exists !). Uniqueness quantification ("there exists exactly one"). ∃! x: P(x) means there is exactly one x such that P(x) is true. EG: ∃! n ∈ N: n + 5 = 2n.
:= (:=), ≡ (≡ \equiv), :⇔ (:⇔ :\Leftrightarrow). Definition ("is defined as"). x := y or x ≡ y means x is defined to be another name for y (but note that ≡ can also mean other things, such as congruence). EG: cosh x := (1/2)(exp x + exp (−x)).
⊢ (⊢ \vdash). Turnstile ("provable"). x ⊢ y means y is provable from x (in some specified formal system). EG: A → B ⊢ ¬B → ¬A.
⊨ (⊨ \models). Double turnstile ("entails"). x ⊨ y means x semantically entails y. EG: A → B ⊨ ¬B → ¬A.
ࢺ (ࢺ). Therefore ("therefore").
ࢻ (ࢻ). Because ("because").
A function is an abstraction that does something and often takes an input parameter. When it is called to act, it may or may not return something. A function is often represented by a name, followed by a pair of parentheses, and may have its input parameters (or variables) between its parentheses. EG: The function "Add" adds to parameters x and y; The "Add" function is represented as A or A(x, y). When done, excecuted, run, or called, A(1, 2) returns 3.
In logic, a predicate is often represented with capital letters (EG: P, Q, A, B), and is most commonly a boolean valued function (returns true or false) with a subject (often represented as x) as an input parameter. Hence P(x) is predicate P, with a subject x, and returns true or false. EG: Represent the predicate "x > 1" as P(x). EG: The predicate "are mortal" as Q.
A domain of discourse (aka universe of discourse, or universe) is the set of entities over which a subject (variable, parameter) of interest may range. In logic to quantification is binding a variable over a domain of discourse. EG: Let us quantify/limit the domain of discourse of x to the prime numbers. Two primary quantifiers are "for all" (∀) and "there exists" (∃).
A proposition is a predicate with subject made to return a result, i.e. it is a statement that evaluates as true or false. EG: If we represent the predicate "x > 1" as P(x), it doesn't return true or false just by sitting there! We have to assign a value (EG: P(3) returns true) or quantify the variable (EG: For all x, P(x) returns false).). EG: The predicate "are mortal" can be come a propostion if we assign a value (EG: "Socrates is mortal" as Q(Socrates)) or quantify the variable (EG: "All men are mortal" as ∀x: Q(x)).
Syllogisms (Greek sullogismos, "deduction") are from Aristotle's Organon and form the foundation of Term logic (aka Traditional logic). Even though Predicate logic has effectively replaced Term logic, syllogisms are still found everywhere.
A syllogism is an argument of a particular format. It consists of:
Three terms. A term is a part of speech (usually a noun or a qualifier) neither true nor false. EGs: man; mortal.
The syllogism orders the propositions in a particular way. FYI: The third or common term is called the middle term (M).
The first proposition is the major premise: It has the major term (P) too.
The second proposition is the minor premise: It has the minor term (S) too.
The third proposition is the conclusion: Its subject is the minor term (S), and its predicate is the major term (P).
The quality of a proposition depends on whether the predicate is either denied or affirmed of the subject. The quantity of a proposition depends on whether the predicate applies to the subject universally or in particular.
Hence quality and quantity make four kinds of propositions.
A: universal and affirmative. EG: All men are mortal.
I: particular and affirmative. EG: Some men are rich.
E: universal and negative. EG: No men are immortal.
O: particular and negative. EG: Some men are not rich.
The names of these kinds of propositions come from the vowels of the Latin words affirmo ("I affirm") and nego ("I deny"). They were also used to create mnemonic words for common combinations. EG: William of Shyreswood (1190/1249):
The figure of the syllogism depends upon the position of the middle term. There are four figures:
M-P, S-M, S-P. The most important. EG: All mumps are purple; Sven is a mump; Hence, Sven is purple.
P-M, S-M, S-P.
M-P, M-S, S-P.
P-M, M-S, S-P.
The possible number of combination is 48 since 4 kinds of propositions x 3 propositions x 4 figures. However only 15 combinations were useful.
Using symbolic logic, the syllogism is reduced to the following form:
((a ⇒ b) ∧ (b ⇒ c)) ⇒ (a ⇒ c)
((a ⇔ b) ∧ (b ⇔ c)) ⇒ (a ⇔ c)
There are many "laws of logic" (see some at Propositional calculus [W]) but as of the 1900s, which laws apply are dependent upon the system. For example, bivalent logic has two values: true or false, but multi-valued logic might have a third value such as "undecided", "both true and false", "neither true nor false", etc. —computer work often deals with values such as null, void, etc. Here are some of the most common laws of logic:
Law of identity. P ≡ P.
Law of the excluded middle (Latin tertium non datur). (P ∧ ¬P).
Law of noncontradiction. ¬(P ∧ ¬P)
Monotonicity of entailment and Idempotency of entailment;
Commutativity of conjunction;
De Morgan duality. Aka De Morgan's law
¬(p ∧ q) ⊢ (¬p ∧ ¬ q)
¬(p ∧ q) ⊢ (¬p ∧ ¬ q)
Reasoning is the act justifying statements. This may involve using and abusing logic —after all, logos, ethos, and pathos form the foundation of rhetoric. Here are the two primary means of reasoning:
Deductive reasoning (de- = "from; off; away; apart; away; out") The conclusion is at least as specific as the premises. This is non-amplicative in that it does not add knowledge, but instead only gives information logically from what is known. Deductive reasoning eventually utilizes some assumption of a priori fact.
EG: The sun rises everyday. Tomorrow is another day. Hence, the sun will rise tomorrow.
EG: I created function sum(x,y) = x+y = z. I know x and y. Hence, I know z.
Inductive reasoning (in- = "in; into; within"). The conclusion is more general than the premises. This is amplicative since it creates new knowledge, new a priori knowledge. This requires a posteriori knowledge. There are two levels:
Collecting data and predicting behavior. Let me call this pattern reasoning.
EG: I have seen the sun rise every day. Tomorrow is another day. Perhaps the sun will rise tomorrow.
EG: I have collected the temperatures (T) of gases at various pressures (P). It seems that T is proportional to P.
EG: Given a sufficiently large population P, and having collected different values of attribute A for its various members. Given a particular member M of the population P. Hence we know that M has a probability for various values for attribute A. This is statistics and Bayesian probability.
Collecting data and predicting behavior with an explanation or hypothesis. This is often called abductive reasoning (ab- = "away from". Aka presumptive reasoning). Of course coming up with a hypothesis is just another step —the next step might be to see if the hypothesis can be used to deductively predict things. Abductive reasoning is so important that it is often stated as the third primary kind of reasoning (besides deductive and inductive).
EG: The sun is hot and moves. Perhaps a god Helios drives a fiery chariot.
EG: T seems to be proportional to P. Perhaps increasing T excites molecules and makes them move faster.
Collecting data and creating something that is truthful and appealing if not necessarily true. Note that such creations are still subject to testing because otherwise nonsense or worse is created. Let me call this creative reasoning.
EG: Any great creative fictional work —including some works that weren't intentionally fictional— has been tested by many people.
EG: Cooking, sewing, dancing, racing, fighting, etc. must be experienced and evaluated.
The recognition of a pattern and jumping to a conclusion is intuitive and inductive even though some of us may be able to go back and show a deductive line of reasoning. Trial and error is also used in obtaining knowledge but then we're wandering into epistemology again. Induction requires exposure to related data as well as seemingly unrelated data.
Here are other ways to reason (most of them are inductive) that can be defeasible (convincing) but are sometimes just rhetorical.
Reasoning by analogy. A specific to a specific.
EG: "Finger is to Hand, as Toe is to __?". This is also commonly stated as follows: "Finger : Hand :: Toe : __?".
Reasoning by metaphor, parable, comparison, apapoge, etc.
EG: Metaphor: "All the world's a stage, And all the men and women merely players They have their exits and their entrances" -William Shakespeare,As You Like It, 2/7. The tenors are world and men & women. The vehicles are stage and players.
EGs: Parables: Aesop's Fables. The Good Samaritan.
Reasoning by apapoge. Aka reductio ad absurdum (Latin "reduction to the absurd"); ἡ εις άτοπον απαγωγη (Greek, hi eis átopon apagogi, "reduction to the impossible"); proof by contradiction. An apapogic argument infers A by showing that the contrary of A is impossible or absurd.
EG: A: All beliefs are valid. B: I disbelieve the belief of statement A. C: A and B can't both be correct.
Retroductive reasoning (retro- = backward; behind). Premise 1 is a rule. Premise 2 has a particular meet the rule.
EG: A bad version: A murder requires motive, means, and opportunity. John has all three. Therefore he did it.
EG: A better version: A murder requires motive, means, and opportunity. John has all three. Therefore he may have done it and let's see who else has all three.
Occam's Razor: "Given two equally predictive theories, choose the simpler" (Latin, Pluralitas non est ponenda sine necessitate).
EG: When diagnosing a symptoms, try ruling out the simpler causes first.
Translation Tips [earlham.edu/~peters/courses/log/transtip.htm]. By Peter Suber. 'In this hand-out I treat the notation of truth-functional propositional logic and first-order predicate logic as a language, and give guidance on translating from English into this foreign language. In general, "logical" issues, such as methods for making use of the expressions once translated, are omitted here.'