Logic is the study of reasoning. It deals primarily with inference, but also entailment, causality, consequence, induction, deduction, truth, falsity, belief, fallacies, paradoxes, probabilities, analysis, tense, modality, necessity, sufficiency, possibility, identity, vagueness, existence, description, justification, tolerance, obligation, permission, relevance, assertion, validity, contradiction, provability, and argumentation.
One of the central questions explored in the study of logic is:
The phrase "follow from" can have different interpretations, including, but not limited to:
Often, logicians are concerned not with the absolute truth or falsity of the premises themselves, but rather with the form of arguments. This makes them inclined to use formal systems. A logistic system is a formal system in which formulas are assigned truth values and a particular class of formulas, called theorems, are generated with inference rules.
The syntax defines the legal strings of the system, which are called its formulas.
Var ::= 'p' | 'q' | 'r' | Var '′'
Formula ::= 'T' | 'F' | Var
| '~' Forumula
| '(' Formula '∧' Formula ')'
| '(' Formula '∨' Formula ')'
| '(' Formula '⇒' Formula ')'
| '(' Formula '≡' Formula ')'
which means that
p
(~(p ∧ q) ∨ ~~p)
(r ⇒ p′)
are formulas, but
~≡pp∧))∧~q∨(F
is not.
The semantics is given by a semantic valuation function which maps each formula to a "truth value." The mapping is necessarily relative to some interpretation φ which gives meanings to the variables in the system.
type Interpretation = Var → {true, false}
E : Formula → Interpretation → {true, false}
E T φ = true
E F φ = false
E p φ = φ(p)
E ~A φ = true, if E A φ = false; and false otherwise
E (A ∧ B) φ = true, if both E A φ = true and E B φ = true; and false otherwise
E (A ∨ B) φ = true, if at least one of E A φ = true and E B φ = true; and false otherwise
E (A ⇒ B) φ = false, if E A φ = true and E B φ = false; and true otherwise
E (A ≡ B) φ = true, if E A φ = E B φ; and false otherwise

In some logistic systems, the semantic truth functions may be too expensive or impossible to compute. So inference rules are defined to algorithmically (mechanistically, typographically) generate a set of formulas in such a way as to mimic a reasoning process. Define
{A1, ..., An} ⊢ B
to mean "B given assumptions A1, ..., An." The inference rules of a logistic system produce these kinds of statements.
If ∅ ⊢ A, we say A is a theorem and write ⊢ A. The sequence of inferences producing a theorem is a proof of that theorem.
| 1. (p ∧ (p ⇒ q)) ⊢ (p ∧ (p ⇒ q)) | Assumption |
| 2. (p ∧ (p ⇒ q)) ⊢ p | Conj Elim (1) |
| 3. (p ∧ (p ⇒ q)) ⊢ (p ⇒ q) | Conj Elim (1) |
| 4. (p ∧ (p ⇒ q)) ⊢ q | MP (2, 3) |
| 5. (p ∧ (p ⇒ q)) ⊢ (p ∧ q) | Conj Intro (2, 4) |
| 6. ((p ∧ (p ⇒ q)) ⇒ (p ∧ q)) | Impl Intro (5) |
The definition of "truth" in a system is generally just stated in precise natural language. The derivation of theorems, however, is a purely mechanical process. We would like to know how well, in a logistic system, does "theorem derivation" (proof) correlate with truth.
There are many different kinds of logic. These types might vary on what they take to be "truth." Sometimes we aren't concerned with exact truth, but rather "degree of belief", or whether something is "justified," or "achievable," or "knowable."
Here are some types of logics. The list is incomplete. The types are also overlapping.
A system with exactly two truth values, usually called true and false. This is as opposed to having a third value called unknown, or instead having truth be a degree of certainty or belief (e.g. a value ∈ 0.0..1.0).
The most widely used. It is characterized by five properties (so say one of the authors of the Wikipedia article on the subject):
In intuitionistic logic we are not concerned with the "truth" of a statement as much as we are about its "justification." Every theorem is something justifiable, constructively. So A means "A is provable" and ~A means "A is refutable" (i.e. it is provable that no proof of A exists — in other words, assuming A leads to the the constant False). Therefore
Classical logic has the principle of explosion: "false implies everything", or "from a contradiction, everything follows." The rationale is: if things are only true or false, and you assume false is true, then everything is true because true is already true and now you say that false is true also.
A proof of (A ∧ ~A) ⇒ B:
A (assume)
~A (assume)
A ∨ B (disj intro (1))
B (disj elim (2,3))
This means the following statements are true in classical logic:
Relevance logic rejects explosion, and requires the antecedent and consequent to be related to each other. There must be some real causality. We say in classical logic, implication is material but in relevance logic it is strict. There are many different ways to encode relevance.
A non-monotonic logic rejects the monotonicity of entailment. If a logic is monotonic, then adding new information can change the set of known facts, causing previously known truths to become falsehoods. These kind of logics are good for cases where you have to retract previous knowledge when new facts are known, as in
A paraconsistent logic is one that allows contradictions, by throwing out the principle of explosion. This means throwing out disjunctive introduction, disjunctive elimination or the transitivity of entailment. At least you can reason about contradictions without throwing out the whole system.
These logics are alternatives to belief revision in non-monotonic logics.
A rather ancient kind of logic that includes reasoning about "all" and "some", but does not allow general propositions nor connectives like and and or. There are only eight kinds of statements that are considered (capital letters are classes, small letters are instances):
A modern way to reason about "all" and "some" — strictly more powerful than syllogistic logic. Just add quantifiers (∃ and ∀) and predicates to propositional logic.
Usually these systems allow objects, functions on objects, and ways to represent identity. Sometimes you have ways to write descriptions ("the x such that ...").
Orders of logic:
Modal Logics deal with modalities. The basic modalities are the alethic ones: necessity and possibility. Modal logics can be based on classical or non-classical logics. Other kinds of logics feature modalities, e.g.
A fuzzy logic is one in which facts have a degree of truth between 0 and 1. DO NOT CONFUSE FUZZY LOGIC WITH PROBABILITY THEORY.