Further discussion of this text may be found at this blog post. Here are some other interactive logic demonstrations:

- Emojic
- NandGame - Build a computer from scratch
- Natural deduction proof editor and checker
- Tarski's World
- The incredible proof machine
- The markable mark
- WFF'N PROOF

CONJUNCTION ELIMINATION (left)

CONJUNCTION ELIMINATION (right)

DISJUNCTION INTRODUCTION (left)

DISJUNCTION INTRODUCTION (right)

IMPLICATION INTRODUCTION

AND

OR

IMPLIES

IFF

NOT

PUSH

PUSH (alternate form)

BICONDITIONAL INTRODUCTION

BICONDITIONAL ELIMINATION (left)

BICONDITIONAL ELIMINATION (right)

DISJUNCTIVE ELIMINATION (left)

DISJUNCTIVE ELIMINATION (right)

TRUE

NOT FALSE

NOT FALSE (alternate form)

PUSH (for free variables)

FREE VARIABLE INTRODUCTION

FOR ALL

THERE EXISTS

PUSH (for set variables)

PULL

PULL

EXISTENCE

EXISTENCE

EQUALITY IS REFLEXIVE

RENAMING BOUND VARIABLE (universal)

RENAMING BOUND VARIABLE (existential)

BARBARA SYLLOGISM (singular form)

REVERSE UNIVERSAL INTRODUCTION

- The
**Root environment**window below contains all the statements that one already knows to be true for the given exercise (which, in this case, are*A*,*B*and*C*). Initially this window will just contain the given hypotheses of the exercise. - Statements can be atomic formulas such as
*A*,*B*, and*C*, or compound formulas formed from the atomic formulas and logical connectives such as AND, OR, and NOT. For instance, (*A*AND*B*) OR*C*is a compound formula, and thus a potential statement in one's argument. - If one drags one statement to another, the
**Available deductions**window below will show what conclusions one can draw from these statements using the available deduction rules; if any conclusions can be drawn, one can add them to the**Root environment**window by clicking on the button containing the conclusion. - For instance, to solve this level one drags the
*A*statement onto the*B*statement (or vice versa), clicks on the button marked "*A*AND*B*" to add that statement to the**Root environment**, drags the new*A*AND*B*statement onto the*C*statement (or vice versa), and then clicks on the button containing the desired conclusion. - By opening the first exercise of Section 1 (Exercise 1.1), you unlocked the rule of conjunction introduction. This asserts that if a statement
*A*is known, and the statement*B*is known, then one can deduce the compound statement*A*AND*B*. This is the only rule one starts with, but more deductive rules will be unlocked whenever one begins a new section of the textbook. The**Achievements**window will record all the unlocked laws. - Progress is recorded in the
**Achievements**and**Event log**windows below. This progress will be saved between sessions (assuming your browser supports local storage), unless you reset this interactive text completely using the button at the bottom of the page. - Your deductions will be recorded as a human-readable proof in the
**Proof**window below. This window is not absolutely necessary in order to play the game, but should help you understand and interpret the moves you are making. - The exercise is completed when you have managed to obtain the desired conclusion (in this case, (
*A*AND*B*) AND*C*) in the**Root environment**window. This will unlock further exercises and sections of the textbook, turning the exercise buttons from gray to yellow.

*A*.*[given]**B*.*[given]**C*.*[given]*- From
*A*,*B*: deduce*A*AND*B*.*[CONJUNCTION INTRODUCTION]* - From
*A*AND*B*,*C*: deduce (*A*AND*B*) AND*C*.*[CONJUNCTION INTRODUCTION]* - QED!

AND IS IDEMPOTENT

- It is permissible to drag a statement onto itself.
- You can move forwards and backwards through the unlocked exercises using the "PREVIOUS EXERCISE" and "NEXT EXERCISE" buttons at the bottom of this page, or by using the '<' and '>' hotkeys.

*A*.*[given]*- From
*A*,*A*: deduce*A*AND*A*.*[CONJUNCTION INTRODUCTION]* - QED!

AND IS COMMUTATIVE

- The rules of conjunction elimination have been unlocked. These rules assert that if a conjunction statement such as
*A*AND*B*is known, then one can deduce either of the two individual statements*A*or*B*of that statement separately. - To activate this rule, click on a compound statement of the form
*A*AND*B*.

*A*AND*B*.*[given]*- From
*A*AND*B*: deduce*A*.*[CONJUNCTION ELIMINATION (left)]* - From
*A*AND*B*: deduce*B*.*[CONJUNCTION ELIMINATION (right)]* - From
*B*,*A*: deduce*B*AND*A*.*[CONJUNCTION INTRODUCTION]* - QED!

AND IS ASSOCIATIVE (left)

- One can think of a deduction rule as a template in which the atomic formulas of the deduction rule (such as
*A*or*B*) can be replaced by compound formulas (e.g. "*A*AND*B*"). This can greatly increase the power of such laws. Each problem that I solved became a rule, which served afterwards to solve other problems

- René Descartes. Each exercise solved in this text becomes a new deduction rule that you may use in subsequent exercises. The**Achievements**window lists all the rules of inference one has available, either through being unlocked by opening the appropriate exercise, or by proving that rule as one of the exercises.- One can also use the numbers '1' through '9' as hotkeys for the available eductions (or the first 9 of them, at any rate).

- (
*A*AND*B*) AND*C*.*[given]* - From (
*A*AND*B*) AND*C*: deduce*A*AND*B*.*[CONJUNCTION ELIMINATION (left)]* - From (
*A*AND*B*) AND*C*: deduce*C*.*[CONJUNCTION ELIMINATION (right)]* - From
*A*AND*B*: deduce*A*.*[CONJUNCTION ELIMINATION (left)]* - From
*A*AND*B*: deduce*B*.*[CONJUNCTION ELIMINATION (right)]* - From
*B*,*C*: deduce*B*AND*C*.*[CONJUNCTION INTRODUCTION]* - From
*A*,*B*AND*C*: deduce*A*AND (*B*AND*C*).*[CONJUNCTION INTRODUCTION]* - QED!

AND IS ASSOCIATIVE (right)

- There are no "wrong" moves in the QED game - every move you make is a valid deduction! However, you may end up making "useless" moves - moves that are logically valid, but do not bring one closer to the desired conclusion. If you are finding the deduction environment to be getting too cluttered, you can click on the exercise button (in this case, Exercise 2.2(b)) to start from the beginning; one can also press the "RESTART EXERCISE" (or presses "r") at the bottom of the page.
- One can also delete sentences by selecting them and then pressing the delete key, though one should caution that this may render the exercise unsolvable without a restart if a key hypothesis ends up being deleted.
- Finally, one can also "UNDO" a deduction if one presses the "IMMEDIATE UNDO" button at the bottom of this page (or presses "u") immediately after making a deduction. This feature is not available if the deduction solves the exercise, or if one has performed any action between the deduction and the undo.
- Thanks to Stijn Vanhee and Siddhartha Srivastava for supplying a short proof.

*A*AND (*B*AND*C*).*[given]*- From
*A*AND (*B*AND*C*): deduce (*B*AND*C*) AND*A*.*[AND IS COMMUTATIVE]* - From (
*B*AND*C*) AND*A*: deduce*B*AND (*C*AND*A*).*[AND IS ASSOCIATIVE (left)]* - From
*B*AND (*C*AND*A*): deduce (*C*AND*A*) AND*B*.*[AND IS COMMUTATIVE]* - From (
*C*AND*A*) AND*B*: deduce*C*AND (*A*AND*B*).*[AND IS ASSOCIATIVE (left)]* - From
*C*AND (*A*AND*B*): deduce (*A*AND*B*) AND*C*.*[AND IS COMMUTATIVE]* - QED!

- Some deductive rules use formulas (also known as well-formed formulas) as input.
- Formulas look the same as statements, but whereas statements in the root environment are known to be true, a formula could be either true or false. As such, we place them in a separate
**Formulas**window, which is now unlocked for use. For instance, in this exercise, the formulas*B*and*C*are*not*known to be true, but are still available for use in some rules of inference. The formula*A*is known to be true, so it can belong to both the**Root environment**and**Formulas**windows. - In mathematical logic, the logical connective OR (also known as disjunction) is interpreted as an
*inclusive*or; the statement "*A*OR*B*" asserts that*at least one*of*A*and*B*are true, and in particular will remain true if*both*of*A*and*B*are true. This feature of OR is captured in part by the laws of disjunction introduction that have just been unlocked. - To use one of these laws, drag a formula from the
**Formulas**window to a sentence in the**Root environment**window (or drag a sentence in the**Root environment**window to a formula in the**Formulas**window).

*A*.*[given]*- From
*A*: deduce*A*OR*B*.*[DISJUNCTION INTRODUCTION (left)]* - From
*A*OR*B*: deduce*C*OR (*A*OR*B*).*[DISJUNCTION INTRODUCTION (right)]* - QED!

OR IS IDEMPOTENT (left)

The reverse implication (deducing *A* from *A* OR *A*) is true, but will be deferred to Exercise 9.1(b), as we first need to introduce the important concept of an assumption and then introduce some further laws of disjunction.

*A*.*[given]*- From
*A*: deduce*A*OR*A*.*[DISJUNCTION INTRODUCTION (left)]* - QED!

- The
**Root environment**window holds all the statements that are known to be true under the given hypothesis. But sometimes in an argument, we also need to consider statements that are only*conditionally*known to be true, under one or more assumptions. For instance, we might not know that a statement*A*is true unconditionally, but instead know that*A*is conditionally true under the assumption of a second statement*B*. - In this interactive text, assumptions are depicted as subwindows of the
**Root environment**window. For instance, to depict the knowledge of*A*conditionally under the assumption of*B*, one would form a subwindow of**Root environment**titled "**Assume**", and place*B**A*inside that window. - The law of assumption (or
*implication introduction*) asserts that if*A*is a formula, then it will be true if we first make an assumption that*A*holds. - Try dragging the formula
*A*to the**Root environment**window (or clicking on the formula) to make such an assumption! - Every deductive rule that one can apply in the root environment, one can also apply in a sub-environment. This is the key to solving the current exercise (and to many subsequent exercises).

- Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - From
*A*[assuming*A*],*A*[assuming*A*]: deduce*A*AND*A*[assuming*A*].*[CONJUNCTION INTRODUCTION]* - QED!

- One can combine formulas together to create compound formulas.
- For binary logical connectives such as AND and OR, this is done here by dragging formulas together in the
**Formulas**window. - See what happens if one drags the formula
*A*onto the formula*B*or vice versa! - For the purposes of recording proof length, the creation of new formulas is considered to be a "free move" in this text, in that it does not use up any lines of the proof.

- Deduce (
*A*AND*B*) OR*C*[assuming (*A*AND*B*) OR*C*].*[IMPLICATION INTRODUCTION]* - QED!

- Assumptions can be nested.
- The statement "
*A*, assuming*B*,*A*" asserts that if one assumes*B*, and then subsequently assumes*A*, then the statement*A*will be true under these two assumptions. - As with Exercise 4.1, the key to solving this exercise is in using the fact that any deductive rule that is applicable in the root environment, can also be applied in any sub-environment.

- Deduce
*B*[assuming*B*].*[IMPLICATION INTRODUCTION]* - Deduce
*A*[assuming*B*,*A*].*[IMPLICATION INTRODUCTION]* - QED!

IMPLIES IS IDEMPOTENT

- The logical connective IMPLIES is also known as material implication (or the
*conditional*); informally, one can think of the assertion IMPLIES(*A*,*B*) as the assertion that*B*is "at least as true as"*A*. (But they do not need to be*equally*true: in particular, if*A*is false and*B*is true, then it turns out that*A*IMPLIES*B*is true. - The statement
*A*IMPLIES*B*can also be written as IF*A*, THEN*B*. - The deduction theorem asserts that if you can prove a statement
*B*under the assumption of another statement*A*, then you can deduce the compound statement*A*IMPLIES*B*. It is very commonly used in mathematics to prove implication statements. - To use the deduction theorem, take a statement that is known under some hypothesis, and drag it out of the window corresponding to that hypothesis into the parent window. (In many cases, the parent window will be the
**Root environment**window.) - In some proof systems for propositional calculus, the deduction theorem is not one of the given laws of inference, but actually has to be proven as a theorem, which explains the name. However, in this text, we will take the deduction theorem as a primitive inference rule.

- Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - From
*A*[assuming*A*]: deduce*A*IMPLIES*A*.*[DEDUCTION THEOREM]* - QED!

To prove an implication of the form *X* IMPLIES *Y*, first create *X* as a formula in the **Formulas** window, drag it to the **Root environment** window to use it as an assumption, and then try to establish *Y* inside the window corresponding to that assumption. Then use the deduction theorem.

- Deduce
*A*AND (*A*OR*B*) [assuming*A*AND (*A*OR*B*)].*[IMPLICATION INTRODUCTION]* - From
*A*AND (*A*OR*B*) [assuming*A*AND (*A*OR*B*)]: deduce*A*[assuming*A*AND (*A*OR*B*)].*[CONJUNCTION ELIMINATION (left)]* - From
*A*[assuming*A*AND (*A*OR*B*)]: deduce (*A*AND (*A*OR*B*)) IMPLIES*A*.*[DEDUCTION THEOREM]* - QED!

DOUBLE DEDUCTION THEOREM

- This exercise easily follows from two applications of the deduction theorem, but is convenient for use in later exercises.
- The appearance of [root environment] in the list of assumptions is not needed to
*solve*the exercise; but it affects the user interface for*applying*the exercise. Namely, to invoke this theorem in the future, one should drag a statement "up" two levels, undoing two levels of assumption. (Without [root environment], one would instead click on the statement rather than drag it up two levels.)

*C*[assuming*A*,*B*].*[given]*- From
*C*[assuming*A*,*B*]: deduce*B*IMPLIES*C*[assuming*A*].*[DEDUCTION THEOREM]* - From
*B*IMPLIES*C*[assuming*A*]: deduce*A*IMPLIES (*B*IMPLIES*C*).*[DEDUCTION THEOREM]* - QED!

- If a statement is known without an assumption, then it can be "pushed" into an enviroment with that assumption. For instance, if
*A*is known to be true unconditionally, then it is also known to be true assuming*B*. - The push law is also known as "weakening" or monotonicity of entailment.
- To apply a push, drag a statement into an assumption environment that shares the same parent environment as the original statement. (Alternatively, if this environment has not yet been created, drag the statement onto a formula containing the assumption, or vice versa.)

- Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - From
*A*[assuming*A*]: deduce*A*[assuming*A*,*B*].*[PUSH (alternate form)]* - From
*A*[assuming*A*,*B*]: deduce*A*IMPLIES (*B*IMPLIES*A*).*[DOUBLE DEDUCTION THEOREM]* - QED!

DOUBLE PUSH

- This exercise easily follows from two applications of the push law, but turns out to be convenient in some subsequent exercises.
- The presence of the assumption environment [assuming
*B*,*C*] is needed for two technical reasons. Firstly, it populates the formula window with the atomic formulas*B*,*C*, which otherwise would not be present. Secondly, it affects the user interface for applying the double push rule. Namely, to invoke this law, one should push a statement "down" two levels, into an assumption window that is two levels nested below the one that the statement lies in. - Thanks to Steve Trout for contributing a short proof.

*A*.*[given]*- From
*A*: deduce*A*[assuming*B*].*[PUSH (alternate form)]* - From
*A*[assuming*B*]: deduce*A*[assuming*B*,*C*].*[PUSH (alternate form)]* - QED!

MODUS PONENS (ASSUMPTION FORM)

- Modus ponens is one of the most famous deductive rules. It asserts that if a statement
*A*is known to be true, and it is also known that*A*IMPLIES*B*, then one can conclude that*B*is also true. - To apply this rule, drag the hypothesis
*A*of an implication onto the implication*A*IMPLIES*B*. The two statements must lie in the same assumption window for the law to be applied. - Incidentally, this exercise (the "assumption" form of Modus ponens) is a useful tool for several subsequent exercises in this text, so keep it in mind. To apply this exercise, drag a hypothesis
*A*to a conclusion*B*that has already been obtained under the assumption of*A*.

*A*.*[given]**B*[assuming*A*].*[given]*- From
*B*[assuming*A*]: deduce*A*IMPLIES*B*.*[DEDUCTION THEOREM]* - From
*A*,*A*IMPLIES*B*: deduce*B*.*[MODUS PONENS]* - QED!

REVERSE DEDUCTION THEOREM

This exercise will be useful in some later exercises. To apply it, click on an implication statement such as *A* IMPLIES *B*.

*A*IMPLIES*B*.*[given]*- Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - From
*A*IMPLIES*B*: deduce*A*IMPLIES*B*[assuming*A*].*[PUSH]* - From
*A*[assuming*A*],*A*IMPLIES*B*[assuming*A*]: deduce*B*[assuming*A*].*[MODUS PONENS]* - QED!

IMPLIES IS TRANSITIVE

*A*IMPLIES*B*.*[given]**B*IMPLIES*C*.*[given]*- From
*A*IMPLIES*B*: deduce*B*[assuming*A*].*[REVERSE DEDUCTION THEOREM]* - From
*B*IMPLIES*C*: deduce*B*IMPLIES*C*[assuming*A*].*[PUSH]* - From
*B*[assuming*A*],*B*IMPLIES*C*[assuming*A*]: deduce*C*[assuming*A*].*[MODUS PONENS]* - From
*C*[assuming*A*]: deduce*A*IMPLIES*C*.*[DEDUCTION THEOREM]* - QED!

AND IS COMMUTATIVE (implication form)

The fact that AND is commutative, proven in Exercise 2.1, will be helpful here.

- Deduce
*A*AND*B*[assuming*A*AND*B*].*[IMPLICATION INTRODUCTION]* - From
*A*AND*B*[assuming*A*AND*B*]: deduce*B*AND*A*[assuming*A*AND*B*].*[AND IS COMMUTATIVE]* - From
*B*AND*A*[assuming*A*AND*B*]: deduce (*A*AND*B*) IMPLIES (*B*AND*A*).*[DEDUCTION THEOREM]* - QED!

General tip: one can press "n" to advance to the next available unsolved exercise, or "N" to advance to the last available unsolved exercise (which will usually be the first exercise of the section after the last solved exercise).

*A*IMPLIES (*B*IMPLIES*C*).*[given]*- Deduce
*A*AND*B*[assuming*A*AND*B*].*[IMPLICATION INTRODUCTION]* - From
*A*AND*B*[assuming*A*AND*B*]: deduce*A*[assuming*A*AND*B*].*[CONJUNCTION ELIMINATION (left)]* - From
*A*IMPLIES (*B*IMPLIES*C*): deduce*A*IMPLIES (*B*IMPLIES*C*) [assuming*A*AND*B*].*[PUSH]* - From
*A*[assuming*A*AND*B*],*A*IMPLIES (*B*IMPLIES*C*) [assuming*A*AND*B*]: deduce*B*IMPLIES*C*[assuming*A*AND*B*].*[MODUS PONENS]* - From
*A*AND*B*[assuming*A*AND*B*]: deduce*B*[assuming*A*AND*B*].*[CONJUNCTION ELIMINATION (right)]* - From
*B*[assuming*A*AND*B*],*B*IMPLIES*C*[assuming*A*AND*B*]: deduce*C*[assuming*A*AND*B*].*[MODUS PONENS]* - From
*C*[assuming*A*AND*B*]: deduce (*A*AND*B*) IMPLIES*C*.*[DEDUCTION THEOREM]* - QED!

- (
*A*AND*B*) IMPLIES*C*.*[given]* - Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - Deduce
*B*[assuming*A*,*B*].*[IMPLICATION INTRODUCTION]* - From
*A*[assuming*A*]: deduce*A*[assuming*A*,*B*].*[PUSH]* - From
*A*[assuming*A*,*B*],*B*[assuming*A*,*B*]: deduce*A*AND*B*[assuming*A*,*B*].*[CONJUNCTION INTRODUCTION]* - From (
*A*AND*B*) IMPLIES*C*: deduce (*A*AND*B*) IMPLIES*C*[assuming*A*,*B*].*[DOUBLE PUSH]* - From
*A*AND*B*[assuming*A*,*B*], (*A*AND*B*) IMPLIES*C*[assuming*A*,*B*]: deduce*C*[assuming*A*,*B*].*[MODUS PONENS]* - From
*C*[assuming*A*,*B*]: deduce*A*IMPLIES (*B*IMPLIES*C*).*[DOUBLE DEDUCTION THEOREM]* - QED!

Thanks to William Chargin and Junghyeon Park for a short proof.

*A*IMPLIES (*B*IMPLIES*C*).*[given]*- From
*A*IMPLIES (*B*IMPLIES*C*): deduce (*A*AND*B*) IMPLIES*C*.*[EXERCISE 8.4(a)]* - Deduce (
*B*AND*A*) IMPLIES (*A*AND*B*).*[EXERCISE 8.3]* - From (
*B*AND*A*) IMPLIES (*A*AND*B*), (*A*AND*B*) IMPLIES*C*: deduce (*B*AND*A*) IMPLIES*C*.*[IMPLIES IS TRANSITIVE]* - From (
*B*AND*A*) IMPLIES*C*: deduce*B*IMPLIES (*A*IMPLIES*C*).*[EXERCISE 8.4(b)]* - QED!

*A*IMPLIES*B*.*[given]*- From
*A*IMPLIES*B*: deduce*B*[assuming*A*].*[REVERSE DEDUCTION THEOREM]* - Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - From
*A*[assuming*A*],*B*[assuming*A*]: deduce*A*AND*B*[assuming*A*].*[CONJUNCTION INTRODUCTION]* - From
*A*AND*B*[assuming*A*]: deduce*A*IMPLIES (*A*AND*B*).*[DEDUCTION THEOREM]* - QED!

*A*IMPLIES*B*.*[given]*- From
*A*IMPLIES*B*: deduce*A*IMPLIES (*A*AND*B*).*[ABSORPTION (right)]* - Deduce (
*A*AND*B*) IMPLIES (*B*AND*A*).*[AND IS COMMUTATIVE (implication form)]* - From
*A*IMPLIES (*A*AND*B*), (*A*AND*B*) IMPLIES (*B*AND*A*): deduce*A*IMPLIES (*B*AND*A*).*[IMPLIES IS TRANSITIVE]* - QED!

*A*AND*B*.*[given]**A*IMPLIES*C*.*[given]*- From
*A*AND*B*: deduce*A*.*[CONJUNCTION ELIMINATION (left)]* - From
*A*AND*B*: deduce*B*.*[CONJUNCTION ELIMINATION (right)]* - From
*A*,*A*IMPLIES*C*: deduce*C*.*[MODUS PONENS]* - From
*C*,*B*: deduce*C*AND*B*.*[CONJUNCTION INTRODUCTION]* - QED!

*A*AND*B*.*[given]**B*IMPLIES*C*.*[given]*- From
*A*AND*B*: deduce*B*AND*A*.*[AND IS COMMUTATIVE]* - From
*B*AND*A*,*B*IMPLIES*C*: deduce*C*AND*A*.*[EXERCISE 8.6(a)]* - From
*C*AND*A*: deduce*A*AND*C*.*[AND IS COMMUTATIVE]* - QED!

OR IS COMMUTATIVE

- We now return to the laws of disjunction (i.e., the laws of the "OR" connective).
- To complement the laws of disjunction introduction from Section 3, one has the law of case analysis: if a statement
*C*is known to be true under the assumption*A*, and also known to be true under the assumption*B*, then it is true under the assumption*A*OR*B*. - For instance, to solve the current exercise, first establish
*B*OR*A*under the assumption of*A*, and then separately establish*B*OR*A*under the assumption of*B*. Then drag the two conclusions together! - Splitting into cases is a common technique in mathematics. For instance, to prove a statement
*A*involving a natural number*n*, one might first prove the statement*A*assuming*n*is odd, and then prove it assuming*n*is even. Since*n*has to be odd or even, the law of case analysis then establishes the statement*A*unconditionally.

*A*OR*B*.*[given]*- Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - From
*A*[assuming*A*]: deduce*B*OR*A*[assuming*A*].*[DISJUNCTION INTRODUCTION (right)]* - Deduce
*B*[assuming*B*].*[IMPLICATION INTRODUCTION]* - From
*B*[assuming*B*]: deduce*B*OR*A*[assuming*B*].*[DISJUNCTION INTRODUCTION (left)]* - From
*B*OR*A*[assuming*A*],*B*OR*A*[assuming*B*]: deduce*B*OR*A*[assuming*A*OR*B*].*[CASE ANALYSIS]* - From
*A*OR*B*,*B*OR*A*[assuming*A*OR*B*]: deduce*B*OR*A*.*[MODUS PONENS (ASSUMPTION FORM)]* - QED!

OR IS IDEMPOTENT (right)

This is the reverse of Exercise 3.1(b).

*A*OR*A*.*[given]*- Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - From
*A*[assuming*A*],*A*[assuming*A*]: deduce*A*[assuming*A*OR*A*].*[CASE ANALYSIS]* - From
*A*OR*A*,*A*[assuming*A*OR*A*]: deduce*A*.*[MODUS PONENS (ASSUMPTION FORM)]* - QED!

OR IS ASSOCIATIVE (left)

- From this point onwards, the solutions will begin to be somewhat lengthy.
- Thanks to Steve Trout, William Chargin, Daniel Spivak, and Keith Winstein for contributing a (relatively) short proof, and Anders Kaseorg for an even shorter proof.

- (
*A*OR*B*) OR*C*.*[given]* - Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - From
*A*[assuming*A*]: deduce*A*OR (*B*OR*C*) [assuming*A*].*[DISJUNCTION INTRODUCTION (left)]* - Deduce
*B*[assuming*B*].*[IMPLICATION INTRODUCTION]* - From
*B*[assuming*B*]: deduce*A*OR (*B*OR*C*) [assuming*B*].*[EXERCISE 3.1(a)]* - Deduce
*C*[assuming*C*].*[IMPLICATION INTRODUCTION]* - From
*C*[assuming*C*]: deduce*B*OR*C*[assuming*C*].*[DISJUNCTION INTRODUCTION (right)]* - From
*B*OR*C*[assuming*C*]: deduce*A*OR (*B*OR*C*) [assuming*C*].*[DISJUNCTION INTRODUCTION (right)]* - From
*A*OR (*B*OR*C*) [assuming*A*],*A*OR (*B*OR*C*) [assuming*B*]: deduce*A*OR (*B*OR*C*) [assuming*A*OR*B*].*[CASE ANALYSIS]* - From
*A*OR (*B*OR*C*) [assuming*A*OR*B*],*A*OR (*B*OR*C*) [assuming*C*]: deduce*A*OR (*B*OR*C*) [assuming (*A*OR*B*) OR*C*].*[CASE ANALYSIS]* - From (
*A*OR*B*) OR*C*,*A*OR (*B*OR*C*) [assuming (*A*OR*B*) OR*C*]: deduce*A*OR (*B*OR*C*).*[MODUS PONENS (ASSUMPTION FORM)]* - QED!

OR IS ASSOCIATIVE (right)

Thanks to William Chargin for a short proof.

*A*OR (*B*OR*C*).*[given]*- From
*A*OR (*B*OR*C*): deduce (*B*OR*C*) OR*A*.*[OR IS COMMUTATIVE]* - From (
*B*OR*C*) OR*A*: deduce*B*OR (*C*OR*A*).*[OR IS ASSOCIATIVE (left)]* - From
*B*OR (*C*OR*A*): deduce (*C*OR*A*) OR*B*.*[OR IS COMMUTATIVE]* - From (
*C*OR*A*) OR*B*: deduce*C*OR (*A*OR*B*).*[OR IS ASSOCIATIVE (left)]* - From
*C*OR (*A*OR*B*): deduce (*A*OR*B*) OR*C*.*[OR IS COMMUTATIVE]* - QED!

OR DISTRIBUTES OVER AND (left)

*A*OR (*B*AND*C*).*[given]*- Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - From
*A*[assuming*A*]: deduce*A*OR*B*[assuming*A*].*[DISJUNCTION INTRODUCTION (left)]* - From
*A*[assuming*A*]: deduce*A*OR*C*[assuming*A*].*[DISJUNCTION INTRODUCTION (left)]* - From
*A*OR*B*[assuming*A*],*A*OR*C*[assuming*A*]: deduce (*A*OR*B*) AND (*A*OR*C*) [assuming*A*].*[CONJUNCTION INTRODUCTION]* - Deduce
*B*AND*C*[assuming*B*AND*C*].*[IMPLICATION INTRODUCTION]* - From
*B*AND*C*[assuming*B*AND*C*]: deduce*B*[assuming*B*AND*C*].*[CONJUNCTION ELIMINATION (left)]* - From
*B*AND*C*[assuming*B*AND*C*]: deduce*C*[assuming*B*AND*C*].*[CONJUNCTION ELIMINATION (right)]* - From
*B*[assuming*B*AND*C*]: deduce*A*OR*B*[assuming*B*AND*C*].*[DISJUNCTION INTRODUCTION (right)]* - From
*C*[assuming*B*AND*C*]: deduce*A*OR*C*[assuming*B*AND*C*].*[DISJUNCTION INTRODUCTION (right)]* - From
*A*OR*B*[assuming*B*AND*C*],*A*OR*C*[assuming*B*AND*C*]: deduce (*A*OR*B*) AND (*A*OR*C*) [assuming*B*AND*C*].*[CONJUNCTION INTRODUCTION]* - From (
*A*OR*B*) AND (*A*OR*C*) [assuming*A*], (*A*OR*B*) AND (*A*OR*C*) [assuming*B*AND*C*]: deduce (*A*OR*B*) AND (*A*OR*C*) [assuming*A*OR (*B*AND*C*)].*[CASE ANALYSIS]* - From
*A*OR (*B*AND*C*), (*A*OR*B*) AND (*A*OR*C*) [assuming*A*OR (*B*AND*C*)]: deduce (*A*OR*B*) AND (*A*OR*C*).*[MODUS PONENS (ASSUMPTION FORM)]* - QED!

AND DISTRIBUTES OVER OR (left)

*A*AND (*B*OR*C*).*[given]*- From
*A*AND (*B*OR*C*): deduce*A*.*[CONJUNCTION ELIMINATION (left)]* - From
*A*AND (*B*OR*C*): deduce*B*OR*C*.*[CONJUNCTION ELIMINATION (right)]* - Deduce
*B*[assuming*B*].*[IMPLICATION INTRODUCTION]* - From
*A*: deduce*A*[assuming*B*].*[PUSH]* - From
*A*[assuming*B*],*B*[assuming*B*]: deduce*A*AND*B*[assuming*B*].*[CONJUNCTION INTRODUCTION]* - From
*A*AND*B*[assuming*B*]: deduce (*A*AND*B*) OR (*A*AND*C*) [assuming*B*].*[DISJUNCTION INTRODUCTION (left)]* - Deduce
*C*[assuming*C*].*[IMPLICATION INTRODUCTION]* - From
*A*: deduce*A*[assuming*C*].*[PUSH]* - From
*A*[assuming*C*],*C*[assuming*C*]: deduce*A*AND*C*[assuming*C*].*[CONJUNCTION INTRODUCTION]* - From
*A*AND*C*[assuming*C*]: deduce (*A*AND*B*) OR (*A*AND*C*) [assuming*C*].*[DISJUNCTION INTRODUCTION (right)]* - From (
*A*AND*B*) OR (*A*AND*C*) [assuming*B*], (*A*AND*B*) OR (*A*AND*C*) [assuming*C*]: deduce (*A*AND*B*) OR (*A*AND*C*) [assuming*B*OR*C*].*[CASE ANALYSIS]* - From
*B*OR*C*, (*A*AND*B*) OR (*A*AND*C*) [assuming*B*OR*C*]: deduce (*A*AND*B*) OR (*A*AND*C*).*[MODUS PONENS (ASSUMPTION FORM)]* - QED!

AND DISTRIBUTES OVER OR (right)

- (
*A*AND*B*) OR (*A*AND*C*).*[given]* - Deduce
*A*AND*B*[assuming*A*AND*B*].*[IMPLICATION INTRODUCTION]* - From
*A*AND*B*[assuming*A*AND*B*]: deduce*A*[assuming*A*AND*B*].*[CONJUNCTION ELIMINATION (left)]* - From
*A*AND*B*[assuming*A*AND*B*]: deduce*B*[assuming*A*AND*B*].*[CONJUNCTION ELIMINATION (right)]* - From
*B*[assuming*A*AND*B*]: deduce*B*OR*C*[assuming*A*AND*B*].*[DISJUNCTION INTRODUCTION (left)]* - From
*A*[assuming*A*AND*B*],*B*OR*C*[assuming*A*AND*B*]: deduce*A*AND (*B*OR*C*) [assuming*A*AND*B*].*[CONJUNCTION INTRODUCTION]* - Deduce
*A*AND*C*[assuming*A*AND*C*].*[IMPLICATION INTRODUCTION]* - From
*A*AND*C*[assuming*A*AND*C*]: deduce*A*[assuming*A*AND*C*].*[CONJUNCTION ELIMINATION (left)]* - From
*A*AND*C*[assuming*A*AND*C*]: deduce*C*[assuming*A*AND*C*].*[CONJUNCTION ELIMINATION (right)]* - From
*C*[assuming*A*AND*C*]: deduce*B*OR*C*[assuming*A*AND*C*].*[DISJUNCTION INTRODUCTION (right)]* - From
*A*[assuming*A*AND*C*],*B*OR*C*[assuming*A*AND*C*]: deduce*A*AND (*B*OR*C*) [assuming*A*AND*C*].*[CONJUNCTION INTRODUCTION]* - From
*A*AND (*B*OR*C*) [assuming*A*AND*B*],*A*AND (*B*OR*C*) [assuming*A*AND*C*]: deduce*A*AND (*B*OR*C*) [assuming (*A*AND*B*) OR (*A*AND*C*)].*[CASE ANALYSIS]* - From (
*A*AND*B*) OR (*A*AND*C*),*A*AND (*B*OR*C*) [assuming (*A*AND*B*) OR (*A*AND*C*)]: deduce*A*AND (*B*OR*C*).*[MODUS PONENS (ASSUMPTION FORM)]* - QED!

OR DISTRIBUTES OVER AND (right)

Thanks to Jan Wieners for the short proof.

- (
*A*OR*B*) AND (*A*OR*C*).*[given]* - Deduce
*B*[assuming*B*].*[IMPLICATION INTRODUCTION]* - From (
*A*OR*B*) AND (*A*OR*C*): deduce*A*OR*C*.*[CONJUNCTION ELIMINATION (right)]* - From
*A*OR*C*: deduce*A*OR*C*[assuming*B*].*[PUSH]* - From
*B*[assuming*B*],*A*OR*C*[assuming*B*]: deduce*B*AND (*A*OR*C*) [assuming*B*].*[CONJUNCTION INTRODUCTION]* - From
*B*AND (*A*OR*C*) [assuming*B*]: deduce (*B*AND*A*) OR (*B*AND*C*) [assuming*B*].*[AND DISTRIBUTES OVER OR (left)]* - Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - From
*A*[assuming*A*]: deduce*A*OR (*B*AND*C*) [assuming*A*].*[DISJUNCTION INTRODUCTION (left)]* - From (
*B*AND*A*) OR (*B*AND*C*) [assuming*B*]: deduce (*B*AND*C*) OR (*B*AND*A*) [assuming*B*].*[OR IS COMMUTATIVE]* - From (
*B*AND*C*) OR (*B*AND*A*) [assuming*B*]: deduce ((*B*AND*C*) OR*B*) AND ((*B*AND*C*) OR*A*) [assuming*B*].*[OR DISTRIBUTES OVER AND (left)]* - From ((
*B*AND*C*) OR*B*) AND ((*B*AND*C*) OR*A*) [assuming*B*]: deduce (*B*AND*C*) OR*A*[assuming*B*].*[CONJUNCTION ELIMINATION (right)]* - From (
*B*AND*C*) OR*A*[assuming*B*]: deduce*A*OR (*B*AND*C*) [assuming*B*].*[OR IS COMMUTATIVE]* - From
*A*OR (*B*AND*C*) [assuming*A*],*A*OR (*B*AND*C*) [assuming*B*]: deduce*A*OR (*B*AND*C*) [assuming*A*OR*B*].*[CASE ANALYSIS]* - From (
*A*OR*B*) AND (*A*OR*C*): deduce*A*OR*B*.*[CONJUNCTION ELIMINATION (left)]* - From
*A*OR*B*,*A*OR (*B*AND*C*) [assuming*A*OR*B*]: deduce*A*OR (*B*AND*C*).*[MODUS PONENS (ASSUMPTION FORM)]* - QED!

CONSTRUCTIVE DILEMMA (left)

*A*OR*B*.*[given]**A*IMPLIES*C*.*[given]*- From
*A*IMPLIES*C*: deduce*C*[assuming*A*].*[REVERSE DEDUCTION THEOREM]* - From
*C*[assuming*A*]: deduce*C*OR*B*[assuming*A*].*[DISJUNCTION INTRODUCTION (left)]* - Deduce
*B*[assuming*B*].*[IMPLICATION INTRODUCTION]* - From
*B*[assuming*B*]: deduce*C*OR*B*[assuming*B*].*[DISJUNCTION INTRODUCTION (right)]* - From
*C*OR*B*[assuming*A*],*C*OR*B*[assuming*B*]: deduce*C*OR*B*[assuming*A*OR*B*].*[CASE ANALYSIS]* - From
*A*OR*B*,*C*OR*B*[assuming*A*OR*B*]: deduce*C*OR*B*.*[MODUS PONENS (ASSUMPTION FORM)]* - QED!

CONSTRUCTIVE DILEMMA (right)

Thanks to William Chargin for a short proof.

*A*OR*B*.*[given]**B*IMPLIES*C*.*[given]*- From
*A*OR*B*: deduce*B*OR*A*.*[OR IS COMMUTATIVE]* - From
*B*OR*A*,*B*IMPLIES*C*: deduce*C*OR*A*.*[CONSTRUCTIVE DILEMMA (left)]* - From
*C*OR*A*: deduce*A*OR*C*.*[OR IS COMMUTATIVE]* - QED!

CONSTRUCTIVE DILEMMA (both)

- This exercise involves three hypotheses, so it cannot be directly invoked by clicking or dragging on these hypotheses. However, if one drags the first hypothesis to the second and then CTRL-clicks the third, or if one clicks the first and then CTRL-clicks the next two, one will be able to apply this exercise (once it is proven), of course. Alternatively, one can use the two halves of this dilemma in Exercise 19(a) and Exercise 19(b) as a substitute.
- This exercise can be solved quickly if one uses Exercises 9.4(a) and 9.4(b). (Of course, you must then solve these exercises first!)

*A*OR*B*.*[given]**A*IMPLIES*C*.*[given]**B*IMPLIES*D*.*[given]*- From
*A*OR*B*,*A*IMPLIES*C*: deduce*C*OR*B*.*[CONSTRUCTIVE DILEMMA (left)]* - From
*C*OR*B*,*B*IMPLIES*D*: deduce*C*OR*D*.*[CONSTRUCTIVE DILEMMA (right)]* - QED!

MONOTONICITY OF AND (right)

Thanks to dP dt for the short proof, and Anders Kaseorg for a shorter proof (located using computer search!).

*A*IMPLIES*B*.*[given]*- Deduce (
*B*AND*C*) IMPLIES (*B*AND*C*).*[IMPLIES IS IDEMPOTENT]* - From (
*B*AND*C*) IMPLIES (*B*AND*C*): deduce*B*IMPLIES (*C*IMPLIES (*B*AND*C*)).*[EXERCISE 8.4(b)]* - From
*A*IMPLIES*B*,*B*IMPLIES (*C*IMPLIES (*B*AND*C*)): deduce*A*IMPLIES (*C*IMPLIES (*B*AND*C*)).*[IMPLIES IS TRANSITIVE]* - From
*A*IMPLIES (*C*IMPLIES (*B*AND*C*)): deduce (*A*AND*C*) IMPLIES (*B*AND*C*).*[EXERCISE 8.4(a)]* - QED!

MONOTONICITY OF OR (right)

Thanks to Pace Nielsen, Andrew Liftin, Alan Lu, and Ephim Kolmogorov for the short proof.

*A*IMPLIES*B*.*[given]*- Deduce
*A*OR*C*[assuming*A*OR*C*].*[IMPLICATION INTRODUCTION]* - From
*A*IMPLIES*B*: deduce*A*IMPLIES*B*[assuming*A*OR*C*].*[PUSH]* - From
*A*OR*C*[assuming*A*OR*C*],*A*IMPLIES*B*[assuming*A*OR*C*]: deduce*B*OR*C*[assuming*A*OR*C*].*[CONSTRUCTIVE DILEMMA (left)]* - From
*B*OR*C*[assuming*A*OR*C*]: deduce (*A*OR*C*) IMPLIES (*B*OR*C*).*[DEDUCTION THEOREM]* - QED!

MONOTONICITY OF AND (left)

Thanks to Gesse Roure for a short proof.

*A*IMPLIES*B*.*[given]*- Deduce
*C*AND*A*[assuming*C*AND*A*].*[IMPLICATION INTRODUCTION]* - From
*A*IMPLIES*B*: deduce*A*IMPLIES*B*[assuming*C*AND*A*].*[PUSH]* - From
*C*AND*A*[assuming*C*AND*A*],*A*IMPLIES*B*[assuming*C*AND*A*]: deduce*C*AND*B*[assuming*C*AND*A*].*[EXERCISE 8.6(b)]* - From
*C*AND*B*[assuming*C*AND*A*]: deduce (*C*AND*A*) IMPLIES (*C*AND*B*).*[DEDUCTION THEOREM]* - QED!

MONOTONICITY OF OR (left)

*A*IMPLIES*B*.*[given]*- Deduce
*C*OR*A*[assuming*C*OR*A*].*[IMPLICATION INTRODUCTION]* - From
*A*IMPLIES*B*: deduce*A*IMPLIES*B*[assuming*C*OR*A*].*[PUSH]* - From
*C*OR*A*[assuming*C*OR*A*],*A*IMPLIES*B*[assuming*C*OR*A*]: deduce*C*OR*B*[assuming*C*OR*A*].*[CONSTRUCTIVE DILEMMA (right)]* - From
*C*OR*B*[assuming*C*OR*A*]: deduce (*C*OR*A*) IMPLIES (*C*OR*B*).*[DEDUCTION THEOREM]* - QED!

SUBSTITUTION

- The logical connective IFF (short for "IF AND ONLY IF") is also known as the biconditional.
- As the laws of biconditional assert, the statement
*A*IFF*B*is equivalent to the statements*A*IMPLIES*B*and*B*IMPLIES*A*both being true. - Another way of thinking about it is that the statement
*A*IFF*B*asserts that*A*and*B*are*equally*true. - To use the laws, either click on a statement of the form
*A*IFF*B*to be able to apply biconditional elimination to deduce*A*IMPLIES*B*or*B*IMPLIES*A*, or drag*A*IMPLIES*B*and*B*IMPLIES*A*together to form*A*IFF*B*(or*B*IFF*A*) via the law of biconditional introduction.

*A*.*[given]**A*IFF*B*.*[given]*- From
*A*IFF*B*: deduce*A*IMPLIES*B*.*[BICONDITIONAL ELIMINATION (left)]* - From
*A*,*A*IMPLIES*B*: deduce*B*.*[MODUS PONENS]* - QED!

SUBSTITUTION FOR AND (left)

Thanks to Wilson Cheang and Alan Lu for a short proof from a previous version of the text.

*A*AND*B*.*[given]**A*IFF*C*.*[given]*- From
*A*IFF*C*: deduce*A*IMPLIES*C*.*[BICONDITIONAL ELIMINATION (left)]* - From
*A*AND*B*,*A*IMPLIES*C*: deduce*C*AND*B*.*[EXERCISE 8.6(a)]* - QED!

SUBSTITUTION FOR AND (right)

*A*AND*B*.*[given]**B*IFF*C*.*[given]*- From
*B*IFF*C*: deduce*B*IMPLIES*C*.*[BICONDITIONAL ELIMINATION (left)]* - From
*A*AND*B*,*B*IMPLIES*C*: deduce*A*AND*C*.*[EXERCISE 8.6(b)]* - QED!

SUBSTITUTION FOR OR (left)

*A*OR*B*.*[given]**A*IFF*C*.*[given]*- From
*A*IFF*C*: deduce*A*IMPLIES*C*.*[BICONDITIONAL ELIMINATION (left)]* - From
*A*OR*B*,*A*IMPLIES*C*: deduce*C*OR*B*.*[CONSTRUCTIVE DILEMMA (left)]* - QED!

SUBSTITUTION FOR OR (right)

*A*OR*B*.*[given]**B*IFF*C*.*[given]*- From
*B*IFF*C*: deduce*B*IMPLIES*C*.*[BICONDITIONAL ELIMINATION (left)]* - From
*A*OR*B*,*B*IMPLIES*C*: deduce*A*OR*C*.*[CONSTRUCTIVE DILEMMA (right)]* - QED!

SUBSTITUTION FOR IMPLIES (left)

*A*IMPLIES*B*.*[given]**A*IFF*C*.*[given]*- From
*A*IFF*C*: deduce*C*IMPLIES*A*.*[BICONDITIONAL ELIMINATION (right)]* - From
*C*IMPLIES*A*,*A*IMPLIES*B*: deduce*C*IMPLIES*B*.*[IMPLIES IS TRANSITIVE]* - QED!

SUBSTITUTION FOR IMPLIES (right)

*A*IMPLIES*B*.*[given]**B*IFF*C*.*[given]*- From
*B*IFF*C*: deduce*B*IMPLIES*C*.*[BICONDITIONAL ELIMINATION (left)]* - From
*A*IMPLIES*B*,*B*IMPLIES*C*: deduce*A*IMPLIES*C*.*[IMPLIES IS TRANSITIVE]* - QED!

IFF IS SYMMETRIC

*A*IFF*B*.*[given]*- From
*A*IFF*B*: deduce*A*IMPLIES*B*.*[BICONDITIONAL ELIMINATION (left)]* - From
*A*IFF*B*: deduce*B*IMPLIES*A*.*[BICONDITIONAL ELIMINATION (right)]* - From
*B*IMPLIES*A*,*A*IMPLIES*B*: deduce*B*IFF*A*.*[BICONDITIONAL INTRODUCTION]* - QED!

IFF IS TRANSITIVE

*A*IFF*B*.*[given]**B*IFF*C*.*[given]*- From
*A*IFF*B*: deduce*A*IMPLIES*B*.*[BICONDITIONAL ELIMINATION (left)]* - From
*A*IMPLIES*B*,*B*IFF*C*: deduce*A*IMPLIES*C*.*[SUBSTITUTION FOR IMPLIES (right)]* - From
*A*IFF*B*: deduce*B*IMPLIES*A*.*[BICONDITIONAL ELIMINATION (right)]* - From
*B*IMPLIES*A*,*B*IFF*C*: deduce*C*IMPLIES*A*.*[SUBSTITUTION FOR IMPLIES (left)]* - From
*A*IMPLIES*C*,*C*IMPLIES*A*: deduce*A*IFF*C*.*[BICONDITIONAL INTRODUCTION]* - QED!

IFF IS REFLEXIVE

"*if it was so, it might be; and if it were so, it would be; but as it isn't, it ain't. That's logic.*" - Tweedledee, "Through the Looking Glass"

- The facts that IFF is symmetric, transitive, and reflexive can be combined into the single assertion that IFF is an equivalence relation.

- Deduce
*A*IMPLIES*A*.*[IMPLIES IS IDEMPOTENT]* - From
*A*IMPLIES*A*,*A*IMPLIES*A*: deduce*A*IFF*A*.*[BICONDITIONAL INTRODUCTION]* - QED!

BICONDITIONAL INTRODUCTION (ASSUMPTION FORM)

This form of biconditional introduction is convenient in some later exercises, as it can shorten proofs slightly.

*A*[assuming*B*].*[given]**B*[assuming*A*].*[given]*- From
*A*[assuming*B*]: deduce*B*IMPLIES*A*.*[DEDUCTION THEOREM]* - From
*B*[assuming*A*]: deduce*A*IMPLIES*B*.*[DEDUCTION THEOREM]* - From
*A*IMPLIES*B*,*B*IMPLIES*A*: deduce*A*IFF*B*.*[BICONDITIONAL INTRODUCTION]* - QED!

OR IS IDEMPOTENT (biconditional form)

- The left and right idempotence of OR, proven in Exercise 3.1(b) and Exercise 9.1(b) respectively, will be useful here.
- Thanks to Chen Xu and JP Sugarbroad for the short proof.

- Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - From
*A*[assuming*A*],*A*[assuming*A*]: deduce*A*[assuming*A*OR*A*].*[CASE ANALYSIS]* - From
*A*[assuming*A*]: deduce*A*OR*A*[assuming*A*].*[DISJUNCTION INTRODUCTION (left)]* - From
*A*[assuming*A*OR*A*],*A*OR*A*[assuming*A*]: deduce*A*IFF (*A*OR*A*).*[BICONDITIONAL INTRODUCTION (ASSUMPTION FORM)]* - QED!

AND IS ASSOCIATIVE (biconditional form)

The fact that AND is associative, proven in Exercise 2.2(a) and Exercise 2.2(b) will be useful here.

- Deduce (
*A*AND*B*) AND*C*[assuming (*A*AND*B*) AND*C*].*[IMPLICATION INTRODUCTION]* - From (
*A*AND*B*) AND*C*[assuming (*A*AND*B*) AND*C*]: deduce*A*AND (*B*AND*C*) [assuming (*A*AND*B*) AND*C*].*[AND IS ASSOCIATIVE (left)]* - Deduce
*A*AND (*B*AND*C*) [assuming*A*AND (*B*AND*C*)].*[IMPLICATION INTRODUCTION]* - From
*A*AND (*B*AND*C*) [assuming*A*AND (*B*AND*C*)]: deduce (*A*AND*B*) AND*C*[assuming*A*AND (*B*AND*C*)].*[AND IS ASSOCIATIVE (right)]* - From (
*A*AND*B*) AND*C*[assuming*A*AND (*B*AND*C*)],*A*AND (*B*AND*C*) [assuming (*A*AND*B*) AND*C*]: deduce ((*A*AND*B*) AND*C*) IFF (*A*AND (*B*AND*C*)).*[BICONDITIONAL INTRODUCTION (ASSUMPTION FORM)]* - QED!

"*When you have eliminated the impossible, whatever remains, however improbable, must be the truth*" - Sherlock Holmes, "The Sign of the Four".

- The logical connective NOT (also known as negation) is a unary connective; click on a formula to find the option to build the negated formula. A statement NOT
*A*is true when*A*is false, and false when*A*is true. - We have unlocked the laws of disjunctive elimination. These laws assert that if a disjunction
*A*OR*B*is true, and (say) NOT*A*is known to be true (so*A*is known to be false), then*B*must be true. - To use this law, drag a disjunction such as
*A*OR*B*to the negation of either*A*or*B*; one can also drag in the reversed direction. - This exercise,
*ex falso quodlibet*, is also known as the "principle of explosion". Informally, it asserts that once one has arrived at a contradiction, one can obtain any conclusion one wishes. - To apply
*ex falso quodlibet*in subsequent exercises, drag a sentence of the form*A*AND (NOT*A*) to a formula in the**Formulas**window (or vice versa).

*A*AND (NOT*A*).*[given]*- From
*A*AND (NOT*A*): deduce*A*.*[CONJUNCTION ELIMINATION (left)]* - From
*A*AND (NOT*A*): deduce NOT*A*.*[CONJUNCTION ELIMINATION (right)]* - From
*A*: deduce*A*OR*B*.*[DISJUNCTION INTRODUCTION (left)]* - From
*A*OR*B*, NOT*A*: deduce*B*.*[DISJUNCTIVE ELIMINATION (left)]* - QED!

EX FALSO QUODLIBET (reversed)

- (NOT
*A*) AND*A*.*[given]* - From (NOT
*A*) AND*A*: deduce*A*AND (NOT*A*).*[AND IS COMMUTATIVE]* - From
*A*AND (NOT*A*): deduce*B*.*[EX FALSO QUODLIBET]* - QED!

- The law of the excluded middle is one of the most powerful rules in classical propositional logic, playing a role somewhat analogous to that of the parallel postulate in Euclidean geometry; it completes the basic set of rules of inference for propositional logic.
- The law asserts that for any statement
*A*, one of the statements*A*and NOT*A*is true. To apply this law, drag the formula*A*from the**Formulas**window to an assumption environment (such as the**Root environment**), or just click on*A*if one wants to use the law in the root environment. - If one removes the law of the excluded middle from classical logic (replacing it with the
*reductio ad absurdum*rule of this exercise), one obtains the system of constructivist logic (also known as intuitionistic logic), which is deductively weaker, but (by the same token) makes a stronger assertion about the statements that it can still prove.

- G. H. Hardy*Reductio ad absurdum*is a far finer gambit than any chess gambit: a chess player may offer the sacrifice of a pawn or even a piece, but a mathematician offers the game.

*B*AND (NOT*B*) [assuming*A*].*[given]*- From
*B*AND (NOT*B*) [assuming*A*]: deduce NOT*A*[assuming*A*].*[EX FALSO QUODLIBET]* - Deduce NOT
*A*[assuming NOT*A*].*[IMPLICATION INTRODUCTION]* - From NOT
*A*[assuming*A*], NOT*A*[assuming NOT*A*]: deduce NOT*A*[assuming*A*OR (NOT*A*)].*[CASE ANALYSIS]* - Deduce
*A*OR (NOT*A*).*[EXCLUDED MIDDLE]* - From
*A*OR (NOT*A*), NOT*A*[assuming*A*OR (NOT*A*)]: deduce NOT*A*.*[MODUS PONENS (ASSUMPTION FORM)]* - QED!

REDUCTIO AD ABSURDUM (separated form)

- This form of reductio ad absurdum is slightly more convenient to use in subsequent exercises. To apply it, combine
*B*and NOT*B*together inside an assumption environment.

*B*[assuming*A*].*[given]*- NOT
*B*[assuming*A*].*[given]* - From
*B*[assuming*A*], NOT*B*[assuming*A*]: deduce*B*AND (NOT*B*) [assuming*A*].*[CONJUNCTION INTRODUCTION]* - From
*B*AND (NOT*B*) [assuming*A*]: deduce NOT*A*.*[REDUCTIO AD ABSURDUM]* - QED!

EXCLUDED MIDDLE (case analysis form)

- This form of the excluded middle is slightly more convenient to use in subsequent exercises. To apply it, combine a statement
*B*(in a window assuming some formula*A*) with the same statement*B*(in a separate window assuming NOT*A*).

*B*[assuming*A*].*[given]**B*[assuming NOT*A*].*[given]*- From
*B*[assuming*A*],*B*[assuming NOT*A*]: deduce*B*[assuming*A*OR (NOT*A*)].*[CASE ANALYSIS]* - Deduce
*A*OR (NOT*A*).*[EXCLUDED MIDDLE]* - From
*A*OR (NOT*A*),*B*[assuming*A*OR (NOT*A*)]: deduce*B*.*[MODUS PONENS (ASSUMPTION FORM)]* - QED!

EXCLUDED MIDDLE (reversed form)

- Deduce
*A*OR (NOT*A*).*[EXCLUDED MIDDLE]* - From
*A*OR (NOT*A*): deduce (NOT*A*) OR*A*.*[OR IS COMMUTATIVE]* - QED!

DOUBLE NEGATION (right)

- NOT (NOT
*A*).*[given]* - Deduce
*A*OR (NOT*A*).*[EXCLUDED MIDDLE]* - From
*A*OR (NOT*A*), NOT (NOT*A*): deduce*A*.*[DISJUNCTIVE ELIMINATION (right)]* - QED!

DOUBLE NEGATION (left)

Thanks to Steve Trout, Hugo Musso Gualandi, Jon Easterday, William Chargin, Haggai Nuchi, Andrew Lei, Jim Apple, Jorge Cañizales Díaz, and Matthew Steffen for discovering the short proof.

*A*.*[given]*- Deduce NOT
*A*[assuming NOT*A*].*[IMPLICATION INTRODUCTION]* - From
*A*: deduce*A*[assuming NOT*A*].*[PUSH]* - From
*A*[assuming NOT*A*], NOT*A*[assuming NOT*A*]: deduce NOT (NOT*A*).*[REDUCTIO AD ABSURDUM (separated form)]* - QED!

DOUBLE NEGATION (both)

- Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - From
*A*[assuming*A*]: deduce NOT (NOT*A*) [assuming*A*].*[DOUBLE NEGATION (left)]* - Deduce NOT (NOT
*A*) [assuming NOT (NOT*A*)].*[IMPLICATION INTRODUCTION]* - From NOT (NOT
*A*) [assuming NOT (NOT*A*)]: deduce*A*[assuming NOT (NOT*A*)].*[DOUBLE NEGATION (right)]* - From
*A*[assuming NOT (NOT*A*)], NOT (NOT*A*) [assuming*A*]: deduce*A*IFF (NOT (NOT*A*)).*[BICONDITIONAL INTRODUCTION (ASSUMPTION FORM)]* - QED!

Thanks to Tyler Freeman and Chandler Watson for a short proof, and Hugo Musso Gualandi, Jon Easterday, Haggai Nuchi, and Jorge Cañizales Díaz for an even shorter proof.

*B*AND (NOT*B*) [assuming NOT*A*].*[given]*- From
*B*AND (NOT*B*) [assuming NOT*A*]: deduce NOT (NOT*A*).*[REDUCTIO AD ABSURDUM]* - From NOT (NOT
*A*): deduce*A*.*[DOUBLE NEGATION (right)]* - QED!

PROOF BY CONTRADICTION (reversed form)

- (NOT
*B*) AND*B*[assuming NOT*A*].*[given]* - From (NOT
*B*) AND*B*[assuming NOT*A*]: deduce*B*AND (NOT*B*) [assuming NOT*A*].*[AND IS COMMUTATIVE]* - From
*B*AND (NOT*B*) [assuming NOT*A*]: deduce*A*.*[PROOF BY CONTRADICTION]* - QED!

Thanks to Anders Kaseorg and Carl Lucas for a short proof.

*A*IMPLIES*B*.*[given]*- Deduce (NOT
*A*) OR*A*.*[EXCLUDED MIDDLE (reversed form)]* - From (NOT
*A*) OR*A*,*A*IMPLIES*B*: deduce (NOT*A*) OR*B*.*[CONSTRUCTIVE DILEMMA (right)]* - QED!

Thanks to Yuval Wigderson, cory, Tyler Freeman, Haggai Nuchi, and Chandler Watson for supplying the short proof for this exercise.

- (NOT
*A*) OR*B*.*[given]* - Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - From (NOT
*A*) OR*B*: deduce (NOT*A*) OR*B*[assuming*A*].*[PUSH]* - From
*A*[assuming*A*]: deduce NOT (NOT*A*) [assuming*A*].*[DOUBLE NEGATION (left)]* - From (NOT
*A*) OR*B*[assuming*A*], NOT (NOT*A*) [assuming*A*]: deduce*B*[assuming*A*].*[DISJUNCTIVE ELIMINATION (left)]* - From
*B*[assuming*A*]: deduce*A*IMPLIES*B*.*[DEDUCTION THEOREM]* - QED!

- Deduce
*A*IMPLIES*B*[assuming*A*IMPLIES*B*].*[IMPLICATION INTRODUCTION]* - From
*A*IMPLIES*B*[assuming*A*IMPLIES*B*]: deduce (NOT*A*) OR*B*[assuming*A*IMPLIES*B*].*[EXERCISE 12.4(a)]* - Deduce (NOT
*A*) OR*B*[assuming (NOT*A*) OR*B*].*[IMPLICATION INTRODUCTION]* - From (NOT
*A*) OR*B*[assuming (NOT*A*) OR*B*]: deduce*A*IMPLIES*B*[assuming (NOT*A*) OR*B*].*[EXERCISE 12.4(b)]* - From
*A*IMPLIES*B*[assuming (NOT*A*) OR*B*], (NOT*A*) OR*B*[assuming*A*IMPLIES*B*]: deduce (*A*IMPLIES*B*) IFF ((NOT*A*) OR*B*).*[BICONDITIONAL INTRODUCTION (ASSUMPTION FORM)]* - QED!

Thanks to Daniel Spivak for a short proof.

- NOT (
*A*OR*B*).*[given]* - Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - From
*A*[assuming*A*]: deduce*A*OR*B*[assuming*A*].*[DISJUNCTION INTRODUCTION (left)]* - From NOT (
*A*OR*B*): deduce NOT (*A*OR*B*) [assuming*A*].*[PUSH]* - From
*A*OR*B*[assuming*A*], NOT (*A*OR*B*) [assuming*A*]: deduce NOT*A*.*[REDUCTIO AD ABSURDUM (separated form)]* - Deduce
*B*[assuming*B*].*[IMPLICATION INTRODUCTION]* - From
*B*[assuming*B*]: deduce*A*OR*B*[assuming*B*].*[DISJUNCTION INTRODUCTION (right)]* - From NOT (
*A*OR*B*): deduce NOT (*A*OR*B*) [assuming*B*].*[PUSH]* - From
*A*OR*B*[assuming*B*], NOT (*A*OR*B*) [assuming*B*]: deduce NOT*B*.*[REDUCTIO AD ABSURDUM (separated form)]* - From NOT
*A*, NOT*B*: deduce (NOT*A*) AND (NOT*B*).*[CONJUNCTION INTRODUCTION]* - QED!

Thanks to Anders Kaseorg for a short proof (found by computer search!).

- (NOT
*A*) OR (NOT*B*).*[given]* - From (NOT
*A*) OR (NOT*B*): deduce*A*IMPLIES (NOT*B*).*[EXERCISE 12.4(b)]* - From
*A*IMPLIES (NOT*B*): deduce (*A*AND*B*) IMPLIES ((NOT*B*) AND*B*).*[MONOTONICITY OF AND]* - From (
*A*AND*B*) IMPLIES ((NOT*B*) AND*B*): deduce (NOT*B*) AND*B*[assuming*A*AND*B*].*[REVERSE DEDUCTION THEOREM]* - From (NOT
*B*) AND*B*[assuming*A*AND*B*]: deduce*B*AND (NOT*B*) [assuming*A*AND*B*].*[AND IS COMMUTATIVE]* - From
*B*AND (NOT*B*) [assuming*A*AND*B*]: deduce NOT (*A*AND*B*).*[REDUCTIO AD ABSURDUM]* - QED!

DE MORGAN'S LAW III

Thanks to Daniel Spivak, Anders Kaseorg, Vincent Hwang, and Olle Wiklund for supplying the short proof for this exercise.

- NOT (
*A*AND*B*).*[given]* - Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - Deduce
*B*[assuming*A*,*B*].*[IMPLICATION INTRODUCTION]* - From
*A*[assuming*A*]: deduce*A*[assuming*A*,*B*].*[PUSH]* - From
*A*[assuming*A*,*B*],*B*[assuming*A*,*B*]: deduce*A*AND*B*[assuming*A*,*B*].*[CONJUNCTION INTRODUCTION]* - From NOT (
*A*AND*B*): deduce NOT (*A*AND*B*) [assuming*A*,*B*].*[DOUBLE PUSH]* - From
*A*AND*B*[assuming*A*,*B*], NOT (*A*AND*B*) [assuming*A*,*B*]: deduce NOT*B*[assuming*A*].*[REDUCTIO AD ABSURDUM (separated form)]* - From NOT
*B*[assuming*A*]: deduce*A*IMPLIES (NOT*B*).*[DEDUCTION THEOREM]* - From
*A*IMPLIES (NOT*B*): deduce (NOT*A*) OR (NOT*B*).*[EXERCISE 12.4(a)]* - QED!

Object | Dual |
---|---|

TRUE | FALSE |

AND | OR |

NOT | NOT |

FOR ALL | THERE EXISTS |

Hypothesis | Conclusion |

- At this point, the reader may have noticed a certain symmetry to propositional logic. This symmetry is formalised by the duality principle in boolean algebra, and may be summarised by the displayed table of "dual" pairs.
- Every deductive law involving the connectives TRUE, FALSE, AND, OR, and NOT with a single hypothesis and conclusion then has a dual law in which the hypothesis and conclusion are interchanged, and the logical connectives are replaced with their duals as indicated by the table.
- For instance, Exercise 12.5(a) and Exercise 12.5(b) are dual, as are Exercise 12.5(c) and Exercise 12.5(d).
- Thanks to Yuval Wigderson and cory for supplying the short proof for this exercise.

- (NOT
*A*) AND (NOT*B*).*[given]* - Deduce
*A*OR*B*[assuming*A*OR*B*].*[IMPLICATION INTRODUCTION]* - From (NOT
*A*) AND (NOT*B*): deduce (NOT*A*) AND (NOT*B*) [assuming*A*OR*B*].*[PUSH]* - From (NOT
*A*) AND (NOT*B*) [assuming*A*OR*B*]: deduce NOT*A*[assuming*A*OR*B*].*[CONJUNCTION ELIMINATION (left)]* - From (NOT
*A*) AND (NOT*B*) [assuming*A*OR*B*]: deduce NOT*B*[assuming*A*OR*B*].*[CONJUNCTION ELIMINATION (right)]* - From
*A*OR*B*[assuming*A*OR*B*], NOT*A*[assuming*A*OR*B*]: deduce*B*[assuming*A*OR*B*].*[DISJUNCTIVE ELIMINATION (left)]* - From
*B*[assuming*A*OR*B*], NOT*B*[assuming*A*OR*B*]: deduce NOT (*A*OR*B*).*[REDUCTIO AD ABSURDUM (separated form)]* - QED!

- Contraposition is also known as transposition, and the statement (NOT
*B*) IMPLIES (NOT*A*) is known as the*contrapositive*of*A*IMPLIES*B*. - Thanks to Steve Trout for a short proof, and Andrew Litfin and Andrew Lei for a shorter proof.

*A*IMPLIES*B*.*[given]*- Deduce NOT
*B*[assuming NOT*B*].*[IMPLICATION INTRODUCTION]* - From
*A*IMPLIES*B*: deduce*A*IMPLIES*B*[assuming NOT*B*].*[PUSH]* - From
*A*IMPLIES*B*[assuming NOT*B*]: deduce (NOT*A*) OR*B*[assuming NOT*B*].*[EXERCISE 12.4(a)]* - From (NOT
*A*) OR*B*[assuming NOT*B*], NOT*B*[assuming NOT*B*]: deduce NOT*A*[assuming NOT*B*].*[DISJUNCTIVE ELIMINATION (right)]* - From NOT
*A*[assuming NOT*B*]: deduce (NOT*B*) IMPLIES (NOT*A*).*[DEDUCTION THEOREM]* - QED!

*A*IMPLIES*B*.*[given]*- NOT
*B*.*[given]* - From
*A*IMPLIES*B*: deduce (NOT*B*) IMPLIES (NOT*A*).*[CONTRAPOSITION]* - From NOT
*B*, (NOT*B*) IMPLIES (NOT*A*): deduce NOT*A*.*[MODUS PONENS]* - QED!

SUBSTITUTION FOR NOT

Thanks to Haggai Nuchi for a short proof, and Tyler Freeman, Jim Apple, and Jorge Cañizales Díaz for an even shorter proof.

- NOT
*A*.*[given]* *A*IFF*B*.*[given]*- From
*A*IFF*B*: deduce*B*IMPLIES*A*.*[BICONDITIONAL ELIMINATION (right)]* - From
*B*IMPLIES*A*, NOT*A*: deduce NOT*B*.*[MODUS TOLLENS]* - QED!

MODUS TOLLENS (alternate form)

Thanks to Brian Quach for suggesting this exercise.

*A*IMPLIES (NOT*B*).*[given]**B*.*[given]*- From
*B*: deduce NOT (NOT*B*).*[DOUBLE NEGATION (left)]* - From
*A*IMPLIES (NOT*B*), NOT (NOT*B*): deduce NOT*A*.*[MODUS TOLLENS]* - QED!

- (
*A*IMPLIES*B*) IMPLIES*A*.*[given]* - Deduce NOT
*A*[assuming NOT*A*].*[IMPLICATION INTRODUCTION]* - From NOT
*A*[assuming NOT*A*]: deduce (NOT*A*) OR*B*[assuming NOT*A*].*[DISJUNCTION INTRODUCTION (left)]* - From (NOT
*A*) OR*B*[assuming NOT*A*]: deduce*A*IMPLIES*B*[assuming NOT*A*].*[EXERCISE 12.4(b)]* - From (
*A*IMPLIES*B*) IMPLIES*A*: deduce (*A*IMPLIES*B*) IMPLIES*A*[assuming NOT*A*].*[PUSH]* - From
*A*IMPLIES*B*[assuming NOT*A*], (*A*IMPLIES*B*) IMPLIES*A*[assuming NOT*A*]: deduce*A*[assuming NOT*A*].*[MODUS PONENS]* - From
*A*[assuming NOT*A*], NOT*A*[assuming NOT*A*]: deduce NOT (NOT*A*).*[REDUCTIO AD ABSURDUM (separated form)]* - From NOT (NOT
*A*): deduce*A*.*[DOUBLE NEGATION (right)]* - QED!

*A*OR*B*.*[given]*- (NOT
*A*) OR*C*.*[given]* - From (NOT
*A*) OR*C*: deduce*A*IMPLIES*C*.*[EXERCISE 12.4(b)]* - From
*A*OR*B*,*A*IMPLIES*C*: deduce*C*OR*B*.*[CONSTRUCTIVE DILEMMA (left)]* - QED!

TRUE IS IDENTITY FOR AND

- In propositional logic, there are two formulas with a constant truth value: TRUE, which is always true, and FALSE, which is never true. These have now been permanently added to the
**Formulas**window for use. - There is just one law for TRUE: TRUE is always true! To use it, drag TRUE from the
**Formulas**window to any environment (or just click on TRUE, if one wants to create it in the root environment). - Similarly, there is one law for FALSE, namely that NOT(FALSE) is always true. To use it, create the formula NOT FALSE in the
**Formulas**window and drag it to any environment (or click on NOT FALSE). - There is also an alternate form of the FALSE law that is triggered when one clicks or drags on the FALSE formula rather than the NOT FALSE formula.
- Another feature that can be of some minor convenience: if a formula already exists in an enviroment, you can create a copy in the
**Formulas**window by dragging to that window.

- Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - Deduce TRUE [assuming
*A*].*[TRUE]* - From TRUE [assuming
*A*],*A*[assuming*A*]: deduce TRUE AND*A*[assuming*A*].*[CONJUNCTION INTRODUCTION]* - Deduce TRUE AND
*A*[assuming TRUE AND*A*].*[IMPLICATION INTRODUCTION]* - From TRUE AND
*A*[assuming TRUE AND*A*]: deduce*A*[assuming TRUE AND*A*].*[CONJUNCTION ELIMINATION (right)]* - From
*A*[assuming TRUE AND*A*], TRUE AND*A*[assuming*A*]: deduce*A*IFF (TRUE AND*A*).*[BICONDITIONAL INTRODUCTION (ASSUMPTION FORM)]* - QED!

FALSE IS IDENTITY FOR OR

- Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - From
*A*[assuming*A*]: deduce FALSE OR*A*[assuming*A*].*[DISJUNCTION INTRODUCTION (right)]* - Deduce FALSE OR
*A*[assuming FALSE OR*A*].*[IMPLICATION INTRODUCTION]* - Deduce NOT FALSE [assuming FALSE OR
*A*].*[NOT FALSE]* - From FALSE OR
*A*[assuming FALSE OR*A*], NOT FALSE [assuming FALSE OR*A*]: deduce*A*[assuming FALSE OR*A*].*[DISJUNCTIVE ELIMINATION (left)]* - From
*A*[assuming FALSE OR*A*], FALSE OR*A*[assuming*A*]: deduce*A*IFF (FALSE OR*A*).*[BICONDITIONAL INTRODUCTION (ASSUMPTION FORM)]* - QED!

FALSE ANNULS AND

Thanks to Pace Nielsen, Elliot Parlin, Adam Glasgall, Ephim Kolmogorov, and Loren Spice for a short proof.

- Deduce NOT FALSE.
*[NOT FALSE]* - From NOT FALSE: deduce (NOT FALSE) OR (NOT
*A*).*[DISJUNCTION INTRODUCTION (left)]* - From (NOT FALSE) OR (NOT
*A*): deduce NOT (FALSE AND*A*).*[DE MORGAN'S LAW II]* - QED!

TRUE ANNULS OR

- Deduce TRUE.
*[TRUE]* - From TRUE: deduce TRUE OR
*A*.*[DISJUNCTION INTRODUCTION (left)]* - QED!

EX FALSO QUODLIBET (boolean version)

Thanks to Anders Kaseorg, Jacob Hobbs, and Pace Nielsen for the short proof.

- Deduce NOT FALSE.
*[NOT FALSE]* - From NOT FALSE: deduce (NOT FALSE) OR
*A*.*[DISJUNCTION INTRODUCTION (left)]* - From (NOT FALSE) OR
*A*: deduce FALSE IMPLIES*A*.*[EXERCISE 12.4(b)]* - QED!

- Deduce
*A*[assuming*A*].*[IMPLICATION INTRODUCTION]* - Deduce TRUE [assuming
*A*].*[TRUE]* - From TRUE [assuming
*A*]: deduce*A*IMPLIES TRUE.*[DEDUCTION THEOREM]* - QED!

- Deduce
*A*IMPLIES (TRUE IMPLIES*A*).*[EXERCISE 7.1]* - Deduce TRUE IMPLIES
*A*[assuming TRUE IMPLIES*A*].*[IMPLICATION INTRODUCTION]* - Deduce TRUE [assuming TRUE IMPLIES
*A*].*[TRUE]* - From TRUE [assuming TRUE IMPLIES
*A*], TRUE IMPLIES*A*[assuming TRUE IMPLIES*A*]: deduce*A*[assuming TRUE IMPLIES*A*].*[MODUS PONENS]* - From
*A*[assuming TRUE IMPLIES*A*]: deduce (TRUE IMPLIES*A*) IMPLIES*A*.*[DEDUCTION THEOREM]* - From
*A*IMPLIES (TRUE IMPLIES*A*), (TRUE IMPLIES*A*) IMPLIES*A*: deduce*A*IFF (TRUE IMPLIES*A*).*[BICONDITIONAL INTRODUCTION]* - QED!

Thanks to Anders Kaseorg for the short proof, to Jacob Hobbs for a shorter proof, and to Pace Nielsen for an even shorter proof.

- Deduce
*A*IMPLIES FALSE [assuming*A*IMPLIES FALSE].*[IMPLICATION INTRODUCTION]* - Deduce NOT FALSE [assuming
*A*IMPLIES FALSE].*[NOT FALSE]* - From
*A*IMPLIES FALSE [assuming*A*IMPLIES FALSE], NOT FALSE [assuming*A*IMPLIES FALSE]: deduce NOT*A*[assuming*A*IMPLIES FALSE].*[MODUS TOLLENS]* - Deduce NOT
*A*[assuming NOT*A*].*[IMPLICATION INTRODUCTION]* - From NOT
*A*[assuming NOT*A*]: deduce (NOT*A*) OR FALSE [assuming NOT*A*].*[DISJUNCTION INTRODUCTION (left)]* - From (NOT
*A*) OR FALSE [assuming NOT*A*]: deduce*A*IMPLIES FALSE [assuming NOT*A*].*[EXERCISE 12.4(b)]* - From NOT
*A*[assuming*A*IMPLIES FALSE],*A*IMPLIES FALSE [assuming NOT*A*]: deduce (NOT*A*) IFF (*A*IMPLIES FALSE).*[BICONDITIONAL INTRODUCTION (ASSUMPTION FORM)]* - QED!

- In previous sections we were working in the simple setting of propositional logic, in which the atomic propositions were given short names such as
*A*,*B*, or*C*, and had no further internal structure. We now begin the exploration of a powerful extension of this logic known as first-order logic (or*predicate logic*), in which the atomic propositions may now depend on one or more*variables*such as*x*,*y*,*z*. First-order logic is the standard logical framework for most of modern mathematics. - For now, we focus on the type of variable known as free variables.
- A free variable can take any value within a given domain of discourse. The precise domain of discourse used is important when applying first-order logic to mathematical situations; for instance, if one is doing number theory, the domain of discourse might be the real numbers, while if one is doing group theory, domain of discourse might be the collection of elements of the group. For more complicated mathematics, the domain of discourse may be the universe of sets. However the rules of first-order logic do not care exactly what this domain is, so we will usually leave the domain unspecified.
- In previous sections, we created sub-environments of the
**Root environment**in which certain sentences were assumed to be true. In first-order logic, one can also create sub-environments in which new free variables are introduced and allowed to range freely in the domain of discourse. Any statement in such a sub-environment is known to be true for all values of this variable. - All the usual laws of propositional logic apply within such sub-environments, with one new wrinkle: if one wants to use a sentence such as
*P(x)*that depends on a variable*x*, one can only do so inside an environment in which that variable has been introduced. For instance,*P(x)*cannot be directly used in the**Root environment**, but can be used in a sub-environment where*x*is arbitrary. (Try dragging*P(x)*or*Q(x)*to various environments to see what happens!) **Technical note**: matching for this exercise has not yet been implemented (thus, this exercise will not appear in subsequent available deductions). I hope to implement this functionality in the future. Many further exercises will also have matching not implemented.

*P*(*x*) [letting*x*be arbitrary].*[given]*- Deduce
*Q*(*x*) [letting*x*be arbitrary, assuming*Q*(*x*)].*[IMPLICATION INTRODUCTION]* - From
*P*(*x*) [letting*x*be arbitrary]: deduce*P*(*x*) [letting*x*be arbitrary, assuming*Q*(*x*)].*[PUSH]* - From
*P*(*x*) [letting*x*be arbitrary, assuming*Q*(*x*)],*Q*(*x*) [letting*x*be arbitrary, assuming*Q*(*x*)]: deduce*P*(*x*) AND*Q*(*x*) [letting*x*be arbitrary, assuming*Q*(*x*)].*[CONJUNCTION INTRODUCTION]* - From
*P*(*x*) AND*Q*(*x*) [letting*x*be arbitrary, assuming*Q*(*x*)]: deduce*Q*(*x*) IMPLIES (*P*(*x*) AND*Q*(*x*)) [letting*x*be arbitrary].*[DEDUCTION THEOREM]* - QED!

- We already know that a sentence (such as
*A*) can be pushed into a sub-environment in which an additional statement (such as*B*) is assumed. - Similarly, we may push a sentence into a sub-environment in which an additional free variable (such as
*x*) is introduced. - By invoking the push law in this fashion, we may end up with statements that do not depend on all of the ambient free variables, but this is perfectly acceptable in first-order logic. (However, as mentioned previously, in any given environment, it is not permitted to work with sentences that depend on free variables that have not been introduced into that environment.)
**Technical note**: matching for this exercise has not yet been implemented.

*P*(*x*) [letting*x*be arbitrary].*[given]**Q*(*x*,*y*) [letting*x*,*y*be arbitrary].*[given]*- From
*P*(*x*) [letting*x*be arbitrary]: deduce*P*(*x*) [letting*x*,*y*be arbitrary].*[PUSH (for free variables)]* - From
*P*(*x*) [letting*x*,*y*be arbitrary],*Q*(*x*,*y*) [letting*x*,*y*be arbitrary]: deduce*P*(*x*) AND*Q*(*x*,*y*) [letting*x*,*y*be arbitrary].*[CONJUNCTION INTRODUCTION]* - QED!

DOUBLE PUSH (for free variables)

This is the analogue of the DOUBLE PUSH law for assumptions introduced in Exercise 7.2, and can similarly be used to shorten some of the proofs in subsequent exercises.

*A*.*[given]*- Form environment [letting
*x*,*y*be arbitrary].*[given]* - From
*A*: deduce*A*[letting*x*be arbitrary].*[PUSH (for free variables)]* - From
*A*[letting*x*be arbitrary]: deduce*A*[letting*x*,*y*be arbitrary].*[PUSH (for free variables)]* - QED!

DOUBLE PUSH (mixed version I)

It will also be helpful to have "mixed" double pushes involving both assumptions and arbitrary variables.

*A*.*[given]*- Form environment [assuming
*B*, letting*x*be arbitrary].*[given]* - From
*A*: deduce*A*[assuming*B*].*[PUSH]* - From
*A*[assuming*B*]: deduce*A*[assuming*B*, letting*x*be arbitrary].*[PUSH (for free variables)]* - QED!

DOUBLE PUSH (mixed version II)

*A*.*[given]*- Form environment [letting
*x*be arbitrary, assuming*B*].*[given]* - From
*A*: deduce*A*[letting*x*be arbitrary].*[PUSH (for free variables)]* - From
*A*[letting*x*be arbitrary]: deduce*A*[letting*x*be arbitrary, assuming*B*].*[PUSH]* - QED!

- In any environment, one may introduce any free variable that is not already in use, thus forming a new environment in which that free variable is arbitrary.
- To do this, drag a free variable from the (now unlocked)
**Terms**window to the target environment (or, if one wants to start from the root environment, one can just click on a free variable). - If all the free variables in the
**Terms**window are already in use, you can click on the "New free variable" button to create a further free variable. - Later, we will introduce some other types of terms than free variables, namely bound variables, primitive terms, and operators applied to other terms. But for now, the
**Terms**window will only be occupied by free variables. **Technical note**: matching for this exercise has not yet been implemented.

- Form environment [letting
*x*be arbitrary].*[FREE VARIABLE INTRODUCTION]* - Form environment [letting
*x*,*y*be arbitrary].*[FREE VARIABLE INTRODUCTION]* - Deduce
*Q*(*x*,*y*) OR (NOT*Q*(*x*,*y*)) [letting*x*,*y*be arbitrary].*[EXCLUDED MIDDLE]* - QED!

- Recall the deduction theorem, which allowed one to convert a statement
*A*that was only known conditionally on an assumption*B*, to a statement*A*IMPLIES*B*that was known unconditionally. - In a similar spirit, we have the law of universal introduction: if one has established a statement
*P(x)*under the assumption that the free variable*x*be arbitrary, then one can conclude the statement FOR ALL*X*:*P(X)*unconditionally. - Note that it is the immediate environment of the statement
*P(x)*that has to be of the form "**Let**"; the law of universal quantification is not available if*x*be arbitrary*P(x)*is deeply nested inside such an environment. - Here
*X*is a different type of variable than a free variable, namely a bound variable.*P(X)*is formed from*P(x)*by replacing every occurrence of the free variable*x*in*P(x)*with the bound variable*X*. - Bound variables need to have different names from free variables; in this text, we ensure this by using lower case letters such as
*x*,*y*,*z*for free variables and upper case variables such as*X*,*Y*,*Z*for bound variables. (Note: this convention is not standard in the mathematics literature; usually, one sees free and bound variables share the same namespace, and then one has to ensure that a variable is not simultaneously used as a free variable and as a bound variable.) - Both free and bound variables will be placed in the
**Terms**window. In later sections we will also introduce further types of terms. - A bound variable such as
*X*can only be used in statements in various environments if they are "bound" by an appropriate quantifier. - For instance, the formula
*P(X)*cannot be directly used in environment windows right now, as it is not bound by a quantifier. (However, we still consider it to be a valid formula.) - Currently, the only available quantifier is the universal quantifier "FOR ALL"; later we will also introduce the existential quantifier "THERE EXISTS".
- Quantifiers can be nested, as long as each quantifier uses different bound variables: "FOR ALL
*X*: (FOR ALL*Y*:*Q(X,Y)*)" is a valid formula, but "FOR ALL*X*: (FOR ALL*X*:*Q(X,X)*)" is not. - To use the law of universal introduction, either drag a statement (in which some free variable is arbitrary) to a bound variable in the
**Terms**window, or drag it to the parent environment. - In the former case, the bound variable selected will be used to perform universal quantification. In the latter case, the text will pick the next available bound variable.
- As with free variables, a button is now provided to produce additional bound variables, should this prove necessary.
**Technical note**: matching for this exercise has not yet been implemented.

- Form environment [letting
*x*be arbitrary].*[FREE VARIABLE INTRODUCTION]* - Deduce
*P*(*x*) IMPLIES*P*(*x*) [letting*x*be arbitrary].*[IMPLIES IS IDEMPOTENT]* - From
*P*(*x*) IMPLIES*P*(*x*) [letting*x*be arbitrary]: deduce FOR ALL*X*: (*P*(*X*) IMPLIES*P*(*X*)).*[UNIVERSAL INTRODUCTION]* - QED!

- To create a formula of the form "FOR ALL
*X*:*P(X)*", create the formula "*P(X)*" and drag it to the bound variable*X*(or vice versa). - As previously noted, we allow the
**Formulas**window to contain formulas such as*Q(X,Y)*that contain unquantified bound variables. As such, these formulas cannot be*directly*used in an environment window; however, after enclosing such formulas in quantifiers to bound all the bound variables, it becomes legal to use them in those windows. **Technical note**: matching for this exercise has not yet been implemented.

- Deduce (FOR ALL
*X*: (FOR ALL*Y*:*Q*(*X*,*Y*))) IMPLIES (FOR ALL*X*: (FOR ALL*Y*:*Q*(*X*,*Y*))).*[IMPLIES IS IDEMPOTENT]* - QED!

- There is a reverse to the law of universal introduction, known as the law of universal specification. It asserts that if FOR ALL
*X*:*P(X)*is true, and*α*is a term which is*well-defined*in the sense that it does not involve bound variables or free variables not present in the environment, then*P(α)*is also true. - Here,
*X*is a bound variable,*P(X)*is any statement that can involve the variable*X*. - At present, the only terms you have seen are free variables and bound variables, so the law can only be currently applied to free variables
*α*. However, some further examples of terms will be introduced later. - As with all other laws, this law is only applicable if the conclusion
*P(α)*is well-formed: in particular, the statement*P(α)*cannot use free variables that are not present in the environment, nor can it have nested quantifiers involving the same bound variable. - The law of universal specification can fail if one permits
*α*to contain bound variables. For instance, using the natural numbers as the domain of discourse, the sentence "FOR ALL*X*: THERE EXISTS*Y*:*Y*=*X*+1" is true (every natural number has a successor), but one cannot specify*X*to equal*Y*to conclude the (incorrect) statement THERE EXISTS*Y*:*Y*=*Y*+1. However, if*y*is an ambient free variable in the current environment, one may specify*X*to equal*y*and conclude THERE EXISTS*Y*:*Y*=*y*+1. - To use the law of universal specification, drag a sentence of the form FOR ALL
*X*:*P(X)*to a term*α*or vice versa. - Note that currently the law does not work in the
**Root environment**, because the unquantified bound variables*X,Y*cannot be used in this environment; similarly for any further free and bound variables one creates. How would one get around this problem? - The presence of the term
*Y*in the hypotheses has no impact on how this exercise is proven, but affects how the exercise can be used in subsequent problems. Namely, to invoke this exercise, drag a sentence of the form FOR ALL*X*:*P(X)*to a term of the form*Y*(or vice versa).

- FOR ALL
*X*:*P*(*X*).*[given]* - Form environment [letting
*x*be arbitrary].*[FREE VARIABLE INTRODUCTION]* - From FOR ALL
*X*:*P*(*X*): deduce FOR ALL*X*:*P*(*X*) [letting*x*be arbitrary].*[PUSH (for free variables)]* - From FOR ALL
*X*:*P*(*X*) [letting*x*be arbitrary]: deduce*P*(*x*) [letting*x*be arbitrary].*[UNIVERSAL SPECIFICATION]* - From
*P*(*x*) [letting*x*be arbitrary]: deduce FOR ALL*Y*:*P*(*Y*).*[ UNIVERSAL INTRODUCTION]* - QED!

*A*.*[given]*- Form environment [letting
*x*be arbitrary].*[FREE VARIABLE INTRODUCTION]* - From
*A*: deduce*A*[letting*x*be arbitrary].*[PUSH (for free variables)]* - From
*A*[letting*x*be arbitrary]: deduce FOR ALL*X*:*A*.*[ UNIVERSAL INTRODUCTION]* - QED!

- This exercise, which reverses the universal introduction law from Section 17, will be helpful in some later exercises. (As such, matching
*has*been implemented for this exercise.) - To use it, drag a statement of the form FOR ALL
*X*:*P(X)*onto a free variable term such as*x*(or vice versa).

- FOR ALL
*X*:*P*(*X*).*[given]* - Form environment [letting
*x*be arbitrary].*[FREE VARIABLE INTRODUCTION]* - From FOR ALL
*X*:*P*(*X*): deduce FOR ALL*X*:*P*(*X*) [letting*x*be arbitrary].*[PUSH (for free variables)]* - From FOR ALL
*X*:*P*(*X*) [letting*x*be arbitrary]: deduce*P*(*x*) [letting*x*be arbitrary].*[UNIVERSAL SPECIFICATION]* - QED!

- The classical syllogisms of Aristotelian logic consisted of two premises (a major premise and a minor premise), and a conclusion that could be drawn from those premises. These syllogisms can be interpreted using the more modern language of first-order logic.
- One of the classical syllogisms is the Barbara syllogism. A famous example of this syllogism (in its singular form) is "All men are mortal. Socrates is a man. Hence, Socrates is mortal."
- In this exercise, we model this syllogism by using
*P(X)*to denote the statement "*X*is a man",*Q(X)*to denote the statement "*X*is a mortal", and*α*to denote Socrates. - The term
*α*is an example of a*primitive term*- neither a free variable or a bound variable, but an object or quantity that one can use in one's arguments. - Primitive terms are to terms as atomic propositions such as
*A*,*B*,*C*are to propositions. To avoid confusion with other objects in first-order logic, we will use Greek letters such as*α*,*β*,*γ*to refer to primitive terms (or more generally to terms that are not required to be free or bound variables). - Most of the other classical syllogisms will be treated in Section 22.
- The presence of the term
*α*in the hypotheses is not needed to solve the exercise, but affects how the exercise is invoked in subsequent applications. Namely, to apply this exercise, one drags a sentence of the form FOR ALL*X*:*P(X)*IMPLIES*Q(X)*to a sentence of the form*P(α)*, and then CTRL-clicks on the term*α*.

- FOR ALL
*X*: (*P*(*X*) IMPLIES*Q*(*X*)).*[given]* *P*(α).*[given]*- From FOR ALL
*X*: (*P*(*X*) IMPLIES*Q*(*X*)): deduce*P*(α) IMPLIES*Q*(α).*[UNIVERSAL SPECIFICATION]* - From
*P*(α),*P*(α) IMPLIES*Q*(α): deduce*Q*(α).*[MODUS PONENS]* - QED!

BARBARA SYLLOGISM (classical form)

- There is another, more classical, form of the Barbara syllogism, a typical example of which is "All men are mortal. All Greeks are men. Hence, all Greeks are mortal".
- Again, we can model this in first-order logic as before, where now
*R(X)*denotes the statement "*X*is Greek". - We will present the other classical syllogisms of Aristotelian logic later in this text.

- FOR ALL
*X*: (*P*(*X*) IMPLIES*Q*(*X*)).*[given]* - FOR ALL
*X*: (*R*(*X*) IMPLIES*P*(*X*)).*[given]* - From FOR ALL
*X*: (*P*(*X*) IMPLIES*Q*(*X*)): deduce*P*(*x*) IMPLIES*Q*(*x*) [letting*x*be arbitrary].*[REVERSE UNIVERSAL INTRODUCTION]* - From FOR ALL
*X*: (*R*(*X*) IMPLIES*P*(*X*)): deduce*R*(*x*) IMPLIES*P*(*x*) [letting*x*be arbitrary].*[REVERSE UNIVERSAL INTRODUCTION]* - From
*R*(*x*) IMPLIES*P*(*x*) [letting*x*be arbitrary],*P*(*x*) IMPLIES*Q*(*x*) [letting*x*be arbitrary]: deduce*R*(*x*) IMPLIES*Q*(*x*) [letting*x*be arbitrary].*[IMPLIES IS TRANSITIVE]* - From
*R*(*x*) IMPLIES*Q*(*x*) [letting*x*be arbitrary]: deduce FOR ALL*X*: (*R*(*X*) IMPLIES*Q*(*X*)).*[ UNIVERSAL INTRODUCTION]* - QED!

FOR ALL IS COMMUTATIVE

- Thanks to Anders Kaseorg for the short proof.

- FOR ALL
*X*: (FOR ALL*Y*:*Q*(*X*,*Y*)).*[given]* - Form environment [letting
*y*be arbitrary].*[FREE VARIABLE INTRODUCTION]* - From FOR ALL
*X*: (FOR ALL*Y*:*Q*(*X*,*Y*)): deduce FOR ALL*X*: (FOR ALL*Y*:*Q*(*X*,*Y*)) [letting*y*be arbitrary].*[PUSH (for free variables)]* - From FOR ALL
*X*: (FOR ALL*Y*:*Q*(*X*,*Y*)) [letting*y*be arbitrary]: deduce FOR ALL*Y*:*Q*(*x*,*Y*) [letting*y*,*x*be arbitrary].*[REVERSE UNIVERSAL INTRODUCTION]* - From FOR ALL
*Y*:*Q*(*x*,*Y*) [letting*y*,*x*be arbitrary]: deduce*Q*(*x*,*y*) [letting*y*,*x*be arbitrary].*[UNIVERSAL SPECIFICATION]* - From
*Q*(*x*,*y*) [letting*y*,*x*be arbitrary]: deduce FOR ALL*X*:*Q*(*X*,*y*) [letting*y*be arbitrary].*[ UNIVERSAL INTRODUCTION]* - From FOR ALL
*X*:*Q*(*X*,*y*) [letting*y*be arbitrary]: deduce FOR ALL*Y*: (FOR ALL*X*:*Q*(*X*,*Y*)).*[ UNIVERSAL INTRODUCTION]* - QED!

AND DISTRIBUTES OVER FOR ALL

- Thanks to Elliot Parlin, Keith Winstein, and Andrew Lei for a (relatively) short proof (which has since been shortened further using some additional helper exercises.)

- Deduce FOR ALL
*X*: (*P*(*X*) AND*Q*(*X*)) [assuming FOR ALL*X*: (*P*(*X*) AND*Q*(*X*))].*[IMPLICATION INTRODUCTION]* - From FOR ALL
*X*: (*P*(*X*) AND*Q*(*X*)) [assuming FOR ALL*X*: (*P*(*X*) AND*Q*(*X*))]: deduce*P*(*x*) AND*Q*(*x*) [assuming FOR ALL*X*: (*P*(*X*) AND*Q*(*X*)), letting*x*be arbitrary].*[REVERSE UNIVERSAL INTRODUCTION]* - From
*P*(*x*) AND*Q*(*x*) [assuming FOR ALL*X*: (*P*(*X*) AND*Q*(*X*)), letting*x*be arbitrary]: deduce*P*(*x*) [assuming FOR ALL*X*: (*P*(*X*) AND*Q*(*X*)), letting*x*be arbitrary].*[CONJUNCTION ELIMINATION (left)]* - From
*P*(*x*) AND*Q*(*x*) [assuming FOR ALL*X*: (*P*(*X*) AND*Q*(*X*)), letting*x*be arbitrary]: deduce*Q*(*x*) [assuming FOR ALL*X*: (*P*(*X*) AND*Q*(*X*)), letting*x*be arbitrary].*[CONJUNCTION ELIMINATION (right)]* - From
*P*(*x*) [assuming FOR ALL*X*: (*P*(*X*) AND*Q*(*X*)), letting*x*be arbitrary]: deduce FOR ALL*X*:*P*(*X*) [assuming FOR ALL*X*: (*P*(*X*) AND*Q*(*X*))].*[ UNIVERSAL INTRODUCTION]* - From
*Q*(*x*) [assuming FOR ALL*X*: (*P*(*X*) AND*Q*(*X*)), letting*x*be arbitrary]: deduce FOR ALL*X*:*Q*(*X*) [assuming FOR ALL*X*: (*P*(*X*) AND*Q*(*X*))].*[ UNIVERSAL INTRODUCTION]* - From FOR ALL
*X*:*P*(*X*) [assuming FOR ALL*X*: (*P*(*X*) AND*Q*(*X*))], FOR ALL*X*:*Q*(*X*) [assuming FOR ALL*X*: (*P*(*X*) AND*Q*(*X*))]: deduce (FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*)) [assuming FOR ALL*X*: (*P*(*X*) AND*Q*(*X*))].*[CONJUNCTION INTRODUCTION]* - Deduce (FOR ALL
*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*)) [assuming (FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*))].*[IMPLICATION INTRODUCTION]* - From (FOR ALL
*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*)) [assuming (FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*))]: deduce FOR ALL*X*:*P*(*X*) [assuming (FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*))].*[CONJUNCTION ELIMINATION (left)]* - From (FOR ALL
*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*)) [assuming (FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*))]: deduce FOR ALL*X*:*Q*(*X*) [assuming (FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*))].*[CONJUNCTION ELIMINATION (right)]* - From FOR ALL
*X*:*P*(*X*) [assuming (FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*))]: deduce*P*(*x*) [assuming (FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*)), letting*x*be arbitrary].*[REVERSE UNIVERSAL INTRODUCTION]* - From FOR ALL
*X*:*Q*(*X*) [assuming (FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*))]: deduce*Q*(*x*) [assuming (FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*)), letting*x*be arbitrary].*[REVERSE UNIVERSAL INTRODUCTION]* - From
*P*(*x*) [assuming (FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*)), letting*x*be arbitrary],*Q*(*x*) [assuming (FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*)), letting*x*be arbitrary]: deduce*P*(*x*) AND*Q*(*x*) [assuming (FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*)), letting*x*be arbitrary].*[CONJUNCTION INTRODUCTION]* - From
*P*(*x*) AND*Q*(*x*) [assuming (FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*)), letting*x*be arbitrary]: deduce FOR ALL*X*: (*P*(*X*) AND*Q*(*X*)) [assuming (FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*))].*[ UNIVERSAL INTRODUCTION]* - From FOR ALL
*X*: (*P*(*X*) AND*Q*(*X*)) [assuming (FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*))], (FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*)) [assuming FOR ALL*X*: (*P*(*X*) AND*Q*(*X*))]: deduce (FOR ALL*X*: (*P*(*X*) AND*Q*(*X*))) IFF ((FOR ALL*X*:*P*(*X*)) AND (FOR ALL*X*:*Q*(*X*))).*[BICONDITIONAL INTRODUCTION (ASSUMPTION FORM)]* - QED!

IMPLIES COMMUTES WITH FOR ALL

- Thanks to Gesse Roure for a short proof.

- Deduce
*A*IMPLIES (FOR ALL*X*:*P*(*X*)) [assuming*A*IMPLIES (FOR ALL*X*:*P*(*X*))].*[IMPLICATION INTRODUCTION]* - Form environment [assuming
*A*IMPLIES (FOR ALL*X*:*P*(*X*)), letting*x*be arbitrary].*[FREE VARIABLE INTRODUCTION]* - From
*A*IMPLIES (FOR ALL*X*:*P*(*X*)) [assuming*A*IMPLIES (FOR ALL*X*:*P*(*X*))]: deduce*A*IMPLIES (FOR ALL*X*:*P*(*X*)) [assuming*A*IMPLIES (FOR ALL*X*:*P*(*X*)), letting*x*be arbitrary].*[PUSH (for free variables)]* - From
*A*IMPLIES (FOR ALL*X*:*P*(*X*)) [assuming*A*IMPLIES (FOR ALL*X*:*P*(*X*)), letting*x*be arbitrary]: deduce FOR ALL*X*:*P*(*X*) [assuming*A*IMPLIES (FOR ALL*X*:*P*(*X*)), letting*x*be arbitrary, assuming*A*].*[REVERSE DEDUCTION THEOREM]* - From FOR ALL
*X*:*P*(*X*) [assuming*A*IMPLIES (FOR ALL*X*:*P*(*X*)), letting*x*be arbitrary, assuming*A*]: deduce*P*(*x*) [assuming*A*IMPLIES (FOR ALL*X*:*P*(*X*)), letting*x*be arbitrary, assuming*A*].*[UNIVERSAL SPECIFICATION]* - From
*P*(*x*) [assuming*A*IMPLIES (FOR ALL*X*:*P*(*X*)), letting*x*be arbitrary, assuming*A*]: deduce*A*IMPLIES*P*(*x*) [assuming*A*IMPLIES (FOR ALL*X*:*P*(*X*)), letting*x*be arbitrary].*[DEDUCTION THEOREM]* - From
*A*IMPLIES*P*(*x*) [assuming*A*IMPLIES (FOR ALL*X*:*P*(*X*)), letting*x*be arbitrary]: deduce FOR ALL*X*: (*A*IMPLIES*P*(*X*)) [assuming*A*IMPLIES (FOR ALL*X*:*P*(*X*))].*[ UNIVERSAL INTRODUCTION]* - Deduce FOR ALL
*X*: (*A*IMPLIES*P*(*X*)) [assuming FOR ALL*X*: (*A*IMPLIES*P*(*X*))].*[IMPLICATION INTRODUCTION]* - Deduce
*A*[assuming FOR ALL*X*: (*A*IMPLIES*P*(*X*)),*A*].*[IMPLICATION INTRODUCTION]* - From FOR ALL
*X*: (*A*IMPLIES*P*(*X*)) [assuming FOR ALL*X*: (*A*IMPLIES*P*(*X*))]: deduce FOR ALL*X*: (*A*IMPLIES*P*(*X*)) [assuming FOR ALL*X*: (*A*IMPLIES*P*(*X*)),*A*].*[PUSH]* - From FOR ALL
*X*: (*A*IMPLIES*P*(*X*)) [assuming FOR ALL*X*: (*A*IMPLIES*P*(*X*)),*A*]: deduce*A*IMPLIES*P*(*x*) [assuming FOR ALL*X*: (*A*IMPLIES*P*(*X*)),*A*, letting*x*be arbitrary].*[REVERSE UNIVERSAL INTRODUCTION]* - From
*A*[assuming FOR ALL*X*: (*A*IMPLIES*P*(*X*)),*A*]: deduce*A*[assuming FOR ALL*X*: (*A*IMPLIES*P*(*X*)),*A*, letting*x*be arbitrary].*[PUSH (for free variables)]* - From
*A*[assuming FOR ALL*X*: (*A*IMPLIES*P*(*X*)),*A*, letting*x*be arbitrary],*A*IMPLIES*P*(*x*) [assuming FOR ALL*X*: (*A*IMPLIES*P*(*X*)),*A*, letting*x*be arbitrary]: deduce*P*(*x*) [assuming FOR ALL*X*: (*A*IMPLIES*P*(*X*)),*A*, letting*x*be arbitrary].*[MODUS PONENS]* - From
*P*(*x*) [assuming FOR ALL*X*: (*A*IMPLIES*P*(*X*)),*A*, letting*x*be arbitrary]: deduce FOR ALL*X*:*P*(*X*) [assuming FOR ALL*X*: (*A*IMPLIES*P*(*X*)),*A*].*[ UNIVERSAL INTRODUCTION]* - From FOR ALL
*X*:*P*(*X*) [assuming FOR ALL*X*: (*A*IMPLIES*P*(*X*)),*A*]: deduce*A*IMPLIES (FOR ALL*X*:*P*(*X*)) [assuming FOR ALL*X*: (*A*IMPLIES*P*(*X*))].*[DEDUCTION THEOREM]* - From
*A*IMPLIES (FOR ALL*X*:*P*(*X*)) [assuming FOR ALL*X*: (*A*IMPLIES*P*(*X*))], FOR ALL*X*: (*A*IMPLIES*P*(*X*)) [assuming*A*IMPLIES (FOR ALL*X*:*P*(*X*))]: deduce (*A*IMPLIES (FOR ALL*X*:*P*(*X*))) IFF (FOR ALL*X*: (*A*IMPLIES*P*(*X*))).*[BICONDITIONAL INTRODUCTION (ASSUMPTION FORM)]* - QED!

- There is a twin sibling to the universal quantifier FOR ALL, namely the existential quantifier THERE EXISTS. As the name suggests, the sentence THERE EXISTS
*X*:*P(X)*should be interpreted as the assertion that there exists a choice of*X*in the domain of discourse such that*P(X)*is true. - One can formalise this using the law of existential instantiation. This law asserts that if THERE EXISTS
*X*:*P(X)*is true, and*x*is an available free variable, then one can set*x*to a value for which*P(x)*holds. - In this text, this is depicted by a subenvironment entitled
**Set**. This is an environment similar to an environment introducing a free variable, but now the variable*x*s.t.*P(x)**x*is not free to range throughout the domain of discourse, but instead has to obey*P(x)*. - The PUSH law extends to these environments also, by the usual mechanism of dragging a statement into the environment where
*x*is set. - To use the existential instantiation law, drag a statement of the form THERE EXISTS
*X*:*P(X)*to a free variable. One can also simply click on the law, and the text will try to locate an available free variable to use. **Technical note**: matching for this exercise has not yet been implemented.

- THERE EXISTS
*X*:*P*(*X*).*[given]* - FOR ALL
*X*:*Q*(*X*).*[given]* - From THERE EXISTS
*X*:*P*(*X*): deduce*P*(*x*) [setting*x*s.t.*P*(*x*)].*[EXISTENTIAL INSTANTIATION]* - From FOR ALL
*X*:*Q*(*X*): deduce FOR ALL*X*:*Q*(*X*) [setting*x*s.t.*P*(*x*)].*[PUSH (for set variables)]* - From FOR ALL
*X*:*Q*(*X*) [setting*x*s.t.*P*(*x*)]: deduce*Q*(*x*) [setting*x*s.t.*P*(*x*)].*[UNIVERSAL SPECIFICATION]* - From
*P*(*x*) [setting*x*s.t.*P*(*x*)],*Q*(*x*) [setting*x*s.t.*P*(*x*)]: deduce*P*(*x*) AND*Q*(*x*) [setting*x*s.t.*P*(*x*)].*[CONJUNCTION INTRODUCTION]* - QED!

DOUBLE PUSH (mixed III)

*A*.*[given]*- Form environment [assuming
*B*, setting*x*s.t.*C*].*[given]* - From
*A*: deduce*A*[assuming*B*].*[PUSH]* - From
*A*[assuming*B*]: deduce*A*[assuming*B*, setting*x*s.t.*C*].*[PUSH (for set variables)]* - QED!

DOUBLE PUSH (mixed IV)

*A*.*[given]*- Form environment [setting
*x*s.t.*C*, assuming*B*].*[given]* - From
*A*: deduce*A*[setting*x*s.t.*C*].*[PUSH (for set variables)]* - From
*A*[setting*x*s.t.*C*]: deduce*A*[setting*x*s.t.*C*, assuming*B*].*[PUSH]* - QED!

DOUBLE PUSH (mixed V)

*A*.*[given]*- Form environment [setting
*x*s.t.*C*, letting*y*be arbitrary].*[given]* - From
*A*: deduce*A*[setting*x*s.t.*C*].*[PUSH (for set variables)]* - From
*A*[setting*x*s.t.*C*]: deduce*A*[setting*x*s.t.*C*, letting*y*be arbitrary].*[PUSH (for free variables)]* - QED!

DOUBLE PUSH (mixed VI)

*A*.*[given]*- Form environment [letting
*y*be arbitrary, setting*x*s.t.*C*].*[given]* - From
*A*: deduce*A*[letting*y*be arbitrary].*[PUSH (for free variables)]* - From
*A*[letting*y*be arbitrary]: deduce*A*[letting*y*be arbitrary, setting*x*s.t.*C*].*[PUSH (for set variables)]* - QED!

DOUBLE PUSH (for set variables)

*A*.*[given]*- Form environment [setting
*y*s.t.*B*, setting*x*s.t.*C*].*[given]* - From
*A*: deduce*A*[setting*y*s.t.*B*].*[PUSH (for set variables)]* - From
*A*[setting*y*s.t.*B*]: deduce*A*[setting*y*s.t.*B*, setting*x*s.t.*C*].*[PUSH (for set variables)]* - QED!

PULL (existential form)

- There is a reverse to the PUSH law (for variables
*x*that have been set to obey a certain property): if a statement*A*is known to hold for some set value of*x*, and the statement*A*does not involve the variable*x*, then one can pull*A*out of that environment and conclude that*A*holds unconditionally. - Of course, if
*A*does depend on*x*, then no such pull is possible, since the statement*A*is not even well-formed once one leaves the environment where*x*is being set. - There are two ways to invoke the PULL law. Either drag a statement
*A*in an environment where a variable*x*is set outside of that environment, or simply click on*A*.

- THERE EXISTS
*X*:*A*.*[given]* - From THERE EXISTS
*X*:*A*: deduce*A*[setting*x*s.t.*A*].*[EXISTENTIAL INSTANTIATION]* - From
*A*[setting*x*s.t.*A*]: deduce*A*.*[PULL]* - QED!

DOUBLE PULL

*A*[setting*y*s.t.*C*, setting*x*s.t.*B*].*[given]*- From
*A*[setting*y*s.t.*C*, setting*x*s.t.*B*]: deduce*A*[setting*y*s.t.*C*].*[PULL]* - From
*A*[setting*y*s.t.*C*]: deduce*A*.*[PULL]* - QED!

PULL (for arbitrary variables)

- Recall that all variables in first-order logic are understood to range in some domain of discourse. However, so far we have not precluded the possibility that this domain of discourse is empty, so that there are no possible values for such variables to take!
- This is of course a rather degenerate situation, in particular all existential statements of the form "THERE EXISTS
*X*:*P(X)*" would automatically be false. To exclude it, we introduce the law of existence: there exists a quantity*X*for which the statement TRUE holds. - This law may seem trivial or redundant, but it actually cannot be deduced from the other laws in this text, and must be stated explicitly. (If one deletes this law, one obtains instead the theory of free logic, in which the domain of discourse is permitted to be empty.)
- The error of assuming the law of existence when the domain of discourse is not known to be non-empty is known as the existential fallacy.
- To use the law of existence, drag the TRUE statement (or the formula TRUE) onto a bound variable (or vice versa).

*A*[letting*x*be arbitrary].*[given]*- From
*A*[letting*x*be arbitrary]: deduce FOR ALL*X*:*A*.*[ UNIVERSAL INTRODUCTION]* - Deduce THERE EXISTS
*X*: TRUE.*[EXISTENCE]* - From THERE EXISTS
*X*: TRUE: deduce TRUE [setting*x*s.t. TRUE].*[EXISTENTIAL INSTANTIATION]* - From FOR ALL
*X*:*A*: deduce FOR ALL*X*:*A*[setting*x*s.t. TRUE].*[PUSH (for set variables)]* - From FOR ALL
*X*:*A*[setting*x*s.t. TRUE]: deduce*A*[setting*x*s.t. TRUE].*[UNIVERSAL SPECIFICATION]* - From
*A*[setting*x*s.t. TRUE]: deduce*A*.*[PULL]* - QED!

- The law of existential introduction asserts that if one knows a statement of the form
*P*(α), where α is a term that does not involve any bound variables or any free variables not present in the ambient environment, then one can deduce THERE EXISTS*X*:*P(X)*, where*X*is a bound variable not already occuring in*P(α)*. This is the main way in which existential statements are proven. - To use this law (with
*X*chosen to be the next available bound variable), drag the sentence*P*(α) onto the term α (or vice versa). - If one wants to specify the bound variable as well, drag the sentence
*P*(α) onto the term α and then CTRL-click on the bound variable*X*(or one can click on*P*(α) and then CTRL-click on both α and*X*. - Important note: dragging
*P*(α) onto a bound variable*X*will*not*trigger this law (because this does not specify what the term*α*is that one is using to introduce the existential quantifier). - Note that if the expression
*P*(α) contains multiple copies of α, then there will be multiple options for*P(X)*, as one is permitted to change zero, one or more of the α into a copy of*X*. This can lead to a rather large number of possible ways to use the law of existential introduction if the statement*P*(α) contains many copies of α! **Technical note**: matching for this exercise has not yet been implemented.

*Q*(α, α).*[given]*- From
*Q*(α, α): deduce*Q*(α, α) AND*Q*(α, α).*[AND IS IDEMPOTENT]* - From
*Q*(α, α) AND*Q*(α, α): deduce THERE EXISTS*X*: (*Q*(α,*X*) AND*Q*(*X*, α)).*[EXISTENTIAL INTRODUCTION]* - QED!

FOR ALL IMPLIES THERE EXISTS

- This exercise will require the use of the law of existence, or a consequence of that law such as the "pull" law for arbitrary variables.
- Thanks to Anders Kaseorg for a short proof.

- FOR ALL
*X*:*P*(*X*).*[given]* - From FOR ALL
*X*:*P*(*X*): deduce*P*(*x*) [letting*x*be arbitrary].*[REVERSE UNIVERSAL INTRODUCTION]* - From
*P*(*x*) [letting*x*be arbitrary]: deduce THERE EXISTS*X*:*P*(*X*) [letting*x*be arbitrary].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*X*:*P*(*X*) [letting*x*be arbitrary]: deduce THERE EXISTS*X*:*P*(*X*).*[PULL (for arbitrary variables)]* - QED!

DE MORGAN'S LAW FOR QUANTIFIERS I

- The formula
*P(x)*provided in the hypotheses will end up being useful during the proof. However, it can be ignored for the purposes of applying this exercise.

- Deduce NOT (THERE EXISTS
*X*:*P*(*X*)) [assuming NOT (THERE EXISTS*X*:*P*(*X*))].*[IMPLICATION INTRODUCTION]* - Form environment [assuming NOT (THERE EXISTS
*X*:*P*(*X*)), letting*x*be arbitrary].*[FREE VARIABLE INTRODUCTION]* - Deduce
*P*(*x*) [assuming NOT (THERE EXISTS*X*:*P*(*X*)), letting*x*be arbitrary, assuming*P*(*x*)].*[IMPLICATION INTRODUCTION]* - From
*P*(*x*) [assuming NOT (THERE EXISTS*X*:*P*(*X*)), letting*x*be arbitrary, assuming*P*(*x*)]: deduce THERE EXISTS*X*:*P*(*X*) [assuming NOT (THERE EXISTS*X*:*P*(*X*)), letting*x*be arbitrary, assuming*P*(*x*)].*[EXISTENTIAL INTRODUCTION]* - From NOT (THERE EXISTS
*X*:*P*(*X*)) [assuming NOT (THERE EXISTS*X*:*P*(*X*))]: deduce NOT (THERE EXISTS*X*:*P*(*X*)) [assuming NOT (THERE EXISTS*X*:*P*(*X*)), letting*x*be arbitrary, assuming*P*(*x*)].*[DOUBLE PUSH (mixed version II)]* - From THERE EXISTS
*X*:*P*(*X*) [assuming NOT (THERE EXISTS*X*:*P*(*X*)), letting*x*be arbitrary, assuming*P*(*x*)], NOT (THERE EXISTS*X*:*P*(*X*)) [assuming NOT (THERE EXISTS*X*:*P*(*X*)), letting*x*be arbitrary, assuming*P*(*x*)]: deduce NOT*P*(*x*) [assuming NOT (THERE EXISTS*X*:*P*(*X*)), letting*x*be arbitrary].*[REDUCTIO AD ABSURDUM (separated form)]* - From NOT
*P*(*x*) [assuming NOT (THERE EXISTS*X*:*P*(*X*)), letting*x*be arbitrary]: deduce FOR ALL*X*: (NOT*P*(*X*)) [assuming NOT (THERE EXISTS*X*:*P*(*X*))].*[ UNIVERSAL INTRODUCTION]* - Deduce FOR ALL
*X*: (NOT*P*(*X*)) [assuming FOR ALL*X*: (NOT*P*(*X*))].*[IMPLICATION INTRODUCTION]* - Deduce THERE EXISTS
*X*:*P*(*X*) [assuming FOR ALL*X*: (NOT*P*(*X*)), THERE EXISTS*X*:*P*(*X*)].*[IMPLICATION INTRODUCTION]* - From THERE EXISTS
*X*:*P*(*X*) [assuming FOR ALL*X*: (NOT*P*(*X*)), THERE EXISTS*X*:*P*(*X*)]: deduce*P*(*x*) [assuming FOR ALL*X*: (NOT*P*(*X*)), THERE EXISTS*X*:*P*(*X*), setting*x*s.t.*P*(*x*)].*[EXISTENTIAL INSTANTIATION]* - From FOR ALL
*X*: (NOT*P*(*X*)) [assuming FOR ALL*X*: (NOT*P*(*X*))]: deduce FOR ALL*X*: (NOT*P*(*X*)) [assuming FOR ALL*X*: (NOT*P*(*X*)), THERE EXISTS*X*:*P*(*X*), setting*x*s.t.*P*(*x*)].*[DOUBLE PUSH (mixed III)]* - From FOR ALL
*X*: (NOT*P*(*X*)) [assuming FOR ALL*X*: (NOT*P*(*X*)), THERE EXISTS*X*:*P*(*X*), setting*x*s.t.*P*(*x*)]: deduce NOT*P*(*x*) [assuming FOR ALL*X*: (NOT*P*(*X*)), THERE EXISTS*X*:*P*(*X*), setting*x*s.t.*P*(*x*)].*[UNIVERSAL SPECIFICATION]* - From
*P*(*x*) [assuming FOR ALL*X*: (NOT*P*(*X*)), THERE EXISTS*X*:*P*(*X*), setting*x*s.t.*P*(*x*)], NOT*P*(*x*) [assuming FOR ALL*X*: (NOT*P*(*X*)), THERE EXISTS*X*:*P*(*X*), setting*x*s.t.*P*(*x*)]: deduce*P*(*x*) AND (NOT*P*(*x*)) [assuming FOR ALL*X*: (NOT*P*(*X*)), THERE EXISTS*X*:*P*(*X*), setting*x*s.t.*P*(*x*)].*[CONJUNCTION INTRODUCTION]* - From
*P*(*x*) AND (NOT*P*(*x*)) [assuming FOR ALL*X*: (NOT*P*(*X*)), THERE EXISTS*X*:*P*(*X*), setting*x*s.t.*P*(*x*)]: deduce TRUE AND (NOT TRUE) [assuming FOR ALL*X*: (NOT*P*(*X*)), THERE EXISTS*X*:*P*(*X*), setting*x*s.t.*P*(*x*)].*[EX FALSO QUODLIBET]* - From TRUE AND (NOT TRUE) [assuming FOR ALL
*X*: (NOT*P*(*X*)), THERE EXISTS*X*:*P*(*X*), setting*x*s.t.*P*(*x*)]: deduce TRUE AND (NOT TRUE) [assuming FOR ALL*X*: (NOT*P*(*X*)), THERE EXISTS*X*:*P*(*X*)].*[PULL]* - From TRUE AND (NOT TRUE) [assuming FOR ALL
*X*: (NOT*P*(*X*)), THERE EXISTS*X*:*P*(*X*)]: deduce NOT (THERE EXISTS*X*:*P*(*X*)) [assuming FOR ALL*X*: (NOT*P*(*X*))].*[REDUCTIO AD ABSURDUM]* - From NOT (THERE EXISTS
*X*:*P*(*X*)) [assuming FOR ALL*X*: (NOT*P*(*X*))], FOR ALL*X*: (NOT*P*(*X*)) [assuming NOT (THERE EXISTS*X*:*P*(*X*))]: deduce (NOT (THERE EXISTS*X*:*P*(*X*))) IFF (FOR ALL*X*: (NOT*P*(*X*))).*[BICONDITIONAL INTRODUCTION (ASSUMPTION FORM)]* - QED!

DE MORGAN'S LAW FOR QUANTIFIERS II

- This one is rather tough; you may have to think in terms of double negatives.
- Again, the formula
*P(x)*should be ignored when applying this exercise in subsequent problems. - Thanks to Anders Kaseorg for a short proof.

- Deduce FOR ALL
*X*:*P*(*X*) [assuming FOR ALL*X*:*P*(*X*)].*[IMPLICATION INTRODUCTION]* - From FOR ALL
*X*:*P*(*X*) [assuming FOR ALL*X*:*P*(*X*)]: deduce*P*(*x*) [assuming FOR ALL*X*:*P*(*X*), letting*x*be arbitrary].*[REVERSE UNIVERSAL INTRODUCTION]* - From
*P*(*x*) [assuming FOR ALL*X*:*P*(*X*), letting*x*be arbitrary]: deduce NOT (NOT*P*(*x*)) [assuming FOR ALL*X*:*P*(*X*), letting*x*be arbitrary].*[DOUBLE NEGATION (left)]* - From NOT (NOT
*P*(*x*)) [assuming FOR ALL*X*:*P*(*X*), letting*x*be arbitrary]: deduce FOR ALL*X*: (NOT (NOT*P*(*X*))) [assuming FOR ALL*X*:*P*(*X*)].*[ UNIVERSAL INTRODUCTION]* - Deduce FOR ALL
*X*: (NOT (NOT*P*(*X*))) [assuming FOR ALL*X*: (NOT (NOT*P*(*X*)))].*[IMPLICATION INTRODUCTION]* - From FOR ALL
*X*: (NOT (NOT*P*(*X*))) [assuming FOR ALL*X*: (NOT (NOT*P*(*X*)))]: deduce NOT (NOT*P*(*x*)) [assuming FOR ALL*X*: (NOT (NOT*P*(*X*))), letting*x*be arbitrary].*[REVERSE UNIVERSAL INTRODUCTION]* - From NOT (NOT
*P*(*x*)) [assuming FOR ALL*X*: (NOT (NOT*P*(*X*))), letting*x*be arbitrary]: deduce*P*(*x*) [assuming FOR ALL*X*: (NOT (NOT*P*(*X*))), letting*x*be arbitrary].*[DOUBLE NEGATION (right)]* - From
*P*(*x*) [assuming FOR ALL*X*: (NOT (NOT*P*(*X*))), letting*x*be arbitrary]: deduce FOR ALL*X*:*P*(*X*) [assuming FOR ALL*X*: (NOT (NOT*P*(*X*)))].*[ UNIVERSAL INTRODUCTION]* - From FOR ALL
*X*: (NOT (NOT*P*(*X*))) [assuming FOR ALL*X*:*P*(*X*)], FOR ALL*X*:*P*(*X*) [assuming FOR ALL*X*: (NOT (NOT*P*(*X*)))]: deduce (FOR ALL*X*: (NOT (NOT*P*(*X*)))) IFF (FOR ALL*X*:*P*(*X*)).*[BICONDITIONAL INTRODUCTION (ASSUMPTION FORM)]* - Deduce (NOT (THERE EXISTS
*X*: (NOT*P*(*X*)))) IFF (FOR ALL*X*: (NOT (NOT*P*(*X*)))).*[DE MORGAN'S LAW FOR QUANTIFIERS I]* - From (NOT (THERE EXISTS
*X*: (NOT*P*(*X*)))) IFF (FOR ALL*X*: (NOT (NOT*P*(*X*)))), (FOR ALL*X*: (NOT (NOT*P*(*X*)))) IFF (FOR ALL*X*:*P*(*X*)): deduce (NOT (THERE EXISTS*X*: (NOT*P*(*X*)))) IFF (FOR ALL*X*:*P*(*X*)).*[IFF IS TRANSITIVE]* - From (NOT (THERE EXISTS
*X*: (NOT*P*(*X*)))) IFF (FOR ALL*X*:*P*(*X*)): deduce (NOT (THERE EXISTS*X*: (NOT*P*(*X*)))) IMPLIES (FOR ALL*X*:*P*(*X*)).*[BICONDITIONAL ELIMINATION (left)]* - From (NOT (THERE EXISTS
*X*: (NOT*P*(*X*)))) IFF (FOR ALL*X*:*P*(*X*)): deduce (FOR ALL*X*:*P*(*X*)) IMPLIES (NOT (THERE EXISTS*X*: (NOT*P*(*X*)))).*[BICONDITIONAL ELIMINATION (right)]* - From (NOT (THERE EXISTS
*X*: (NOT*P*(*X*)))) IMPLIES (FOR ALL*X*:*P*(*X*)): deduce (NOT (FOR ALL*X*:*P*(*X*))) IMPLIES (NOT (NOT (THERE EXISTS*X*: (NOT*P*(*X*))))).*[CONTRAPOSITION]* - From (FOR ALL
*X*:*P*(*X*)) IMPLIES (NOT (THERE EXISTS*X*: (NOT*P*(*X*)))): deduce (NOT (NOT (THERE EXISTS*X*: (NOT*P*(*X*))))) IMPLIES (NOT (FOR ALL*X*:*P*(*X*))).*[CONTRAPOSITION]* - From (NOT (NOT (THERE EXISTS
*X*: (NOT*P*(*X*))))) IMPLIES (NOT (FOR ALL*X*:*P*(*X*))), (NOT (FOR ALL*X*:*P*(*X*))) IMPLIES (NOT (NOT (THERE EXISTS*X*: (NOT*P*(*X*))))): deduce (NOT (NOT (THERE EXISTS*X*: (NOT*P*(*X*))))) IFF (NOT (FOR ALL*X*:*P*(*X*))).*[BICONDITIONAL INTRODUCTION]* - Deduce (THERE EXISTS
*X*: (NOT*P*(*X*))) IFF (NOT (NOT (THERE EXISTS*X*: (NOT*P*(*X*))))).*[DOUBLE NEGATION (both)]* - From (THERE EXISTS
*X*: (NOT*P*(*X*))) IFF (NOT (NOT (THERE EXISTS*X*: (NOT*P*(*X*))))), (NOT (NOT (THERE EXISTS*X*: (NOT*P*(*X*))))) IFF (NOT (FOR ALL*X*:*P*(*X*))): deduce (THERE EXISTS*X*: (NOT*P*(*X*))) IFF (NOT (FOR ALL*X*:*P*(*X*))).*[IFF IS TRANSITIVE]* - From (THERE EXISTS
*X*: (NOT*P*(*X*))) IFF (NOT (FOR ALL*X*:*P*(*X*))): deduce (NOT (FOR ALL*X*:*P*(*X*))) IFF (THERE EXISTS*X*: (NOT*P*(*X*))).*[IFF IS SYMMETRIC]* - QED!

CELARENT SYLLOGISM

- An example of the Celarent syllogism is "No reptiles have fur. All snakes are reptiles. Hence, no snakes have fur."
- Thanks to Anders Kaseorg for a short proof.
- For the purposes of matching, the formulae
*P(x)*,*Q(x)*,*R(x)*should be ignored.

- NOT (THERE EXISTS
*X*: (*P*(*X*) AND*Q*(*X*))).*[given]* - FOR ALL
*X*: (*R*(*X*) IMPLIES*P*(*X*)).*[given]* - Deduce THERE EXISTS
*X*: (*R*(*X*) AND*Q*(*X*)) [assuming THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*))].*[IMPLICATION INTRODUCTION]* - From THERE EXISTS
*X*: (*R*(*X*) AND*Q*(*X*)) [assuming THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*))]: deduce*R*(*x*) AND*Q*(*x*) [assuming THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*)), setting*x*s.t.*R*(*x*) AND*Q*(*x*)].*[EXISTENTIAL INSTANTIATION]* - From FOR ALL
*X*: (*R*(*X*) IMPLIES*P*(*X*)): deduce FOR ALL*X*: (*R*(*X*) IMPLIES*P*(*X*)) [assuming THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*)), setting*x*s.t.*R*(*x*) AND*Q*(*x*)].*[DOUBLE PUSH (mixed III)]* - From FOR ALL
*X*: (*R*(*X*) IMPLIES*P*(*X*)) [assuming THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*)), setting*x*s.t.*R*(*x*) AND*Q*(*x*)]: deduce*R*(*x*) IMPLIES*P*(*x*) [assuming THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*)), setting*x*s.t.*R*(*x*) AND*Q*(*x*)].*[UNIVERSAL SPECIFICATION]* - From
*R*(*x*) AND*Q*(*x*) [assuming THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*)), setting*x*s.t.*R*(*x*) AND*Q*(*x*)],*R*(*x*) IMPLIES*P*(*x*) [assuming THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*)), setting*x*s.t.*R*(*x*) AND*Q*(*x*)]: deduce*P*(*x*) AND*Q*(*x*) [assuming THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*)), setting*x*s.t.*R*(*x*) AND*Q*(*x*)].*[EXERCISE 8.6(a)]* - From
*P*(*x*) AND*Q*(*x*) [assuming THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*)), setting*x*s.t.*R*(*x*) AND*Q*(*x*)]: deduce THERE EXISTS*X*: (*P*(*X*) AND*Q*(*X*)) [assuming THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*)), setting*x*s.t.*R*(*x*) AND*Q*(*x*)].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*X*: (*P*(*X*) AND*Q*(*X*)) [assuming THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*)), setting*x*s.t.*R*(*x*) AND*Q*(*x*)]: deduce THERE EXISTS*X*: (*P*(*X*) AND*Q*(*X*)) [assuming THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*))].*[PULL]* - From NOT (THERE EXISTS
*X*: (*P*(*X*) AND*Q*(*X*))): deduce NOT (THERE EXISTS*X*: (*P*(*X*) AND*Q*(*X*))) [assuming THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*))].*[PUSH]* - From THERE EXISTS
*X*: (*P*(*X*) AND*Q*(*X*)) [assuming THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*))], NOT (THERE EXISTS*X*: (*P*(*X*) AND*Q*(*X*))) [assuming THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*))]: deduce NOT (THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*))).*[REDUCTIO AD ABSURDUM (separated form)]* - QED!

DARII SYLLOGISM

- An example of the Darii syllogism is "All rabbits have fur. Some pets are rabbits. Hence, some pets have fur.".

- FOR ALL
*X*: (*P*(*X*) IMPLIES*Q*(*X*)).*[given]* - THERE EXISTS
*X*: (*R*(*X*) AND*P*(*X*)).*[given]* - From THERE EXISTS
*X*: (*R*(*X*) AND*P*(*X*)): deduce*R*(*x*) AND*P*(*x*) [setting*x*s.t.*R*(*x*) AND*P*(*x*)].*[EXISTENTIAL INSTANTIATION]* - From FOR ALL
*X*: (*P*(*X*) IMPLIES*Q*(*X*)): deduce FOR ALL*X*: (*P*(*X*) IMPLIES*Q*(*X*)) [setting*x*s.t.*R*(*x*) AND*P*(*x*)].*[PUSH (for set variables)]* - From FOR ALL
*X*: (*P*(*X*) IMPLIES*Q*(*X*)) [setting*x*s.t.*R*(*x*) AND*P*(*x*)]: deduce*P*(*x*) IMPLIES*Q*(*x*) [setting*x*s.t.*R*(*x*) AND*P*(*x*)].*[UNIVERSAL SPECIFICATION]* - From
*R*(*x*) AND*P*(*x*) [setting*x*s.t.*R*(*x*) AND*P*(*x*)],*P*(*x*) IMPLIES*Q*(*x*) [setting*x*s.t.*R*(*x*) AND*P*(*x*)]: deduce*R*(*x*) AND*Q*(*x*) [setting*x*s.t.*R*(*x*) AND*P*(*x*)].*[EXERCISE 8.6(b)]* - From
*R*(*x*) AND*Q*(*x*) [setting*x*s.t.*R*(*x*) AND*P*(*x*)]: deduce THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*)) [setting*x*s.t.*R*(*x*) AND*P*(*x*)].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*X*: (*R*(*X*) AND*Q*(*X*)) [setting*x*s.t.*R*(*x*) AND*P*(*x*)]: deduce THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*)).*[PULL]* - QED!

FERIOQUE SYLLOGISM

- An example of the Ferioque syllogism is "No homework is fun. Some reading is homework. Hence, some reading is not fun.".
- Thanks to Anders Kaseorg for a short proof, Opax for a shorter proof, and Brian Quach for an even shorter proof.
- For the purposes of matching, the formulae
*P(x)*,*Q(x)*,*R(x)*should be ignored.

- NOT (THERE EXISTS
*X*: (*P*(*X*) AND*Q*(*X*))).*[given]* - THERE EXISTS
*X*: (*R*(*X*) AND*P*(*X*)).*[given]* - Deduce (NOT (THERE EXISTS
*X*: (*P*(*X*) AND*Q*(*X*)))) IFF (FOR ALL*X*: (NOT (*P*(*X*) AND*Q*(*X*)))).*[DE MORGAN'S LAW FOR QUANTIFIERS I]* - From NOT (THERE EXISTS
*X*: (*P*(*X*) AND*Q*(*X*))), (NOT (THERE EXISTS*X*: (*P*(*X*) AND*Q*(*X*)))) IFF (FOR ALL*X*: (NOT (*P*(*X*) AND*Q*(*X*)))): deduce FOR ALL*X*: (NOT (*P*(*X*) AND*Q*(*X*))).*[SUBSTITUTION]* - From FOR ALL
*X*: (NOT (*P*(*X*) AND*Q*(*X*))): deduce NOT (*P*(*x*) AND*Q*(*x*)) [letting*x*be arbitrary].*[REVERSE UNIVERSAL INTRODUCTION]* - From NOT (
*P*(*x*) AND*Q*(*x*)) [letting*x*be arbitrary]: deduce (NOT*P*(*x*)) OR (NOT*Q*(*x*)) [letting*x*be arbitrary].*[DE MORGAN'S LAW III]* - From (NOT
*P*(*x*)) OR (NOT*Q*(*x*)) [letting*x*be arbitrary]: deduce*P*(*x*) IMPLIES (NOT*Q*(*x*)) [letting*x*be arbitrary].*[EXERCISE 12.4(b)]* - From
*P*(*x*) IMPLIES (NOT*Q*(*x*)) [letting*x*be arbitrary]: deduce FOR ALL*X*: (*P*(*X*) IMPLIES (NOT*Q*(*X*))).*[ UNIVERSAL INTRODUCTION]* - From FOR ALL
*X*: (*P*(*X*) IMPLIES (NOT*Q*(*X*))), THERE EXISTS*X*: (*R*(*X*) AND*P*(*X*)): deduce THERE EXISTS*X*: (*R*(*X*) AND (NOT*Q*(*X*))).*[DARII SYLLOGISM]* - QED!

BAROCO SYLLOGISM

- An example of the Baroco syllogism is "All informative things are useful. Some websites are not useful. Hence, some websites are not informative.".
- Thanks to Anders Kaseorg for a short proof, Opax for a shorter proof, and Brian Quach for an even shorter proof.

- FOR ALL
*X*: (*P*(*X*) IMPLIES*Q*(*X*)).*[given]* - THERE EXISTS
*X*: (*R*(*X*) AND (NOT*Q*(*X*))).*[given]* - From FOR ALL
*X*: (*P*(*X*) IMPLIES*Q*(*X*)): deduce*P*(*x*) IMPLIES*Q*(*x*) [letting*x*be arbitrary].*[REVERSE UNIVERSAL INTRODUCTION]* - From
*P*(*x*) IMPLIES*Q*(*x*) [letting*x*be arbitrary]: deduce (NOT*Q*(*x*)) IMPLIES (NOT*P*(*x*)) [letting*x*be arbitrary].*[CONTRAPOSITION]* - From (NOT
*Q*(*x*)) IMPLIES (NOT*P*(*x*)) [letting*x*be arbitrary]: deduce FOR ALL*X*: ((NOT*Q*(*X*)) IMPLIES (NOT*P*(*X*))).*[ UNIVERSAL INTRODUCTION]* - From FOR ALL
*X*: ((NOT*Q*(*X*)) IMPLIES (NOT*P*(*X*))), THERE EXISTS*X*: (*R*(*X*) AND (NOT*Q*(*X*))): deduce THERE EXISTS*X*: (*R*(*X*) AND (NOT*P*(*X*))).*[DARII SYLLOGISM]* - QED!

BOCARDO SYLLOGISM

- An example of the Bocardo syllogism is "Some cats have no tails. All cats are mammals. Hence, some mammals have no tails.".
- Thanks to Anders Kaseorg for a short proof.
- For the purposes of matching, the formulae
*P(x)*,*Q(x)*,*R(x)*should be ignored.

- THERE EXISTS
*X*: (*P*(*X*) AND (NOT*Q*(*X*))).*[given]* - FOR ALL
*X*: (*P*(*X*) IMPLIES*R*(*X*)).*[given]* - From THERE EXISTS
*X*: (*P*(*X*) AND (NOT*Q*(*X*))): deduce*P*(*x*) AND (NOT*Q*(*x*)) [setting*x*s.t.*P*(*x*) AND (NOT*Q*(*x*))].*[EXISTENTIAL INSTANTIATION]* - From FOR ALL
*X*: (*P*(*X*) IMPLIES*R*(*X*)): deduce FOR ALL*X*: (*P*(*X*) IMPLIES*R*(*X*)) [setting*x*s.t.*P*(*x*) AND (NOT*Q*(*x*))].*[PUSH (for set variables)]* - From FOR ALL
*X*: (*P*(*X*) IMPLIES*R*(*X*)) [setting*x*s.t.*P*(*x*) AND (NOT*Q*(*x*))]: deduce*P*(*x*) IMPLIES*R*(*x*) [setting*x*s.t.*P*(*x*) AND (NOT*Q*(*x*))].*[UNIVERSAL SPECIFICATION]* - From
*P*(*x*) AND (NOT*Q*(*x*)) [setting*x*s.t.*P*(*x*) AND (NOT*Q*(*x*))],*P*(*x*) IMPLIES*R*(*x*) [setting*x*s.t.*P*(*x*) AND (NOT*Q*(*x*))]: deduce*R*(*x*) AND (NOT*Q*(*x*)) [setting*x*s.t.*P*(*x*) AND (NOT*Q*(*x*))].*[EXERCISE 8.6(a)]* - From
*R*(*x*) AND (NOT*Q*(*x*)) [setting*x*s.t.*P*(*x*) AND (NOT*Q*(*x*))]: deduce THERE EXISTS*X*: (*R*(*X*) AND (NOT*Q*(*X*))) [setting*x*s.t.*P*(*x*) AND (NOT*Q*(*x*))].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*X*: (*R*(*X*) AND (NOT*Q*(*X*))) [setting*x*s.t.*P*(*x*) AND (NOT*Q*(*x*))]: deduce THERE EXISTS*X*: (*R*(*X*) AND (NOT*Q*(*X*))).*[PULL]* - QED!

BARBARI SYLLOGISM

- In contrast to the syllogisms in Exercise 22.4, these syllogisms require a third assumption, namely the existence of some class of object. As such, they are sometimes not considered to be genuine syllogisms in the classical sense by some authors.
- An example of the Barbari syllogism is "All men are mortal. All Greeks are men. Greeks exist. Hence, some Greeks are mortal."
- Thanks to Anders Kaseorg for a short proof, and Brian Quach for a shorter proof.

- FOR ALL
*X*: (*P*(*X*) IMPLIES*Q*(*X*)).*[given]* - FOR ALL
*X*: (*Q*(*X*) IMPLIES*R*(*X*)).*[given]* - THERE EXISTS
*X*:*P*(*X*).*[given]* - From THERE EXISTS
*X*:*P*(*X*): deduce*P*(*x*) [setting*x*s.t.*P*(*x*)].*[EXISTENTIAL INSTANTIATION]* - From
*P*(*x*) [setting*x*s.t.*P*(*x*)]: deduce*P*(*x*) AND*P*(*x*) [setting*x*s.t.*P*(*x*)].*[AND IS IDEMPOTENT]* - From
*P*(*x*) AND*P*(*x*) [setting*x*s.t.*P*(*x*)]: deduce THERE EXISTS*X*: (*P*(*X*) AND*P*(*X*)) [setting*x*s.t.*P*(*x*)].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*X*: (*P*(*X*) AND*P*(*X*)) [setting*x*s.t.*P*(*x*)]: deduce THERE EXISTS*X*: (*P*(*X*) AND*P*(*X*)).*[PULL]* - From FOR ALL
*X*: (*P*(*X*) IMPLIES*Q*(*X*)), THERE EXISTS*X*: (*P*(*X*) AND*P*(*X*)): deduce THERE EXISTS*X*: (*P*(*X*) AND*Q*(*X*)).*[DARII SYLLOGISM]* - From FOR ALL
*X*: (*Q*(*X*) IMPLIES*R*(*X*)), THERE EXISTS*X*: (*P*(*X*) AND*Q*(*X*)): deduce THERE EXISTS*X*: (*P*(*X*) AND*R*(*X*)).*[DARII SYLLOGISM]* - QED!

CELARONT SYLLOGISM

- An example of the Celaront syllogism is "No reptiles have fur. All snakes are reptiles. Snakes exist. Hence, some snakes have no fur."
- For the purposes of matching, the formulae
*P(x)*,*Q(x)*,*R(x)*should be ignored. - Thanks to Anders Kaseorg for a short proof, Lucas Silve for a shorter proof, and Brian Quach for an even shorter proof.

- NOT (THERE EXISTS
*X*: (*P*(*X*) AND*Q*(*X*))).*[given]* - FOR ALL
*X*: (*R*(*X*) IMPLIES*P*(*X*)).*[given]* - THERE EXISTS
*X*:*R*(*X*).*[given]* - From THERE EXISTS
*X*:*R*(*X*): deduce*R*(*x*) [setting*x*s.t.*R*(*x*)].*[EXISTENTIAL INSTANTIATION]* - From
*R*(*x*) [setting*x*s.t.*R*(*x*)]: deduce*R*(*x*) AND*R*(*x*) [setting*x*s.t.*R*(*x*)].*[AND IS IDEMPOTENT]* - From
*R*(*x*) AND*R*(*x*) [setting*x*s.t.*R*(*x*)]: deduce THERE EXISTS*X*: (*R*(*X*) AND*R*(*X*)) [setting*x*s.t.*R*(*x*)].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*X*: (*R*(*X*) AND*R*(*X*)) [setting*x*s.t.*R*(*x*)]: deduce THERE EXISTS*X*: (*R*(*X*) AND*R*(*X*)).*[PULL]* - From FOR ALL
*X*: (*R*(*X*) IMPLIES*P*(*X*)), THERE EXISTS*X*: (*R*(*X*) AND*R*(*X*)): deduce THERE EXISTS*X*: (*R*(*X*) AND*P*(*X*)).*[DARII SYLLOGISM]* - From NOT (THERE EXISTS
*X*: (*P*(*X*) AND*Q*(*X*))), THERE EXISTS*X*: (*R*(*X*) AND*P*(*X*)): deduce THERE EXISTS*X*: (*R*(*X*) AND (NOT*Q*(*X*))).*[FERIOQUE SYLLOGISM]* - QED!

CAMESTROS SYLLOGISM

- An example of the Camestros syllogism is "All horses have hooves. No humans have hooves. Humans exist. Hence, some humans are not horses."
- Thanks to Anders Kaseorg for a short proof, and Brian Quach for an even shorter proof.
- For the purposes of matching, the formulae
*P(x)*,*Q(x)*,*R(x)*should be ignored.

- FOR ALL
*X*: (*P*(*X*) IMPLIES*Q*(*X*)).*[given]* - NOT (THERE EXISTS
*X*: (*R*(*X*) AND*Q*(*X*))).*[given]* - THERE EXISTS
*X*:*R*(*X*).*[given]* - From THERE EXISTS
*X*:*R*(*X*): deduce*R*(*x*) [setting*x*s.t.*R*(*x*)].*[EXISTENTIAL INSTANTIATION]* - From
*R*(*x*) [setting*x*s.t.*R*(*x*)]: deduce*R*(*x*) AND*R*(*x*) [setting*x*s.t.*R*(*x*)].*[AND IS IDEMPOTENT]* - From
*R*(*x*) AND*R*(*x*) [setting*x*s.t.*R*(*x*)]: deduce THERE EXISTS*X*: (*R*(*X*) AND*R*(*X*)) [setting*x*s.t.*R*(*x*)].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*X*: (*R*(*X*) AND*R*(*X*)) [setting*x*s.t.*R*(*x*)]: deduce THERE EXISTS*X*: (*R*(*X*) AND*R*(*X*)).*[PULL]* - From NOT (THERE EXISTS
*X*: (*R*(*X*) AND*Q*(*X*))), THERE EXISTS*X*: (*R*(*X*) AND*R*(*X*)): deduce THERE EXISTS*X*: (*R*(*X*) AND (NOT*Q*(*X*))).*[FERIOQUE SYLLOGISM]* - From FOR ALL
*X*: (*P*(*X*) IMPLIES*Q*(*X*)), THERE EXISTS*X*: (*R*(*X*) AND (NOT*Q*(*X*))): deduce THERE EXISTS*X*: (*R*(*X*) AND (NOT*P*(*X*))).*[BAROCO SYLLOGISM]* - QED!

FELAPTON SYLLOGISM

- An example of the Felapton syllogism is "No flowers are animals. All flowers are plants. Flowers exist. Hence, some plants are not animals."
- For the purposes of matching, the formulae
*P(x)*,*Q(x)*,*R(x)*should be ignored. - Thanks to Anders Kaseorg for a short proof, and Brian Quach for a shorter proof.

- NOT (THERE EXISTS
*X*: (*P*(*X*) AND*Q*(*X*))).*[given]* - FOR ALL
*X*: (*P*(*X*) IMPLIES*R*(*X*)).*[given]* - THERE EXISTS
*X*:*P*(*X*).*[given]* - From THERE EXISTS
*X*:*P*(*X*): deduce*P*(*x*) [setting*x*s.t.*P*(*x*)].*[EXISTENTIAL INSTANTIATION]* - From
*P*(*x*) [setting*x*s.t.*P*(*x*)]: deduce*P*(*x*) AND*P*(*x*) [setting*x*s.t.*P*(*x*)].*[AND IS IDEMPOTENT]* - From
*P*(*x*) AND*P*(*x*) [setting*x*s.t.*P*(*x*)]: deduce THERE EXISTS*X*: (*P*(*X*) AND*P*(*X*)) [setting*x*s.t.*P*(*x*)].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*X*: (*P*(*X*) AND*P*(*X*)) [setting*x*s.t.*P*(*x*)]: deduce THERE EXISTS*X*: (*P*(*X*) AND*P*(*X*)).*[PULL]* - From NOT (THERE EXISTS
*X*: (*P*(*X*) AND*Q*(*X*))), THERE EXISTS*X*: (*P*(*X*) AND*P*(*X*)): deduce THERE EXISTS*X*: (*P*(*X*) AND (NOT*Q*(*X*))).*[FERIOQUE SYLLOGISM]* - From THERE EXISTS
*X*: (*P*(*X*) AND (NOT*Q*(*X*))), FOR ALL*X*: (*P*(*X*) IMPLIES*R*(*X*)): deduce THERE EXISTS*X*: (*R*(*X*) AND (NOT*Q*(*X*))).*[BOCARDO SYLLOGISM]* - QED!

DARAPTI SYLLOGISM

- An example of the Darapti syllogism is "All squares are rectangles. All squares are rhombi. Squares exist. Hence, some rhombi are rectangles."
- Thanks to Anders Kaseorg for a short proof, and Brian Quach for a shorter proof.

- FOR ALL
*X*: (*P*(*X*) IMPLIES*Q*(*X*)).*[given]* - FOR ALL
*X*: (*P*(*X*) IMPLIES*R*(*X*)).*[given]* - THERE EXISTS
*X*:*P*(*X*).*[given]* - From THERE EXISTS
*X*:*P*(*X*): deduce*P*(*x*) [setting*x*s.t.*P*(*x*)].*[EXISTENTIAL INSTANTIATION]* - From FOR ALL
*X*: (*P*(*X*) IMPLIES*R*(*X*)): deduce FOR ALL*X*: (*P*(*X*) IMPLIES*R*(*X*)) [setting*x*s.t.*P*(*x*)].*[PUSH (for set variables)]* - From FOR ALL
*X*: (*P*(*X*) IMPLIES*R*(*X*)) [setting*x*s.t.*P*(*x*)],*P*(*x*) [setting*x*s.t.*P*(*x*)]: deduce*R*(*x*) [setting*x*s.t.*P*(*x*)].*[BARBARA SYLLOGISM (singular form)]* - From
*R*(*x*) [setting*x*s.t.*P*(*x*)],*P*(*x*) [setting*x*s.t.*P*(*x*)]: deduce*R*(*x*) AND*P*(*x*) [setting*x*s.t.*P*(*x*)].*[CONJUNCTION INTRODUCTION]* - From
*R*(*x*) AND*P*(*x*) [setting*x*s.t.*P*(*x*)]: deduce THERE EXISTS*X*: (*R*(*X*) AND*P*(*X*)) [setting*x*s.t.*P*(*x*)].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*X*: (*R*(*X*) AND*P*(*X*)) [setting*x*s.t.*P*(*x*)]: deduce THERE EXISTS*X*: (*R*(*X*) AND*P*(*X*)).*[PULL]* - From FOR ALL
*X*: (*P*(*X*) IMPLIES*Q*(*X*)), THERE EXISTS*X*: (*R*(*X*) AND*P*(*X*)): deduce THERE EXISTS*X*: (*R*(*X*) AND*Q*(*X*)).*[DARII SYLLOGISM]* - QED!

THERE EXISTS IS COMMUTATIVE

- In this exercise you may need to use the law of existential instantiation with a specific choice of bound variable (rather than let the text choose the first available bound variable). In order to do so, one needs to click on the original statement
*P(α)*, then CTRL-click on the term*α*, then CTRL-click on the bound variable. (Alternatively, one can drag the statement to the term and then CTRL-click on the bound variable.)

- THERE EXISTS
*Y*: (THERE EXISTS*X*:*Q*(*X*,*Y*)).*[given]* - From THERE EXISTS
*Y*: (THERE EXISTS*X*:*Q*(*X*,*Y*)): deduce THERE EXISTS*X*:*Q*(*X*,*x*) [setting*x*s.t. THERE EXISTS*X*:*Q*(*X*,*x*)].*[EXISTENTIAL INSTANTIATION]* - From THERE EXISTS
*X*:*Q*(*X*,*x*) [setting*x*s.t. THERE EXISTS*X*:*Q*(*X*,*x*)]: deduce*Q*(*y*,*x*) [setting*x*s.t. THERE EXISTS*X*:*Q*(*X*,*x*), setting*y*s.t.*Q*(*y*,*x*)].*[EXISTENTIAL INSTANTIATION]* - From
*Q*(*y*,*x*) [setting*x*s.t. THERE EXISTS*X*:*Q*(*X*,*x*), setting*y*s.t.*Q*(*y*,*x*)]: deduce THERE EXISTS*Y*:*Q*(*y*,*Y*) [setting*x*s.t. THERE EXISTS*X*:*Q*(*X*,*x*), setting*y*s.t.*Q*(*y*,*x*)].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*Y*:*Q*(*y*,*Y*) [setting*x*s.t. THERE EXISTS*X*:*Q*(*X*,*x*), setting*y*s.t.*Q*(*y*,*x*)]: deduce THERE EXISTS*X*: (THERE EXISTS*Y*:*Q*(*X*,*Y*)) [setting*x*s.t. THERE EXISTS*X*:*Q*(*X*,*x*), setting*y*s.t.*Q*(*y*,*x*)].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*X*: (THERE EXISTS*Y*:*Q*(*X*,*Y*)) [setting*x*s.t. THERE EXISTS*X*:*Q*(*X*,*x*), setting*y*s.t.*Q*(*y*,*x*)]: deduce THERE EXISTS*X*: (THERE EXISTS*Y*:*Q*(*X*,*Y*)).*[DOUBLE PULL]* - QED!

INTERCHANGING FOR ALL AND THERE EXISTS

- This exercise cannot be reversed. For instance, using the natural numbers as the domain of discourse, the statement "FOR ALL X: THERE EXISTS Y: Y>X" is true (every number has another number larger than it), but the statement "THERE EXISTS Y: FOR ALL X: Y>X" is false (there is no number that is larger than every number).
- Thanks to Anders Kaseorg for a short proof.

- THERE EXISTS
*Y*: (FOR ALL*X*:*Q*(*X*,*Y*)).*[given]* - From THERE EXISTS
*Y*: (FOR ALL*X*:*Q*(*X*,*Y*)): deduce FOR ALL*X*:*Q*(*X*,*y*) [setting*y*s.t. FOR ALL*X*:*Q*(*X*,*y*)].*[EXISTENTIAL INSTANTIATION]* - From FOR ALL
*X*:*Q*(*X*,*y*) [setting*y*s.t. FOR ALL*X*:*Q*(*X*,*y*)]: deduce*Q*(*x*,*y*) [setting*y*s.t. FOR ALL*X*:*Q*(*X*,*y*), letting*x*be arbitrary].*[REVERSE UNIVERSAL INTRODUCTION]* - From
*Q*(*x*,*y*) [setting*y*s.t. FOR ALL*X*:*Q*(*X*,*y*), letting*x*be arbitrary]: deduce THERE EXISTS*Y*:*Q*(*x*,*Y*) [setting*y*s.t. FOR ALL*X*:*Q*(*X*,*y*), letting*x*be arbitrary].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*Y*:*Q*(*x*,*Y*) [setting*y*s.t. FOR ALL*X*:*Q*(*X*,*y*), letting*x*be arbitrary]: deduce FOR ALL*X*: (THERE EXISTS*Y*:*Q*(*X*,*Y*)) [setting*y*s.t. FOR ALL*X*:*Q*(*X*,*y*)].*[ UNIVERSAL INTRODUCTION]* - From FOR ALL
*X*: (THERE EXISTS*Y*:*Q*(*X*,*Y*)) [setting*y*s.t. FOR ALL*X*:*Q*(*X*,*y*)]: deduce FOR ALL*X*: (THERE EXISTS*Y*:*Q*(*X*,*Y*)).*[PULL]* - QED!

This is the existential counterpart of Exercise 18.1.

- THERE EXISTS
*X*:*P*(*X*).*[given]* - From THERE EXISTS
*X*:*P*(*X*): deduce*P*(*x*) [setting*x*s.t.*P*(*x*)].*[EXISTENTIAL INSTANTIATION]* - From
*P*(*x*) [setting*x*s.t.*P*(*x*)]: deduce THERE EXISTS*Y*:*P*(*Y*) [setting*x*s.t.*P*(*x*)].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*Y*:*P*(*Y*) [setting*x*s.t.*P*(*x*)]: deduce THERE EXISTS*Y*:*P*(*Y*).*[PULL]* - QED!

**Technical note**: matching for this exercise has not yet been implemented.

- Deduce (THERE EXISTS
*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*))].*[IMPLICATION INTRODUCTION]* - From (THERE EXISTS
*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*))]: deduce THERE EXISTS*X*:*P*(*X*) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*))].*[CONJUNCTION ELIMINATION (left)]* - From (THERE EXISTS
*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*))]: deduce THERE EXISTS*Y*:*Q*(*Y*) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*))].*[CONJUNCTION ELIMINATION (right)]* - From THERE EXISTS
*X*:*P*(*X*) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*))]: deduce*P*(*x*) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)), setting*x*s.t.*P*(*x*)].*[EXISTENTIAL INSTANTIATION]* - From THERE EXISTS
*Y*:*Q*(*Y*) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*))]: deduce THERE EXISTS*Y*:*Q*(*Y*) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)), setting*x*s.t.*P*(*x*)].*[PUSH (for set variables)]* - From THERE EXISTS
*Y*:*Q*(*Y*) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)), setting*x*s.t.*P*(*x*)]: deduce*Q*(*y*) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)), setting*x*s.t.*P*(*x*), setting*y*s.t.*Q*(*y*)].*[EXISTENTIAL INSTANTIATION]* - From
*P*(*x*) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)), setting*x*s.t.*P*(*x*)]: deduce*P*(*x*) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)), setting*x*s.t.*P*(*x*), setting*y*s.t.*Q*(*y*)].*[PUSH (for set variables)]* - From
*P*(*x*) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)), setting*x*s.t.*P*(*x*), setting*y*s.t.*Q*(*y*)],*Q*(*y*) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)), setting*x*s.t.*P*(*x*), setting*y*s.t.*Q*(*y*)]: deduce*P*(*x*) AND*Q*(*y*) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)), setting*x*s.t.*P*(*x*), setting*y*s.t.*Q*(*y*)].*[CONJUNCTION INTRODUCTION]* - From
*P*(*x*) AND*Q*(*y*) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)), setting*x*s.t.*P*(*x*), setting*y*s.t.*Q*(*y*)]: deduce THERE EXISTS*Y*: (*P*(*x*) AND*Q*(*Y*)) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)), setting*x*s.t.*P*(*x*), setting*y*s.t.*Q*(*y*)].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*Y*: (*P*(*x*) AND*Q*(*Y*)) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)), setting*x*s.t.*P*(*x*), setting*y*s.t.*Q*(*y*)]: deduce THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)), setting*x*s.t.*P*(*x*), setting*y*s.t.*Q*(*y*)].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)), setting*x*s.t.*P*(*x*), setting*y*s.t.*Q*(*y*)]: deduce THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*))].*[DOUBLE PULL]* - Deduce THERE EXISTS
*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*)))].*[IMPLICATION INTRODUCTION]* - From THERE EXISTS
*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*)))]: deduce THERE EXISTS*Y*: (*P*(*x*) AND*Q*(*Y*)) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))), setting*x*s.t. THERE EXISTS*Y*: (*P*(*x*) AND*Q*(*Y*))].*[EXISTENTIAL INSTANTIATION]* - From THERE EXISTS
*Y*: (*P*(*x*) AND*Q*(*Y*)) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))), setting*x*s.t. THERE EXISTS*Y*: (*P*(*x*) AND*Q*(*Y*))]: deduce*P*(*x*) AND*Q*(*y*) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))), setting*x*s.t. THERE EXISTS*Y*: (*P*(*x*) AND*Q*(*Y*)), setting*y*s.t.*P*(*x*) AND*Q*(*y*)].*[EXISTENTIAL INSTANTIATION]* - From
*P*(*x*) AND*Q*(*y*) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))), setting*x*s.t. THERE EXISTS*Y*: (*P*(*x*) AND*Q*(*Y*)), setting*y*s.t.*P*(*x*) AND*Q*(*y*)]: deduce*P*(*x*) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))), setting*x*s.t. THERE EXISTS*Y*: (*P*(*x*) AND*Q*(*Y*)), setting*y*s.t.*P*(*x*) AND*Q*(*y*)].*[CONJUNCTION ELIMINATION (left)]* - From
*P*(*x*) AND*Q*(*y*) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))), setting*x*s.t. THERE EXISTS*Y*: (*P*(*x*) AND*Q*(*Y*)), setting*y*s.t.*P*(*x*) AND*Q*(*y*)]: deduce*Q*(*y*) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))), setting*x*s.t. THERE EXISTS*Y*: (*P*(*x*) AND*Q*(*Y*)), setting*y*s.t.*P*(*x*) AND*Q*(*y*)].*[CONJUNCTION ELIMINATION (right)]* - From
*P*(*x*) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))), setting*x*s.t. THERE EXISTS*Y*: (*P*(*x*) AND*Q*(*Y*)), setting*y*s.t.*P*(*x*) AND*Q*(*y*)]: deduce THERE EXISTS*X*:*P*(*X*) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))), setting*x*s.t. THERE EXISTS*Y*: (*P*(*x*) AND*Q*(*Y*)), setting*y*s.t.*P*(*x*) AND*Q*(*y*)].*[EXISTENTIAL INTRODUCTION]* - From
*Q*(*y*) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))), setting*x*s.t. THERE EXISTS*Y*: (*P*(*x*) AND*Q*(*Y*)), setting*y*s.t.*P*(*x*) AND*Q*(*y*)]: deduce THERE EXISTS*Y*:*Q*(*Y*) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))), setting*x*s.t. THERE EXISTS*Y*: (*P*(*x*) AND*Q*(*Y*)), setting*y*s.t.*P*(*x*) AND*Q*(*y*)].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*X*:*P*(*X*) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))), setting*x*s.t. THERE EXISTS*Y*: (*P*(*x*) AND*Q*(*Y*)), setting*y*s.t.*P*(*x*) AND*Q*(*y*)], THERE EXISTS*Y*:*Q*(*Y*) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))), setting*x*s.t. THERE EXISTS*Y*: (*P*(*x*) AND*Q*(*Y*)), setting*y*s.t.*P*(*x*) AND*Q*(*y*)]: deduce (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))), setting*x*s.t. THERE EXISTS*Y*: (*P*(*x*) AND*Q*(*Y*)), setting*y*s.t.*P*(*x*) AND*Q*(*y*)].*[CONJUNCTION INTRODUCTION]* - From (THERE EXISTS
*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))), setting*x*s.t. THERE EXISTS*Y*: (*P*(*x*) AND*Q*(*Y*)), setting*y*s.t.*P*(*x*) AND*Q*(*y*)]: deduce (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*)))].*[DOUBLE PULL]* - From (THERE EXISTS
*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*)) [assuming THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*)))], THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*))) [assuming (THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*))]: deduce ((THERE EXISTS*X*:*P*(*X*)) AND (THERE EXISTS*Y*:*Q*(*Y*))) IFF (THERE EXISTS*X*: (THERE EXISTS*Y*: (*P*(*X*) AND*Q*(*Y*)))).*[BICONDITIONAL INTRODUCTION (ASSUMPTION FORM)]* - QED!

LEWIS CARROLL SYLLOGISM

- Lewis Carroll is best known for his books "Alice in Wonderland" and "Through the Looking Glass". But he also wrote a list of logic puzzles, some of which can be found here.
- The simplest of his logic puzzles is the following. Given the hypotheses "Babies are illogical. Illogical persons are despised. Nobody who is despised can manage a crocodile", conclude "Babies cannot handle crocodiles".
- The exercise here is a translation of that puzzle to first-order logic - can you see how?
- Thanks to Anders Kaseorg for a short proof, Opax for a shorter proof, Anders Kaseorg for an even shorter proof, and Brian Quach for a yet shorter proof.
- For the purposes of applying this exercise, the formulae
*P(x)*,*Q(x)*,*R(x)*,*S(x)*should be ignored.

- FOR ALL
*X*: (*P*(*X*) IMPLIES (NOT*Q*(*X*))).*[given]* - FOR ALL
*X*: ((NOT*Q*(*X*)) IMPLIES*R*(*X*)).*[given]* - NOT (THERE EXISTS
*X*: (*R*(*X*) AND*S*(*X*))).*[given]* - From NOT (THERE EXISTS
*X*: (*R*(*X*) AND*S*(*X*))), FOR ALL*X*: ((NOT*Q*(*X*)) IMPLIES*R*(*X*)): deduce NOT (THERE EXISTS*X*: ((NOT*Q*(*X*)) AND*S*(*X*))).*[CELARENT SYLLOGISM]* - Deduce (NOT (THERE EXISTS
*X*: ((NOT*Q*(*X*)) AND*S*(*X*)))) IFF (FOR ALL*X*: (NOT ((NOT*Q*(*X*)) AND*S*(*X*)))).*[DE MORGAN'S LAW FOR QUANTIFIERS I]* - From NOT (THERE EXISTS
*X*: ((NOT*Q*(*X*)) AND*S*(*X*))), (NOT (THERE EXISTS*X*: ((NOT*Q*(*X*)) AND*S*(*X*)))) IFF (FOR ALL*X*: (NOT ((NOT*Q*(*X*)) AND*S*(*X*)))): deduce FOR ALL*X*: (NOT ((NOT*Q*(*X*)) AND*S*(*X*))).*[SUBSTITUTION]* - From FOR ALL
*X*: (NOT ((NOT*Q*(*X*)) AND*S*(*X*))): deduce NOT ((NOT*Q*(*x*)) AND*S*(*x*)) [letting*x*be arbitrary].*[REVERSE UNIVERSAL INTRODUCTION]* - From NOT ((NOT
*Q*(*x*)) AND*S*(*x*)) [letting*x*be arbitrary]: deduce (NOT (NOT*Q*(*x*))) OR (NOT*S*(*x*)) [letting*x*be arbitrary].*[DE MORGAN'S LAW III]* - From (NOT (NOT
*Q*(*x*))) OR (NOT*S*(*x*)) [letting*x*be arbitrary]: deduce (NOT*Q*(*x*)) IMPLIES (NOT*S*(*x*)) [letting*x*be arbitrary].*[EXERCISE 12.4(b)]* - From (NOT
*Q*(*x*)) IMPLIES (NOT*S*(*x*)) [letting*x*be arbitrary]: deduce FOR ALL*X*: ((NOT*Q*(*X*)) IMPLIES (NOT*S*(*X*))).*[ UNIVERSAL INTRODUCTION]* - From FOR ALL
*X*: ((NOT*Q*(*X*)) IMPLIES (NOT*S*(*X*))), FOR ALL*X*: (*P*(*X*) IMPLIES (NOT*Q*(*X*))): deduce FOR ALL*X*: (*P*(*X*) IMPLIES (NOT*S*(*X*))).*[BARBARA SYLLOGISM (classical form)]* - QED!

- In previous exercises, formulas such as
*Q(x,y)*were manually provided for those exercises where they were needed. In this section, a new window has been unlocked that allows one to generate such formulas without manual intervention. - The
**Predicates**window contains all the predicates that appear in the exercise. Predicates can be take one or more arguments, indicated here by em-dashes —. - A few exercises from now, we will also introduce operators, which are similar to predicates and which will appear in the
**Operators**window. - If one drags a term to each argument of a predicate, one creates a formula in the
**Formulas**window (and the arguments of the predicate are then reset to em-dashes). For instance, to create the formula*Q(x,y)*, drag the term*x*to the first argument of*Q*(—,—), and drag the term*y*to the second argument. **Technical note**: matching for this exercise has not yet been implemented.

- Form environment [letting
*x*be arbitrary].*[FREE VARIABLE INTRODUCTION]* - Form environment [letting
*x*,*y*be arbitrary].*[FREE VARIABLE INTRODUCTION]* - Deduce
*Q*(*x*,*y*) IMPLIES*Q*(*x*,*y*) [letting*x*,*y*be arbitrary].*[IMPLIES IS IDEMPOTENT]* - From
*Q*(*x*,*y*) IMPLIES*Q*(*x*,*y*) [letting*x*,*y*be arbitrary]: deduce FOR ALL*Y*: (*Q*(*x*,*Y*) IMPLIES*Q*(*x*,*Y*)) [letting*x*be arbitrary].*[ UNIVERSAL INTRODUCTION]* - From FOR ALL
*Y*: (*Q*(*x*,*Y*) IMPLIES*Q*(*x*,*Y*)) [letting*x*be arbitrary]: deduce FOR ALL*X*: (FOR ALL*Y*: (*Q*(*X*,*Y*) IMPLIES*Q*(*X*,*Y*))).*[ UNIVERSAL INTRODUCTION]* - QED!

- Some predicates are customarily written in between their arguments, rather than to the left of the arguments. The most familiar examples of these are the comparison predicates <, >, ≤, ≥ and the equality relation =.
- However, this difference is purely notational, and these predicates otherwise follow all the laws of first-order logic that predicates such as
*Q*(—, —) do. **Technical note**: matching for this exercise has not yet been implemented.

- Form environment [letting
*x*be arbitrary].*[FREE VARIABLE INTRODUCTION]* - Form environment [letting
*x*,*y*be arbitrary].*[FREE VARIABLE INTRODUCTION]* - Deduce (
*x**>**y*) IMPLIES (*x**>**y*) [letting*x*,*y*be arbitrary].*[IMPLIES IS IDEMPOTENT]* - From (
*x**>**y*) IMPLIES (*x**>**y*) [letting*x*,*y*be arbitrary]: deduce FOR ALL*Y*: ((*x**>**Y*) IMPLIES (*x**>**Y*)) [letting*x*be arbitrary].*[ UNIVERSAL INTRODUCTION]* - From FOR ALL
*Y*: ((*x**>**Y*) IMPLIES (*x**>**Y*)) [letting*x*be arbitrary]: deduce FOR ALL*X*: (FOR ALL*Y*: ((*X**>**Y*) IMPLIES (*X**>**Y*))).*[ UNIVERSAL INTRODUCTION]* - QED!

- In addition to predicates, first-order logic also allows the use of
*operators*, also known as*function symbols*. - operators are symbols that take some number of terms to produce more complicated terms. The most familiar examples of operators are the arithmetic operators +, -, x, /; thus for instance one could take the terms
*x*and*y*and produce a new term*x*+*y*. - Operators closely resemble predicates, except that a predicate produces formulas, whereas an operator produces terms.
- As such, we place operators an
**Operators**window similar to the**Predicates**window as predicates; the only difference is that the output of such operators goes into the**Terms**window rather than the**Formulas**window. - Note that compound terms such as
*x+y*are not free variables or bound variables, and so cannot be used for those laws of first-order logic that require such variables. However, they are still perfectly good terms for use in such laws as universal specification or existential introduction. **Technical note**: matching for this exercise has not yet been implemented.

- Form environment [letting
*x*be arbitrary].*[FREE VARIABLE INTRODUCTION]* - Form environment [letting
*x*,*y*be arbitrary].*[FREE VARIABLE INTRODUCTION]* - Deduce
*P*(*x**+**y*) IMPLIES*P*(*x**+**y*) [letting*x*,*y*be arbitrary].*[IMPLIES IS IDEMPOTENT]* - From
*P*(*x**+**y*) IMPLIES*P*(*x**+**y*) [letting*x*,*y*be arbitrary]: deduce FOR ALL*Y*: (*P*(*x**+**Y*) IMPLIES*P*(*x**+**Y*)) [letting*x*be arbitrary].*[ UNIVERSAL INTRODUCTION]* - From FOR ALL
*Y*: (*P*(*x**+**Y*) IMPLIES*P*(*x**+**Y*)) [letting*x*be arbitrary]: deduce FOR ALL*X*: (FOR ALL*Y*: (*P*(*X**+**Y*) IMPLIES*P*(*X**+**Y*))).*[ UNIVERSAL INTRODUCTION]* - QED!

- Russell's paradox is a famous paradox in set theory. It asserts that there cannot exist a set that consists precisely of those sets that do not contain themselves.
- It had a significant impact in set theory, showing that certain axioms of "naive set theory" were in fact inconsistent. This eventually led to modern axiomatisations of set theory, such as Zermelo-Fraenkel-Choice (ZFC).
- An informal version of the paradox involves a barber who shaves everyone who does not shave themselves. Who shaves the barber?
- Thanks to Anders Kaseorg for a short proof.
**Technical note**: matching for this exercise has not yet been implemented.

- THERE EXISTS
*X*: (FOR ALL*Y*: ((*Y**∈**X*) IFF (NOT (*Y**∈**Y*)))).*[given]* - From THERE EXISTS
*X*: (FOR ALL*Y*: ((*Y**∈**X*) IFF (NOT (*Y**∈**Y*)))): deduce FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*))) [setting*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))].*[EXISTENTIAL INSTANTIATION]* - From FOR ALL
*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*))) [setting*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))]: deduce (*x**∈**x*) IFF (NOT (*x**∈**x*)) [setting*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))].*[UNIVERSAL SPECIFICATION]* - From (
*x**∈**x*) IFF (NOT (*x**∈**x*)) [setting*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))]: deduce (*x**∈**x*) IMPLIES (NOT (*x**∈**x*)) [setting*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))].*[BICONDITIONAL ELIMINATION (left)]* - From (
*x**∈**x*) IMPLIES (NOT (*x**∈**x*)) [setting*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))]: deduce (NOT (*x**∈**x*)) OR (NOT (*x**∈**x*)) [setting*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))].*[EXERCISE 12.4(a)]* - From (NOT (
*x**∈**x*)) OR (NOT (*x**∈**x*)) [setting*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))]: deduce NOT (*x**∈**x*) [setting*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))].*[OR IS IDEMPOTENT (right)]* - From NOT (
*x**∈**x*) [setting*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))], (*x**∈**x*) IFF (NOT (*x**∈**x*)) [setting*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))]: deduce NOT (NOT (*x**∈**x*)) [setting*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))].*[SUBSTITUTION FOR NOT]* - From NOT (
*x**∈**x*) [setting*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))], NOT (NOT (*x**∈**x*)) [setting*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))]: deduce (NOT (*x**∈**x*)) AND (NOT (NOT (*x**∈**x*))) [setting*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))].*[CONJUNCTION INTRODUCTION]* - From (NOT (
*x**∈**x*)) AND (NOT (NOT (*x**∈**x*))) [setting*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))]: deduce NOT TRUE [setting*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))].*[EX FALSO QUODLIBET]* - From NOT TRUE [setting
*x*s.t. FOR ALL*Y*: ((*Y**∈**x*) IFF (NOT (*Y**∈**Y*)))]: deduce NOT TRUE.*[PULL]* - QED!

NO LARGEST NATURAL NUMBER

- If one takes the natural numbers as the domain of discourse, and interprets arithmetic symbols such as
*≥*,*+*,*1*in the usual fashion, then this exercise is asking you to prove that there is no natural number that is greater than or equal to all natural numbers. Your given information is that a natural number*X*is never greater than its successor*X+1*. - While one could solve this exercise by randomly trying various laws of deduction, it is better to use your mathematical intuition and think first about
*why*the above assertion about natural numbers is true. Once you figure out why, convert your reasoning into a formal proof. **Technical note**: matching for this exercise has not yet been implemented.

- FOR ALL
*X*: (NOT (*X**≥*(*X**+*1))).*[given]* - Deduce THERE EXISTS
*X*: (FOR ALL*Y*: (*X**≥**Y*)) [assuming THERE EXISTS*X*: (FOR ALL*Y*: (*X**≥**Y*))].*[IMPLICATION INTRODUCTION]* - From THERE EXISTS
*X*: (FOR ALL*Y*: (*X**≥**Y*)) [assuming THERE EXISTS*X*: (FOR ALL*Y*: (*X**≥**Y*))]: deduce FOR ALL*Y*: (*x**≥**Y*) [assuming THERE EXISTS*X*: (FOR ALL*Y*: (*X**≥**Y*)), setting*x*s.t. FOR ALL*Y*: (*x**≥**Y*)].*[EXISTENTIAL INSTANTIATION]* - From FOR ALL
*Y*: (*x**≥**Y*) [assuming THERE EXISTS*X*: (FOR ALL*Y*: (*X**≥**Y*)), setting*x*s.t. FOR ALL*Y*: (*x**≥**Y*)]: deduce*x**≥*(*x**+*1) [assuming THERE EXISTS*X*: (FOR ALL*Y*: (*X**≥**Y*)), setting*x*s.t. FOR ALL*Y*: (*x**≥**Y*)].*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*X*: (NOT (*X**≥*(*X**+*1))): deduce FOR ALL*X*: (NOT (*X**≥*(*X**+*1))) [assuming THERE EXISTS*X*: (FOR ALL*Y*: (*X**≥**Y*)), setting*x*s.t. FOR ALL*Y*: (*x**≥**Y*)].*[DOUBLE PUSH (mixed III)]* - From FOR ALL
*X*: (NOT (*X**≥*(*X**+*1))) [assuming THERE EXISTS*X*: (FOR ALL*Y*: (*X**≥**Y*)), setting*x*s.t. FOR ALL*Y*: (*x**≥**Y*)]: deduce NOT (*x**≥*(*x**+*1)) [assuming THERE EXISTS*X*: (FOR ALL*Y*: (*X**≥**Y*)), setting*x*s.t. FOR ALL*Y*: (*x**≥**Y*)].*[UNIVERSAL SPECIFICATION]* - From
*x**≥*(*x**+*1) [assuming THERE EXISTS*X*: (FOR ALL*Y*: (*X**≥**Y*)), setting*x*s.t. FOR ALL*Y*: (*x**≥**Y*)], NOT (*x**≥*(*x**+*1)) [assuming THERE EXISTS*X*: (FOR ALL*Y*: (*X**≥**Y*)), setting*x*s.t. FOR ALL*Y*: (*x**≥**Y*)]: deduce (*x**≥*(*x**+*1)) AND (NOT (*x**≥*(*x**+*1))) [assuming THERE EXISTS*X*: (FOR ALL*Y*: (*X**≥**Y*)), setting*x*s.t. FOR ALL*Y*: (*x**≥**Y*)].*[CONJUNCTION INTRODUCTION]* - From (
*x**≥*(*x**+*1)) AND (NOT (*x**≥*(*x**+*1))) [assuming THERE EXISTS*X*: (FOR ALL*Y*: (*X**≥**Y*)), setting*x*s.t. FOR ALL*Y*: (*x**≥**Y*)]: deduce TRUE AND (NOT TRUE) [assuming THERE EXISTS*X*: (FOR ALL*Y*: (*X**≥**Y*)), setting*x*s.t. FOR ALL*Y*: (*x**≥**Y*)].*[EX FALSO QUODLIBET]* - From TRUE AND (NOT TRUE) [assuming THERE EXISTS
*X*: (FOR ALL*Y*: (*X**≥**Y*)), setting*x*s.t. FOR ALL*Y*: (*x**≥**Y*)]: deduce TRUE AND (NOT TRUE) [assuming THERE EXISTS*X*: (FOR ALL*Y*: (*X**≥**Y*))].*[PULL]* - From TRUE AND (NOT TRUE) [assuming THERE EXISTS
*X*: (FOR ALL*Y*: (*X**≥**Y*))]: deduce NOT (THERE EXISTS*X*: (FOR ALL*Y*: (*X**≥**Y*))).*[REDUCTIO AD ABSURDUM]* - QED!

EQUALITY IS SYMMETRIC

- Amongst all the predicates in first-order logic, there is a special one that obeys special rules: the equality predicate
*=*. This binary predicate is written as a relation, thus we write*α=β*rather than*=(α,β)*. - Equality obeys two fundamental laws. The first is reflexivity: if
*α*is a term, then the statement*α=α*is true (assuming of course that this statement is well-formed in the target environment. - The second law is the indiscernability of identicals (also known as Leibniz's law): if one knows that
*α=β*, and one knows that*P(α)*is true, then one can conclude that*P(β)*is also true. - To use the law of reflexivity, click on a term in the
**Terms**window, or drag a term into a target environment. - To use the indiscernability of identicals, drag an equation of the form
*α=β*to another statement in the same environment. - As with the law of existential introduction, there can be multiple ways in which the indiscernability of identicals law can be applied to a given pair of statements. However, the game removes the "trivial" deduction of concluding a statement from itself.
- With these two laws of equality, the the set of rules of deduction for first-order logic used in this text is now complete. (But this is not the only such set of rules; there are other deductive systems for first-order logic that use a different set of rules, though they still end up proving the same set of statements.)
- The indiscernability of identicals works in mathematics, because mathematics is concerned almost exclusively with extensional statements. But in natural languages such as English, there are also intensional statements to which the indiscernability of identicals does not apply.

- α
*=*β.*[given]* - Deduce α
*=*α.*[EQUALITY IS REFLEXIVE]* - From α
*=*α, α*=*β: deduce β*=*α.*[INDISCERNABILITY OF IDENTICALS]* - QED!

EQUALITY IS TRANSITIVE

- The fact that equality is reflexive, symmetric, and transitive can be summarised into the single observation that equality is an equivalence relation.

- α
*=*β.*[given]* - β
*=*γ.*[given]* - From α
*=*β, β*=*γ: deduce α*=*γ.*[INDISCERNABILITY OF IDENTICALS]* - QED!

SUBSTITUTION

**Technical note**: matching for this exercise has not yet been implemented.

- α
*=*β.*[given]* - Deduce
*f*(α)*=**f*(α).*[EQUALITY IS REFLEXIVE]* - From
*f*(α)*=**f*(α), α*=*β: deduce*f*(α)*=**f*(β).*[INDISCERNABILITY OF IDENTICALS]* - QED!

LEFT IDENTITY EQUALS RIGHT IDENTITY

- Now that all the laws of first-order logic are unlocked, it is now possible (in principle at least) to start proving statements in mathematics itself, rather than in logic.
- We illustrate this with one of the first results in group theory: if one has a left-identity
*α*(so that*α * X = X*for all*X*) and a right-identity*β*(so that*X * β = X*for all*X*), then*α*and*β*must be equal. **Technical note**: matching for this exercise has not yet been implemented.

- FOR ALL
*X*: ((α****X*)*=**X*).*[given]* - FOR ALL
*X*: ((*X****β)*=**X*).*[given]* - From FOR ALL
*X*: ((α****X*)*=**X*): deduce (α***β)*=*β.*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*X*: ((*X****β)*=**X*): deduce (α***β)*=*α.*[UNIVERSAL SPECIFICATION]* - From (α
***β)*=*β, (α***β)*=*α: deduce α*=*β.*[INDISCERNABILITY OF IDENTICALS]* - QED!

- This exercise asks to prove a more complicated result in group theory, namely the cancellation law that allows one to deduce the identity
*β = γ*from*α * β = α * γ*when*α, β, γ*lie in a group. - There are three relevant group laws here. The first is identity: there is a term
*1*such that*1*X=X*for all group elements*X*. - The second is associativity: one has
*X*(Y*Z) = (X*Y)*Z*for all group elements*X,Y,Z*. - The third is inverse: for every group element
*X*, there is a group element*Y*such that*Y*X=1*. - This is a relatively easy exercise in group theory when written out in informal mathematical language, but turns out to be somewhat lengthy when one tries to formalise it in first-order logic. More generally, first-order logic tends to be too "low-level" of a proof system to be convenient for advanced mathematics; most proofs in mathematics are instead written in a more "high-level" fashion, using less formal, but more expressive, sentences in English (or in other languages) in place of the very limited sentences available to first-order logic.
- Thanks to Gesse Roure for a short proof, and Anders Kaseorg for a shorter proof.
**Technical note**: matching for this exercise has not yet been implemented.

- FOR ALL
*X*: ((1****X*)*=**X*).*[given]* - FOR ALL
*X*: (FOR ALL*Y*: (FOR ALL*Z*: ((*X****(*Y*****Z*))*=*((*X*****Y*)****Z*)))).*[given]* - FOR ALL
*X*: (THERE EXISTS*Y*: ((*Y*****X*)*=*1)).*[given]* - (α
***β)*=*(α***γ).*[given]* - From FOR ALL
*X*: (THERE EXISTS*Y*: ((*Y*****X*)*=*1)): deduce THERE EXISTS*Y*: ((*Y****α)*=*1).*[UNIVERSAL SPECIFICATION]* - From THERE EXISTS
*Y*: ((*Y****α)*=*1): deduce (*x****α)*=*1 [setting*x*s.t. (*x****α)*=*1].*[EXISTENTIAL INSTANTIATION]* - From FOR ALL
*X*: (FOR ALL*Y*: (FOR ALL*Z*: ((*X****(*Y*****Z*))*=*((*X*****Y*)****Z*)))): deduce FOR ALL*X*: (FOR ALL*Y*: (FOR ALL*Z*: ((*X****(*Y*****Z*))*=*((*X*****Y*)****Z*)))) [setting*x*s.t. (*x****α)*=*1].*[PUSH (for set variables)]* - From FOR ALL
*X*: (FOR ALL*Y*: (FOR ALL*Z*: ((*X****(*Y*****Z*))*=*((*X*****Y*)****Z*)))) [setting*x*s.t. (*x****α)*=*1]: deduce FOR ALL*Y*: (FOR ALL*Z*: ((*x****(*Y*****Z*))*=*((*x*****Y*)****Z*))) [setting*x*s.t. (*x****α)*=*1].*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*Y*: (FOR ALL*Z*: ((*x****(*Y*****Z*))*=*((*x*****Y*)****Z*))) [setting*x*s.t. (*x****α)*=*1]: deduce FOR ALL*Z*: ((*x****(α****Z*))*=*((*x****α)****Z*)) [setting*x*s.t. (*x****α)*=*1].*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*Z*: ((*x****(α****Z*))*=*((*x****α)****Z*)) [setting*x*s.t. (*x****α)*=*1], (*x****α)*=*1 [setting*x*s.t. (*x****α)*=*1]: deduce FOR ALL*Z*: ((*x****(α****Z*))*=*(1****Z*)) [setting*x*s.t. (*x****α)*=*1].*[INDISCERNABILITY OF IDENTICALS]* - From FOR ALL
*Z*: ((*x****(α****Z*))*=*(1****Z*)) [setting*x*s.t. (*x****α)*=*1]: deduce (*x****(α***β))*=*(1***β) [setting*x*s.t. (*x****α)*=*1].*[UNIVERSAL SPECIFICATION]* - From (α
***β)*=*(α***γ): deduce (α***β)*=*(α***γ) [setting*x*s.t. (*x****α)*=*1].*[PUSH (for set variables)]* - From (
*x****(α***β))*=*(1***β) [setting*x*s.t. (*x****α)*=*1], (α***β)*=*(α***γ) [setting*x*s.t. (*x****α)*=*1]: deduce (*x****(α***γ))*=*(1***β) [setting*x*s.t. (*x****α)*=*1].*[INDISCERNABILITY OF IDENTICALS]* - From FOR ALL
*Z*: ((*x****(α****Z*))*=*(1****Z*)) [setting*x*s.t. (*x****α)*=*1]: deduce (*x****(α***γ))*=*(1***γ) [setting*x*s.t. (*x****α)*=*1].*[UNIVERSAL SPECIFICATION]* - From (
*x****(α***γ))*=*(1***γ) [setting*x*s.t. (*x****α)*=*1], (*x****(α***γ))*=*(1***β) [setting*x*s.t. (*x****α)*=*1]: deduce (1***β)*=*(1***γ) [setting*x*s.t. (*x****α)*=*1].*[INDISCERNABILITY OF IDENTICALS]* - From (1
***β)*=*(1***γ) [setting*x*s.t. (*x****α)*=*1]: deduce (1***β)*=*(1***γ).*[PULL]* - From FOR ALL
*X*: ((1****X*)*=**X*): deduce (1***β)*=*β.*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*X*: ((1****X*)*=**X*): deduce (1***γ)*=*γ.*[UNIVERSAL SPECIFICATION]* - From (1
***β)*=*(1***γ), (1***β)*=*β: deduce β*=*(1***γ).*[INDISCERNABILITY OF IDENTICALS]* - From β
*=*(1***γ), (1***γ)*=*γ: deduce β*=*γ.*[INDISCERNABILITY OF IDENTICALS]* - QED!

PRODUCT OF INVERTIBLE ELEMENTS IS INVERTIBLE

- A monoid is like a group, but in which not every element
*α*is invertible in the sense that there is an element*X*of the monoid for which*X * α = 1*. A typical example of a monoid is the collection of*n × n*matrices with (say) real entries, for some fixed*n*. - This exercise asks to prove that if two elements
*α, β*are known to be invertible, then so is their product*α * β*. - The only monoid laws one is given here are the identity law
*1 * X = X*and the associativity law*X * (Y * Z)=(X * Y) * Z*, valid for all monoid elements*X,Y,Z*. - As with the other exercises involving actual mathematical objects, one should first sketch out a proof using informal mathematical reasoning, and only then try transferring that proof to the first-order logic deductive system of this text.
**Technical note**: matching for this exercise has not yet been implemented.

- FOR ALL
*X*: ((1****X*)*=**X*).*[given]* - FOR ALL
*X*: (FOR ALL*Y*: (FOR ALL*Z*: ((*X****(*Y*****Z*))*=*((*X*****Y*)****Z*)))).*[given]* - THERE EXISTS
*X*: ((*X****α)*=*1).*[given]* - THERE EXISTS
*X*: ((*X****β)*=*1).*[given]* - From THERE EXISTS
*X*: ((*X****α)*=*1): deduce (*x****α)*=*1 [setting*x*s.t. (*x****α)*=*1].*[EXISTENTIAL INSTANTIATION]* - From THERE EXISTS
*X*: ((*X****β)*=*1): deduce THERE EXISTS*X*: ((*X****β)*=*1) [setting*x*s.t. (*x****α)*=*1].*[PUSH (for set variables)]* - From THERE EXISTS
*X*: ((*X****β)*=*1) [setting*x*s.t. (*x****α)*=*1]: deduce (*y****β)*=*1 [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1].*[EXISTENTIAL INSTANTIATION]* - From (
*x****α)*=*1 [setting*x*s.t. (*x****α)*=*1]: deduce (*x****α)*=*1 [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1].*[PUSH (for set variables)]* - From FOR ALL
*X*: ((1****X*)*=**X*): deduce FOR ALL*X*: ((1****X*)*=**X*) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1].*[DOUBLE PUSH (for set variables)]* - From FOR ALL
*X*: (FOR ALL*Y*: (FOR ALL*Z*: ((*X****(*Y*****Z*))*=*((*X*****Y*)****Z*)))): deduce FOR ALL*X*: (FOR ALL*Y*: (FOR ALL*Z*: ((*X****(*Y*****Z*))*=*((*X*****Y*)****Z*)))) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1].*[DOUBLE PUSH (for set variables)]* - From FOR ALL
*X*: (FOR ALL*Y*: (FOR ALL*Z*: ((*X****(*Y*****Z*))*=*((*X*****Y*)****Z*)))) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1]: deduce FOR ALL*Y*: (FOR ALL*Z*: ((*x****(*Y*****Z*))*=*((*x*****Y*)****Z*))) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1].*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*Y*: (FOR ALL*Z*: ((*x****(*Y*****Z*))*=*((*x*****Y*)****Z*))) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1]: deduce FOR ALL*Z*: ((*x****(α****Z*))*=*((*x****α)****Z*)) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1].*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*Z*: ((*x****(α****Z*))*=*((*x****α)****Z*)) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1]: deduce (*x****(α***β))*=*((*x****α)***β) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1].*[UNIVERSAL SPECIFICATION]* - From (
*x****(α***β))*=*((*x****α)***β) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1], (*x****α)*=*1 [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1]: deduce (*x****(α***β))*=*(1***β) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1].*[INDISCERNABILITY OF IDENTICALS]* - From FOR ALL
*X*: ((1****X*)*=**X*) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1]: deduce (1***β)*=*β [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1].*[UNIVERSAL SPECIFICATION]* - From (
*x****(α***β))*=*(1***β) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1], (1***β)*=*β [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1]: deduce (*x****(α***β))*=*β [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1].*[EQUALITY IS TRANSITIVE]* - From FOR ALL
*X*: (FOR ALL*Y*: (FOR ALL*Z*: ((*X****(*Y*****Z*))*=*((*X*****Y*)****Z*)))) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1]: deduce FOR ALL*Y*: (FOR ALL*Z*: ((*y****(*Y*****Z*))*=*((*y*****Y*)****Z*))) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1].*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*Y*: (FOR ALL*Z*: ((*y****(*Y*****Z*))*=*((*y*****Y*)****Z*))) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1]: deduce FOR ALL*Z*: ((*y****(*x*****Z*))*=*((*y*****x*)****Z*)) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1].*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*Z*: ((*y****(*x*****Z*))*=*((*y*****x*)****Z*)) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1]: deduce (*y****(*x****(α***β)))*=*((*y*****x*)***(α***β)) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1].*[UNIVERSAL SPECIFICATION]* - From (
*y****(*x****(α***β)))*=*((*y*****x*)***(α***β)) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1], (*x****(α***β))*=*β [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1]: deduce (*y****β)*=*((*y*****x*)***(α***β)) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1].*[INDISCERNABILITY OF IDENTICALS]* - From (
*y****β)*=*1 [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1], (*y****β)*=*((*y*****x*)***(α***β)) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1]: deduce ((*y*****x*)***(α***β))*=*1 [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1].*[INDISCERNABILITY OF IDENTICALS]* - From ((
*y*****x*)***(α***β))*=*1 [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1]: deduce THERE EXISTS*X*: ((*X****(α***β))*=*1) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*X*: ((*X****(α***β))*=*1) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y****β)*=*1]: deduce THERE EXISTS*X*: ((*X****(α***β))*=*1).*[DOUBLE PULL]* - QED!

INVERSE IS AN INVOLUTION

- This is another exercise in group theory. In this exercise, we denote the (left) inverse of a group element
*X*by*f(X)*, thus*f(X) * X = 1*for all*X*. - We also are given the associativity law
*X * (Y * Z)=(X * Y) * Z*, the left identity law*1 * X = X*, and the right identity law*X * 1 = X*for all*X,Y,Z*. - The task here is to show that when one applies the inverse operation twice, one ends up where one started:
*f(f(X)) = X*. - To get a hint, hover over this sentence.
- Still stuck? Hover over this sentence.
**Technical note**: matching for this exercise has not yet been implemented.

- FOR ALL
*X*: ((1****X*)*=**X*).*[given]* - FOR ALL
*X*: ((*X****1)*=**X*).*[given]* - FOR ALL
*X*: (FOR ALL*Y*: (FOR ALL*Z*: ((*X****(*Y*****Z*))*=*((*X*****Y*)****Z*)))).*[given]* - FOR ALL
*X*: ((*f*(*X*)****X*)*=*1).*[given]* - From FOR ALL
*X*: ((*f*(*X*)****X*)*=*1): deduce (*f*(*x*)****x*)*=*1 [letting*x*be arbitrary].*[REVERSE UNIVERSAL INTRODUCTION]* - From FOR ALL
*X*: (FOR ALL*Y*: (FOR ALL*Z*: ((*X****(*Y*****Z*))*=*((*X*****Y*)****Z*)))): deduce FOR ALL*X*: (FOR ALL*Y*: (FOR ALL*Z*: ((*X****(*Y*****Z*))*=*((*X*****Y*)****Z*)))) [letting*x*be arbitrary].*[PUSH (for free variables)]* - From FOR ALL
*X*: (FOR ALL*Y*: (FOR ALL*Z*: ((*X****(*Y*****Z*))*=*((*X*****Y*)****Z*)))) [letting*x*be arbitrary]: deduce FOR ALL*Y*: (FOR ALL*Z*: ((*f*(*f*(*x*))***(*Y*****Z*))*=*((*f*(*f*(*x*))****Y*)****Z*))) [letting*x*be arbitrary].*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*Y*: (FOR ALL*Z*: ((*f*(*f*(*x*))***(*Y*****Z*))*=*((*f*(*f*(*x*))****Y*)****Z*))) [letting*x*be arbitrary]: deduce FOR ALL*Z*: ((*f*(*f*(*x*))***(*f*(*x*)****Z*))*=*((*f*(*f*(*x*))****f*(*x*))****Z*)) [letting*x*be arbitrary].*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*Z*: ((*f*(*f*(*x*))***(*f*(*x*)****Z*))*=*((*f*(*f*(*x*))****f*(*x*))****Z*)) [letting*x*be arbitrary]: deduce (*f*(*f*(*x*))***(*f*(*x*)****x*))*=*((*f*(*f*(*x*))****f*(*x*))****x*) [letting*x*be arbitrary].*[UNIVERSAL SPECIFICATION]* - From (
*f*(*f*(*x*))***(*f*(*x*)****x*))*=*((*f*(*f*(*x*))****f*(*x*))****x*) [letting*x*be arbitrary], (*f*(*x*)****x*)*=*1 [letting*x*be arbitrary]: deduce (*f*(*f*(*x*))***1)*=*((*f*(*f*(*x*))****f*(*x*))****x*) [letting*x*be arbitrary].*[INDISCERNABILITY OF IDENTICALS]* - From FOR ALL
*X*: ((*f*(*X*)****X*)*=*1): deduce FOR ALL*X*: ((*f*(*X*)****X*)*=*1) [letting*x*be arbitrary].*[PUSH (for free variables)]* - From FOR ALL
*X*: ((*f*(*X*)****X*)*=*1) [letting*x*be arbitrary]: deduce (*f*(*f*(*x*))****f*(*x*))*=*1 [letting*x*be arbitrary].*[UNIVERSAL SPECIFICATION]* - From (
*f*(*f*(*x*))***1)*=*((*f*(*f*(*x*))****f*(*x*))****x*) [letting*x*be arbitrary], (*f*(*f*(*x*))****f*(*x*))*=*1 [letting*x*be arbitrary]: deduce (*f*(*f*(*x*))***1)*=*(1****x*) [letting*x*be arbitrary].*[INDISCERNABILITY OF IDENTICALS]* - From FOR ALL
*X*: ((1****X*)*=**X*): deduce (1****x*)*=**x*[letting*x*be arbitrary].*[REVERSE UNIVERSAL INTRODUCTION]* - From (
*f*(*f*(*x*))***1)*=*(1****x*) [letting*x*be arbitrary], (1****x*)*=**x*[letting*x*be arbitrary]: deduce (*f*(*f*(*x*))***1)*=**x*[letting*x*be arbitrary].*[INDISCERNABILITY OF IDENTICALS]* - From FOR ALL
*X*: ((*X****1)*=**X*): deduce FOR ALL*X*: ((*X****1)*=**X*) [letting*x*be arbitrary].*[PUSH (for free variables)]* - From FOR ALL
*X*: ((*X****1)*=**X*) [letting*x*be arbitrary]: deduce (*f*(*f*(*x*))***1)*=**f*(*f*(*x*)) [letting*x*be arbitrary].*[UNIVERSAL SPECIFICATION]* - From (
*f*(*f*(*x*))***1)*=**x*[letting*x*be arbitrary], (*f*(*f*(*x*))***1)*=**f*(*f*(*x*)) [letting*x*be arbitrary]: deduce*f*(*f*(*x*))*=**x*[letting*x*be arbitrary].*[INDISCERNABILITY OF IDENTICALS]* - From
*f*(*f*(*x*))*=**x*[letting*x*be arbitrary]: deduce FOR ALL*X*: (*f*(*f*(*X*))*=**X*).*[ UNIVERSAL INTRODUCTION]* - QED!

IRRATIONAL TO IRRATIONAL CAN BE RATIONAL

**Note:**This is one of the hardest exercises in this text; one needs to first think carefully as to how to establish the exercise mathematically, and only then try to translate your mathematical reasoning to a first-order proof.- Here, the domain of discourse is intended to be the positive reals, and the predicate
*R(X)*should be interpreted as an assertion that*X*is a rational number. - The task is to show that there exist irrational positive reals
*X,Y*such that the quantity*X^Y*is rational. - As it turns out, this claim can be established using the following relatively elementary facts. Firstly, one needs some laws of exponentiation, namely that
*(X^Y)^Z = X^(Y*Z)*,*√X * √X = X*, and*(√X)^2 = X*. - Secondly, one needs to know that
*2*is rational, and*√ 2*is irrational. - This problem is notable for two reasons. Firstly, and rather surprisingly, the solution relies crucially at one point on the law of the excluded middle!
- Secondly, you will find at some points in the proof that the law of existential introduction will generate a
*lot*of possible options. One will have to carefully select the right option amongst them! - Just a reminder: to apply the law of existential introduction with a specific bound variable, drag the sentence
*P(α)*to the term*α*, and then CTRL-CLICK on the desired bound variable. - To get a hint, hover over this sentence.
- Still stuck? Hover over this sentence.
- Thanks to Anders Kaseorg for a short proof.
**Technical note**: matching for this exercise has not yet been implemented.

- FOR ALL
*X*: (FOR ALL*Y*: (FOR ALL*Z*: (((*X**^**Y*)*^**Z*)*=*(*X**^*(*Y*****Z*))))).*[given]* - FOR ALL
*X*: ((*√*(*X*)****√*(*X*))*=**X*).*[given]* - FOR ALL
*X*: ((*√*(*X*)*^*2)*=**X*).*[given]* *R*(2).*[given]*- NOT
*R*(*√*(2)).*[given]* - From FOR ALL
*X*: (FOR ALL*Y*: (FOR ALL*Z*: (((*X**^**Y*)*^**Z*)*=*(*X**^*(*Y*****Z*))))): deduce FOR ALL*Y*: (FOR ALL*Z*: (((*√*(2)*^**Y*)*^**Z*)*=*(*√*(2)*^*(*Y*****Z*)))).*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*Y*: (FOR ALL*Z*: (((*√*(2)*^**Y*)*^**Z*)*=*(*√*(2)*^*(*Y*****Z*)))): deduce FOR ALL*Z*: (((*√*(2)*^**√*(2))*^**Z*)*=*(*√*(2)*^*(*√*(2)****Z*))).*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*Z*: (((*√*(2)*^**√*(2))*^**Z*)*=*(*√*(2)*^*(*√*(2)****Z*))): deduce ((*√*(2)*^**√*(2))*^**√*(2))*=*(*√*(2)*^*(*√*(2)****√*(2))).*[UNIVERSAL SPECIFICATION]* - From ((
*√*(2)*^**√*(2))*^**√*(2))*=*(*√*(2)*^*(*√*(2)****√*(2))): deduce (*√*(2)*^*(*√*(2)****√*(2)))*=*((*√*(2)*^**√*(2))*^**√*(2)).*[EQUALITY IS SYMMETRIC]* - From FOR ALL
*X*: ((*√*(*X*)****√*(*X*))*=**X*): deduce (*√*(2)****√*(2))*=*2.*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*X*: ((*√*(*X*)*^*2)*=**X*): deduce (*√*(2)*^*2)*=*2.*[UNIVERSAL SPECIFICATION]* - From (
*√*(2)*^*(*√*(2)****√*(2)))*=*((*√*(2)*^**√*(2))*^**√*(2)), (*√*(2)****√*(2))*=*2: deduce (*√*(2)*^*2)*=*((*√*(2)*^**√*(2))*^**√*(2)).*[INDISCERNABILITY OF IDENTICALS]* - From (
*√*(2)*^*2)*=*((*√*(2)*^**√*(2))*^**√*(2)), (*√*(2)*^*2)*=*2: deduce 2*=*((*√*(2)*^**√*(2))*^**√*(2)).*[INDISCERNABILITY OF IDENTICALS]* - From
*R*(2), 2*=*((*√*(2)*^**√*(2))*^**√*(2)): deduce*R*((*√*(2)*^**√*(2))*^**√*(2)).*[INDISCERNABILITY OF IDENTICALS]* - Deduce
*R*(*√*(2)*^**√*(2)) [assuming*R*(*√*(2)*^**√*(2))].*[IMPLICATION INTRODUCTION]* - From NOT
*R*(*√*(2)): deduce NOT*R*(*√*(2)) [assuming*R*(*√*(2)*^**√*(2))].*[PUSH]* - From NOT
*R*(*√*(2)) [assuming*R*(*√*(2)*^**√*(2))], NOT*R*(*√*(2)) [assuming*R*(*√*(2)*^**√*(2))],*R*(*√*(2)*^**√*(2)) [assuming*R*(*√*(2)*^**√*(2))]: deduce ((NOT*R*(*√*(2))) AND (NOT*R*(*√*(2)))) AND*R*(*√*(2)*^**√*(2)) [assuming*R*(*√*(2)*^**√*(2))].*[EXERCISE 1.1]* - From ((NOT
*R*(*√*(2))) AND (NOT*R*(*√*(2)))) AND*R*(*√*(2)*^**√*(2)) [assuming*R*(*√*(2)*^**√*(2))]: deduce THERE EXISTS*Y*: (((NOT*R*(*√*(2))) AND (NOT*R*(*Y*))) AND*R*(*√*(2)*^**Y*)) [assuming*R*(*√*(2)*^**√*(2))].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*Y*: (((NOT*R*(*√*(2))) AND (NOT*R*(*Y*))) AND*R*(*√*(2)*^**Y*)) [assuming*R*(*√*(2)*^**√*(2))]: deduce THERE EXISTS*X*: (THERE EXISTS*Y*: (((NOT*R*(*X*)) AND (NOT*R*(*Y*))) AND*R*(*X**^**Y*))) [assuming*R*(*√*(2)*^**√*(2))].*[EXISTENTIAL INTRODUCTION]* - Deduce NOT
*R*(*√*(2)*^**√*(2)) [assuming NOT*R*(*√*(2)*^**√*(2))].*[IMPLICATION INTRODUCTION]* - From NOT
*R*(*√*(2)): deduce NOT*R*(*√*(2)) [assuming NOT*R*(*√*(2)*^**√*(2))].*[PUSH]* - From
*R*((*√*(2)*^**√*(2))*^**√*(2)): deduce*R*((*√*(2)*^**√*(2))*^**√*(2)) [assuming NOT*R*(*√*(2)*^**√*(2))].*[PUSH]* - From NOT
*R*(*√*(2)*^**√*(2)) [assuming NOT*R*(*√*(2)*^**√*(2))], NOT*R*(*√*(2)) [assuming NOT*R*(*√*(2)*^**√*(2))],*R*((*√*(2)*^**√*(2))*^**√*(2)) [assuming NOT*R*(*√*(2)*^**√*(2))]: deduce ((NOT*R*(*√*(2)*^**√*(2))) AND (NOT*R*(*√*(2)))) AND*R*((*√*(2)*^**√*(2))*^**√*(2)) [assuming NOT*R*(*√*(2)*^**√*(2))].*[EXERCISE 1.1]* - From ((NOT
*R*(*√*(2)*^**√*(2))) AND (NOT*R*(*√*(2)))) AND*R*((*√*(2)*^**√*(2))*^**√*(2)) [assuming NOT*R*(*√*(2)*^**√*(2))]: deduce THERE EXISTS*Y*: (((NOT*R*(*√*(2)*^**√*(2))) AND (NOT*R*(*Y*))) AND*R*((*√*(2)*^**√*(2))*^**Y*)) [assuming NOT*R*(*√*(2)*^**√*(2))].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*Y*: (((NOT*R*(*√*(2)*^**√*(2))) AND (NOT*R*(*Y*))) AND*R*((*√*(2)*^**√*(2))*^**Y*)) [assuming NOT*R*(*√*(2)*^**√*(2))]: deduce THERE EXISTS*X*: (THERE EXISTS*Y*: (((NOT*R*(*X*)) AND (NOT*R*(*Y*))) AND*R*(*X**^**Y*))) [assuming NOT*R*(*√*(2)*^**√*(2))].*[EXISTENTIAL INTRODUCTION]* - From THERE EXISTS
*X*: (THERE EXISTS*Y*: (((NOT*R*(*X*)) AND (NOT*R*(*Y*))) AND*R*(*X**^**Y*))) [assuming*R*(*√*(2)*^**√*(2))], THERE EXISTS*X*: (THERE EXISTS*Y*: (((NOT*R*(*X*)) AND (NOT*R*(*Y*))) AND*R*(*X**^**Y*))) [assuming NOT*R*(*√*(2)*^**√*(2))]: deduce THERE EXISTS*X*: (THERE EXISTS*Y*: (((NOT*R*(*X*)) AND (NOT*R*(*Y*))) AND*R*(*X**^**Y*))).*[EXCLUDED MIDDLE (case analysis form)]* - QED!

- This is a variant of Exercise 24.4. One is given the left identity, associativity, and left inverse properties of a group, and one has to derive the right identity property.
- Thanks to Martin Epstein for suggesting this exercise.
- Stuck? Hover over this sentence.
- Thanks to Anders Kaseorg for a short proof, Martin Epstein for a shorter proof, and Anders Kaseorg for an even shorter proof.
**Technical note**: matching for this exercise has not yet been implemented.

- FOR ALL
*X*: ((1****X*)*=**X*).*[given]* - FOR ALL
*X*: (FOR ALL*Y*: (FOR ALL*Z*: ((*X****(*Y*****Z*))*=*((*X*****Y*)****Z*)))).*[given]* - FOR ALL
*X*: (THERE EXISTS*Y*: ((*Y*****X*)*=*1)).*[given]* - From FOR ALL
*X*: (THERE EXISTS*Y*: ((*Y*****X*)*=*1)): deduce THERE EXISTS*Y*: ((*Y****α)*=*1).*[UNIVERSAL SPECIFICATION]* - From THERE EXISTS
*Y*: ((*Y****α)*=*1): deduce (*x****α)*=*1 [setting*x*s.t. (*x****α)*=*1].*[EXISTENTIAL INSTANTIATION]* - From FOR ALL
*X*: (THERE EXISTS*Y*: ((*Y*****X*)*=*1)): deduce FOR ALL*X*: (THERE EXISTS*Y*: ((*Y*****X*)*=*1)) [setting*x*s.t. (*x****α)*=*1].*[PUSH (for set variables)]* - From FOR ALL
*X*: (THERE EXISTS*Y*: ((*Y*****X*)*=*1)) [setting*x*s.t. (*x****α)*=*1]: deduce THERE EXISTS*Y*: ((*Y*****x*)*=*1) [setting*x*s.t. (*x****α)*=*1].*[UNIVERSAL SPECIFICATION]* - From THERE EXISTS
*Y*: ((*Y*****x*)*=*1) [setting*x*s.t. (*x****α)*=*1]: deduce (*y*****x*)*=*1 [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1].*[EXISTENTIAL INSTANTIATION]* - From FOR ALL
*X*: (FOR ALL*Y*: (FOR ALL*Z*: ((*X****(*Y*****Z*))*=*((*X*****Y*)****Z*)))): deduce FOR ALL*X*: (FOR ALL*Y*: (FOR ALL*Z*: ((*X****(*Y*****Z*))*=*((*X*****Y*)****Z*)))) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1].*[DOUBLE PUSH (for set variables)]* - From FOR ALL
*X*: (FOR ALL*Y*: (FOR ALL*Z*: ((*X****(*Y*****Z*))*=*((*X*****Y*)****Z*)))) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1]: deduce FOR ALL*Y*: (FOR ALL*Z*: ((*y****(*Y*****Z*))*=*((*y*****Y*)****Z*))) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1].*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*Y*: (FOR ALL*Z*: ((*y****(*Y*****Z*))*=*((*y*****Y*)****Z*))) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1]: deduce FOR ALL*Z*: ((*y****(1****Z*))*=*((*y****1)****Z*)) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1].*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*Z*: ((*y****(1****Z*))*=*((*y****1)****Z*)) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1]: deduce (*y****(1***1))*=*((*y****1)***1) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1].*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*X*: ((1****X*)*=**X*): deduce FOR ALL*X*: ((1****X*)*=**X*) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1].*[DOUBLE PUSH (for set variables)]* - From FOR ALL
*X*: ((1****X*)*=**X*) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1]: deduce (1***1)*=*1 [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1].*[UNIVERSAL SPECIFICATION]* - From (
*y****(1***1))*=*((*y****1)***1) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1], (1***1)*=*1 [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1]: deduce (*y****1)*=*((*y****1)***1) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1].*[INDISCERNABILITY OF IDENTICALS]* - From (
*x****α)*=*1 [setting*x*s.t. (*x****α)*=*1]: deduce (*x****α)*=*1 [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1].*[PUSH (for set variables)]* - From FOR ALL
*Y*: (FOR ALL*Z*: ((*y****(*Y*****Z*))*=*((*y*****Y*)****Z*))) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1]: deduce FOR ALL*Z*: ((*y****(*x*****Z*))*=*((*y*****x*)****Z*)) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1].*[UNIVERSAL SPECIFICATION]* - From FOR ALL
*Z*: ((*y****(*x*****Z*))*=*((*y*****x*)****Z*)) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1]: deduce (*y****(*x****α))*=*((*y*****x*)***α) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1].*[UNIVERSAL SPECIFICATION]* - From (
*y****(*x****α))*=*((*y*****x*)***α) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1], (*x****α)*=*1 [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1]: deduce (*y****1)*=*((*y*****x*)***α) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1].*[INDISCERNABILITY OF IDENTICALS]* - From (
*y****1)*=*((*y*****x*)***α) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1], (*y*****x*)*=*1 [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1]: deduce (*y****1)*=*(1***α) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1].*[INDISCERNABILITY OF IDENTICALS]* - From FOR ALL
*X*: ((1****X*)*=**X*) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1]: deduce (1***α)*=*α [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1].*[UNIVERSAL SPECIFICATION]* - From (
*y****1)*=*(1***α) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1], (1***α)*=*α [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1]: deduce (*y****1)*=*α [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1].*[EQUALITY IS TRANSITIVE]* - From (
*y****1)*=*((*y****1)***1) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1], (*y****1)*=*α [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1]: deduce α*=*(α***1) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1].*[INDISCERNABILITY OF IDENTICALS]* - From α
*=*(α***1) [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1]: deduce (α***1)*=*α [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1].*[EQUALITY IS SYMMETRIC]* - From (α
***1)*=*α [setting*x*s.t. (*x****α)*=*1, setting*y*s.t. (*y*****x*)*=*1]: deduce (α***1)*=*α.*[DOUBLE PULL]* - QED!