logical formalisms
play

Logical Formalisms 2 MPRI 6 I. Lambda-Calculus (a crash review) - PowerPoint PPT Presentation

1 MPRI 6 Logical Formalisms 2 MPRI 6 I. Lambda-Calculus (a crash review) 3 MPRI 6 What is lambda-calculus ? An intentional theory of functions. A simple functional programming language. A theory of free- and bound-variables, of


  1. 1 MPRI 6 Logical Formalisms

  2. 2 MPRI 6 I. Lambda-Calculus (a crash review)

  3. 3 MPRI 6 What is lambda-calculus ? • An intentional theory of functions. • A simple functional programming language. • A theory of free- and bound-variables, of scope and substitution. • The keystone of higher-order syntax and higher- order logic. • The algebra of natural-deduction proofs.

  4. 4 MPRI 6 Syntax : T ::= x | λx. T | ( T T ) λ is a binder: thre free occurrences of x in t are bound in λx. t . Warning : You should solve, once and for all, any problem you could have with the notions of free and bound occurrences of variables. Reduction rule : ( λx. t ) u → β t [ x := u ] Church-Rosser Theorem : For all λ -terms t , u , and v such that: t → → β u and t → → β v there exists a λ -term w such that: u → → β w and v → → β w Corollary : Uniqueness of normal forms. Turing Completeness : Every recursive function is λ -definable.

  5. 5 MPRI 6 Sense and Denotation Sense/Denotation (Frege) Intension/Extension (Carnap) According to Frege, the sense of an expression is its “mode of presentation”, while the denotation of an expression is the object it refers to. For instance, both expressions “1 + 1” and “2” have the same denotation but not the same sense. An intensional proposition is a proposition whose F.L.G. Frege validity is not invariant under extensional substi- (1848–1925) tution. Frege gives the example of the “morning star” and the “evening star” which both refer to the planet Venus. Compare “the morning star is the evening star” with “John does not know that the morning star is the evening star”.

  6. 6 MPRI 6 Paradoxes and Type-Theory Compare: Ω = δ δ δ = λx. x x where with: X = { x | x �∈ x } B. Russell (1872–1970)

  7. 7 MPRI 6 Simply Typed Lambda-Calculus Γ , x : A − x : A Γ − t : A → B Γ − u : A x : A, Γ − t : B Γ − ( t u ) : B Γ − λx. t : A → B Strong-Normalisation Theorem : There is no infinite reduction se- quence.

  8. 8 MPRI 6 Curry-Howard Isomorphism Natural deduction λ -calculus propositions types connectives type constructors proofs terms introduction rules term constructors elimination rules term destructors active hypotheses free variables discarded hypotheses bound variables detour redex detour elimination reduction step proof normalization term evaluation

  9. 9 MPRI 6 II. Higher-Order Logic

  10. 10 MPRI 6 Church’s Simple Theory of Types Two atomic types: ι, o Logical constants: : ⊥ o ⊃ : o → o → o ∀ α : ( α → o ) → o (at each type α ) ι is the type of individuals and o is the type of A. Church propositions. (1903–1995) Formulas are defined to be well-typed λ -terms of type o . We write P ⊃ Q and ∀ x. P for ⊃ P Q and ∀ α ( λx. P ), respectively. Similarly for the other connectives ( ¬ , ∧ , ∨ , ≡ , ∃ ), which are defined in the usual way — the system is classical! t = u is defined as ∀ P.P t ⊃ P u .

  11. 11 MPRI 6 Logical rules : Γ , A − A Γ , A − B Γ − A ⊃ B Γ − A Γ − A ⊃ B Γ − B Γ − A Γ − ∀ α A x of type α , x �∈ FV (Γ) B of type α Γ − ∀ α ( λx α . A ) Γ − A B Γ , ¬ A − ⊥ Γ − A Conversion rule : Γ − A where A = β B Γ − B

  12. 12 MPRI 6 Extensionality axioms : Γ − ( ∀ α x.A x = B x ) ⊃ ( A = B ) Γ − ( A ≡ B ) ⊃ ( A = B )

  13. 13 MPRI 6 Higher-order logic as a set theory { x | P } as λx. P t ∈ A as A t Expressive Power △ S = ( ∀ x. s x � = 0) ∧ ( ∀ xy. s x = s y ⊃ x = y ) △ N = λx. ( ∀ R. R 0 ∧ ( ∀ y. R y ⊃ R ( s y )) ⊃ R x ) The only model of S ∧ ∀ x. N x is the set of natural numbers.

  14. 14 MPRI 6 Let φ be a formula of Peano’s Arithmetic, and define φ N as follows: • φ N = φ , for φ an atomic formula, • ( ¬ φ ) N = ¬ φ N , • ( φ ∗ ψ ) N = φ N ∗ ψ N , for ∗ ∈ {∧ , ∨ , ⊃ , ≡} , • ( ∀ x. φ ) N = ∀ x. (N x ⊃ φ N ), • ( ∃ x. φ ) N = ∃ x. (N x ∧ φ N ). Let D be the conjunction of the universal closures of the defining equations for addition and multiplication, and let PA be S ∧ ∀ x. N x ∧ D. Then, the formula PA ⊃ φ is valid if and only if φ is true in the standard model of Peano’s arithmetic. Corollary : incompleteness of higher-order logic.

  15. 15 MPRI 6 III. Modal Logic

  16. 16 MPRI 6 Necessity and Possibility A proposition is necessarily true if it is true in all possible worlds. A proposition is possibly true if it is true in at least one possible world. Dr. Pangloss in Voltaire’s Candide. G.W. von Leibniz (1646–1716)

  17. 17 MPRI 6 Syntax : F ::= a | ¬ F | F ∨ F | � F Define the other connectives in the usual way. Define ♦ A as ¬ � ¬ A . � A stands for “necessarily A”. ♦ A stands for “possibly A”. Validity : let M = � W, P � , where W is a set of “possible worlds”, and P is a function that asigns to each atomic proposition a subset of W . M , s | = a iff s ∈ P ( a ) . M , s | = ¬ A iff not M , s | = A. M , s | = A ∨ B iff either M , s | = A or M , s | = B, or both . = � A iff for every t ∈ W, M , t | = A. M , s | It is easy to establish that: M , s | = ♦ A iff for some t ∈ W, M , t | = A.

  18. 18 MPRI 6 System S5 : (P) all propositional tautologies (K) � ( A ⊃ B ) ⊃ ( � A ⊃ � B ) (T) � A ⊃ A (5) ♦ A ⊃ �♦ A Modus ponens: A ⊃ B A B Rule of necessitation: A � A

  19. 19 MPRI 6 Kripke Semantics : let M = � W, R, P � , where W is a set of “possible worlds”, R is a binary relation over W , and P is a function that asigns to each atomic proposition a subset of W . M , s | = � A iff for every t ∈ W such that sRt, M , t | = A. = ♦ A iff for some t ∈ W such that sRt, M , t | = A. M , s | System K : (P) all propositional tautologies (K) � ( A ⊃ B ) ⊃ ( � A ⊃ � B ) Modus ponens: A ⊃ B A B Rule of necessitation: A � A

  20. 20 MPRI 6 The following theorems of S5 are not valid in the class of all Kripke models: (D) � A ⊃ ♦ A (T) � A ⊃ A (B) A ⊃ �♦ A (4) � A ⊃ �� A (5) ♦ A ⊃ �♦ A A binary relation R ∈ W × W is serial if and only if for every s ∈ W there exists t ∈ W such that sRt .

  21. 21 MPRI 6 Some well-known systems KD basic deontic logic serial KT basic alethic logic reflexive KTB Brouwersche system reflexive, symmetric KT4 Lewis’ S4 reflexive, transitive KT5 Lewis’ S5 reflexive, symmetric, transitive

  22. 22 MPRI 6 IV. Hybrid Logic

  23. 23 MPRI 6 Key idea: provide the formula language with explicit means of speaking about worlds! Syntax : Two sorts of atoms: usual atomic propositions ( a, b, c, . . . ), and nominals ( i, j, k, . . . ). Nominals will be used for naming worlds. F ::= a | i | ¬ F | F ∨ F | � F | ↓ i. F | @ i F ↓ is a binder: the free occurrences of i in A are bound in ↓ i. F . On the, other hand, @ is simply a binary connectives whose first term must be a nominal. Intuition: ↓ is used for naming the “here-and-now”. It allows a nominal to be bound to the current world. @ i A asserts that proposition A holds at world i .

  24. 24 MPRI 6 Semantics : Let M = � W, R, P � be a Kripke model, and let η be a valuation that assigns to each nominal an element of W . M , η, s | = a iff s ∈ P ( a ) . M , η, s | = i iff s = η ( i ) . = ¬ A iff not M , η, s | = A. M , η, s | M , η, s | = A ∨ B iff either M , η, s | = A or M , η, s | = B, or both . M , η, s | = � A iff for every t ∈ W such that sRt, M , η, t | = A. M , η, s | = ↓ i. A iff M , η [ i := s ] , s | = A. M , η, s | = @ i A iff M , η, η ( i ) | = A.

  25. 25 MPRI 6 Axiomatization : 1. ↓ i. ( A ⊃ B ) ⊃ ( A ⊃ ↓ i. B ), where i does not occur free in A 2. ↓ i. A ⊃ ( j ⊃ A [ i := j ]) 3. ↓ i. ( i ⊃ A ) ⊃ ↓ i. A 4. ↓ i. A ≡ ¬↓ i. ¬ A 5. @ i ( A ⊃ B ) ⊃ (@ i A ⊃ @ i B ) 6. @ i A ≡ ¬ @ i ¬ A 7. i ∧ A ⊃ @ i A

  26. 26 MPRI 6 8. @ i i 9. @ i j ⊃ (@ j A ⊃ @ i A ) 10. @ i j ≡ @ j i 11. @ i @ j A ≡ @ j A 12. ♦ @ i A ⊃ @ i A 13. ♦ i ∧ @ i A ⊃ ♦ A A A @ i ( j ∧ A ) ⊃ B @ i ♦ ( j ∧ A ) ⊃ B A ⊃ B A A (*) (*) ↓ i. A @ i A @ i A ⊃ B @ i ♦ A ⊃ B B � A (*) j is distinct from i and does not occur free in A or B .

  27. 27 MPRI 6 An example : The binary operator of temporal logic: A until B may be defined as: ↓ i. ♦ ↓ j. @ i ( ♦ ( j ∧ B ) ∧ � ( ♦ j ⊃ A )) http://hylo.loria.fr/

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend