natural deduction metalanguage, practical foundations
type theory (dependent, intensional, observational type theory, homotopy type theory)
computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory
In computer science and to some extent also in formal logic, sugaring refers to the modification of formal notation (syntax) into a form which is more readable for humans, thereby “sweetening” it for consumption. Syntactic sugar does not add to the functionality or expressivity of the language.
Peter Landin first used the expression ‘syntactic sugaring’ in the context of interpretations of terms in the λ-calculus (Landin64).
The reverse process to expressions in the more formal language is sometimes known as ‘desugaring’.
In a set theory where classes are not “first-class objects” (for example ZFC, but not NBG), classes are only syntactic sugar and have no independent existence. For instance, if one defines a class $M \coloneqq \{ X | \varphi(X) \}$ by comprehension, then “$X \in M$” is syntactic sugar for “$\varphi(X)$”.
In formal linguistics, natural language versions of formal expressions are described as ‘sugarings’ (Ranta 1994). Often there are many ways to sugar a formal expression into natural language.
Consider the type theoretic expression $\sum_{x: man} \sum_{y: donkey} (x\;owns\; y)$. Ranta (1994, p. 68) gives nine natural language sugarings for it by applying three different operations twice:
Peter Landin, The mechanical evaluation of expressions, (pdf)
Aarne Ranta, Type-theoretical grammar, Oxford University Press (1994)
Aarne Ranta, Type theory and the informal language of mathematics, TYPES ‘93: Proceedings of the international workshop on Types for proofs and programs, pp. 352–365, (pdf)
See also:
Last revised on November 19, 2022 at 19:16:00. See the history of this page for a list of all contributions to it.