Playground Documentation Challenges Full Docs

Statements

The fundamental unit of proof

Overview

A statement in Formall has the form expression -> expression. It asserts that within the current context, the left expression can be replaced by the right expression.

leftExpression -> rightExpression
leftExpression
What may be replaced.
rightExpression
What replaces it: wherever leftExpression occurs, it can be rewritten to rightExpression. A truth is a statement with a true value on the right: P -> ✔.

Basic examples

With if

Introduce statements as assumptions:

if statements

▶ Run

With prove

Derive statements by substitution:

prove statements

Note: outer angle brackets around f are NOT needed since f itself is not being substituted.

▶ Run

Statement Semantics

A statement A -> B means: in the current proof context, A can be replaced with B. This is not logical implication — it's closer to "evaluates to" or "equals". To express logical implication, use a function:

Equality vs Implication

▶ Run

Statement Sources

Statements can come from: if (assumptions), proofs <…> (derived by rewriting), calls T[…] (theorems and quantified facts applied to values; taking their blocks — lifted to universals, flipped assumptions), and axiom (conditional axioms).

Statement Visibility

Statements are visible inside the scope where they were created. When that scope closes, they are no longer accessible:

Statement scope

▶ Run

Chained Substitutions

With nested angle brackets, prove chains substitutions:

Chains

▶ Run
ℹ
Formall statements are one-directional. A -> B does not imply B -> A. To express bidirectional equality, you typically prove both directions separately.