freeCodeCamp/guide/english/mathematics/propositional-logic/index.md

1.7 KiB

title
Propositional Logic

Propositional Logic Intro

Propositional logic is a branch of logic that uses propositions, logical connectives and inference rules to reach conclusions. Propositions are statements or assertions that only be either false or true. These statements are the basic building blocks of propositional logic. Logical connectives bring propositions together to define argument and reach conclusions. Inference rules dictate how arguments are structured.

Propositions are simple statements that can be represented by simple symbols. Those symbols can then be used with logical connectives to reach conclusions. For example take the following argument:

First Premise: If it is snowing, then it is winter.

Second Premise: It is snowing.

Conclusion: Therefore, it is winter.

This argument can be rewritten in the form:

First Premise: P -> Q

Second Premise: P

Conclusion: Q

Modus Ponens

The following argument illustrates one of the most basic inference rules of propositional logic: Modus Ponens also known as implication elimination.

The rule for modus ponens takes the simple form: If P is true then Q is true. P is true therefore Q is true.

P and Q can be replaced with any statement and the argument will be valid meaning if the premises are true, then the conclusion must be true by necessity. However, the argument is not sound unless it is both valid and the premises are true. For example,

The following argument is valid but not sound:

First Premise: If it is raining, it is a Thursday.

Second Premise: It is raining.

Conclusion: It is Thursday.

More Information: