wellordered.xyz

First Order Logic · Free Form Practice

Drag blocks from the toolbox onto the 2D Canvas (or click a toolbox block to spawn it), snap blocks together with magnetic sockets, or pull any nested block out of its socket. Snap a Modus Ponens block into a statement line to use the formula it concludes.

Block Toolbox (Drag or Click to Spawn)Hover any block on the canvas to see the exact piece you will grab. Drag back here or to the Trash to delete.

1. Connectives

Rounded formula pills. Drag to canvas or snap into any formula socket.

2. Quantifiers

Snaps into any formula socket, or into the left side of Membership (∀x ∈ y) or Relation (∀x R y).

x
y

3. Membership & Elements

Bridges square element sockets into a rounded formula pill.

Element of
Subset
Elements
xyzAB

4. Shortcuts

Snap Predicate, Relation, or Subset/Membership into the left side of ≔ or into any formula socket.

Predicate
P
Relation
R
Definition

5. Proof

Drag Statements or Modus Ponens onto the canvas. Snap Modus Ponens or an Element into a statement line to chain steps or instantiate ∀.

Statements
Modus Ponens
Layer 2: Set Theory (ZFC)

6. Set Relations & Definitions

Set equality (x = y) and ZFC definitions lower directly into Layer 1 formulas and Definition (≔) blocks. Click Unfold on any Layer 2 block on the canvas to expand it into raw Layer 1 blocks.

Set Equality
Subset Definition
x ⊆ y ≔ (∀z (z ∈ y)) ∈ x
Set Equality Shortcut
x R y ≔ (x ⊆ y ∧ y ⊆ x)
Empty Set Predicate
P(x) ≔ ∀z ¬(z ∈ x)

7. ZFC Axioms

Closed ZFC axioms. Snap into any statement line (1., 2., …) or click Unfold on the canvas to burst into Layer 1 quantifiers, connectives, and membership blocks.

Extensionality
ExtExtensionality
Empty Set
∅Empty Set
Pairing
{x, y}Pairing
Union
⋃AUnion
Power Set
𝒫(A)Power Set
Regularity
RegRegularity
Infinity
∞Infinity
Choice
ACChoice

8. ZFC Axiom Schemas

Formula-parameterized schemas (Separation and Replacement). Snap any Layer 1 formula φ into the inner rounded socket to define a new ZFC set specification.

Separation Schema
{z ∈ A : φ}
Replacement Schema
Rep(A, ψ)

2D Block Canvas

✓ Valid Modus Ponens (Line 2 applied to Line 1)
Pxxx
PxPxxy
xy
Hover any block to see its grab outline · Drag outer block to move stack · Drag inner block to unplug · Drag to toolbox/trash to delete.
🗑 Trash

Rigorous Kernel Code (Lean 4 & Rocq)

Lean 4 (Zero-Tactic Kernel Term)
-- First-Order Logic Block System (Lean 4 Kernel Representation)
section FirstOrderLogic

variable (D : Type)
variable (mem sub : D → D → Prop)
variable (x y : D)

-- Proof (Statements + Modus Ponens ⇒)
theorem modus_ponens_step :
    let P (x : D) : Prop := (sub x x)
    (P x) →
    ((P x) → (mem x y)) →
    (mem x y) :=
  fun h1 h2 => h2 h1

end FirstOrderLogic
Rocq 9.2 (Zero-Tactic Kernel Term)
(* First-Order Logic Block System (Rocq Kernel Representation) *)
Section FirstOrderLogic.

  Variable D : Type.
  Variable mem sub : D -> D -> Prop.
  Variable x y : D.

  (* Shortcuts (≔) *)
  Definition P (x : D) : Prop :=
    (sub x x).

  (* Proof (Statements + Modus Ponens ⇒) *)
  Theorem modus_ponens_step
      (h1 : (P x))
      (h2 : ((P x) -> (mem x y)))
      : (mem x y).
  Proof. exact (h2 h1). Qed.

End FirstOrderLogic.
2026-11-20 00:48 UTC