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
Logical Definition Hat (≔)
╭ def

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

2D Block Canvas

✓ Valid Modus Ponens (Line 2 applied to Line 1)
╭ def
P
PP
Drag canvas to pan · ⌘/Ctrl+Scroll zoom · 0 Fit · U Unfold · F Fold · D Duplicate · ⌫ Delete · ↑↓←→ Navigate
🗑 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 : D → D → Prop)
variable (x y : D)

-- Proof (Statements + Modus Ponens ⇒)
theorem modus_ponens_step :
    let sub (x y : D) : Prop := (∀ z : D, ((mem z x) → (mem z y)))
    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 : D -> D -> Prop.
  Variable x y : D.

  (* Shortcuts (≔) *)
  Definition sub (x y : D) : Prop :=
    (forall z : D, ((mem z x) -> (mem z y))).
  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-27 04:37 UTC