Rules
Each rule lists how many available proof lines to cite. A and B stand for whole formulas, not just single letters. The symbol ⊢ means “therefore”; ⟺ means that a transformation works in either direction. Exercise-specific restrictions appear beneath the proof command box.
Cite premises, open assumptions, earlier lines in your current scope, or completed SHOW lines. You cannot cite an unproved SHOW or a line inside a closed subproof. Open a SHOW goal before adding derived lines.
Propositional Rules
These rules also work inside predicate and modal proofs, subject to the exercise's restrictions.
| Rule / cite | What follows | Type |
|---|---|---|
R1 line | Repeat: from an available A, derive A again. | 1 r |
MP2 lines | Modus Ponens: from A and A→B, derive B. | 1 2 mp |
MT2 lines | Modus Tollens: from A→B and ¬B, derive ¬A. | 1 2 mt |
DN1 line | Double Negation: from ¬¬A derive A, or from A derive ¬¬A. | 1 dn |
S1 line | Simplification: from A∧B, derive A or B. | 1 sl / 1 sr |
ADJ2 lines | Adjunction: from A and B, derive A∧B. | 1 2 adj |
ADD1 line | Addition: from A, derive A∨B or B∨A. | 1 add B |
MC1 line | Material Conditional: from B or from ¬A, derive A → B (one cited line). | 1 mc A -> B |
MTP2 lines | Disjunctive syllogism: from A∨B and ¬A, derive B (or with ¬B, derive A). Order changes and double negation are allowed. | 1 2 mtp |
BC1 line | Biconditional-to-Conditional: from A↔B, derive A→B. | 1 bc |
CB2 lines | Conditional-to-Biconditional: from A→B, B→A, derive A↔B. | 1 2 cb |
BP2 lines | Biconditional Ponens: from A↔B and A, derive B (or from A↔B and B, derive A). | 1 2 bp |
BT2 lines | Biconditional Tollens: from A↔B and ¬A, derive ¬B (or from A↔B and ¬B, derive ¬A). | 1 2 bt |
DM1 line | De Morgan: ¬(A∧B) ⟺ ¬A∨¬B, ¬(A∨B) ⟺ ¬A∧¬B. | 1 dm |
NC1 line | Negated Conditional: ¬(A → B) ⟺ A ∧ ¬B. | 1 nc |
NB1 line | Negated Biconditional: ¬(A↔B) ⟺ (A↔¬B). | 1 nb |
SL and SR select the left and right conjunct for S; REP is another name for R (Repeat).
Why does Q imply P → Q?
A conditional is false only when its antecedent is true and its consequent is false. If Q is already true, P → Q is true regardless of P.
With Q on line 1, type 1 mc P -> Q. The same command works with ¬P on line 1: a false antecedent also guarantees the conditional. Type the whole conditional you want, including parentheses where needed. MC does not let you infer P → Q from P alone or from ¬Q alone.
You can prove this by CD: with Q on line 1, enter show P -> Q cd, then 1 r, then co. The assumption P does not have to be used.
MC is a derived shortcut. It is unavailable in the early lessons that establish conditional reasoning; use CD there. It is available in the sandbox and from the derived-rules chapter onward unless an exercise disables it.
Derivation Strategies
| Type | To show | Strategy |
|---|---|---|
| DD | Any A | Derive A directly (no assumption) |
| CD | A → B | Assume A, derive B |
| ID | Any A | Assume ¬A and derive a contradiction: B and ¬B, or a denial of self-identity such as ¬c=c. |
| UD | ∀xA | Derive A(x) with x flagged (x must not appear free in any premise or undischarged assumption) |
| EI | Any A | From ∃xB, assume B(a/x) with fresh constant a flagged. Derive A. Flagged constant must not appear in A. |
Predicate Rules
| Rule | Cited | Description |
|---|---|---|
UI | 1 | ∀xFx ⊢ Ft — Universal Instantiation. Substitute a term for x without letting a variable in that term become captured by another quantifier. |
EI | 1 | Use 7 ei/a to instantiate existential line 7 with a fresh constant a inside your open SHOW. The witness cannot occur in that proof's conclusion or support an invalid universal generalization. You can also explicitly open show <goal> ei 7. |
EG | 1 | Ft ⊢ ∃xFx — Existential Generalization. Generalize a term to a variable. |
QN | 1 | Quantifier Negation: ¬∀xA ⟺ ∃x¬A; ¬∃xA ⟺ ∀x¬A; ∀xA ⟺ ¬∃x¬A; ∃xA ⟺ ¬∀x¬A. Each works in both directions. |
=I | 0 | t = t — Identity Introduction. Zero premises; conclude any term equals itself. |
=E | 2 | a=b, φ(a) ⊢ φ(b) — Leibniz's Law. Substitute equals for equals. Optional term arg to control which term is replaced; l/r to pick among results. |
Examples: 1 ui a instantiates a universal with a; 1 ei/a chooses a fresh witness; 1 eg a generalizes occurrences of a; 1 qn moves a negation across a quantifier; =i a gives a=a; 1 2 =e substitutes using an identity.
Modal logic
Worlds, frames, and proof systems
□A is true at a world when A holds at every accessible world; ◇A requires at least one accessible world where A holds. With no successors, a box is true and a diamond is false. An argument's local premises constrain the evaluation world. A countermodel keeps every premise true there and makes the conclusion false.
| System | Frame conditions |
|---|---|
| K | None |
| KD (D) | Serial: each world has a successor |
| T | Reflexive: each world sees itself |
| KB | Symmetric: every arrow has its reverse |
| KTB (B) | Reflexive and symmetric |
| K4 | Transitive: every two-step route has a direct arrow |
| S4 | Reflexive and transitive |
| K45 | Transitive and Euclidean |
| KD45 | Serial, transitive, and Euclidean |
| S5 | Equivalence relation |
Euclidean means: if w sees u and v, then u sees v. These systems do not form a single linear ladder. KB does not require self-loops; B does. Belief in KD45 can be mistaken, while knowledge in S5 is factive.
Quantified modality
∃x□Fx says one object has F at every accessible world; □∃xFx permits different witnesses at different worlds. The exercises state their domain policy. Quantifiers range over the local domain; names and free-variable assignments are rigid across worlds. Predicate extensions are supplied over the outer domain, so predication is meaningful even for an object absent from a world's local domain.
The Barcan formula ∀x□Fx → □∀xFx holds with constant or decreasing domains; its converse □∀xFx → ∀x□Fx holds with constant or increasing domains. Arbitrary varying domains validate neither in general.
Branch notation
KₐA: agent a knows A. E_G A: every agent in G knows A. D_G A: A follows from the group's pooled information, using the intersection of their alternatives. C_G A: A holds throughout all worlds reachable by any finite sequence of group alternatives, including the current world.
[!A]B: after a truthful public announcement of A, B holds in the model restricted to A-worlds. If A is false initially, this announcement conditional is vacuously true. Updating may change whether agents know A.
On an infinite trace, X A means next, F A eventually, G A always, and A U B means strong until: B must eventually occur and A must hold before it. CTL adds path quantifiers A (every path) and E (some path). The displayed finite trace repeats its marked loop forever.
O A: A holds in every ideal alternative; permission is ¬O¬A. These do not imply actual A. In STIT, an agent ensures A when every history in that agent's current choice cell satisfies A; deliberative STIT also requires that A is not already settled across all histories.
[α]A covers every terminating execution of program α; ⟨α⟩A needs one. Semicolon composes programs, ∪ offers a choice, ?A tests A, and α* permits any finite number of repetitions, including zero. μX.A is a least fixed point; νX.A is a greatest fixed point, with X occurring positively.
A □→ B checks B at all closest A-worlds, including all ties. Neighborhood □A asks whether the entire set of A-worlds belongs to the current world's supplied neighborhoods. These exercises state their conventions rather than silently using normal K rules.
In provability logic, □A expresses provability in a specified formal arithmetic theory. GL adds Löb's axiom □(□A → A) → □A. Finite GL frames are transitive and irreflexive; on infinite frames the relevant restriction also excludes infinite forward chains.
Modal Rules by System
Choose the system used by your proof. Its modal rules are listed below; the propositional and predicate rules are listed above. D is also called KD; B is also called KTB.
System K — Arbitrary frames — distribution and theorem-only necessitation
| Rule | Cited | Description |
|---|---|---|
Def◇ |
1 | Def◇: ◇A ⟺ ¬□¬A (bidirectional). |
DUAL |
1 | DUAL: all four modal duality equivalences. |
K |
1 | K (Distribution): from □(A→B), derive □A→□B. |
N |
1 | N (Necessitation): from A (proved without premises), derive □A. (cited must be premise-free SHOW) |
System KD — Serial frames — adds □A → ◇A; truth at the current world is not assumed
| Rule | Cited | Description |
|---|---|---|
Def◇ |
1 | Def◇: ◇A ⟺ ¬□¬A (bidirectional). |
DUAL |
1 | DUAL: all four modal duality equivalences. |
K |
1 | K (Distribution): from □(A→B), derive □A→□B. |
N |
1 | N (Necessitation): from A (proved without premises), derive □A. (cited must be premise-free SHOW) |
D |
1 | D: from □A, derive ◇A. |
System T — Reflexive frames — adds □A → A
| Rule | Cited | Description |
|---|---|---|
Def◇ |
1 | Def◇: ◇A ⟺ ¬□¬A (bidirectional). |
DUAL |
1 | DUAL: all four modal duality equivalences. |
K |
1 | K (Distribution): from □(A→B), derive □A→□B. |
N |
1 | N (Necessitation): from A (proved without premises), derive □A. (cited must be premise-free SHOW) |
T |
1 | T (Reflexivity): from □A, derive A. |
D |
1 | D: from □A, derive ◇A. |
System KB — Symmetric frames — adds A → □◇A, without assuming reflexivity
| Rule | Cited | Description |
|---|---|---|
Def◇ |
1 | Def◇: ◇A ⟺ ¬□¬A (bidirectional). |
DUAL |
1 | DUAL: all four modal duality equivalences. |
K |
1 | K (Distribution): from □(A→B), derive □A→□B. |
N |
1 | N (Necessitation): from A (proved without premises), derive □A. (cited must be premise-free SHOW) |
B |
1 | B (Brouwer): from A, derive □◇A. |
System B — Reflexive and symmetric frames — KTB; transitivity is not assumed
| Rule | Cited | Description |
|---|---|---|
Def◇ |
1 | Def◇: ◇A ⟺ ¬□¬A (bidirectional). |
DUAL |
1 | DUAL: all four modal duality equivalences. |
K |
1 | K (Distribution): from □(A→B), derive □A→□B. |
N |
1 | N (Necessitation): from A (proved without premises), derive □A. (cited must be premise-free SHOW) |
T |
1 | T (Reflexivity): from □A, derive A. |
D |
1 | D: from □A, derive ◇A. |
B |
1 | B (Brouwer): from A, derive □◇A. |
System K4 — Transitive frames — adds □A → □□A, without assuming reflexivity
| Rule | Cited | Description |
|---|---|---|
Def◇ |
1 | Def◇: ◇A ⟺ ¬□¬A (bidirectional). |
DUAL |
1 | DUAL: all four modal duality equivalences. |
K |
1 | K (Distribution): from □(A→B), derive □A→□B. |
N |
1 | N (Necessitation): from A (proved without premises), derive □A. (cited must be premise-free SHOW) |
S4 |
1 | 4 (Transitivity; legacy name S4): from □A, derive □□A. |
4 |
1 | 4 (Transitivity; legacy name S4): from □A, derive □□A. |
TRANS |
1 | 4 (Transitivity; legacy name S4): from □A, derive □□A. |
System S4 — Reflexive and transitive frames — T plus 4
| Rule | Cited | Description |
|---|---|---|
Def◇ |
1 | Def◇: ◇A ⟺ ¬□¬A (bidirectional). |
DUAL |
1 | DUAL: all four modal duality equivalences. |
K |
1 | K (Distribution): from □(A→B), derive □A→□B. |
N |
1 | N (Necessitation): from A (proved without premises), derive □A. (cited must be premise-free SHOW) |
T |
1 | T (Reflexivity): from □A, derive A. |
D |
1 | D: from □A, derive ◇A. |
S4 |
1 | 4 (Transitivity; legacy name S4): from □A, derive □□A. |
4 |
1 | 4 (Transitivity; legacy name S4): from □A, derive □□A. |
TRANS |
1 | 4 (Transitivity; legacy name S4): from □A, derive □□A. |
System K45 — Transitive and Euclidean frames — 4 and 5, without assuming seriality
| Rule | Cited | Description |
|---|---|---|
Def◇ |
1 | Def◇: ◇A ⟺ ¬□¬A (bidirectional). |
DUAL |
1 | DUAL: all four modal duality equivalences. |
K |
1 | K (Distribution): from □(A→B), derive □A→□B. |
N |
1 | N (Necessitation): from A (proved without premises), derive □A. (cited must be premise-free SHOW) |
S4 |
1 | 4 (Transitivity; legacy name S4): from □A, derive □□A. |
4 |
1 | 4 (Transitivity; legacy name S4): from □A, derive □□A. |
TRANS |
1 | 4 (Transitivity; legacy name S4): from □A, derive □□A. |
5 |
1 | 5 (Euclidean frames; command alias EUCL): from ◇A, derive □◇A. |
EUCL |
1 | 5 (Euclidean frames; command alias EUCL): from ◇A, derive □◇A. |
System KD45 — Serial, transitive and Euclidean frames — consistent introspective belief
| Rule | Cited | Description |
|---|---|---|
Def◇ |
1 | Def◇: ◇A ⟺ ¬□¬A (bidirectional). |
DUAL |
1 | DUAL: all four modal duality equivalences. |
K |
1 | K (Distribution): from □(A→B), derive □A→□B. |
N |
1 | N (Necessitation): from A (proved without premises), derive □A. (cited must be premise-free SHOW) |
D |
1 | D: from □A, derive ◇A. |
S4 |
1 | 4 (Transitivity; legacy name S4): from □A, derive □□A. |
4 |
1 | 4 (Transitivity; legacy name S4): from □A, derive □□A. |
TRANS |
1 | 4 (Transitivity; legacy name S4): from □A, derive □□A. |
5 |
1 | 5 (Euclidean frames; command alias EUCL): from ◇A, derive □◇A. |
EUCL |
1 | 5 (Euclidean frames; command alias EUCL): from ◇A, derive □◇A. |
System S5 — Equivalence frames — reflexivity, symmetry and transitivity; includes 5
| Rule | Cited | Description |
|---|---|---|
Def◇ |
1 | Def◇: ◇A ⟺ ¬□¬A (bidirectional). |
DUAL |
1 | DUAL: all four modal duality equivalences. |
K |
1 | K (Distribution): from □(A→B), derive □A→□B. |
N |
1 | N (Necessitation): from A (proved without premises), derive □A. (cited must be premise-free SHOW) |
T |
1 | T (Reflexivity): from □A, derive A. |
D |
1 | D: from □A, derive ◇A. |
S4 |
1 | 4 (Transitivity; legacy name S4): from □A, derive □□A. |
4 |
1 | 4 (Transitivity; legacy name S4): from □A, derive □□A. |
TRANS |
1 | 4 (Transitivity; legacy name S4): from □A, derive □□A. |
B |
1 | B (Brouwer): from A, derive □◇A. |
5 |
1 | 5 (Euclidean frames; command alias EUCL): from ◇A, derive □◇A. |
EUCL |
1 | 5 (Euclidean frames; command alias EUCL): from ◇A, derive □◇A. |
Nolt's Modal Rules
- DUAL: All four duality equivalences: □A ↔ ¬◊¬A, ◊A ↔ ¬□¬A, ¬□A ↔ ◊¬A, ¬◊A ↔ □¬A.
- K (Distribution): From □(A→B), derive □A→□B.
- N (Necessitation): From a completed SHOW line that used no premises or external lines, derive □A. The cited subderivation must be entirely self-contained.
- T (Reflexivity, T+): From □A, derive A.
- D (Seriality): From □A, derive ◊A. Available in KD and systems whose frame conditions imply seriality.
- 4 / S4 / TRANS (Transitivity): From □A, derive □□A.
- B (Symmetry): From A, derive □◊A. Available in KB, KTB, and S5.
- 5 / EUCL (Euclideanness): From ◊A, derive □◊A. Available in K45, KD45, and S5.
Keyboard Shortcuts
Press Alt + key while focused on any formula input:
| Key | Inserts | Symbol |
|---|---|---|
| Alt+A | & | ∧ Conjunction |
| Alt+O | v | ∨ Disjunction |
| Alt+C | -> | → Conditional |
| Alt+B | <-> | ↔ Biconditional |
| Alt+N | [] | □ Necessity |
| Alt+P | <> | ◊ Possibility |
| Alt+U | @ | ∀ Universal (predicate) |
| Alt+E | $ | ∃ Existential (predicate) |
| Alt+I | = | = Identity (predicate) |
Command Bar
Type commands directly to build derivations quickly:
| Command | Action |
|---|---|
show conc | Open a direct derivation of the conclusion. Add CD, ID, UD, or EI to choose a different strategy. |
show conc cd | Show the conclusion with CD strategy |
show P -> Q cd | Show a specific formula with CD |
show @xGx ud | Show a universal with UD strategy |
show $xGx ei 1 | Show with EI, citing line 1 as existential source |
ass cd | Immediately after a fresh SHOW, use CD for that goal and assume its antecedent. Keeps the existing SHOW line. |
ass id | Immediately after a fresh SHOW, use ID for that goal and assume its negation. Keeps the existing SHOW line. |
show cons | Inside the current CD proof of A → B, open a goal to prove B. Follow with ass id, or use show cons id, to prove B indirectly. show consequent also works. |
3 4 mp | Apply MP to lines 3 and 4 (auto-computes result) |
1 4 / 1 5 | Apply the modal transitivity / Euclidean rule to line 1 in a system permitting it. |
1 sl / 1 sr | Take the left / right conjunct of line 1. Equivalent to 1 s l / 1 s r. |
1 r / 1 rep | Repeat the formula on available line 1. Closed subproof lines and unproved SHOW lines cannot be cited. |
1 ui a | Apply UI to line 1 with term a |
=i a | Derive a = a (identity introduction, zero premises) |
1 2 =e | Apply identity elimination to lines 1 and 2 (auto-picks direction) |
1 2 =e a | Apply =E replacing only term a |
1 2 =e l / r | Pick left or right result when multiple substitutions exist |
co | Complete the current subderivation |
Rule names are case-insensitive. Aliases: defd for Def◊, dl for DUAL, nec for N, brouwer for B, demorgan for DM, eqi/idi for =I, eqe/ide for =E.
Multi-result rules (S, DM, NC, NB, DUAL, QN, =E) support l/r to pick the left or right result: 1 s l for left conjunct, 1 s r for right. Default is left.
Case does not matter: 1 SL and 1 sl do the same thing. In 1 s r, the final r selects the right conjunct; alone, 1 r repeats line 1.
1, 2 mp, 4 mp applies MP to lines 1 and 2, then uses that result with line 4 for another MP. Only the final result appears on the new line. Keep adding rules to continue the chain; commas are optional. A unary rule needs no new citation: 1 sl dn.
A semicolon starts a separate command: 1 2 mp; co writes a proof line, then closes the proof. A failed chain adds no line; a batch stops at its first failed command.
Formula Syntax
| Symbol | Input | Display |
|---|---|---|
| Negation | ~ | ¬ |
| Conjunction | & | ∧ |
| Disjunction | v | ∨ |
| Conditional | -> | → |
| Biconditional | <-> | ↔ |
| Necessity (Box) | [] | □ |
| Possibility (Diamond) | <> | ◊ |
| Universal Quantifier | @x | ∀x |
| Existential Quantifier | $x | ∃x |
| Identity | a = b | a = b |
Precedence (tightest first): unary operators ~ [] <> @ $, then &, v, ->, <->. Unary operators apply to what immediately follows them; parentheses extend their scope.
Use parentheses to show grouping: (P v Q) & R differs from P v (Q & R). Without those first parentheses, P v Q & R means the second formula.
Atoms: uppercase letters optionally followed by digits (P, Q, P1, Q2).
Predicate Logic Syntax
| Element | Convention | Example |
|---|---|---|
| Predicates | Single uppercase letter | F, G, H |
| Predicate application | Ordered arguments; commas are optional; each symbol has one fixed arity | Fx, Rxy, R(xy), R(x,y), T(x,y,z) |
| Function terms | One value for each input tuple; terms may nest | f(x), g(a,y), R(f(x),g(a,y)) |
| Constants | Lowercase a–t | a, b, c |
| Variables | Lowercase u–z | u, v, x, y, z |
| Universal | @x + scope | @x(Fx -> Gx) |
| Existential | $x + scope | $xFx |
| Identity | a = b | a = a, a = b -> Fa -> Fb |
Quantifiers bind like unary operators (same level as ~, □, ◊). @xFx & Gx parses as (∀xFx) ∧ Gx.
Use explicit arguments for a variable named v: R(v,x). In compact input, PvQ means disjunction. Separate premises with commas outside parentheses or with new lines.
Relations and quantifier dependencies
Relations tutorial · Dependent witnesses tutorial · Functions and identity tutorial
Argument order and scope
If R(x,y) means x trusts y, R(a,b) says a trusts b; R(b,a) says something different. Repeating a term, as in R(a,a), fills both places with the same object. A ternary relation such as S(x,y,z) keeps three roles separate.
Each variable occurrence belongs to its nearest matching quantifier. A sentence has no free variables. Renaming a bound variable preserves meaning only when the renaming avoids capture: ∀x R(x,y) can become ∀z R(z,y), but not ∀y R(y,y).
Quantifier order and restricted domains
∀x∃y R(x,y) permits a different y for each x. ∃y∀x R(x,y) requires one shared y. The latter entails the former in a nonempty domain; the converse fails when each of two objects relates only to itself. Consecutive universals can exchange order, as can consecutive existentials.
Use ∀x(Fx → …) for every F, and ∃x(Fx ∧ …) for some F. For a mixed domain of people and projects, ∀x(Px → ∃y(Cy ∧ R(x,y))) requires a coordinator for each project without claiming everything is a project.
Negation switches each quantifier: ¬∀x∃y R(x,y) is equivalent to ∃x∀y ¬R(x,y). To move quantifiers outward into prenex form, rename bound variables apart and never capture a free variable. Moving a quantifier across a conditional's antecedent can switch its kind; simply copying it outward is unsafe.
Relations, orders, and functions
Reflexive: ∀x R(x,x). Symmetric: ∀x∀y(R(x,y) → R(y,x)). Transitive: ∀x∀y∀z((R(x,y) ∧ R(y,z)) → R(x,z)). Together these define an equivalence relation. Antisymmetry instead says that R(x,y) and R(y,x) imply x=y; it does not prohibit loops.
A strict partial order is irreflexive and transitive. A linear order additionally compares every two distinct objects. Do not confuse a two-step chain with two arrows leaving the same object.
A function is total and single-valued. Injectivity says ∀x∀y(f(x)=f(y) → x=y); surjectivity says ∀y∃x f(x)=y. Neither condition comes for free. Names may denote the same object, and the domain can contain unnamed objects.
Identity, counting, and descriptions
Identity substitution works in any argument place, including inside nested functions. From a=b, infer f(a)=f(b); the converse requires injectivity. Replacing an occurrence must not capture a variable.
At most one F: ∀x∀y((Fx ∧ Fy) → x=y). Exactly one F: ∃x(Fx ∧ ∀y(Fy → y=x)). Exactly two Fs: ∃x∃y((Fx ∧ Fy) ∧ (¬x=y ∧ ∀z(Fz → (z=x ∨ z=y)))). Existence, distinctness, and exhaustion are separate requirements.
On the Russellian reading used here, “the F is G” asserts that exactly one F exists and it is G. Negating that entire assertion allows there to be no unique F; asserting that the unique F is not G still requires its existence.
Interpretations, countermodels, and proof
An interpretation supplies a nonempty domain, denotations for names, a set of ordered tuples for each relation, and a total table for each function. Evaluate an open formula relative to a variable assignment. Quantifiers vary their own variable while keeping the other assignments fixed.
A countermodel makes every premise true and the conclusion false. One countermodel disproves validity. Passing every test on a few small domains does not prove validity over all domains: some distinctions require larger or infinite interpretations.
For a universal conclusion, begin with an arbitrary variable using UD. For an existential premise, use a fresh witness inside an open proof; the witness must not escape in the conclusion or justify an unrestricted generalization. To establish a result used by a shortcut rule, prove it with the permitted underlying rules.