Abstract

A witness is an element that satisfies an existential claim. In constructive mathematics and type theory, providing a witness is essential to proving existence.

Definition

Given a predicate , a witness for the statement is an element such that holds.

More formally, a witness is the first component of a proof of an existential statement. In the BHK Interpretation, a proof of is a pair where:

  • is the witness
  • is a proof that holds

Constructive vs Classical

In Classical Logic

In classical logic, one can prove without exhibiting a specific witness. For example, using the Law of the Excluded Middle, one might prove existence by contradiction without constructing the element.

In Constructive Mathematics

In constructive mathematics, every existence proof must provide an explicit witness. This requirement ensures that proofs have computational content.

A famous example is the statement “there exist irrational numbers such that is rational.” The classical proof considers and uses excluded middle, avoiding the need to determine which case holds. A constructive proof must exhibit specific values.

Type-Theoretic Perspective

In type theory, witnesses appear naturally in dependent sum types.

Dependent Sums

An element of is a pair where:

  • is the witness
  • is the proof

The first projection extracts the witness.

Propositional Truncation

In Homotopy Type Theory, propositional truncation asserts existence without providing computational access to the witness. This recovers the classical notion of existence while maintaining proof irrelevance.

The elimination principle for truncated types requires that the target type is a proposition, preventing extraction of the witness.

Examples

Mathematical Witnesses

  • For , any natural number is a witness
  • For , both and are witnesses
  • For , the number is a witness

Uniqueness

When a witness is unique, we write . In type theory, this is expressed as:

The witness is unique up to equality.