nLab numeral

Redirected from "numerals".
Numerals

Context

Type theory

natural deduction metalanguage, practical foundations

  1. type formation rule
  2. term introduction rule
  3. term elimination rule
  4. computation rule

type theory (dependent, intensional, observational type theory, homotopy type theory)

syntax object language

computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory

logicset theory (internal logic of)category theorytype theory
propositionsetobjecttype
predicatefamily of setsdisplay morphismdependent type
proofelementgeneralized elementterm/program
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
introduction rule for implicationcounit for hom-tensor adjunctionlambda
elimination rule for implicationunit for hom-tensor adjunctionapplication
cut elimination for implicationone of the zigzag identities for hom-tensor adjunctionbeta reduction
identity elimination for implicationthe other zigzag identity for hom-tensor adjunctioneta conversion
truesingletonterminal object/(-2)-truncated objecth-level 0-type/unit type
falseempty setinitial objectempty type
proposition, truth valuesubsingletonsubterminal object/(-1)-truncated objecth-proposition, mere proposition
logical conjunctioncartesian productproductproduct type
disjunctiondisjoint union (support of)coproduct ((-1)-truncation of)sum type (bracket type of)
implicationfunction set (into subsingleton)internal hom (into subterminal object)function type (into h-proposition)
negationfunction set into empty setinternal hom into initial objectfunction type into empty type
universal quantificationindexed cartesian product (of family of subsingletons)dependent product (of family of subterminal objects)dependent product type (of family of h-propositions)
existential quantificationindexed disjoint union (support of)dependent sum ((-1)-truncation of)dependent sum type (bracket type of)
logical equivalencebijection setobject of isomorphismsequivalence type
support setsupport object/(-1)-truncationpropositional truncation/bracket type
n-image of morphism into terminal object/n-truncationn-truncation modality
equalitydiagonal function/diagonal subset/diagonal relationpath space objectidentity type/path type
completely presented setsetdiscrete object/0-truncated objecth-level 2-type/set/h-set
setset with equivalence relationinternal 0-groupoidBishop set/setoid with its pseudo-equivalence relation an actual equivalence relation
equivalence class/quotient setquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
presettype without identity types
set of truth valuessubobject classifiertype of propositions
domain of discourseuniverseobject classifiertype universe
modalityclosure operator, (idempotent) monadmodal type theory, monad (in computer science)
linear logic(symmetric, closed) monoidal categorylinear type theory/quantum computation
proof netstring diagramquantum circuit
(absence of) contraction rule(absence of) diagonalno-cloning theorem
synthetic mathematicsdomain specific embedded programming language

homotopy levels

semantics

Arithmetic

Numerals

Definition

In informal mathematical speech and writing, a numeral refers to any notation or terms (for instance strings of digits) which denote a natural number. In computer science one may say that a numeral is syntax whose denotational semantics is a number [Scott & Strachey (1971, §0)].

Usually, in mathematics, this refers to base ten place-value notation, so that for instance 00, 22, 1313, and 890890 are numerals.

In type theory, a numeral generally means (e.g. Martin-Löf (1973)) a term whose type is the natural numbers type and which is of canonical form. The meaning of “canonical form” may vary with the formal theory, but with the usual presentation of the natural numbers as an inductive type generated by zero 00 and the successor operation ss, the numerals are the terms of the form

s(s(s(s(0)))). s(s(\cdots s(s(0))\cdots )).

Often, the numeral representing the natural number nn — which is to say, the term with ss applied nn times to 00 — is denoted by n̲\underline{n}. Thus, for instance, 2̲\underline{2} means s(s(0))s(s(0)). It is important to note that 2̲\underline{2} is not (usually) a term inside the formal system being considered; it is a “meta-notation” which stands for the term s(s(0))s(s(0)). (One might say that the underline converts informal numerals to formal ones.) In particular, any statement which quantifies over a natural number nn that occurs in a term n̲\underline{n} can only be expressed in the metatheory?.

Canonicity

Not every term of natural number type \mathbb{N} is a numeral; consider for instance 2̲+2̲\underline{2}+\underline{2}. However, good formal systems have the property of canonicity, which in this context means that every term of type \mathbb{N} computes to, or is provably equal to, a numeral. In our example, if ++ is defined by recursion, there is a sequence of beta-reduction steps leading from 2̲+2̲\underline{2}+\underline{2} to 4̲\underline{4}. (Canonicity is about terms in the empty context; in a context with free variables of type \mathbb{N}, then of course there will be more terms of type \mathbb{N}, built out of these variables.)

If we add to such a formal system an axiom using an existential statement, then this is equivalent to adding to the language an additional term for a natural number that is not (and may not provably be equal to) any canonical numeral. For example, in PA+¬Con(PA)PA + \neg{Con(PA)} (Peano arithmetic plus the axiom that Peano arithmetic is inconsistent?), we have the axiom

n,(n PA), \exists n, (n \vdash_{PA} \bot) ,

stating the existence of a number nn that is the Gödel number of a proof in PAPA of a falsehood. If we instead extend the language of PAPA with a new symbol ※ and add the axiom

PA, ※ \vdash_{PA} \bot ,

then (assuming that PAPA and so PA+¬Con(PA)PA + \neg{Con(PA)} is in fact consistent) one can prove

n̲ \underline{n} \neq ※

in this system for every natural number nn, but one cannot prove

n,n \forall n,\, n \neq ※

(which is actually trivially refutable).

References

Discussion in motivation of denotational semantics and domain theory:

Discussion in type theory:

  • Per Martin-Löf, §1.7 in: An intuitionistic theory of types: predicative part, in: H. E. Rose, J. C. Shepherdson (eds.), Logic Colloquium ‘73, Proceedings of the Logic Colloquium, Studies in Logic and the Foundations of Mathematics 80, Elsevier (1975) 73-118 [doi:10.1016/S0049-237X(08)71945-1, CiteSeer]

where it says:

A closed normal term with type symbol NN, which obviously must have the form s(s(...s(0)...))s(s(...s(0)...)), is called a numeral.

Last revised on December 29, 2022 at 19:23:48. See the history of this page for a list of all contributions to it.