nLab definition

Redirected from "single assignment operators".
Contents

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

There are good reasons why the theorems should all be easy and the definitions hard. [Michael Spivak, preface to “Calculus on Manifolds”]

Contents

Idea

In type theory a definition is the construction of a type or a term of a certain type. By “construction”, we mean that the type has a formation rule and the term has an introduction rule. Then, there are in general two ways to complete the construction:

Many types in type theory, such as function types, product types, coproduct types, booleans type, natural numbers type, integers, et cetera, are defined in both ways, by universal properties and by equality with another type.

Rules for definitions and single assignment operators

One way that definitions of types and of terms could be formalized inside the type theory is by the use of equality with another term or type. More specifically, every definition of a symbol AA comes with a formation rule for the symbol which states that it is a type or an introduction rule for the symbol which states that it is a term of a type, and a definition rule that the term or type AA is equal to some existing term or type BB. The equality used in the definition rule is called definitional equality.

As documented in the article on equality, there are three notions of equality used in type theory: judgmental equality, propositional equality, and typal equality. All three notions of equality could be used in the definition rule. In Martin-Löf type theory and cubical type theory, symbols and abbreviations are defined using judgmental equality. In ZFC and ETCS, they are defined using propositional equality, and in objective type theories, they are defined using typal equality.

For example, suppose that the type BB is already derived in some context Γ\Gamma. Then, in order to define the symbol AA to be the type BB there are the following formation and definition rules for AA:

  • Formation and judgmental definition rules for AA:
ΓctxΓAtypeΓctxΓA=Btype\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash A \; \mathrm{type}} \qquad \frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash A = B \; \mathrm{type}}
  • Formation and propositional definition rules for AA:
ΓctxΓAtypeΓctxΓA=Btrue\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash A \; \mathrm{type}} \qquad \frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash A = B\; \mathrm{true}}
  • Formation and typal definition rules for AA:
ΓctxΓAtypeΓctxΓδ A:AB\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash A \; \mathrm{type}} \qquad \frac{\Gamma \: \mathrm{ctx}}{\Gamma \vdash \delta_A:A \simeq B}

Similarly, suppose that the term b:Ab:A is already derived in some context Γ\Gamma. Then, in order to define the symbol aa to be the term b:Ab:A there are the following introduction and definition rules for aa:

  • Introduction and judgmental definition rules for aa:
ΓAtypeΓa:AΓAtypeΓa=b:A\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash a:A} \qquad \frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash a = b:A}
  • Introduction and propositional definition rules for aa:
ΓAtypeΓa:AΓAtypeΓa= Abtrue\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash a:A} \qquad \frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash a =_A b \; \mathrm{true}}
  • Introduction and typal definition rules for aa:
ΓAtypeΓa:AΓAtypeΓδ a:a= Ab\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash a:A} \qquad \frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \delta_a:a =_A b}

However, including separate rules for each new term or type is very cumbersome and would lead to an explosion of rules in the type theory. To handle that, one usually introduces the single assignment operator, initialization operator, initialisation operator, or definition operator \coloneqq to the type theory, which is formally defined as a pair of judgments

  • BAtypeB \coloneqq A \; \mathrm{type}, where we judge BB to be defined as the type AA, or assigned the type AA
  • ba:Ab \coloneqq a:A, where we judge bb to be defined as the term a:Aa:A, or assigned the term a:Aa:A

in addition to the judgments for types, terms, and judgmental equality. BAtypeB \coloneqq A \; \mathrm{type} is called type definition, type initialization, type initialisation or type single assignment, while ba:Ab \coloneqq a:A is called term definition, term initialization, term initialisation, or term single assignment. Judgmental single assignment is different from judgmental equality as judgmental equality is an equivalence relation, while judgmental single assignment is not an equivalence relation, but instead has a reflection rule into equality.

Depending upon what notion of equality is used for definitional equality, the single assignment operator has the following formation and equality reflection rules for type definitions

  • Formation and judgmental equality reflection rules for type definition:

    ΓBAtypeΓBtypeΓBAtypeΓBAtype\frac{\Gamma \vdash B \coloneqq A \; \mathrm{type}}{\Gamma \vdash B \; \mathrm{type}} \qquad \frac{\Gamma \vdash B \coloneqq A \; \mathrm{type}}{\Gamma \vdash B \equiv A\; \mathrm{type}}
  • Formation and propositional equality reflection rules for type definition:

    ΓBAtypeΓBtypeΓBAtypeΓBAtrue\frac{\Gamma \vdash B \coloneqq A \; \mathrm{type}}{\Gamma \vdash B \; \mathrm{type}} \qquad \frac{\Gamma \vdash B \coloneqq A \; \mathrm{type}}{\Gamma \vdash B \equiv A\; \mathrm{true}}
  • Formation and typal equality reflection rules for type definition:

    ΓBAtypeΓBtypeΓBAtypeΓP:BA\frac{\Gamma \vdash B \coloneqq A \; \mathrm{type}}{\Gamma \vdash B \; \mathrm{type}} \qquad \frac{\Gamma \vdash B \coloneqq A \; \mathrm{type}}{\Gamma \vdash P:B \simeq A}

There are also the following introduction and equality reflection rules for term definitions:

  • Introduction and judgmental equality reflection rules for term definition:

    Γba:AΓb:AΓba:AΓba:A\frac{\Gamma \vdash b \coloneqq a:A}{\Gamma \vdash b:A} \qquad \frac{\Gamma \vdash b \coloneqq a:A}{\Gamma \vdash b \equiv a:A}
  • Introduction and propositional equality reflection rules for term definition:

    Γba:AΓb:AΓba:AΓb Aatrue\frac{\Gamma \vdash b \coloneqq a:A}{\Gamma \vdash b:A} \qquad \frac{\Gamma \vdash b \coloneqq a:A}{\Gamma \vdash b \equiv_A a \; \mathrm{true}}
  • Introduction and typal equality reflection rules for term definition:

    Γba:AΓb:AΓba:AΓp:b= Aa\frac{\Gamma \vdash b \coloneqq a:A}{\Gamma \vdash b:A} \qquad \frac{\Gamma \vdash b \coloneqq a:A}{\Gamma \vdash p:b =_A a}

Copy definitions

Another way of typally defining a type AA to be a type BB is via copying. Copying becomes important for typally defining the type of equivalences, as the usual way of typally defining types involves the type of equivalences and thus isn’t available. One add rules saying that from the assignment judgment BAtypeB \coloneqq A \; \mathrm{type} one can derive that BB satisfies the universal property of a copy of AA.

mathematical statements

References

The single assignment operator is defined (not by name) in Remark 2.2.1 in:

See also:

Last revised on March 5, 2023 at 13:31:10. See the history of this page for a list of all contributions to it.