A Proof Theory for Generic Judgments

Similar documents
A Proof Theory for Generic Judgments

A LOGICAL FRAMEWORK FOR REASONING ABOUT LOGICAL SPECIFICATIONS

Mixing Finite Success and Finite Failure. Automated Prover

The Bedwyr system for model checking over syntactic expressions

Stratification in Logics of Definitions

A Multiple-Conclusion Specification Logic

Proof Search Foundations for Logic Programming

On the Role of Names in Reasoning about λ-tree Syntax Specifications

REASONING IN A LOGIC WITH DEFINITIONS AND INDUCTION RAYMOND CHARLES MCDOWELL COMPUTER AND INFORMATION SCIENCE

AN OVERVIEW OF LINEAR LOGIC PROGRAMMING

Combining generic judgments with recursive definitions

1 An Overview of Linear Logic Programming

The Curry-Howard Isomorphism

From Operational Semantics to Abstract Machines

Logic Programming in a Fragment of Intuitionistic Linear Logic

Introduction to dependent type theory. CIRM, May 30

Relating State-Based and Process-Based Concurrency through Linear Logic

MSR 3.0: The Logical Meeting Point of Multiset Rewriting and Process Algebra. Iliano Cervesato. ITT Industries, NRL Washington, DC

An overview of Structural Proof Theory and Computing

A proposal for broad spectrum proof certificates

Propositional and Predicate Logic. jean/gbooks/logic.html

1 Introduction to Predicate Resolution

Relating Nominal and Higher-order Abstract Syntax Specifications

UNIFORM PROOFS AS A FOUNDATION FOR LOGIC PROGRAMMING. Computer and Information Science Department University of Pennsylvania, Philadelphia, PA 19104

Type Theory and Constructive Mathematics. Type Theory and Constructive Mathematics Thierry Coquand. University of Gothenburg

One Year Later. Iliano Cervesato. ITT Industries, NRL Washington, DC. MSR 3.0:

Focused labeled proof systems for modal logic

Propositional Logic Language

Relating Reasoning Methodologies in Linear Logic and Process Algebra

The Logical Meeting Point of Multiset Rewriting and Process Algebra

Nominal Completion for Rewrite Systems with Binders

Predicate Logic. Xinyu Feng 09/26/2011. University of Science and Technology of China (USTC)

A NOTE ON COMPOSITIONALITY IN THE FIRST ORDER LANGUAGE

CHAPTER 10. Predicate Automated Proof Systems

Intensionality, Extensionality, and Proof Irrelevance in Modal Type Theory

06 From Propositional to Predicate Logic

Uniform Schemata for Proof Rules

Resolution for mixed Post logic

Using linear logic to reason about sequent systems

PHIL 50 INTRODUCTION TO LOGIC 1 FREE AND BOUND VARIABLES MARCELLO DI BELLO STANFORD UNIVERSITY DERIVATIONS IN PREDICATE LOGIC WEEK #8

15414/614 Optional Lecture 3: Predicate Logic

Proseminar on Semantic Theory Fall 2013 Ling 720 First Order (Predicate) Logic: Syntax and Natural Deduction 1

Model Theory in the Univalent Foundations

Nominal Unification. Key words: Abstract Syntax, Alpha-Conversion, Binding Operations, Unification

07 Equational Logic and Algebraic Reasoning

Business Process Management

Adjunction Based Categorical Logic Programming

Lecture Notes on The Curry-Howard Isomorphism

Towards Concurrent Type Theory

Relating Nominal and Higher-Order Pattern Unification

Lecture Notes on Linear Logic

185.A09 Advanced Mathematical Logic

Lecture Notes on Quantification

A Spatial Logic for Concurrency

Handout Proof Methods in Computer Science

Advanced Topics in LP and FP

Homotopy Type Theory

Linear Logic Pages. Yves Lafont (last correction in 2017)

Predicate Logic. Xinyu Feng 11/20/2013. University of Science and Technology of China (USTC)

The Skolemization of existential quantifiers in intuitionistic logic

COMP9414: Artificial Intelligence First-Order Logic

The predicate calculus is complete

COMP 409: Logic Homework 5

TR : Binding Modalities

Notes on Propositional and First-Order Logic (CPSC 229 Class Notes, January )

Lecture Notes on A Concurrent Logical Framework

Errata and Remarks for The Semantics and Proof Theory of the Logic of Bunched Implications BI-monograph-errata.

Clausal Presentation of Theories in Deduction Modulo

First-Order Logic. Chapter Overview Syntax

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

Completeness Theorems and λ-calculus

Canonical Calculi: Invertibility, Axiom expansion and (Non)-determinism

Logic Overview, I. and T T T T F F F T F F F F

Encoding Graph Transformation in Linear Logic

Predicate Calculus. Formal Methods in Verification of Computer Systems Jeremy Johnson

Formal Methods for Java

A BRIEF INTRODUCTION TO TYPED PREDICATE LOGIC

Cut-Elimination and Quantification in Canonical Systems

Consequence Relations and Natural Deduction

Atomic Cut Elimination for Classical Logic

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

A Concurrent Logical Framework

Review of The π-calculus: A Theory of Mobile Processes

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

Sequent calculus for predicate logic

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

The non-logical symbols determine a specific F OL language and consists of the following sets. Σ = {Σ n } n<ω

Chapter 2. Assertions. An Introduction to Separation Logic c 2011 John C. Reynolds February 3, 2011

Axiomatic Semantics. Stansifer Ch 2.4, Ch. 9 Winskel Ch.6 Slonneger and Kurtz Ch. 11 CSE

Teaching Natural Deduction as a Subversive Activity

Local Representations of Binding

query. The quantification over predicate variables that is permitted and the corresponding enrichment to the term structure are however sufficient to

Investigation of Prawitz s completeness conjecture in phase semantic framework

Sequent Combinators: A Hilbert System for the Lambda Calculus

Lecture 11: Measuring the Complexity of Proofs

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

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic

NICTA Advanced Course. Theorem Proving Principles, Techniques, Applications

Notes. Corneliu Popeea. May 3, 2013

Transcription:

A Proof Theory for Generic Judgments Dale Miller INRIA/Futurs/Saclay and École Polytechnique Alwen Tiu École Polytechnique and Penn State University LICS 2003, Ottawa, Canada, 23 June 2003

Outline 1. Motivations 2. Problems with universal quantification 3. A new quantifier 4. Intuitionistic logic with 5. A proof theoretic notion of definitions 6. Meta-theories 7. Example: encoding π calculus 8. Related work 9. Conclusions and future work 1

Motivations To use proof-theory as a framework for studying computational systems. One main challenge is to encode and reason about abstractions in various computational systems, e.g., π-calculus, spi-calculus, imperative programming languages, etc. The static structures of abstractions are encoded as λ-terms, following the tradition of higher-order abstract syntax. The dynamic aspects of abstractions in computation is often modelled using universally quantified judgments and eigenvariables. This interpretation can be problematic. 2

Two approaches to prove a universal The universal quantifier τ x.b can be proved: extensionally, i.e., by proving B[t/x] for all terms t of type τ. Obviously, if τ is defined inductively, this approach can use induction. intensionally, i.e., by proving B[c/x] for a new generic constant c (an eigenvariable). Such eigenvariables generally remain unchanged during proof search. 3

The collapse of eigenvariables A cut-free proof of x y.p x y first introduces two new eigenvariables c and d and then attempts to prove P c d. Eigenvariables have been used to encode names in π-calculus [Miller93], nonces in security protocols [Cervesato, et. al. 99], reference locations in imperative programming [Chirimar95], etc. Since x y.p x y z.p z z is provable, it follows that the provability of x y.p x y implies the provability of z.p z z. That is, there is also a proof where the eigenvariables c and d are identified. Thus, eigenvariables are unlikely to capture the proper logic behind things like nonces, references, names, etc. 4

A new quantifier does not handle the intensional meaning well, hence we will introduce a new quantifier, x.b x which focuses on an intensional reading. To accomodate this new quantifier, we add a new context to sequents. Σ : B 1,..., B n B 0 Σ : σ 1 B 1,..., σ n B n σ 0 B 0 Σ is a set of eigenvariables, scoped over the sequent and σ i is a list of generic variables, locally scoped over the formula B i. The expression σ i B i is called a generic judgment. Equality between judgments is defined up to renaming of local variables. 5

Intuitionistic logic with Σ : σ A, Γ σ A init Σ : B Σ : B, Γ C Σ :, Γ C cut Σ : σ, Γ B L Σ : Γ σ R Σ : B, B, Γ C Σ : B, Γ C cl Σ : Γ C Σ : B, Γ C wl Σ : σ B i, Γ D Σ : σ B 1 B 2, Γ D L Σ : Γ σ B 1 Σ : Γ σ B 2 Σ : Γ σ B 1 B 2 R Σ : σ B 1, Γ D Σ : σ B 2, Γ D Σ : σ B 1 B 2, Γ D L Σ : Γ σ B i Σ : Γ σ B 1 B 2 R Σ : Γ σ B Σ : σ C, Γ D Σ : σ B C, Γ D L Σ : σ B, Γ σ C Σ : Γ σ B C R 6

Intuitionistic logic with Σ : σ A, Γ σ A init Σ : B Σ : B, Γ C Σ :, Γ C cut Σ : σ, Γ B L Σ : Γ σ R Σ : B, B, Γ C Σ : B, Γ C cl Σ : Γ C Σ : B, Γ C wl Σ : σ B i, Γ D Σ : σ B 1 B 2, Γ D L Σ : Γ σ B 1 Σ : Γ σ B 2 Σ : Γ σ B 1 B 2 R Σ : σ B 1, Γ D Σ : σ B 2, Γ D Σ : σ B 1 B 2, Γ D L Σ : Γ σ B i Σ : Γ σ B 1 B 2 R Σ : Γ σ B Σ : σ C, Γ D Σ : σ B C, Γ D L Σ : σ B, Γ σ C Σ : Γ σ B C R 7

Intuitionistic logic with Σ : (σ, y : τ) B[y/x], Γ C Σ : σ τ x.b, Γ C L Σ : Γ (σ, y : τ) C[y/x] Σ : Γ σ τ x.c R Σ, σ t : γ Σ : σ B[t/x], Γ C Σ : σ γ x.b, Γ C L Σ, h : Γ σ B[(h σ)/x] Σ : Γ σ x.b R Σ, h : σ B[(h σ)/x], Γ C Σ : σ x.b, Γ C L Σ, σ t : γ Σ : Γ σ B[t/x] Σ : Γ σ γ x.b R The typing of terms follows Church s Simple Theory of Types. Formulas are given type o, and quantified variables can be of higher types, as long as the type does not contain the type o. 8

Dependency between eigenvariables and local variables is encoded using the technique of -lifting [Paulson] or raising [Miller92] of the types of the eigenvariables. Example: {x α, h τ γ β } : Γ (a τ, b γ ) B (h a b) b {x α } : Γ (a τ, b γ ) β y.b y b L {x α } : Γ (a τ ) γ z. β y.b y z R 9

Properties of Some theorems: x Bx xbx x(bx Cx) xbx xcx x(bx Cx) xbx xcx x(bx Cx) xbx xcx x ybxy h xbx(hx) x ybxy h xbx(hx) x ybxy y xbxy x., x. Consequence: can always be given atomic scope within formulas. Non-theorems: x ybxy zbzz zbzz x ybxy y xbxy x ybxy xbx xbx x y.b x y y x.b x y xbx xbx xbx xbx xbx xbx xb B 10

A proof theoretic notion of definitions We extend the logic further by allowing a non-logical constants (predicate) to be introduced. To each predicate, we associate some definition clauses. We write x.p t = B to denote a definition clause for predicate p. Free variables in B are in the set of free variables in t, which are all in x. The notion of definition has been previously studied by Schroeder-Heister, Girard, Miller and McDowell. By imposing certain restriction on definitions, we can prove cut-elimination. 11

Introduction rules for definitions In intuitionistic logic without, the right introduction rule for a predicate A is Γ Bθ Γ A defr provided that there is a definition clause x.[h = B] such that A = βη Hθ The left introduction rule is {Bθ, Γθ Cθ x.[h = B] is a definition clause and Aθ = βη Hθ} A, Γ C defl Notice that: eigenvariables can be instantiated, and the set of premises can be empty, finite or infinite, depending on the set of solutions for the associated equational problems. 12

Applying definitions to judgments To apply definition rules to a judgment given a set of definition clauses, we need to raise the definition clauses. Given a definition clause x.h = B, and a list of variables ȳ, its raised form w.r.t. ȳ is h.ȳ H[( h ȳ)/ x] = ȳ B[( h ȳ)/ x]. The right introduction rule for a judgment ȳ A Σ : Γ (ȳ B)θ Σ : Γ ȳ A defr where h.ȳ H = ȳ B is a raised definition clause and λȳ.a = βη (λȳ.h)θ. 13

The left rule is given by {Σθ : (ȳ B)θ, Γθ Cθ} B,θ Σ : ȳ A, Γ C defl where h.ȳ H = ȳ B is a raised definition clause and (λȳ.a)θ = βη (λȳ.h)θ. The signature Σθ is obtained from Σ by removing variables in the domain of θ, and adding free variables in the range of θ. Notice that the local variables ȳ are not instantiated. 14

Meta theories Theorem 1. Cut-elimination. Given a fixed stratified definition, a sequent has a proof if and only if it has a cut-free proof. Theorem 2. Given a noetherian definition, the following formula is provable. x y.b x y y x.b x y. Theorem 3. If we restrict to Horn definitions (no implication and negation in the body of the definitions) then 1. and are interchangable in definitions, 2. x.b x x.b x for noetherian definitions. 15

Example: encoding π calculus π-calculus is a formal model for concurrency. The main entity is process. The syntax is the following: P := 0 τ.p x(y).p xy.p (P P ) (P + P ) (x)p [x = y]p Processes can make transitions (actions), which are guided by the syntax. Actions are of the following kind: input action x(y), free output action xy and bound output action x(y) and the internal action τ. The variable y in bound output denotes a fresh names. The internal action is represented by a constant τ. 16

π-calculus: one step transitions Operational semantics: xy.p xy P OUTPUT ACT P α P [x = x]p α P MATCH α P P (y)p α (y)p RES, y n(p ) Encoding restriction using is problematic. RES : (x)p α (x)q = x.(p α Q) OUTPUT ACT : xy.p xy P = MATCH : [x = x]p α Q = P α Q Consider the process (y)[x = y] xz.0. It cannot make any transition, since y has to be fresh. 17

The following statement should be provable x Q α.[((y)[x = y]( xz.0) α Q) ] Given the encoding of restriction using, this reduces to proving the sequent α {x, z, Q, α} : y.([x = y]( xz.0) Q) There are at least two instantiations of variables that identify x and y: 1. y w, x w, α wz, Q 0: (wrong scoping) {z} : ([w = w]( wz.0) wz 0) 2. y x, α xz, Q 0: (freshness assumption on y is violated) {z} : ([x = x]( xz.0) xz 0) 18

Scoping and freshness are captured precisely by : RES : (x)p α (x)q = x.(p α Q) {x, z, Q, α} : w ([x = w]( xz.0) {x, z, Q, α} :. y.([x = y]( xz.0) {x, z, Q, α} :. ((y)[x = y]( xz.0) {x, z, Q, α} :. ((y)[x = y]( xz.0) α Q) defl α Q) L α Q) defl α Q) R The success of defl depends on the failure of unification problem λw.x = λw.w. 19

π-calculus: encoding (bi)simulation One-step transition relation is encoded as three different predicates P A Q x P M P x M free actions, A : act input action, x : nm act, M : nm proc output action, x : nm act, M : nm proc sim P Q = A P [(P A P ) Q.(Q X P [(P X P ) Q.(Q X P [(P X P ) Q.(Q A Q ) sim P Q ] X Q ) w.sim (P w) (Q w)] X Q ) w.sim (P w) (Q w)] Note that this definition clause is not Horn, and thus illustrates the differences between and. 20

Related Work Pitts and Gabbay s new quantifier. Both and the new quantifier are self-dual but is not implied by nor does it imply. Pitts and Gabbay s quantifier has set theory semantics and it assumes an infinite set of names, and hence it has some extensional flavor. on the other hand, does not require any assumption on the types of quantified variables, and is multisorted. O Hearn and Pym s new (The logic of bunched implications, BSL 99). Eigenvariables are treated as resource (linear). We haven t explored further possible relations to. 21

Conclusions We have shown a simple extension of intuitionistic logic by focusing on the intensional character of eigenvariables. This gives rise to a new quantifier, and a richer sequent with explicit local context. We proved cut-elimination, and hence consistency of the logic. The logic can be extended further with a proof-theoretic notion of definitions. Cut-elimination is also satisfied by this extended system. We have shown an example to illustrate the use of our logic to formalize generic reasoning, and show that captures the spirit of genericity better than. 22

Future Work Implementation. It should be straightforward, since we are in a proofsearch settings. The use of raising is not problematic with unification. We are working on a prototype, written in λprolog. We are considering adding induction and possibly coinduction to our current framework in order to capture reasoning about infinite behaviors. Other proof-theoretic properties are to be studied, e.g., permutation of rules, characterization of definitions in relation to properties of. Another interesting direction would be to look for a type theory for the intuitionistic logic with, e.g., typing system a la Martin-Löf dependent type. 23