Appendix C

Tools

Johannes Korbmacher about 1 min read

Here are the book’s apps in one place. Use them to try your own examples or check your work. The links take you back to the chapters for the explanations.

Formal languages

Parsing with full brackets

Start with the grammar from the parsing section . Click through the steps to see how the formula breaks down into its parts, or use the pencil to enter a formula of your own.

Use p₁, p₂, … or the shorthand p, q, r as variables. LaTeX commands turn into symbols as you type. LaTeX cheat sheet

Full brackets: each binary formula has its own pair of brackets.

The interactive tree is loading. The explanation in the chapter can also be followed without it.

Enable JavaScript to step through the tree. The grammar and worked example remain available in the chapter.

Parsing with bracket conventions

This version uses the conventions for omitting brackets . Try the same expression in both apps. Which brackets can you leave out here? The exercise on omitted brackets practices translating between the two notations. The guided grammar exercise then develops a parser for conventional notation.

Use p₁, p₂, … or the shorthand p, q, r as variables. LaTeX commands turn into symbols as you type. LaTeX cheat sheet

Conventional notation: ¬, ∧, ∨, →, ↔ in decreasing priority; ∧ and ∨ group left, → groups right. Bracket repeated ↔ explicitly.

The interactive tree is loading. The explanation in the chapter can also be followed without it.

Enable JavaScript to step through the tree. The grammar and worked example remain available in the chapter.

Shunting yard

Convert infix formulas to postfix notation, watching the operator stack and output at each step. The shunting-yard exercises explain the rules and provide worked examples.

Use p, q, and r. LaTeX cheat sheet

Unread input
Stack (top at right)
Output

Sets and valid inference

Explore set membership , then use intersections to test deductive consequence . The buttons highlight regions and explain the same finite sets.

Where two sets meetS contains Mr. Sir and Little Jimmy. T contains Little Jimmy, a beer and a soda. Little Jimmy belongs to both sets. Soda ST

Two collections in one space

Follow each outline to see which objects it contains. An object can belong to both sets.

The members of S

gimmick_mr_sir and gimmick_little_jimmy belong to S. Membership in T does not prevent gimmick_little_jimmy from belonging to S too.

The members of T

gimmick_little_jimmy , the gimmick_beer and the gimmick_sodaSoda belong to T. The same gimmick_little_jimmy appears in both sets, but only once in the picture.

What they have in common

S ∩ T

Keep only the objects inside both outlines. gimmick_little_jimmy is the common member. The hatched overlap is S ∩ T.

One exception is enough

S ⊈ T

gimmick_mr_sir belongs to S but not T. This witness shows that S is not a subset of T.

Read the diagram as text

S contains Mr. Sir and Little Jimmy. T contains Little Jimmy, a beer and a soda. Little Jimmy belongs to both sets.

  • S = { Mr. Sir, Little Jimmy }
  • T = { Little Jimmy, beer, soda }
Joint premises: a countermodelM₂ satisfies both premises but not C. [C][P][Q] M₁ M₂ M₃ M₄ M₅ M₆ M₇ M₈

Possible reasoning situations

Each little world is one model. The outlines collect the models where each formula is true.

Where P is true

[P]

Highlight the models of this premise. A model satisfying this premise alone need not satisfy the other premise.

Where Q is true

[Q]

Highlight the models of this premise. A model satisfying this premise alone need not satisfy the other premise.

All premises true together

[P] ∩ [Q]

Keep only the worlds in both premise regions. A world outside this intersection cannot be a countermodel to the inference.

Where C is true

[C]

The green outline contains the models in which the conclusion is true. Compare it with the premise region.

A world that defeats the inference

P, Q ⊭ C

M₂ satisfies both premises but not C. One such world is enough to make the inference invalid.

Read the diagram as text

M₂ satisfies both premises but not C.

  • [C] = { M₁, M₃, M₆ }
  • [P] = { M₁, M₂, M₃ }
  • [Q] = { M₁, M₂, M₄ }