82,491 research outputs found
Bananas in space: extending fold and unfold to exponential types
Fold and unfold are general purpose functionals for process-ing and constructing lists. By using the categorical approach of modelling recursive datatypes as fixed points of functors, these functionals and their algebraic properties were generalised from lists to polynomial (sum-of-product) datatypes. However, the restriction to polynomial datatypes is a serious limitation: it precludes the use of exponentials (function-spaces), whereas it is central to functional programming that functions are first-class values, and so exponentials should be able to be used freely in datatype definitions. In this paper we explain how Freyd’s work on modelling recursive datatypes as fixed points of difunctors shows how to generalise fold and unfold from polynomial datatypes to those involving exponentials. Knowledge of category theory is not required; we use Gofer throughout as our meta-language, making extensive use of constructor classe
Recursive Definitions of Monadic Functions
Using standard domain-theoretic fixed-points, we present an approach for
defining recursive functions that are formulated in monadic style. The method
works both in the simple option monad and the state-exception monad of
Isabelle/HOL's imperative programming extension, which results in a convenient
definition principle for imperative programs, which were previously hard to
define.
For such monadic functions, the recursion equation can always be derived
without preconditions, even if the function is partial. The construction is
easy to automate, and convenient induction principles can be derived
automatically.Comment: In Proceedings PAR 2010, arXiv:1012.455
The Rooster and the Syntactic Bracket
We propose an extension of pure type systems with an algebraic presentation
of inductive and co-inductive type families with proper indices. This type
theory supports coercions toward from smaller sorts to bigger sorts via
explicit type construction, as well as impredicative sorts. Type families in
impredicative sorts are constructed with a bracketing operation. The necessary
restrictions of pattern-matching from impredicative sorts to types are confined
to the bracketing construct. This type theory gives an alternative presentation
to the calculus of inductive constructions on which the Coq proof assistant is
an implementation.Comment: To appear in the proceedings of the 19th International Conference on
Types for Proofs and Program
Type-Based Termination, Inflationary Fixed-Points, and Mixed Inductive-Coinductive Types
Type systems certify program properties in a compositional way. From a bigger
program one can abstract out a part and certify the properties of the resulting
abstract program by just using the type of the part that was abstracted away.
Termination and productivity are non-trivial yet desired program properties,
and several type systems have been put forward that guarantee termination,
compositionally. These type systems are intimately connected to the definition
of least and greatest fixed-points by ordinal iteration. While most type
systems use conventional iteration, we consider inflationary iteration in this
article. We demonstrate how this leads to a more principled type system, with
recursion based on well-founded induction. The type system has a prototypical
implementation, MiniAgda, and we show in particular how it certifies
productivity of corecursive and mixed recursive-corecursive functions.Comment: In Proceedings FICS 2012, arXiv:1202.317
First steps in synthetic guarded domain theory: step-indexing in the topos of trees
We present the topos S of trees as a model of guarded recursion. We study the
internal dependently-typed higher-order logic of S and show that S models two
modal operators, on predicates and types, which serve as guards in recursive
definitions of terms, predicates, and types. In particular, we show how to
solve recursive type equations involving dependent types. We propose that the
internal logic of S provides the right setting for the synthetic construction
of abstract versions of step-indexed models of programming languages and
program logics. As an example, we show how to construct a model of a
programming language with higher-order store and recursive types entirely
inside the internal logic of S. Moreover, we give an axiomatic categorical
treatment of models of synthetic guarded domain theory and prove that, for any
complete Heyting algebra A with a well-founded basis, the topos of sheaves over
A forms a model of synthetic guarded domain theory, generalizing the results
for S
Infinitary Tableau for Semantic Truth
Acknowledgements I would like to thank Philip Welch for his assistance and acknowledge the late Greg Hjorth for the time he spent in helping me learn how to use the tools used in the paper. I would also like to thank Hannes Leitgeb for giving me the opportunity to present this material and for providing me with valuable feedback. And I would like to thank Benedict Eastaugh and Marcus Holland for helping make the final sections of this paper more accessible in the way it was intended.Peer reviewedPostprin
Reasoning about modular datatypes with Mendler induction
In functional programming, datatypes a la carte provide a convenient modular
representation of recursive datatypes, based on their initial algebra
semantics. Unfortunately it is highly challenging to implement this technique
in proof assistants that are based on type theory, like Coq. The reason is that
it involves type definitions, such as those of type-level fixpoint operators,
that are not strictly positive. The known work-around of impredicative
encodings is problematic, insofar as it impedes conventional inductive
reasoning. Weak induction principles can be used instead, but they considerably
complicate proofs.
This paper proposes a novel and simpler technique to reason inductively about
impredicative encodings, based on Mendler-style induction. This technique
involves dispensing with dependent induction, ensuring that datatypes can be
lifted to predicates and relying on relational formulations. A case study on
proving subject reduction for structural operational semantics illustrates that
the approach enables modular proofs, and that these proofs are essentially
similar to conventional ones.Comment: In Proceedings FICS 2015, arXiv:1509.0282
Partition function of the Potts model on self-similar lattices as a dynamical system and multiple transitions
We present an analytic study of the Potts model partition function on two
different types of self-similar lattices of triangular shape with non integer
Hausdorff dimension. Both types of lattices analyzed here are interesting
examples of non-trivial thermodynamics in less than two dimensions. First, the
Sierpinski gasket is considered. It is shown that, by introducing suitable
geometric coefficients, it is possible to reduce the computation of the
partition function to a dynamical system, whose variables are directly
connected to (the arising of) frustration on macroscopic scales, and to
determine the possible phases of the system. The same method is then used to
analyse the Hanoi graph. Again, dynamical system theory provides a very elegant
way to determine the phase diagram of the system. Then, exploiting the analysis
of the basins of attractions of the corresponding dynamical systems, we
construct various examples of self-similar lattices with more than one critical
temperature. These multiple critical temperatures correspond to crossing phases
with different degrees of frustration.Comment: 16 pages, 12 figures, 1 table; title changed, references and
discussion on multiple transitions adde
- …