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.
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).
3. Membership & Elements
Bridges square element sockets into a rounded formula pill.
4. Shortcuts
Snap Predicate, Relation, or Subset/Membership into the left side of ≔ or into any formula socket.
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 ∀.
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.
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.
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.
2D Block Canvas
✓ Valid Modus Ponens (Line 2 applied to Line 1)Rigorous Kernel Code (Lean 4 & Rocq)
-- 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(* 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.