Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Linear Type Theory Revisited (BACAT Feb 2014)

720 views

Published on

BACAT2: Valeria suggested that we discussed some old work on linear type theory to get up to date with newer work. Here are some slides for a background talk on linear type theory, based on Term Assignment for Intuitionistic Linear Logic. (Benton, Bierman, de Paiva and Hyland). Technical Report 262, University of Cambridge Computer Laboratory 1992.

Published in: Education
  • Be the first to comment

  • Be the first to like this

Linear Type Theory Revisited (BACAT Feb 2014)

  1. 1. Linear Type Theory Revisited Valeria de Paiva Nuance Comms February 21, 2014
  2. 2. Introduction
  3. 3. Goals Discuss very old work (early 90’s) on linear type theories
  4. 4. Goals Discuss very old work (early 90’s) on linear type theories based on Term Assignment for Intuitionistic Linear Logic. (Benton, Bierman, de Paiva and Hyland). Technical Report 262, University of Cambridge Computer Laboratory 1992.
  5. 5. Goals Discuss very old work (early 90’s) on linear type theories based on Term Assignment for Intuitionistic Linear Logic. (Benton, Bierman, de Paiva and Hyland). Technical Report 262, University of Cambridge Computer Laboratory 1992. available from http://www.cs.bham.ac.uk/ vdp/publications/papers.html.
  6. 6. Goals Discuss very old work (early 90’s) on linear type theories based on Term Assignment for Intuitionistic Linear Logic. (Benton, Bierman, de Paiva and Hyland). Technical Report 262, University of Cambridge Computer Laboratory 1992. available from http://www.cs.bham.ac.uk/ vdp/publications/papers.html. then get to the state-of-the art...
  7. 7. Summary from Abstract Investigate the problem of deriving a term assignment system for Girard’s Intuitionistic Linear Logic
  8. 8. Summary from Abstract Investigate the problem of deriving a term assignment system for Girard’s Intuitionistic Linear Logic both sequent calculus and natural deduction proof systems
  9. 9. Summary from Abstract Investigate the problem of deriving a term assignment system for Girard’s Intuitionistic Linear Logic both sequent calculus and natural deduction proof systems satisfying two important properties: the substitution property (the set of valid deductions is closed under substitution) and subject reduction (reduction on terms is well-typed)
  10. 10. Summary from Abstract Investigate the problem of deriving a term assignment system for Girard’s Intuitionistic Linear Logic both sequent calculus and natural deduction proof systems satisfying two important properties: the substitution property (the set of valid deductions is closed under substitution) and subject reduction (reduction on terms is well-typed) a categorical model for Intuitionistic Linear Logic and how to use it to derive the term assignment
  11. 11. Summary from Abstract Investigate the problem of deriving a term assignment system for Girard’s Intuitionistic Linear Logic both sequent calculus and natural deduction proof systems satisfying two important properties: the substitution property (the set of valid deductions is closed under substitution) and subject reduction (reduction on terms is well-typed) a categorical model for Intuitionistic Linear Logic and how to use it to derive the term assignment long (57 pages) but slow and easy...
  12. 12. Introduction the problem of deriving a term assignment system for Girard’s Intuitionistic Linear Logic
  13. 13. Introduction the problem of deriving a term assignment system for Girard’s Intuitionistic Linear Logic Previous approaches have simply annotated the sequent calculus with terms and have given little or no justification for their choice
  14. 14. Introduction the problem of deriving a term assignment system for Girard’s Intuitionistic Linear Logic Previous approaches have simply annotated the sequent calculus with terms and have given little or no justification for their choice Phil Wadler: There’s no substitute for LL
  15. 15. Introduction the problem of deriving a term assignment system for Girard’s Intuitionistic Linear Logic Previous approaches have simply annotated the sequent calculus with terms and have given little or no justification for their choice Phil Wadler: There’s no substitute for LL substitution lemma does not hold for the term assignment system in Abramsky’s ‘Computational Interpretations of Linear Logic’ (Cited by 546)
  16. 16. Digression: Other old work... Linear types can change the world Is there a use for linear logic? A taste of linear logic Operational interpretations of linear logic Reference counting as a computational interpretation of linear logic (Chirimar)
  17. 17. Introduction 2 solving the problem of deriving a term assignment system for Girard’s Intuitionistic Linear Logic:
  18. 18. Introduction 2 solving the problem of deriving a term assignment system for Girard’s Intuitionistic Linear Logic: Two ways By considering the sequent calculus formulation of the logic and using the underlying categorical constructions to suggest a term assignment system By considering a linear natural deduction system
  19. 19. Introduction 2 solving the problem of deriving a term assignment system for Girard’s Intuitionistic Linear Logic: Two ways By considering the sequent calculus formulation of the logic and using the underlying categorical constructions to suggest a term assignment system By considering a linear natural deduction system two approaches produce equivalent term assignment systems
  20. 20. Introduction 2 solving the problem of deriving a term assignment system for Girard’s Intuitionistic Linear Logic: Two ways By considering the sequent calculus formulation of the logic and using the underlying categorical constructions to suggest a term assignment system By considering a linear natural deduction system two approaches produce equivalent term assignment systems BUT for equality (via reduction of terms) matters are more subtle: natural equalities for category theory are stronger than those suggested by computational considerations
  21. 21. Outline of TR Girard’s Intuitionistic Linear Logic:
  22. 22. Outline of TR Girard’s Intuitionistic Linear Logic: a simple categorical model of Intuitionistic Linear Logic (sequent calculus)
  23. 23. Outline of TR Girard’s Intuitionistic Linear Logic: a simple categorical model of Intuitionistic Linear Logic (sequent calculus) a linear system of natural deduction
  24. 24. Outline of TR Girard’s Intuitionistic Linear Logic: a simple categorical model of Intuitionistic Linear Logic (sequent calculus) a linear system of natural deduction how our two systems of Intuitionistic Linear Logic are related
  25. 25. Outline of TR Girard’s Intuitionistic Linear Logic: a simple categorical model of Intuitionistic Linear Logic (sequent calculus) a linear system of natural deduction how our two systems of Intuitionistic Linear Logic are related the process of proof normalisation within the linear natural deduction system
  26. 26. Outline of TR Girard’s Intuitionistic Linear Logic: a simple categorical model of Intuitionistic Linear Logic (sequent calculus) a linear system of natural deduction how our two systems of Intuitionistic Linear Logic are related the process of proof normalisation within the linear natural deduction system model for Intuitionistic Linear Logic
  27. 27. Outline of TR Girard’s Intuitionistic Linear Logic: a simple categorical model of Intuitionistic Linear Logic (sequent calculus) a linear system of natural deduction how our two systems of Intuitionistic Linear Logic are related the process of proof normalisation within the linear natural deduction system model for Intuitionistic Linear Logic cut-elimination in the sequent calculus
  28. 28. Outline of TR Girard’s Intuitionistic Linear Logic: a simple categorical model of Intuitionistic Linear Logic (sequent calculus) a linear system of natural deduction how our two systems of Intuitionistic Linear Logic are related the process of proof normalisation within the linear natural deduction system model for Intuitionistic Linear Logic cut-elimination in the sequent calculus conclusions
  29. 29. Intuitionistic Linear Logic Recommended if sequent calculus/ND are not part of your vocab: Jean Gallier: Constructive Logics. Part I: A Tutorial on Proof Systems and Typed lambda-Calculi. Theoretical Computer Science, 110(2), 249-239 (1993). from http://www.cis.upenn.edu/ jean/gbooks/logic.html multiplicative fragment of Intuitionistic Linear Logic (ILL)
  30. 30. Intuitionistic Linear Logic Recommended if sequent calculus/ND are not part of your vocab: Jean Gallier: Constructive Logics. Part I: A Tutorial on Proof Systems and Typed lambda-Calculi. Theoretical Computer Science, 110(2), 249-239 (1993). from http://www.cis.upenn.edu/ jean/gbooks/logic.html multiplicative fragment of Intuitionistic Linear Logic (ILL) a refinement of intuitionistic logic (IL) where formulae must be used exactly once
  31. 31. Intuitionistic Linear Logic Recommended if sequent calculus/ND are not part of your vocab: Jean Gallier: Constructive Logics. Part I: A Tutorial on Proof Systems and Typed lambda-Calculi. Theoretical Computer Science, 110(2), 249-239 (1993). from http://www.cis.upenn.edu/ jean/gbooks/logic.html multiplicative fragment of Intuitionistic Linear Logic (ILL) a refinement of intuitionistic logic (IL) where formulae must be used exactly once Weakening and Contraction rules are removed
  32. 32. Intuitionistic Linear Logic Recommended if sequent calculus/ND are not part of your vocab: Jean Gallier: Constructive Logics. Part I: A Tutorial on Proof Systems and Typed lambda-Calculi. Theoretical Computer Science, 110(2), 249-239 (1993). from http://www.cis.upenn.edu/ jean/gbooks/logic.html multiplicative fragment of Intuitionistic Linear Logic (ILL) a refinement of intuitionistic logic (IL) where formulae must be used exactly once Weakening and Contraction rules are removed To regain the expressive power, rules returned in a controlled manner using operator “!”
  33. 33. Intuitionistic Linear Logic Recommended if sequent calculus/ND are not part of your vocab: Jean Gallier: Constructive Logics. Part I: A Tutorial on Proof Systems and Typed lambda-Calculi. Theoretical Computer Science, 110(2), 249-239 (1993). from http://www.cis.upenn.edu/ jean/gbooks/logic.html multiplicative fragment of Intuitionistic Linear Logic (ILL) a refinement of intuitionistic logic (IL) where formulae must be used exactly once Weakening and Contraction rules are removed To regain the expressive power, rules returned in a controlled manner using operator “!” “!” similar to the modal necessity operator
  34. 34. Intuitionistic Linear Logic Rules
  35. 35. Generic Categorical considerations sequent calculus: providing not proofs themselves but a meta-theory concerning proofs fundamental idea of categorical treatment of proof theory propositions interpreted as objects of a category (or multicategory or polycategory)
  36. 36. Generic Categorical considerations sequent calculus: providing not proofs themselves but a meta-theory concerning proofs fundamental idea of categorical treatment of proof theory propositions interpreted as objects of a category (or multicategory or polycategory) proofs interpreted as maps of the category
  37. 37. Generic Categorical considerations sequent calculus: providing not proofs themselves but a meta-theory concerning proofs fundamental idea of categorical treatment of proof theory propositions interpreted as objects of a category (or multicategory or polycategory) proofs interpreted as maps of the category operations transforming proofs into proofs then correspond (if possible) to natural transformations between appropriate hom-functors
  38. 38. Categorical considerations dealing with sequents Γ multicategories A in principle we should deal with
  39. 39. Categorical considerations dealing with sequents Γ A in principle we should deal with multicategories simplifying assumption: multicategorical structure represented by a tensor product .
  40. 40. Categorical considerations dealing with sequents Γ A in principle we should deal with multicategories simplifying assumption: multicategorical structure represented by a tensor product . a sequent of form C1 , C2 , . . . , Cn A will be represented by C1 ⊗ C2 ⊗ . . . ⊗ Cn → A sometimes written as Γ → A
  41. 41. Categorical considerations dealing with sequents Γ A in principle we should deal with multicategories simplifying assumption: multicategorical structure represented by a tensor product . a sequent of form C1 , C2 , . . . , Cn A will be represented by C1 ⊗ C2 ⊗ . . . ⊗ Cn → A sometimes written as Γ → A (a coherence result is assumed)
  42. 42. Categorical considerations dealing with sequents Γ A in principle we should deal with multicategories simplifying assumption: multicategorical structure represented by a tensor product . a sequent of form C1 , C2 , . . . , Cn A will be represented by C1 ⊗ C2 ⊗ . . . ⊗ Cn → A sometimes written as Γ → A (a coherence result is assumed) We seek to enrich the sequent judgement to a term assignment judgement of the form x1 : C1 , x2 : C2 , . . . , xn : Cn e: A where the xi are distinct variables and e is a term.
  43. 43. Identity and Cut The sequent representing the Identity rule is interpreted as the canonical identity arrow idA : A → A
  44. 44. Identity and Cut The sequent representing the Identity rule is interpreted as the canonical identity arrow idA : A → A The corresponding rule of term formation is x : A x :A
  45. 45. Identity and Cut The sequent representing the Identity rule is interpreted as the canonical identity arrow idA : A → A The corresponding rule of term formation is x : A x :A The rule of Exchange we interpret by assuming that we have a symmetry for the tensor product
  46. 46. Identity and Cut The sequent representing the Identity rule is interpreted as the canonical identity arrow idA : A → A The corresponding rule of term formation is x : A x :A The rule of Exchange we interpret by assuming that we have a symmetry for the tensor product We suppress Exchange and the corresponding symmetry, considering multisets of formulae, so no term forming operations result from this rule (others do diff...)
  47. 47. Identity and Cut The sequent representing the Identity rule is interpreted as the canonical identity arrow idA : A → A The corresponding rule of term formation is x : A x :A The rule of Exchange we interpret by assuming that we have a symmetry for the tensor product We suppress Exchange and the corresponding symmetry, considering multisets of formulae, so no term forming operations result from this rule (others do diff...) The cut rule is interpreted as a generalized form of composition. if the maps f : Γ → A and g : A, ∆ → B are the interpretations of hypotheses of the rule, then the composite Γ ⊗ ∆ →f ⊗1∆ A ⊗ ∆ →g B is the interpretation of the conclusion
  48. 48. Substitution in Terms... Assumption: any logical rule corresponds to an operation on maps of the category which is natural in the interpretations of the components of the sequents which remain unchanged during the application of a rule
  49. 49. Substitution in Terms... Assumption: any logical rule corresponds to an operation on maps of the category which is natural in the interpretations of the components of the sequents which remain unchanged during the application of a rule Composition corresponds to Cut: our operations commute where appropriate with Cut.
  50. 50. Substitution in Terms... Assumption: any logical rule corresponds to an operation on maps of the category which is natural in the interpretations of the components of the sequents which remain unchanged during the application of a rule Composition corresponds to Cut: our operations commute where appropriate with Cut. Composition is interpreted by textual substitution thus the free variables have to reflect the possibility for substitution.
  51. 51. Substitution in Terms... Assumption: any logical rule corresponds to an operation on maps of the category which is natural in the interpretations of the components of the sequents which remain unchanged during the application of a rule Composition corresponds to Cut: our operations commute where appropriate with Cut. Composition is interpreted by textual substitution thus the free variables have to reflect the possibility for substitution. The rules for the constant I are parallel to the rules for the tensor product ⊗, which we describe next.
  52. 52. Substitution in Terms... Assumption: any logical rule corresponds to an operation on maps of the category which is natural in the interpretations of the components of the sequents which remain unchanged during the application of a rule Composition corresponds to Cut: our operations commute where appropriate with Cut. Composition is interpreted by textual substitution thus the free variables have to reflect the possibility for substitution. The rules for the constant I are parallel to the rules for the tensor product ⊗, which we describe next. The rules for (linear) implication are usual.
  53. 53. Substitution in Terms... Assumption: any logical rule corresponds to an operation on maps of the category which is natural in the interpretations of the components of the sequents which remain unchanged during the application of a rule Composition corresponds to Cut: our operations commute where appropriate with Cut. Composition is interpreted by textual substitution thus the free variables have to reflect the possibility for substitution. The rules for the constant I are parallel to the rules for the tensor product ⊗, which we describe next. The rules for (linear) implication are usual. The rules for the modality ! are the hard ones. these slides will get us to page 12 of the report...
  54. 54. Text substitution Terms use this and BB to get equation (2)
  55. 55. Tensor Terms Abramsky introduced a let constructor for tensor products, a reasonable syntax to bind variables x and y in the term f .
  56. 56. Tensor Terms Abramsky introduced a let constructor for tensor products, a reasonable syntax to bind variables x and y in the term f . Composition is interpreted by textual substitution thus the free variables have to reflect the possibility for substitution.
  57. 57. Tensor Terms Abramsky introduced a let constructor for tensor products, a reasonable syntax to bind variables x and y in the term f . Composition is interpreted by textual substitution thus the free variables have to reflect the possibility for substitution. Naturality in C gives rise to the equation equation explaining how lets interact with composition.
  58. 58. Tensor Terms Abramsky introduced a let constructor for tensor products, a reasonable syntax to bind variables x and y in the term f . Composition is interpreted by textual substitution thus the free variables have to reflect the possibility for substitution. Naturality in C gives rise to the equation equation explaining how lets interact with composition. For the tensoring on the right, we simply multiply (or tensor) the terms.
  59. 59. Tensor Terms Abramsky introduced a let constructor for tensor products, a reasonable syntax to bind variables x and y in the term f . Composition is interpreted by textual substitution thus the free variables have to reflect the possibility for substitution. Naturality in C gives rise to the equation equation explaining how lets interact with composition. For the tensoring on the right, we simply multiply (or tensor) the terms. since the constant I is the unity for the tensor operation, its rules are similar.
  60. 60. Implication Terms Are just like usual implication (lambda) terms
  61. 61. Implication Terms Are just like usual implication (lambda) terms the difference is that the variable that your lambda binds has to be present in the context and only once
  62. 62. Implication Terms Are just like usual implication (lambda) terms the difference is that the variable that your lambda binds has to be present in the context and only once There is an explanation for why the Yoneda lemma is responsible for the simplification that one can do in the syntax (and why Peter Schroeder-Heister is really right about his formulation of Natural Deduction) but we don’t need to go there.
  63. 63. Modality ! Term Assignment The left rules are ok. The dereliction rules creates a binder, a bit like the tensor and the I rules.
  64. 64. Modality ! Term Assignment The left rules are ok. The dereliction rules creates a binder, a bit like the tensor and the I rules. The weakening and contraction rules discard and copy variables, and have naturality conditions as the tensor rule.
  65. 65. Modality ! Term Assignment The left rules are ok. The dereliction rules creates a binder, a bit like the tensor and the I rules. The weakening and contraction rules discard and copy variables, and have naturality conditions as the tensor rule. The problematic rule, ”promotion”
  66. 66. Multiplicative Term Assignment
  67. 67. Conclusions so Far... The categorical model can give you guidance for the shape of the type theory rules.
  68. 68. Conclusions so Far... The categorical model can give you guidance for the shape of the type theory rules. Categorical rules are about full beta and eta equivalence plus some naturality conditions (not very liked by FPers)
  69. 69. Conclusions so Far... The categorical model can give you guidance for the shape of the type theory rules. Categorical rules are about full beta and eta equivalence plus some naturality conditions (not very liked by FPers)
  70. 70. Conclusions so Far... Newer models plus new term calculi via DILL (Dual Intuitionistic Linear Logic) and monoidal adjunction models (Benton, Barber, Mellies, who else?...)
  71. 71. Conclusions so Far... Newer models plus new term calculi via DILL (Dual Intuitionistic Linear Logic) and monoidal adjunction models (Benton, Barber, Mellies, who else?...) Which one to read about?
  72. 72. Conclusions so Far... Newer models plus new term calculi via DILL (Dual Intuitionistic Linear Logic) and monoidal adjunction models (Benton, Barber, Mellies, who else?...) Which one to read about? Rewriting is a new ball game, which I would like to investigate too cf. Barney Hilken paper “Towards a proof theory of rewriting: the simply-typed 2-[lambda] calculus” Theor. Comp. Sci. Vol. 170, 1-2, pp 407-444. 1996.

×