36 research outputs found
Martin-L\"of \`a la Coq
We present an extensive mechanization of the meta-theory of Martin-L\"of Type
Theory (MLTT) in the Coq proof assistant. Our development builds on
pre-existing work in Agda to show not only the decidability of conversion, but
also the decidability of type checking, using an approach guided by
bidirectional type checking. From our proof of decidability, we obtain a
certified and executable type checker for a full-fledged version of MLTT with
support for , , , and identity types, and one
universe. Furthermore, our development does not rely on impredicativity,
induction-recursion or any axiom beyond MLTT with a schema for indexed
inductive types and a handful of predicative universes, narrowing the gap
between the object theory and the meta-theory to a mere difference in
universes. Finally, we explain our formalization choices, geared towards a
modular development relying on Coq's features, e.g. meta-programming facilities
provided by tactics and universe polymorphism
Complete Bidirectional Typing for the Calculus of Inductive Constructions
This article presents a bidirectional type system for the Calculus of Inductive Constructions (CIC). The key property of the system is its completeness with respect to the usual undirected one, which has been formally proven in Coq as a part of the MetaCoq project. Although it plays an important role in an ongoing completeness proof for a realistic typing algorithm, the interest of bidirectionality is wider, as it gives insights and structure when trying to prove properties on CIC or design variations and extensions. In particular, we put forward constrained inference, an intermediate between the usual inference and checking judgements, to handle the presence of computation in types
Touring the MetaCoq Project (Invited Paper)
International audienc
Touring the MetaCoq Project (Invited Paper)
International audienc
A Mechanized Proof of Kleene’s Theorem in Why3
In this dissertation we present a mathematically minded development of the correction
proof of Kleene’s theorem conversion of regular expressions into finite automata, on
the basis of equivalent expressive power. We formalise a functional implementation of
the algorithm and prove, in full detail, the soundness of its mathematical definition,
working within the Why3 framework to develop a mechanically verified implementation
of the conversion algorithm. The motivation for this work is to test the feasibility of
the deductive approach to the verification of software and pave the way to do similar
proofs in the context of a static analysis approach to (object-oriented) programming. In
particular, on the subject of behavioural types in typestate settings, whose expressiveness
stands between regular and context-free languages and, therefore, can greatly benefit
from mechanically certified implementations.Nesta dissertação apresentamos um desenvolvimento matemático da prova de correcção
da conversão de expressões regulares em autómatos finitos do teorema de Kleene,
com base no seu poder expressivo equivalente. Formalizamos uma implementação funcional
do algoritmo e provamos, em detalhe, a correcção da sua definição matemática.
Trabalhando no framework Why3 para desenvolver uma implementação mecanicamente
certificada do algoritmo de conversão. A motivação para este trabalho é testar a viabilidade
da metodologia e preparar o caminho para fazer provas semelhantes no contexto de
uma abordagem de análise estática na programação (orientada para objectos). Em particular,
no tópico dos tipos comportamentais com typestates, cuja expressividade está entre a
das linguagens regulares e livres-de-contexto. Podendo, por isso, beneficiar enormemente
de implementações mecanicamente certificada
Church's thesis and related axioms in Coq's type theory
"Church's thesis" () as an axiom in constructive logic states
that every total function of type is computable,
i.e. definable in a model of computation. is inconsistent in both
classical mathematics and in Brouwer's intuitionism since it contradicts Weak
K\"onig's Lemma and the fan theorem, respectively. Recently, was
proved consistent for (univalent) constructive type theory.
Since neither Weak K\"onig's Lemma nor the fan theorem are a consequence of
just logical axioms or just choice-like axioms assumed in constructive logic,
it seems likely that is inconsistent only with a combination of
classical logic and choice axioms. We study consequences of and
its relation to several classes of axioms in Coq's type theory, a constructive
type theory with a universe of propositions which does neither prove classical
logical axioms nor strong choice axioms.
We thereby provide a partial answer to the question which axioms may preserve
computational intuitions inherent to type theory, and which certainly do not.
The paper can also be read as a broad survey of axioms in type theory, with all
results mechanised in the Coq proof assistant
Continuous and monotone machines
We investigate a variant of the fuel-based approach to modeling diverging computation in type theories and use it to abstractly capture the essence of oracle Turing machines. The resulting objects we call continuous machines. We prove that it is possible to translate back and forth between such machines and names in the standard function encoding used in computable analysis. Put differently, among the operators on Baire space, exactly the partial continuous ones are implementable by continuous machines and the data that such a machine provides is a description of the operator as a sequentially realizable functional. Continuous machines are naturally formulated in type theories and we have formalized our findings in Coq as part of Incone, a Coq library for computable analysis. The correctness proofs use a classical meta-theory with countable choice. Along the way we formally prove some known results such as the existence of a self-modulating modulus of continuity for partial continuous operators on Baire space. To illustrate their versatility we use continuous machines to specify some algorithms that operate on objects that cannot be fully described by finite means, such as real numbers and functions. We present particularly simple algorithms for finding the multiplicative inverse of a real number and for composition of partial continuous operators on Baire space. Some of the simplicity is achieved by utilizing the fact that continuous machines are compatible with multivalued semantics