slides 07 1 restricted -terms and logics definition (1d1) a -term p is called a i-term iff, for each...

27
Slides 07 Slides 07 1 Restricted Restricted -terms and -terms and logics logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form xM in P, x occurs free in M at least once. Example: I xx is a I-term; K xyx is a non-I-term. Sometimes unrestricted -terms are called K-terms. I-terms are terms without vacuous binding.

Post on 20-Dec-2015

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 0711

Restricted Restricted -terms and logics-terms and logics• Definition (1D1) A -term P is called a I-

term iff, for each subterm with the form xM in P, x occurs free in M at least once.

• Example:

I xx is a I-term;

K xyx is a non-I-term.

• Sometimes unrestricted -terms are called K-terms.

I-terms are terms without vacuous binding.

Page 2: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 0722

• Definition (1D2) A BCK-term is a -term P such that (i) for each subterm xM of P, x occurs free in M at most once,(ii) each free variable of P has just one occurrence free in P.

• Examples: the following are BCK-terms:

I xx, B xyzx(yz), B' xyzy(xz), C xyzxzy, K xyx, C0 xyy, C1 xyxyThe following are not:

C2 xyx(xy), S xyzxz(yz), W xyxyy

Page 3: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 0733

• Definition (1D3) A BCI-term or linear -term is a -term P such that(i) for each subterm xM of P, x occurs free in M exactly once,(ii) each free variable of P has just one occurrence free in P.

• Every BCI-term is a BCK-term, but the BCK-term K is not a BCI-term.

• A term is a BCI-term iff it is both a I-term and a BCK-term.

Page 4: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 0744

• Definition (6C2) The implicational fragment of BCK-logic is defined exactly like intuitionistic logic in (6A2) on Slide 06.19, except that multiple discharging is not allowed. That is, when (I) is used, its discharge-label must either be vacuous or contain only one occurrence of .

• BCK-logic is a logic in which an assumption cannot be used more than once; it is a logic of non-reusable information.

• Example: the proof of (aac)aac in (6A2.2) is a BCK-proof.

Page 5: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 0755

• Definition (6C3) The implicational fragment of BCI-logic is defined exactly like intuitionistic logic in (6A2) on Slide 06.19, except that both vacuous and multiple discharging are forbidden. That is, when (I) is used, its discharge-label must contain exactly one occurrence of .

• BCI-logic is a relevance logic of non-reusable information.

• Example: the proof of (aac)aac in (6A2.2) is also a BCI-proof.

Page 6: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 0766

• Definition (6C1) The definition of the relevance logic R is exactly like that of intuitionistic logic in (6A2) on Slide 06.19, except that vacuous discharging is forbidden. That is, when is the conclusion of rule (I), its discharge-label must contain at least one occurrence of .

• Example:the formula (aac)aac is provable in R (see 6A2.2).

Page 7: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 0777

• Motivation for R:

In one important view of implication, a formula should not be provable unless is in some way relevant to . In this view the formula aba is not universally valid, because it says in essence that if a statement a is true then every other statement b implies it, even when b has no connection with the meaning of a.R is one of the earliest and simplest attempts to capture the notion of relevant implication. In it, we can only prove when has actually been used in the deduction of .

Page 8: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 0788

• Refined Curry-Howard Theorem (6C5)(i) The provable formulas of R, BCK-logic, and BCI-logic are exactly the types of the following -terms:

R: types of the closed I-terms;

BCK-logic: types of the closed BCK-terms;BCI-logic: types of the closed BCI-terms.

(ii) The relation 1, ..., n ⊢ holds in R, BCK-logic or BCI-logic iff there exist M and x1, ..., xn (distinct) such that

x1:1, ..., xn:n ⊢ M:

and M is, respectively, a I-term, BCK-term or BCI-term.

Page 9: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 0799

Axiomatic (Hilbert-style) Axiomatic (Hilbert-style) SystemsSystems

• Definition (6D1) Let A be any set of implicational formulas that are tautologies in the classical truth-table sense. Then A generates the following Hilbert-style system, which will be called the corresponding A-logic.Axioms: the members of A.Deduction-rules:

(E): [often called modus ponens]

(Sub): [ if s is a substitution and no variable in Dom(s)

s() occurs in a non-axiom assumption in the

deduction above the line ]

Page 10: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 071010

Deductions in an A-logic are trees, with axioms and assumptions at the tops of branches and the conclusion at the bottom of the tree. The notation

1, ..., n ⊢A

means that there is a deduction whose non-axiom assumptions are some or all of 1, ..., n and whose conclusion is . (1, ..., n need not all be distinct.)When n = 0, the deduction is called a proof of and we call a provable formula or theorem of the A-logic in question, and we write

⊢A .

The set of all theorems in an A-logic may be called A⊢.

Page 11: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 071111

• The rule (Sub) is the substitution rule. Its side-condition says that substitutions may be made only for variables that occur in axioms.

Page 12: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 071212

• Example (6D1.2): Let A contain the formulas C (abc)bac and K aba, and s [(aba)/b, a/c].Then the following deduction gives ⊢A aa.

(abc)bac aba (Sub) (Sub) (a(aba)a)(aba)aa a(aba)a (E) (aba)aa aba (E)

aa

Page 13: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 071313

• Definition (6D2) In any A-logic, a substitutions-first deduction is a deduction in which the rule (Sub) is only applied to axioms.

• Lemma (6D2.1) In any A-logic, every deduction can be replaced by a substitutions-first deduction * with the same assumptions, axioms and conclusion.

Page 14: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 071414

Proof of Lemma (6D2.1):Suppose the rule (Sub) is applied below an application of the rule (E), as follows:

(E)

(Sub) s()

Then (Sub) can be moved up above (E), thus:

(Sub) (Sub) s()s() s() (E) s()

Page 15: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 071515

Two successive (Sub)'s can be combined into one. The moving-up procedure ends when all (Sub)'s are at the tops of branches in the deduction tree. By the restriction on (Sub) in (6D1), the top formula of each of these branches cannot be a non-axiom assumption, so it must be an axiom.

Page 16: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 071616

• Definition (6D3) Hilbert-style intuitionistic logic of implication is the A-logic whose A has just the following four members:(B) (ab)(ca)(cb), (C) (abc)bac, (K) aba,(W) (aab)ab.

Page 17: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 071717

• Definition (6D4) Hilbert-style R is the A-logic whose A has just the following four members:(B) (ab)(ca)(cb), (C) (abc)bac, (I) aa,(W) (aab)ab.

Page 18: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 071818

• Definition (6D5) Hilbert-style BCK-logic of implication is the A-logic whose A has just the following three members:(B) (ab)(ca)(cb), (C) (abc)bac, (K) aba.

Page 19: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 071919

• Definition (6D6) Hilbert-style BCI-logic of implication is the A-logic whose A has just the following three members:(B) (ab)(ca)(cb), (C) (abc)bac, (I) aa.

Page 20: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 072020

• Example:

By Example (6D1.2) I aa is provable in Hilbert-style BCK-logic and in Hilbert-style intuitionistic logic.

Page 21: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 072121

• (B), (C), (I), (K), and (W) are the principal types of the -terms B, C, I, K and W. Each of the formulas also expresses a property of implication that has its own interest quite independently of type-theory.(I) aa indicates the reflexivity property of implication,(C) (abc)bac states that hypotheses can be commuted,(K) aba states that redundant hypotheses can be added,(W) (aab)ab states that duplicates can be removed,(B) (ab)(ca)(cb) indicates a transitivity property of implication or a "right-handed" replacement property which says that if ab holds, then a may be replaced by b in the formula ca.

Page 22: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 072222

• Definition (9F1) If S is a set of -terms, an S-combination, or applicative combination of members of S, is a -term built from some or all of the members of S by application only. An S-and-variables combination is an applicative combination of members of S and variables.For subsets of {B, B', C, I, K, S, W} (see Slide 2) the S-combinations will be called BCK-combinations, BCIW-combinations,etc.

• Examples: If S = {B, C, K} then CKK and B are S-combinations and CKx, xy and CKK are S-and-variables combinations. But x.BC is neither an S-combination nor an S-and-variables combination.

Page 23: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 072323

• CKK ?

Page 24: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 072424

• Curry-Howard Theorem for Hilbert systems (6D7)Let {C1, C2, ...} be a finite or infinite set of typable closed -terms and let A = {1, 2, ...} where i PT(Ci). Then

(i) the theorems of A-logic are exactly the types of the typable applicative combinations of C1, C2, ...,

(ii) the relation 1, ..., n ⊢A holds iff there exist an applicative combination M of C1, C2, ..., and some distinct term-variables x1, ..., xn, such that

x1:1, ..., xn:n ⊢ M:.

Page 25: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 072525

• Proof:Part (i) is a special case of (ii) with n = 0.We prove (ii). First, the "if"-part.Let M be an applicative combination of x1, ..., xn, C1, C2, ..., and let be a TA-deduction of

x1:1, ..., xn:n ↦ M:. (1)

Corresponding to each occurrence of a Ci in M there will be an occurrence of ↦ Ci:s(i) in for some substitution s. Remove from all steps above these occurrences of C1, C2, ..., and replace each formula ↦ Ci:s(i) by the type s(i). Then replace every other formula in , say ↦ N:, by the type . The result is a Hilbert-style deduction giving

1, ..., n ⊢ . (2)

Page 26: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 072626

Now, we prove the "only if"-part. Let 1, ..., n ⊢ in A-logic. Then by Lemma (6D2.1) there is a deduction of in which (Sub) is only applied to axioms. Change to a TA-deduction as follows. First choose some distinct term-variables x1, ..., xn and replace each undischarged branch-top occurrence of each i in by

xi:i ↦ xi:i.

Next, since each application of (Sub) in will be applied to an axiom to give, say, ↦ s(k); replace it by a TA-proof of ↦ Ck:s(k). Then replace the logic rule (E) by the TA-rule (E) throughout. The result is a TA-deduction of (1) for some term M as required.

Page 27: Slides 07 1 Restricted -terms and logics Definition (1D1) A -term P is called a I-term iff, for each subterm with the form x  M in P, x occurs free in

Slides 07Slides 072727

• Theorem (6D8: Hilbert-Gentzen link) For the intuitionistic logic, R-logic, BCK-logic, and BCI-logic, the relation

1, ..., n ⊢

holds in the Natural Deduction version iff it holds in the Hilbert version.

• Note: This link is usually proved directly using the so-called Deduction Theorem, without going through -calculus.