LF P A Logical Framework with External Predicates

Similar documents
An Open Logical Framework

LF P A Logical Framework with External Predicates

On the Set Theory of Fitch-Prawitz

LLFP : A Logical Framework for modeling External Evidence, Side Conditions, and Proof Irrelevance using Monads

Towards a general framework for metareasoning on HOAS encodings

Notes on Logical Frameworks

HOAS by example What is a Formal System? A Simply Typed Framework What Does it Mean? Canonical LF References HOAS. Randy Pollack

LLF P : A LOGICAL FRAMEWORK FOR MODELING EXTERNAL EVIDENCE, SIDE CONDITIONS, AND PROOF IRRELEVANCE USING MONADS

Formal Logic and Deduction Systems

Constructive approach to relevant and affine term calculi

The Curry-Howard Isomorphism

Classical First-Order Logic

On Equivalence and Canonical Forms in the LF Type Theory (Extended Abstract) Robert Harper and Frank Pfenning Department of Computer Science Carnegie

On Equivalence and Canonical Forms in the LF Type Theory

Evaluation Driven Proof-Search in Natural Deduction Calculi for Intuitionistic Propositional Logic

Mechanizing Metatheory in a Logical Framework

The Calculus of Inductive Constructions

AN ALTERNATIVE NATURAL DEDUCTION FOR THE INTUITIONISTIC PROPOSITIONAL LOGIC

Reasoning with Higher-Order Abstract Syntax and Contexts: A Comparison

Logic for Computational Effects: work in progress

Intensionality, Extensionality, and Proof Irrelevance in Modal Type Theory

Outline. Overview. Syntax Semantics. Introduction Hilbert Calculus Natural Deduction. 1 Introduction. 2 Language: Syntax and Semantics

Henk Barendregt and Freek Wiedijk assisted by Andrew Polonsky. Radboud University Nijmegen. March 5, 2012

Logical Preliminaries

Constructivization. LFMTP June CNAM, Inria, LSV. A Rewrite System for Proof. Constructivization. Raphaël Cauderlier.

An axiomatic approach to metareasoning on nominal algebras in HOAS

An overview of Structural Proof Theory and Computing

Termination and Reduction Checking for Higher-Order Logic Programs

Classical First-Order Logic

Intersection Synchronous Logic

Categories, Proofs and Programs

Forcing-based cut-elimination for Gentzen-style intuitionistic sequent calculus

Deductive System: Calculus of axioms and inference rules dening judgments. Used in the presentation of logics and programming derivable Logical Framew

Lazy Strong Normalization

Basic Algebraic Logic

Lecture 11: Measuring the Complexity of Proofs

λ Slide 1 Content Exercises from last time λ-calculus COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification

Proof Search Foundations for Logic Programming

Semantical study of intuitionistic modal logics

Non-classical Logics: Theory, Applications and Tools

Mathematical Logic. Introduction to Reasoning and Automated Reasoning. Hilbert-style Propositional Reasoning. Chiara Ghidini. FBK-IRST, Trento, Italy

Subtyping and Intersection Types Revisited

Lecture Notes on The Concurrent Logical Framework

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Example. Lemma. Proof Sketch. 1 let A be a formula that expresses that node t is reachable from s

Some Recent Logical Frameworks

Preuves de logique linéaire sur machine, ENS-Lyon, Dec. 18, 2018

Intersection Types and Lambda Theories

A Behavioural Model for Klop s Calculus

Lecture Notes on Combinatory Modal Logic

Program-ing in Coq. Matthieu Sozeau under the direction of Christine Paulin-Mohring

Type Systems as a Foundation for Reliable Computing

Silvia Ghilezan and Jelena Ivetić

Theoretical Computer Science. Representing model theory in a type-theoretical logical framework

Justifying Algorithms for βη-conversion

Modal Logic XX. Yanjing Wang

Meta-reasoning in the concurrent logical framework CLF

Typage et déduction dans le calcul de

Mechanically Verifying Logic Translations

07 Equational Logic and Algebraic Reasoning

An Introduction to Modal Logic III

Introduction to Type Theory February 2008 Alpha Lernet Summer School Piriapolis, Uruguay. Herman Geuvers Nijmegen & Eindhoven, NL

A Canonical 1 Local Representation of Binding. α -equivalence is identity. Randy Pollack. Masahiko Sato. LFCS, University of Edinburgh

Propositional and Predicate Logic - XIII

A Concurrent Logical Framework:

Investigation of Prawitz s completeness conjecture in phase semantic framework

On a computational interpretation of sequent calculus for modal logic S4

Introduction to Kleene Algebra Lecture 14 CS786 Spring 2004 March 15, 2004

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

A Practical Module System for LF

A Canonical 1 Locally Named Representation of Binding. α -equivalence is identity. Randy Pollack. Masahiko Sato. LFCS, University of Edinburgh

Classical Combinatory Logic

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events

Classical Program Logics: Hoare Logic, Weakest Liberal Preconditions

Modal Logics. Most applications of modal logic require a refined version of basic modal logic.

Type Systems. Lecture 9: Classical Logic. Neel Krishnaswami University of Cambridge

Propositional logic (revision) & semantic entailment. p. 1/34

Propositional Logic: Deductive Proof & Natural Deduction Part 1

Kleene realizability and negative translations

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events

Proving Fixed Points

arxiv: v3 [cs.pl] 15 May 2011

Midterm Exam Types and Programming Languages Frank Pfenning. October 18, 2018

NICTA Advanced Course. Theorem Proving Principles, Techniques, Applications

Asterix calculus - classical computation in detail

A Proof Theory for Generic Judgments

02 Propositional Logic

Categories of Coalgebraic Games with Selective Sum

The Vectorial Lambda-Calculus

Sequent Combinators: A Hilbert System for the Lambda Calculus

03 Propositional Logic II

Formalising the Completeness Theorem of Classical Propositional Logic in Agda (Proof Pearl)

Syntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P.

The algebraicity of the lambda-calculus

Implementing Cantor s Paradise

Mechanizing a Decision Procedure for Coproduct Equality in Twelf

On Frankl conjecture. Coherence in predicate logic. Algebraic theory of fuzzy languages and automata

THE AUSTRALIAN NATIONAL UNIVERSITY Second Semester COMP2600/COMP6260 (Formal Methods for Software Engineering)

If-then-else and other constructive and classical connectives (Or: How to derive natural deduction rules from truth tables)

Adjoint Logic and Its Concurrent Semantics

Transcription:

LF P A Logical Framework with External Predicates Petar Maksimović in collaboration with Furio Honsell, Marina Lenisa, Luigi Liquori, and Ivan Scagnetto Mathematical Institute of the Serbian Academy of Sciences and Arts, Serbia Faculty of Technical Sciences, University of Novi Sad, Serbia INRIA Sophia Antipolis Méditerranée, France Università di Udine, Italy Fourth Workshop on Formal and Automated Theorem Proving and Applications, February 2-3, 2012, Belgrade, Serbia

Briefly about LF The Harper-Honsell-Plotkin Logical Framework LF a logical framework based on the λπ-calculus Dependent types - types depending on terms Based on the Curry-Howard isomorphism Basis for the proof assistant Twelf

The ideas behind LF P The main ideas Develop a way of easily and smoothly encoding logics with arbitrary structural side-conditions in LF, Separate derivation from verification/computation, Increase modularity, and Optimize performance.

The pseudo-syntax of LF P Σ S Σ ::= Σ, a:k Σ, c:σ Signatures Γ C Γ ::= Γ, x:σ Contexts K K K ::= Type Πx:σ.K Kinds σ, τ, ρ F σ ::= a Πx:σ.τ σ N L P N,σ [ρ] Families M, N O M ::= c x λx:σ.m M N L P N,σ [M] U N,σ P [M] Objects Figure: The pseudo-syntax of LF P

So, what is new? Predicates on derivable typing judgements P(Γ Σ N : σ) Truth verified via an external call to a logical system, Can inspect the signature, context, term, and the type.

So, what is new? Predicates on derivable typing judgements P(Γ Σ N : σ) Truth verified via an external call to a logical system, Can inspect the signature, context, term, and the type. Locked types (L P N,σ [ρ]), locked objects (LP N,σ [M]), and unlocked objects (UN,σ P [M]),

So, what is new? Predicates on derivable typing judgements P(Γ Σ N : σ) Truth verified via an external call to a logical system, Can inspect the signature, context, term, and the type. Locked types (L P N,σ [ρ]), locked objects (LP N,σ [M]), and unlocked objects (UN,σ P [M]), Introduction rules: Γ Σ ρ : Type Γ Σ N : σ Γ Σ M : ρ Γ Σ N : σ Γ Σ L P N,σ [ρ] : Type Γ Σ L P N,σ [M] : LP N,σ [ρ]

So, what is new? Predicates on derivable typing judgements P(Γ Σ N : σ) Truth verified via an external call to a logical system, Can inspect the signature, context, term, and the type. Locked types (L P N,σ [ρ]), locked objects (LP N,σ [M]), and unlocked objects (UN,σ P [M]), Introduction rules: Γ Σ ρ : Type Γ Σ N : σ Γ Σ M : ρ Γ Σ N : σ Γ Σ L P N,σ [ρ] : Type Γ Σ L P N,σ [M] : LP N,σ [ρ] Elimination rule: Γ Σ M : L P N,σ [ρ] Γ Σ N : σ P(Γ Σ N : σ) Γ Σ U P N,σ [M] : ρ

So, what is new? Predicates on derivable typing judgements P(Γ Σ N : σ) Truth verified via an external call to a logical system, Can inspect the signature, context, term, and the type. Locked types (L P N,σ [ρ]), locked objects (LP N,σ [M]), and unlocked objects (UN,σ P [M]), Introduction rules: Γ Σ ρ : Type Γ Σ N : σ Γ Σ M : ρ Γ Σ N : σ Γ Σ L P N,σ [ρ] : Type Γ Σ L P N,σ [M] : LP N,σ [ρ] Elimination rule: Γ Σ M : L P N,σ [ρ] Γ Σ N : σ P(Γ Σ N : σ) Γ Σ U P N,σ [M] : ρ L-reduction: U P N,σ [LP N,σ [M]] L M.

Properties of LF P The main properties Confluence, Strong Normalization - Yes, immediately.

Properties of LF P The main properties Confluence, Strong Normalization - Yes, immediately. Subject Reduction - Yes, with certain conditions imposed on predicates (closure under signature and context weakening and permutation, substitution, and βl-reduction.

Properties of LF P The main properties Confluence, Strong Normalization - Yes, immediately. Subject Reduction - Yes, with certain conditions imposed on predicates (closure under signature and context weakening and permutation, substitution, and βl-reduction. Decidability - Yes, if predicates used are decidable.

Properties of LF P The main properties Confluence, Strong Normalization - Yes, immediately. Subject Reduction - Yes, with certain conditions imposed on predicates (closure under signature and context weakening and permutation, substitution, and βl-reduction. Decidability - Yes, if predicates used are decidable. A canonical version of the system (LF C P ) was also developed, dealing only with βη-long normal forms, for easy formulation and proofs of adequacy of the encodings.

Encoded examples The untyped λ-calculus (using HOAS)

Encoded examples The untyped λ-calculus (using HOAS) The untyped λ-calculus with call-by-value reduction strategy β-reduction in M N occurs only if N is a value

Encoded examples The untyped λ-calculus (using HOAS) The untyped λ-calculus with call-by-value reduction strategy β-reduction in M N occurs only if N is a value Modal logics S 4 and S 5 in Hilbert and Natural deduction style Rule applicable if formula does not depend on assumptions

Encoded examples The untyped λ-calculus (using HOAS) The untyped λ-calculus with call-by-value reduction strategy β-reduction in M N occurs only if N is a value Modal logics S 4 and S 5 in Hilbert and Natural deduction style Rule applicable if formula does not depend on assumptions Non-commutative linear logic Conditions on occurence and order of assumptions

Encoded examples The untyped λ-calculus (using HOAS) The untyped λ-calculus with call-by-value reduction strategy β-reduction in M N occurs only if N is a value Modal logics S 4 and S 5 in Hilbert and Natural deduction style Rule applicable if formula does not depend on assumptions Non-commutative linear logic Conditions on occurence and order of assumptions A simple imperative language with Hoare-like logic Pre- and post-conditions

The end of the presentation Thank you for your attention! Any questions?