22 research outputs found
Initial Semantics for Strengthened Signatures
We give a new general definition of arity, yielding the companion notions of
signature and associated syntax. This setting is modular in the sense requested
by Ghani and Uustalu: merging two extensions of syntax corresponds to building
an amalgamated sum. These signatures are too general in the sense that we are
not able to prove the existence of an associated syntax in this general
context. So we have to select arities and signatures for which there exists the
desired initial monad. For this, we follow a track opened by Matthes and
Uustalu: we introduce a notion of strengthened arity and prove that the
corresponding signatures have initial semantics (i.e. associated syntax). Our
strengthened arities admit colimits, which allows the treatment of the
\lambda-calculus with explicit substitution.Comment: In Proceedings FICS 2012, arXiv:1202.317
Representations of first order function types as terminal coalgebras
Cosmic rays provide an important source for free electrons in Earth's atmosphere and also in dense interstellar regions where they produce a prevailing background ionization. We utilize a Monte Carlo cosmic ray transport model for particle energies of 10(6) eV <E <10(9) eV, and an analytic cosmic ray transport model for particle energies of 10(9) eV <E <10(12) eV in order to investigate the cosmic ray enhancement of free electrons in substellar atmospheres of free-floating objects. The cosmic ray calculations are applied to Drift-Phoenix model atmospheres of an example brown dwarf with effective temperature T-eff = 1500 K, and two example giant gas planets (T-eff = 1000 K, 1500 K). For the model brown dwarf atmosphere, the electron fraction is enhanced significantly by cosmic rays when the pressure p(gas) <10(-2) bar. Our example giant gas planet atmosphere suggests that the cosmic ray enhancement extends to 10(-4)-10(-2) bar, depending on the effective temperature. For the model atmosphere of the example giant gas planet considered here (T-eff = 1000 K), cosmic rays bring the degree of ionization to f(e) greater than or similar to 10(-8) when p(gas) <10(-8) bar, suggesting that this part of the atmosphere may behave as a weakly ionized plasma. Although cosmic rays enhance the degree of ionization by over three orders of magnitude in the upper atmosphere, the effect is not likely to be significant enough for sustained coupling of the magnetic field to the gas.Publisher PDFPeer reviewe
Higher Order Containers
Abstract. Containers are a semantic way to talk about strictly positive types. In previous work it was shown that containers are closed under various constructions including products, coproducts, initial algebras and terminal coalgebras. In the present paper we show that, surprisingly, the category of containers is cartesian closed, giving rise to a full cartesian closed subcategory of endofunctors. The result has interesting applications syntax. We also show that while the category of containers has finite limits, it is not locally cartesian closed.
Terminal semantics for codata types in intensional Martin-L\"of type theory
In this work, we study the notions of relative comonad and comodule over a
relative comonad, and use these notions to give a terminal coalgebra semantics
for the coinductive type families of streams and of infinite triangular
matrices, respectively, in intensional Martin-L\"of type theory. Our results
are mechanized in the proof assistant Coq.Comment: 14 pages, ancillary files contain formalized proof in the proof
assistant Coq; v2: 20 pages, title and abstract changed, give a terminal
semantics for streams as well as for matrices, Coq proof files updated
accordingl
New Equations for Neutral Terms: A Sound and Complete Decision Procedure, Formalized
The definitional equality of an intensional type theory is its test of type
compatibility. Today's systems rely on ordinary evaluation semantics to compare
expressions in types, frustrating users with type errors arising when
evaluation fails to identify two `obviously' equal terms. If only the machine
could decide a richer theory! We propose a way to decide theories which
supplement evaluation with `-rules', rearranging the neutral parts of
normal forms, and report a successful initial experiment.
We study a simple -calculus with primitive fold, map and append operations on
lists and develop in Agda a sound and complete decision procedure for an
equational theory enriched with monoid, functor and fusion laws
High-level signatures and initial semantics
We present a device for specifying and reasoning about syntax for datatypes,
programming languages, and logic calculi. More precisely, we study a notion of
signature for specifying syntactic constructions.
In the spirit of Initial Semantics, we define the syntax generated by a
signature to be the initial object---if it exists---in a suitable category of
models. In our framework, the existence of an associated syntax to a signature
is not automatically guaranteed. We identify, via the notion of presentation of
a signature, a large class of signatures that do generate a syntax.
Our (presentable) signatures subsume classical algebraic signatures (i.e.,
signatures for languages with variable binding, such as the pure lambda
calculus) and extend them to include several other significant examples of
syntactic constructions.
One key feature of our notions of signature, syntax, and presentation is that
they are highly compositional, in the sense that complex examples can be
obtained by assembling simpler ones. Moreover, through the Initial Semantics
approach, our framework provides, beyond the desired algebra of terms, a
well-behaved substitution and the induction and recursion principles associated
to the syntax.
This paper builds upon ideas from a previous attempt by Hirschowitz-Maggesi,
which, in turn, was directly inspired by some earlier work of
Ghani-Uustalu-Hamana and Matthes-Uustalu.
The main results presented in the paper are computer-checked within the
UniMath system.Comment: v2: extended version of the article as published in CSL 2018
(http://dx.doi.org/10.4230/LIPIcs.CSL.2018.4); list of changes given in
Section 1.5 of the paper; v3: small corrections throughout the paper, no
major change
A principled approach to programming with nested types in Haskell
Initial algebra semantics is one of the cornerstones of the theory of modern functional programming languages. For each inductive data type, it provides a Church encoding for that type, a build combinator which constructs data of that type, a fold combinator which encapsulates structured recursion over data of that type, and a fold/build rule which optimises modular programs by eliminating from them data constructed using the buildcombinator, and immediately consumed using the foldcombinator, for that type. It has long been thought that initial algebra semantics is not expressive enough to provide a similar foundation for programming with nested types in Haskell. Specifically, the standard folds derived from initial algebra semantics have been considered too weak to capture commonly occurring patterns of recursion over data of nested types in Haskell, and no build combinators or fold/build rules have until now been defined for nested types. This paper shows that standard folds are, in fact, sufficiently expressive for programming with nested types in Haskell. It also defines buildcombinators and fold/build fusion rules for nested types. It thus shows how initial algebra semantics provides a principled, expressive, and elegant foundation for programming with nested types in Haskell
Needle & knot : binder boilerplate tied up
To lighten the burden of programming language mechanization, many approaches have been developed that tackle the substantial boilerplate which arises from variable binders. Unfortunately, the existing approaches are limited in scope. They typically do not support complex binding forms (such as multi-binders) that arise in more advanced languages, or they do not tackle the boilerplate due to mentioning variables and binders in relations. As a consequence, the human mechanizer is still unnecessarily burdened with binder boilerplate and discouraged from taking on richer languages.
This paper presents Knot, a new approach that substantially extends the support for binder boilerplate. Knot is a highly expressive language for natural and concise specification of syntax with binders. Its meta-theory constructively guarantees the coverage of a considerable amount of binder boilerplate for well-formed specifications, including that for well-scoping of terms and context lookups. Knot also comes with a code generator, Needle, that specializes the generic boilerplate for convenient embedding in COQ and provides a tactic library for automatically discharging proof obligations that frequently come up in proofs of weakening and substitution lemmas of type-systems.
Our evaluation shows, that Needle & Knot significantly reduce the size of language mechanizations (by 40% in our case study). Moreover, as far as we know, Knot enables the most concise mechanization of the POPLmark Challenge (1a + 2a) and is two-thirds the size of the next smallest. Finally, Knot allows us to mechanize for instance dependentlytyped languages, which is notoriously challenging because of dependent contexts and mutually-recursive sorts with variables