Inmathematical logic, awitness is a specific valuet to be substituted for variablex of anexistential statement of the form∃xφ(x) such thatφ(t) is true.
For example, a theoryT of arithmetic is said to be inconsistent if there exists a proof inT of the formula "0 = 1". The formula I(T), which says thatT is inconsistent, is thus an existential formula. A witness for the inconsistency ofT is a particular proof of "0 = 1" inT.
Boolos, Burgess, and Jeffrey (2002:81) define the notion of a witness with the example, in whichS is ann-place relation on natural numbers,R is an(n+1)-placerecursive relation, and ↔ indicateslogical equivalence (if and only if):
In this particular example, the authors defineds to be(positively) recursively semidecidable, or simplysemirecursive.
Inpredicate calculus, aHenkin witness for a sentence in a theoryT is atermc such thatT provesφ(c) (Hinman 2005:196). The use of such witnesses is a key technique in the proof ofGödel's completeness theorem presented byLeon Henkin in 1949.
The notion of witness leads to the more general idea ofgame semantics. In the case of sentence the winning strategy for the verifier is to pick a witness for. For more complex formulas involvinguniversal quantifiers, the existence of a winning strategy for the verifier depends on the existence of appropriateSkolem functions. For example, ifS denotes then anequisatisfiable statement forS is. The Skolem functionf (if it exists) actually codifies a winning strategy for the verifier ofS by returning a witness for the existential sub-formula for every choice ofx the falsifier might make.