1 research outputs found
On the Formalisation of the Metatheory of the Lambda Calculus and Languages with Binders
Este trabajo trata sobre el razonamiento formal veri cado por computadora involucrando lenguajes
con operadores de ligadura.
Comenzamos presentando el C谩lculo Lambda, para el cual utilizamos la sintaxis hist贸rica, esto es,
sintaxis de primer orden con s贸lo un tipo de nombres para las variables ligadas y libres. Primeramente
trabajamos con t茅rminos concretos, utilizando la operaci贸n de sustituci贸n m煤ltiple de nida
por Stoughton como la operaci贸n fundamental sobre la cual se de nen las conversiones alfa
y beta. Utilizando esta sintaxis desarrollamos los principales resultados metate贸ricos del c谩lculo:
los lemas de sustituci贸n, el teorema de Church-Rosser y el teorema de preservaci贸n de tipo (Subject
Reduction) para el sistema de asignaci贸n de tipos simples. En una segunda formalizaci贸n
reproducimos los mismos resultados, esta vez basando la conversion alfa sobre una operaci贸n
m谩s sencilla, que es la de permutaci贸n de nombres. Utilizando este mecanismo, derivamos principios
de inducci贸n y recursi贸n que permiten trabajar identificando t茅rminos alfa equivalentes,
de modo tal de reproducir la llamada convenci贸n de variables de Barendregt. De este modo,
podemos imitar las demostraciones al estilo l谩piz y papel dentro del riguroso entorno formal
de un asistente de demostraci贸n.
Como una generalizaci贸n de este 煤ltimo enfoque, concluimos utilizando t茅cnicas de programaci贸n
gen茅rica para definir una base para razonar sobre estructuras gen茅ricas con operadores de ligadura.
Definimos un universo de tipos de datos regulares con informaci贸n de variables y operadores
de ligadura, y sobre 茅stos definimos operadores gen茅ricos de formaci贸n, eliminaci贸n
e inducci贸n. Tambi茅n introducimos una relaci贸n de alfa equivalencia basada en la operaci贸n
de permutaci贸n y derivamos un principio de iteraci贸n/inducci贸n que captura la convenci贸n de
variables anteriormente mencionada. A modo de ejemplo, mostramos c贸mo definir el C谩lculo
Lambda y el sistema F en nuestro universo, ilustrando no s贸lo la reutilizaci贸n de las pruebas
gen茅ricas, sino tambi茅n cu谩n sencillo es el desarrollo de nuevas pruebas en estos casos.
Todas las formalizaciones de esta tesis fueron realizadas en Teor铆a Constructiva de Tipos y
verificadas utilizando el asistente de pruebas AgdaThis work is about formal, machine-checked reasoning on languages with name binders.
We start by considering the 蕩-calculus using the historical ( rst order) syntax with only one
sort of names for both bound and free variables. We rst work on the concrete terms taking
Stoughton's multiple substitution operation as the fundamental operation upon which the
维 and 脽-conversion are de ned. Using this syntax we reach well-known meta-theoretical results,
namely the Substitution lemmas, the Church-Rosser theorem and the Subject Reduction theorem
for the system of assignment of simple types. In a second formalisation we reproduce the same
results, this time using an approach in which -conversion is de ned using the simpler operation
of name permutation. Using this we derive induction and recursion principles that allow us to
work by identifying terms up to -conversion and to reproduce the so-called Barendregt's variable
convention [4]. Thus, we are able to mimic pencil and paper proofs inside the rigorous formal
setting of a proof assistant.
As a generalisation of the latter, we conclude by using generic programming techniques to de ne
a framework for reasoning over generic structures with binders. We de ne a universe of regular
datatypes with variables and binders information, and over these we de ne generic formation,
elimination, and induction operations. We also introduce an 维 equivalence relation based on
the swapping operation, and are able to derive an -iteration/induction principle that captures
Barendregt's variable convention. As an example, we show how to de ne the 蕩 calculus and
System F in our universe, and thereby we are able to illustrate not only the reuse of the generic
proofs but also how simple the development of new proofs becomes in these instances.
All formalisations in this thesis have been made in Constructive Type Theory and completely
checked using the Agda proof assistan