Playground Documentation Challenges Full Docs

rule("define")

Declaring unique existence: definitions of operations

Overview

define has two forms. An explicit definition define(f := {a: T | e}) needs no rule: the new atom is just a name for a term. A definition from a theorem define(f | T) introduces an operation whose value is described by a property, and this is allowed only for the quantifier «there exists a unique» declared by rule("define").

rule("define", quantifierExpression1, quantifierExpression2, …; truthExpression)
quantifierExpression1, …
The quantifier of unique existence ∃!: an atom of type [[T -> V] -> V], possibly polymorphic.
truthExpression
The value v of a true statement. Then define(c | T) with T: ∃!{x | φ(x)} -> v introduces c with φ(c).

Basic examples

An operation from unique existence

▶ Run

In the library the rule stands in logic/uniqueness.fl next to the general ∃!, so the set theory (∪, ∩, {}, 𝒫, A × B) and the reals (sup) define their operations the same way.

⚠
rule("define", …) is a statement of the theory: declaring it for ∃ (plain existence) would allow choosing a value that does not exist uniquely, and the theory could become inconsistent.

What the rule states

If for all ā under conditions H(ā) a theorem gives ∃!{c | φ(ā, c)} -> v, then a new operation f may be added with the theorem φ(ā, f(ā)) -> v under the same conditions. This is the theorem on functional extensions (Shoenfield, Mathematical Logic, § 4.6) and func … means … existence uniqueness in Mizar: the extension is conservative, so the rule is safe exactly when the declared atom really means unique existence.