**Logic** is the study of the principles of human reasoning, and
of what makes arguments valid or invalid. Logic attempts to discover and
formalise the rules of rationality.

If an argument is *valid*, then if its premises are true
then its conclusion must be true. But the validity of an argument is
independent of the truth of its premises: *Everyone born in Wisconsin
has U.S. citizenship; Julius Caesar was born in Wisconsin; therefore,
Julius Caesar has U.S. citizenship*. This is a valid argument, since
if its premises are true, so must be its conclusion; even though, in
fact, at least one of its premises is false. If an argument is valid,
and furthermore its premises are true, then we say the argument is *sound*.

Logic as a discipline forms part of both philosophy and mathematics,
and is a foundational discipline to both, although people approaching
it from each perspective will tend to be interested in different areas
of it. Logic is also related to rhetoric
— while logic helps us to formulate arguments that are valid and sound,
those arguments may not be convincing in practice; while rhetoric helps
us to construct arguments that are convincing in practice, yet may be
neither sound nor valid. Logic is also important to computer science, in particular in the fields of artificial intelligence, machine learning and automated reasoning.

## Informal logic

The study of logic without formalisms is known as *informal logic*.
Whereas contemporary formal logic is highly technical and mathematical,
informal logic aims to present logical ideas in such a way that they
can be used by the everyday person in arguments, debates, etc. Informal
logic is useful in that it helps us to see the holes in other's
arguments, even when those arguments are convincing on the surface.

### Name-a-fallacy fallacy

The **name-a-fallacy fallacy** refers to the fallacy in which,
rather than engaging with their opponent's arguments in detail, a person
responds with the mention of a logical fallacy, without any explanation
of how the fallacy actually applies to the argument at hand.

This fallacy is particularly common among atheists, although not exclusive to them. Here is an example of the fallacy in action:

**Christian**: Everything that begins to exist, must have a
cause. The universe began to exist, therefore the universe must have a
cause. And the cause of the universe, we call "God".
**Atheist**: That's special pleading.

The Christian may or may not be guilty of special pleading; but the
atheist is definitely guilty of the name-a-fallacy fallacy, because they
have made no effort to actually engage with the Christian's argument,
or explain how it constitutes special pleading (if it in fact does).
Knowledge of logical fallacies can be a useful tool, but they are not
magical talismans which will defeat any argument simply by being
mentioned; and yet, practitioners of the name-a-fallacy seem to think
that they are exactly that.

In order to legitimately accuse your opponent of a logical fallacy, there are three necessary elements:

- It is necessary to provide a clear definition of what the
fallacy is. Many logical fallacies are defined in different ways by
different people, and it is impossible to answer the subsequent two
questions without a clear definition being adopted.
- Reason to believe that the fallacy is actually a fallacy. A
form of argument does not become fallacious merely by having the label
"fallacy" attached to it; anyone who wishes to label something
fallacious, needs to provide a clear and convincing argument that what
they claim to be fallacious in fact actually is. Even if it is agreed
that some instances of a particular type of argument are clearly
fallacious, it does not automatically follow that all arguments of that
type are necessarily fallacious; to hold so would be to potentially
commit the fallacy of overgeneralization.
- A clear and convincing explanation of why your opponent's
argument is in fact an instance of that fallacy. One line answers have
no place in serious debate.

This fallacy is also known as the "Catchy Fallacy Name Fallacy".^{[1]}

## Formal logic

Formal logic is also known as *symbolic logic* or *mathematical logic*.
It forms part of mathematics, and is often considered the foundational
discipline upon which the rest of mathematics can be built.

Formal logic is not a single system, but rather many, with
competing and contrary principles; the discipline concerns itself with
studying the properties of these different logical systems, both as an
end-in-itself (pure mathematics), but also to try to find which formal
system best reflects our pre-existing intuitive ideas of what is
"logical".

Logical systems can be distinguished on the basis of which types of statements they concern themselves with:

**propositional calculus** is concerned with the relationships between propositions, but not the internal structure of those propositions
**predicate calculus**
breaks propositions down into subject and predicate, and provides
quantifiers (all, some). It is broken up into first-order predicate
calculus, which can assert that entities have properties, but cannot
talk about those assertions or properties themselves; and higher-order
predicate caclulus, which enables assertions to be made about
propositions and predicates.
**type theory**
extends predicate calculus with the notion that entities belong to
certain types; restrictions are imposed on what can be said about
entities of different types, to avoid paradoxes such as Russell's paradox
**modal logic** is concerned with the notions of *necessity* and *possibility*.
**temporal logic** formalizes temporal statements, and provides past, present and future tense (and aspect also)

There is one particular approach to logic which is known as *classical*,
since it is the most popular approach, and the one which is generally
presented first in textbooks. This approach is based on certain
assumptions, such as the law of the excluded middle (everything is either true or false, but not neither) and the law of non-contradiction (nothing can be both true and false simultaneously). Non-classical logics question some of the assumptions of classical logic:

**substructural logic**: permits less rules of inference than those permitted in classical propositional calculus
**relevance logic**:
attempts to better model our informal ideas of implication, by
insisting the premise must be relevant to the conclusion (a type of
substructural logic)
**linear logic**: a system of logic based on the idea of constrained resources (a type of substructural logic)
**intuitionistic logic**:
denies the law of the excluded middle (everything must be true or
false); inspired by the mathematical movements of
intiutionism/constructivism
**paraconsistent logic**:
rejects the law of non-contradiction; permits valid reasoning from
contradictory premises. (All relevance logics are paraconsistent, but
not all paraconistent logics are relevant)
**infinitary logic**:
whereas classical logic only permits finite-length propositions and
finite-length proofs, inifinitary logic allows propositions and proofs
of infinite length
**quantum logic**: a system of logic used to reason about quantum mechanical systems

## Ex contradictione quodlibet

The **principle of explosion** is also known by its Latin name **ex contradictione quodlibet**, meaning *from a contradiction anything follows*, or **ECQ** for short.

Classical logic accepts the principle of explosion; but in paraconsistent logic it is rejected. It is also rejected in relevance logic, since relevance logic is based on the competing principle that *the premises must be relevant to the conclusion*. (All relevance logics are paraconsistent, but not all paraconsistent logics are relevant.)

## Triviality

A formal system is **trivial** if every possible well-formed formula is provable in the system.

A system of paraconsistent logic can be non-trivial even if it contains contradictory axioms, since its inference rules do not include the principle of explosion.

## Paraconsistent logic

**Paraconsistent logic** refers to alternative (non-classical) systems of logic which reject the law of non-contradiction, that everything must be either true or false but not both. To avoid triviality, it is necessary to also reject the principle ex contradictione quodlibet, from a contradiction anything follows.

Paraconsistent logic is proposed as a potential solution to paradoxes such as the liar paradox.

**Paraconsistent mathematics** refers to attempts to develop mathematics on top of a foundation of paraconsistent logic.

The most notable adherent of paraconsistency in the contemporary
philosophical scene is the British-Australian philosopher Graham Priest.

Historically speaking, paraconsistency has been a common theme in
Indian logic, especially Jain and Buddhist logic. Whereas classical
Western logic would see a statement as either true or false, but not
both nor neither, Indian logics have traditionally been accepting of
statements being both true and false simultaneously, or neither true nor
false. Paraconsistency applies in particular to the *both* case - although it often allows the *neither* case as well. Constructivist/intuitionistic logic allows the *neither* case but not the *both* case, by denying the law of the excluded middle.

## Relevance logic

**Relevance logic**, also known as **relevant logic**, is a group of systems of non-classical logic which attempt to resolve the paradoxes of material implication.

The classical definition of implication, material implication, is
truth-functional: if we know the truth value of A and B, then we know
the truth value of whether A implies B. A implies B if A is false or if B
is true. What this means, is that if A is false, then A implies
anything. For example, the following is true according to material
implication: "If the Earth has two moons, then JFK was never
assassinated". Since the antecedent is false, the implication is true,
regardless of the truth or falsehood of the consequent. However, most
would say that this implication is false, since the two statements have
nothing to do with each other. Relevance logic attempts to capture
formally this intuitive idea, that the premises must be relevant to the
conclusion for the implication to be true. But as a result, the relevant
implication is not truth-functional - knowing the truth or falsehood of
the antecedent and consequent is insufficient to know whether or not
the implication is true.

One attempt to form a notion of implication which better reflects
our naive ideas of the meaning of "implies" is strict implication.
Strict implication interprets "A implies B" as meaning "necessarily, A
implies B", or "in all possible worlds, A implies B". Whereas material
implication would consider "If the Earth has two moons, then JFK was
never assassinated", strict implication would suggest that statement is
false, since (arguably) there is some possible world in which the Earth
had two moons, yet the JFK assassination still happened. But, consider
another statement "If 1+1=3, then JFK was never assassinated". Strict
implication would consider this true, since the same statement
(interpreted according to material implication) is true in all possible
worlds, since there is no possible world in which 1+1=3 was true. But
relevant implication would reject that implication as false, since the
premise is irrelevant to the conclusion. Thus may relevant and strict
implication be distinguished.

All relevant logics are paraconsistent, since they all deny the principle of explosion; but not all paraconsistent logics are relevant.

## Russell's paradox

**Russell's paradox**, named for philosopher and logician Bertrand
Russell, is as follows: Consider the set of all sets which not members
of themselves. Is this set a member of itself? If it is, then it is not.
If it is not, then it is. A contradiction ensues.

An equivalent formulation is the **Barber's paradox** — the
village barber shaves all those men who do not shave themselves. Does he
shave himself? If he does then he doesn't, he doesn't then he does.

Russell's paradox is a consequence of the axiom of comprehension
and the existence of a universal set. Hence, in ZF set theory, the
universal set does not exist. Alternatively, one could avoid Russell's
paradox and retain a universal set by rejecting the axiom of
comprehension.