17,915 research outputs found

    Elements of mathematics and logic for computer program analysis

    Get PDF
    1 Introduction 2 Induction and sequences 2.1 Induction on natural numbers 2.2 Words and sequences 2.3 A digression on set theory 2.4 Induction on words 2.5 Grammar rules and string rewriting 3 Terms 3.1 Definition of terms 3.2 Knaster-Tarski's fixpoint theorem (1927) 3.3 Kleene's fixpoint theorem (1952?) 3.4 Pattern matching and term rewriting 3.5 Models of a term algebra 4 Lambda-calculus 4.1 Definition of λ-calculus 4.2 Church-computable functions 4.3 Kleene-computable functions 4.4 Turing-computable functions 5 Simply-typed lambda-calculus 5.1 Curry-style simply-typed λ-calculus . 5.2 Unification 5.3 Type inference 5.4 Church-style simply-typed λ-calculus 6 First-order logic 6.1 Formulas and truth 6.2 Provability and deduction systems 6.3 Proof terms and Curry-Howard correspondence 7 To go further 8 Solutions to exercises 8.1 Section 2: Induction and sequences 8.2 Section 3: Terms 8.3 Section 4: Lambda-calculus 8.4 Section 5: Simply-typed lambda-calculus 8.5 Section 6: First-order logicMasterIn order to be able to rigorously prove the correctness of a program, one must have a formal definition of: what is a program, syntactically; how it is evaluated, that is, what is its semantics; how to formulate the properties we are interested in; and how to prove them. All this requires to understand some basic mathematical notions like induction, terms, formulas, deduction, etc. These notes are intended to give an introduction to some of these notions

    Towards a canonical classical natural deduction system

    Get PDF
    This paper studies a new classical natural deduction system, presented as a typed calculus named \lml. It is designed to be isomorphic to Curien-Herbelin's calculus, both at the level of proofs and reduction, and the isomorphism is based on the correct correspondence between cut (resp. left-introduction) in sequent calculus, and substitution (resp. elimination) in natural deduction. It is a combination of Parigot's λμ\lambda\mu-calculus with the idea of ``coercion calculus'' due to Cervesato-Pfenning, accommodating let-expressions in a surprising way: they expand Parigot's syntactic class of named terms. This calculus aims to be the simultaneous answer to three problems. The first problem is the lack of a canonical natural deduction system for classical logic. \lml is not yet another classical calculus, but rather a canonical reflection in natural deduction of the impeccable treatment of classical logic by sequent calculus. The second problem is the lack of a formalization of the usual semantics of Curien-Herbelin's calculus, that explains co-terms and cuts as, respectively, contexts and hole-filling instructions. The mentioned isomorphism is the required formalization, based on the precise notions of context and hole-expression offered by \lml. The third problem is the lack of a robust process of ``read-back'' into natural deduction syntax of calculi in the sequent calculus format, that affects mainly the recent proof-theoretic efforts of derivation of λ\lambda-calculi for call-by-value. An isomorphic counterpart to the QQ-subsystem of Curien-Herbelin's-calculus is derived, obtaining a new λ\lambda-calculus for call-by-value, combining control and let-expressions.Fundação para a Ciência e a Tecnologia (FCT

    A Neural Lambda Calculus: Neurosymbolic AI meets the foundations of computing and functional programming

    Full text link
    Over the last decades, deep neural networks based-models became the dominant paradigm in machine learning. Further, the use of artificial neural networks in symbolic learning has been seen as increasingly relevant recently. To study the capabilities of neural networks in the symbolic AI domain, researchers have explored the ability of deep neural networks to learn mathematical constructions, such as addition and multiplication, logic inference, such as theorem provers, and even the execution of computer programs. The latter is known to be too complex a task for neural networks. Therefore, the results were not always successful, and often required the introduction of biased elements in the learning process, in addition to restricting the scope of possible programs to be executed. In this work, we will analyze the ability of neural networks to learn how to execute programs as a whole. To do so, we propose a different approach. Instead of using an imperative programming language, with complex structures, we use the Lambda Calculus ({\lambda}-Calculus), a simple, but Turing-Complete mathematical formalism, which serves as the basis for modern functional programming languages and is at the heart of computability theory. We will introduce the use of integrated neural learning and lambda calculi formalization. Finally, we explore execution of a program in {\lambda}-Calculus is based on reductions, we will show that it is enough to learn how to perform these reductions so that we can execute any program. Keywords: Machine Learning, Lambda Calculus, Neurosymbolic AI, Neural Networks, Transformer Model, Sequence-to-Sequence Models, Computational ModelsComment: Keywords: Machine Learning, Lambda Calculus, Neurosymbolic AI, Neural Networks, Transformer Model, Sequence-to-Sequence Models, Computational Model

    Kartezijanski zatvorene kategorije

    Get PDF
    U ovom diplomskom radu proučavamo teoriju kategorija s posebnim fokusom na kartezijanski zatvorene kategorije, jednostavno tipizirani λ\lambda-račun i opisujemo vezu između njih koja je poznata kao Curry-Howard-Lambekov izomorfizam. Dan je uvod u teoriju kategorija, te kroz brojne primjere definiramo osnovne pojmove nužne za razumijevanje Curry-Howard-Lambekov izomorfizma. Koristimo programski jezik Haskell za demonstraciju praktične primjene teorija kategorija i lakše razumijevanje nekih koncepata. Definirane su kartezijanski zatvorene kategorije, vrsta kategorije koja ima ekspresivnu moć jednaku tipiziranom λ\lambda-računu i pokazano je nekoliko primjera kartezijanski zatvorenih kategorija. Definirano je proširenje jednostavno tipiziranog λ\lambda-računa s pravilima dedukcije i osnovni pojmovi vezani za tipizirani λ\lambda-račun. U posljednjem poglavlju je opisana konstrukcija kojom se pokazala veza između tipiziranog λ\lambda-računa i kartezijanski zatvorenih kategorija. Rad završavamo s primjerom kojim se pokazuje razmjenjivost funkcija u λ\lambda--računu s projekcijama u kartezijanski zatvorenim kategorijama. Dajemo kratki ostvrt na prednosti kategorijskog pristupa u programiranju pozivajući se na nekoliko najčešće korištenih programskih paketa.In this master thesis we study category theory with special focus on Cartesian closed categories and simply typed λ\lambda-calculus. We describe the relationship between them, known as Curry-Howard-Lambek isomorphism. An introduction to the category theory and neccesary terms required for understanding the Curry-Howard-Lambek isomorphism are given. Programming language Haskell is used to demonstrate practical applications of category theory. We define Cartesian closed categories, type of category which has expressive power equivalent to the simply typed λ\lambda-calculus and demonstrate few examples of Cartesian closed categories. In the last chapter we define a construction that describes relationship between simply typed λ\lambda-calculus and Cartesian closed categories. Master thesis is finalized with an example which demonstrates interchangeability of functions in simply typed λ\lambda-caluclus with projections in Cartesian closed categories. A short overview with advantages of categorical approach to computation is given, demonstrating practicality with few well known programming libraries

    Call-by-Value Lambda-calculus and LJQ

    Get PDF
    Accepté pour publication dans J. Logic Comput. ; 24 pagesLJQ is a focused sequent calculus for intuitionistic logic, with a simple restriction on the first premiss of the usual left introduction rule for implication. In a previous paper we discussed its history (going back to about 1950, or beyond) and presented its basic theory and some applications; here we discuss in detail its relation to call-by-value reduction in lambda calculus, establishing a connection between LJQ and the CBV calculus Lambda_C of Moggi. In particular, we present an equational correspondence between these two calculi forming a bijection between the two sets of normal terms, and allowing reductions in each to be simulated by reductions in the other

    Precise subtyping for synchronous multiparty sessions

    Get PDF
    The notion of subtyping has gained an important role both in theoretical and applicative domains: in lambda and concurrent calculi as well as in programming languages. The soundness and the completeness, together referred to as the preciseness of subtyping, can be considered from two different points of view: operational and denotational. The former preciseness has been recently developed with respect to type safety, i.e. the safe replacement of a term of a smaller type when a term of a bigger type is expected. The latter preciseness is based on the denotation of a type which is a mathematical object that describes the meaning of the type in accordance with the denotations of other expressions from the language. The result of this paper is the operational and denotational preciseness of the subtyping for a synchronous multiparty session calculus. The novelty of this paper is the introduction of characteristic global types to prove the operational completeness

    Lambda Dependency-Based Compositional Semantics

    Full text link
    This short note presents a new formal language, lambda dependency-based compositional semantics (lambda DCS) for representing logical forms in semantic parsing. By eliminating variables and making existential quantification implicit, lambda DCS logical forms are generally more compact than those in lambda calculus

    A Complete V-Equational System for Graded lambda-Calculus

    Full text link
    Modern programming frequently requires generalised notions of program equivalence based on a metric or a similar structure. Previous work addressed this challenge by introducing the notion of a V-equation, i.e. an equation labelled by an element of a quantale V, which covers inter alia (ultra-)metric, classical, and fuzzy (in)equations. It also introduced a V-equational system for the linear variant of lambda-calculus where any given resource must be used exactly once. In this paper we drop the (often too strict) linearity constraint by adding graded modal types which allow multiple uses of a resource in a controlled manner. We show that such a control, whilst providing more expressivity to the programmer, also interacts more richly with V-equations than the linear or Cartesian cases. Our main result is the introduction of a sound and complete V-equational system for a lambda-calculus with graded modal types interpreted by what we call a Lipschitz exponential comonad. We also show how to build such comonads canonically via a universal construction, and use our results to derive graded metric equational systems (and corresponding models) for programs with timed and probabilistic behaviour
    corecore