lambda calculus linear logic and symbolic computation
play

Lambda Calculus, Linear Logic and Symbolic Computation Habilitation - PowerPoint PPT Presentation

Lambda Calculus, Linear Logic and Symbolic Computation Habilitation diriger des recherches Giulio Manzonetto giulio.manzonetto@lipn.univ-paris13.fr LIPN IRIF Universit Paris Nord Universit Paris Diderot March the 7th, 2017 Giulio


  1. λ -Calculus — Its Syntax and Semantics Syntactic and semantic tools Observational Theories Denotational Tree-like structures Semantics Scott’s continuous semantics: Böhm Trees Data ∈ D poset + extensional equalities Program = continuous function Full abstraction for H ∗ [Hyland/Wadsworth’76] ⇒ H ∗ ⊢ M = N D ∞ | = M = N ⇐ Full abstraction for H + [Coppo-Dezani-Zacchi’87] ⇒ H + ⊢ M = N D cdz | = M = N ⇐ Giulio Manzonetto HdR Defense 07/03/17 9 / 38

  2. λ -Calculus — Its Syntax and Semantics The Relational Semantics The cartesian closed category MRel : objects: sets A , B , . . . morphisms: A → B are relations from M f ( A ) to B Relational Graph Models D = ( D , i ) : injection: i : M f ( D ) × D → D Approximation Theorem [ManzonettoR, MFPS 2014] In every rgm D , � M � D = { � t � D : t is a finite approximant of BT ( M ) } Characterization of Full Abstraction for H + [BreuvartMPR, FSCD 2016] Th ( D ) = H + ⇐ ⇒ D is extensional and λ -König. Characterization of Full Abstraction for H ∗ [BreuvartMR 2017] Th ( D ) = H ∗ ⇐ ⇒ D is extensional and hyperimmune. Giulio Manzonetto HdR Defense 07/03/17 10 / 38

  3. λ -Calculus — Its Syntax and Semantics The Relational Semantics The cartesian closed category MRel : objects: sets A , B , . . . morphisms: A → B are relations from M f ( A ) to B Relational Graph Models D = ( D , i ) : injection: i : M f ( D ) × D → D Approximation Theorem [ManzonettoR, MFPS 2014] In every rgm D , � M � D = { � t � D : t is a finite approximant of BT ( M ) } Characterization of Full Abstraction for H + [BreuvartMPR, FSCD 2016] Th ( D ) = H + ⇐ ⇒ D is extensional and λ -König. Characterization of Full Abstraction for H ∗ [BreuvartMR 2017] Th ( D ) = H ∗ ⇐ ⇒ D is extensional and hyperimmune. Giulio Manzonetto HdR Defense 07/03/17 10 / 38

  4. λ -Calculus — Its Syntax and Semantics The Relational Semantics The cartesian closed category MRel : objects: sets A , B , . . . morphisms: A → B are relations from M f ( A ) to B Relational Graph Models D = ( D , i ) : injection: i : M f ( D ) × D → D Approximation Theorem [ManzonettoR, MFPS 2014] In every rgm D , � M � D = { � t � D : t is a finite approximant of BT ( M ) } Characterization of Full Abstraction for H + [BreuvartMPR, FSCD 2016] Th ( D ) = H + ⇐ ⇒ D is extensional and λ -König. Characterization of Full Abstraction for H ∗ [BreuvartMR 2017] Th ( D ) = H ∗ ⇐ ⇒ D is extensional and hyperimmune. Giulio Manzonetto HdR Defense 07/03/17 10 / 38

  5. λ -Calculus — Its Syntax and Semantics The Relational Semantics The cartesian closed category MRel : objects: sets A , B , . . . morphisms: A → B are relations from M f ( A ) to B Are all theories T in the interval [ H + , H ∗ ] Relational Graph Models D = ( D , i ) : representable by relational graph models? injection: i : M f ( D ) × D → D Approximation Theorem [ManzonettoR, MFPS 2014] In every rgm D , � M � D = { � t � D : t is a finite approximant of BT ( M ) } Characterization of Full Abstraction for H + [BreuvartMPR, FSCD 2016] Th ( D ) = H + ⇐ ⇒ D is extensional and λ -König. Characterization of Full Abstraction for H ∗ [BreuvartMR 2017] Th ( D ) = H ∗ ⇐ ⇒ D is extensional and hyperimmune. Giulio Manzonetto HdR Defense 07/03/17 10 / 38

  6. λ -Calculus — Its Syntax and Semantics The Relational Semantics The cartesian closed category MRel : objects: sets A , B , . . . morphisms: A → B are relations from M f ( A ) to B Are all theories T in the interval [ H + , H ∗ ] Relational Graph Models D = ( D , i ) : representable by relational graph models? injection: i : M f ( D ) × D → D Approximation Theorem [ManzonettoR, MFPS 2014] In every rgm D , � M � D = { � t � D : t is a finite approximant of BT ( M ) } Otherwise, is it possible to characterize all representable theories? Characterization of Full Abstraction for H + [BreuvartMPR, FSCD 2016] Th ( D ) = H + ⇐ ⇒ D is extensional and λ -König. Characterization of Full Abstraction for H ∗ [BreuvartMR 2017] Th ( D ) = H ∗ ⇐ ⇒ D is extensional and hyperimmune. Giulio Manzonetto HdR Defense 07/03/17 10 / 38

  7. λ -Calculus — Its Syntax and Semantics The Relational Semantics The cartesian closed category MRel : objects: sets A , B , . . . morphisms: A → B are relations from M f ( A ) to B Are all theories T in the interval [ H + , H ∗ ] Relational Graph Models D = ( D , i ) : representable by relational graph models? injection: i : M f ( D ) × D → D Approximation Theorem [ManzonettoR, MFPS 2014] In every rgm D , � M � D = { � t � D : t is a finite approximant of BT ( M ) } Otherwise, is it possible to characterize all representable theories? Characterization of Full Abstraction for H + [BreuvartMPR, FSCD 2016] Th ( D ) = H + ⇐ ⇒ D is extensional and λ -König. What can we say about non-extensional Characterization of Full Abstraction for H ∗ [BreuvartMR 2017] representable theories? Th ( D ) = H ∗ ⇐ ⇒ D is extensional and hyperimmune. Giulio Manzonetto HdR Defense 07/03/17 10 / 38

  8. Quantitative Semantics 2. Quantitative Properties in Nondeterministic Settings Giulio Manzonetto HdR Defense 07/03/17 11 / 38

  9. Quantitative Semantics Semantics of Non-Determinism Nondeterministic Functional Programming Languages Denotational characterize Operational properties Semantics Semantics Execution properties I/O flow Termination Contextual equivalence Giulio Manzonetto HdR Defense 07/03/17 12 / 38

  10. Quantitative Semantics Semantics of Non-Determinism Nondeterministic Functional Programming Languages Denotational characterize Operational properties Semantics Semantics Properties of the model Execution properties Soundness I/O flow Adequacy Termination Full Abstraction Contextual equivalence Giulio Manzonetto HdR Defense 07/03/17 12 / 38

  11. Quantitative Semantics Semantics of Non-Determinism Nondeterministic Functional Programming Languages Denotational characterize Operational properties Semantics Semantics Properties of the model Qualitative properties Soundness I/O flow Adequacy Termination Full Abstraction Contextual equivalence Giulio Manzonetto HdR Defense 07/03/17 12 / 38

  12. Quantitative Semantics Quantitative properties input output P → · → · → · · · → · → · → i o “black box” Intensional view on Programs We need to “open the box”. . . Giulio Manzonetto HdR Defense 07/03/17 13 / 38

  13. Quantitative Semantics Quantitative properties input output → · → · → · · · → · → · → i o Intensional view on Programs We need to “open the box”. . . Quantitative Properties Number of steps to termination, Number of calls to the argument at runtime, Amount of resources used during the computation, Non-deterministic setting: Number of “ways” to get the output. Giulio Manzonetto HdR Defense 07/03/17 13 / 38

  14. Quantitative Semantics Quantitative properties input output · · · · · · · i o · · · · Intensional view on Programs We need to “open the box”. . . Quantitative Properties Number of steps to termination, Number of calls to the argument at runtime, Amount of resources used during the computation, Non-deterministic setting: Number of “ways” to get the output. Giulio Manzonetto HdR Defense 07/03/17 13 / 38

  15. Quantitative Semantics Semantics of Non-Determinism Nondeterministic Functional Programming Languages Denotational characterize Operational properties Semantics Semantics Properties of the model Qualitative properties Soundness I/O flow Adequacy Termination Full Abstraction Contextual equivalence Quantitative properties # steps to termination ? # calls to argument # resources needed # ways to get the output Giulio Manzonetto HdR Defense 07/03/17 14 / 38

  16. Quantitative Semantics Semantics of Non-Determinism Nondeterministic Functional Programming Languages Denotational characterize Operational properties Semantics Semantics Properties of the model Qualitative properties Soundness I/O flow Adequacy Termination Full Abstraction Contextual equivalence Quantitative properties # steps to termination We need quantitative models! # calls to argument # resources needed # ways to get the output Giulio Manzonetto HdR Defense 07/03/17 14 / 38

  17. Quantitative Semantics The Relational Semantics is Quantitative The category MRel Data/Objects: sets Program/Morphism A → B : relation from M f ( A ) and B . # calls to the argument output � P � ⊆ M f ( A ) × B Example A program like M = λ n . n ∗ n : Nat → Nat is interpreted by the relation � M � = { ([ n 1 , n 2 ] , n 1 ∗ n 2 ) | n 1 , n 2 ∈ N } Multiset of cardinality two ⇒ M uses its argument twice. Giulio Manzonetto HdR Defense 07/03/17 15 / 38

  18. Quantitative Semantics The Relational Semantics is Quantitative The category MRel Data/Objects: sets Program/Morphism A → B : relation from M f ( A ) and B . # calls to the argument output � P � ⊆ M f ( A ) × B Example A program like M = λ n . n ∗ n : Nat → Nat is interpreted by the relation � M � = { ([ n 1 , n 2 ] , n 1 ∗ n 2 ) | n 1 , n 2 ∈ N } Multiset of cardinality two ⇒ M uses its argument twice. Giulio Manzonetto HdR Defense 07/03/17 15 / 38

  19. Quantitative Semantics The Relational Semantics is Quantitative The category MRel Data/Objects: sets Program/Morphism A → B : relation from M f ( A ) and B . # calls to the argument output � P � ⊆ M f ( A ) × B Example A program like M = λ n . n ∗ n : Nat → Nat is interpreted by the relation � M � = { ([ n 1 , n 2 ] , n 1 ∗ n 2 ) | n 1 , n 2 ∈ N } NB: Non-deterministic setting! Giulio Manzonetto HdR Defense 07/03/17 15 / 38

  20. Quantitative Semantics Replace qualitative by quantitative methods Qualitative methods Quantitative methods Continuous semantics Relational Semantics � M � = cont. function A → B � M � = relation ⊆ M f ( A ) × B � M � = � A ∈ App ( M ) � A � Appr. Thm. � M � = � t ∈T ( M ) � t � Appr. Thm. Böhm’s approximants Resource approximants λ� x | λ x . s | s · [ t 1 , . . . , t n ] (linear term) x . yA 1 · · · A n (finite tree) Taylor Expansion Böhm trees ∞ 1 � BT ( M ) = � A T ( MN ) = n ! M [ N 1 , . . . , N n ] A ∈ App ( BT ( M )) n = 0 Giulio Manzonetto HdR Defense 07/03/17 16 / 38

  21. Quantitative Semantics Replace qualitative by quantitative methods Qualitative methods Quantitative methods For the resource Continuous semantics Relational Semantics calculus, look in the HdR thesis! � M � = cont. function A → B � M � = relation ⊆ M f ( A ) × B � M � = � A ∈ App ( M ) � A � Appr. Thm. � M � = � t ∈T ( M ) � t � Appr. Thm. Böhm’s approximants Resource approximants λ� x | λ x . s | s · [ t 1 , . . . , t n ] (linear term) x . yA 1 · · · A n (finite tree) Taylor Expansion Böhm trees ∞ 1 � BT ( M ) = � A T ( MN ) = n ! M [ N 1 , . . . , N n ] A ∈ App ( BT ( M )) n = 0 Manzonetto et Al. [2010-2013] Syntactic properties + model theory for Ehrhard’s resource calculus. Giulio Manzonetto HdR Defense 07/03/17 16 / 38

  22. Quantitative Semantics Some Quantitative Properties Bound on the length of the (linear) head reduction: σ ∈ � M � ⇒ M normalizes in # σ linear-steps Theorems [DeCarvalho 2008] Call-By-Name, [Ehrhard 2012] Call-By-Value, [Díaz-CaroMP 2013] Call-By-Value with may/must non-determinism. [BreuvartMR 2017] Combinatorial proof of Approximation Theorem Giulio Manzonetto HdR Defense 07/03/17 17 / 38

  23. Quantitative Semantics Can we do better? Giulio Manzonetto HdR Defense 07/03/17 18 / 38

  24. Quantitative Semantics The Weighted Relational Model Relations as matrices A relation from M f ( A ) to B is a matrix in Bool M f ( A ) × B Generalization: Continuous semi-rings From Bool to arbitrary commutative semi-rings R = ( R , · , 1 , � ) , such that: R is a positively ordered cpo with a bottom element 0 the operators · and � are continuous. The interpretation of ⊢ M : A → B becomes a matrix � M � : M f ( A ) × B → R Giulio Manzonetto HdR Defense 07/03/17 19 / 38

  25. Quantitative Semantics The program interpretation Program ⊢ P : Nat → Nat . � P � 0 1 2 3 4 5 · · · [] p 1 , 1 p 1 , 2 p 1 , 3 p 1 , 4 p 1 , 5 p 1 , 6 · · · [ 0 ] p 2 , 1 p 2 , 2 p 2 , 3 p 2 , 4 p 2 , 5 p 2 , 6 · · · [ 0 , 1 ] p 3 , 1 p 3 , 2 p 3 , 3 p 3 , 4 p 3 , 5 p 2 , 6 · · · [ 0 , 0 ] p 4 , 1 p 4 , 2 p 4 , 3 p 4 , 4 p 4 , 5 p 3 , 6 · · · [ 1 , 1 ] p 5 , 1 p 5 , 2 p 5 , 3 p 5 , 4 p 5 , 5 p 4 , 6 · · · [ 0 , 0 , 1 ] p 6 , 1 p 6 , 2 p 6 , 3 p 6 , 4 p 6 , 5 p 6 , 6 · · · . . . . . . . ... . . . . . . . . . . . . . . Programs become matrices. . . what is the meaning of the scalars? Giulio Manzonetto HdR Defense 07/03/17 20 / 38

  26. Quantitative Semantics The program interpretation Program ⊢ P : Nat → Nat . � P � 0 1 2 3 4 5 · · · [] p 1 , 1 p 1 , 2 p 1 , 3 p 1 , 4 p 1 , 5 p 1 , 6 · · · [ 0 ] p 2 , 1 p 2 , 2 p 2 , 3 p 2 , 4 p 2 , 5 p 2 , 6 · · · [ 0 , 1 ] p 3 , 1 p 3 , 2 p 3 , 3 p 3 , 4 p 3 , 5 p 2 , 6 · · · [ 0 , 0 ] p 4 , 1 p 4 , 2 p 4 , 3 p 4 , 4 p 4 , 5 p 3 , 6 · · · [ 1 , 1 ] p 5 , 1 p 5 , 2 p 5 , 3 p 5 , 4 p 5 , 5 p 4 , 6 · · · [ 0 , 0 , 1 ] p 6 , 1 p 6 , 2 p 6 , 3 p 6 , 4 p 6 , 5 p 6 , 6 · · · . . . . . . . ... . . . . . . . . . . . . . . Programs become matrices. . . what is the meaning of the scalars? Giulio Manzonetto HdR Defense 07/03/17 20 / 38

  27. Quantitative Semantics Capturing the operational semantics Consider PCF or , with weighted reductions: M Giulio Manzonetto HdR Defense 07/03/17 21 / 38

  28. Quantitative Semantics Capturing the operational semantics Consider PCF or , with weighted reductions: p 1 M 1 M p 2 M 2 Giulio Manzonetto HdR Defense 07/03/17 21 / 38

  29. Quantitative Semantics Capturing the operational semantics Consider PCF or , with weighted reductions: M 1 , 1 p 1 , 1 p 1 M 1 , 2 M 1 p 1 , 2 M p 2 , 1 p 2 M 2 , 1 M 2 p 2 , 2 M 2 , 2 Giulio Manzonetto HdR Defense 07/03/17 21 / 38

  30. Quantitative Semantics Capturing the operational semantics Consider PCF or , with weighted reductions: n M 1 , 1 k p 1 , 1 k ′ p 1 M 1 , 2 n M 1 p 1 , 2 m M p 2 , 1 p 2 n M 2 M 2 , 1 n p 2 , 2 m M 2 , 2 Giulio Manzonetto HdR Defense 07/03/17 21 / 38

  31. Quantitative Semantics Capturing the operational semantics Consider PCF or , with weighted reductions: n M 1 , 1 k p 1 , 1 k ′ p 1 M 1 , 2 n M 1 p 1 , 2 m M p 2 , 1 p 2 n M 2 M 2 , 1 n p 2 , 2 m M 2 , 2 Parametric Adequacy [Laird, Manzonetto, McCusker, Pagani LICS’13] Given M : Nat we have: � M � ( n ) = Sum of the product of the scalars along the paths M ։ n Giulio Manzonetto HdR Defense 07/03/17 21 / 38

  32. Quantitative Semantics Parametrized Quantitative Results for PCF or What are we actually counting? This depends on the chosen semi-ring. . . x | λ x . M | MN | Y M | zero | succ M | pred M | ifz ( M , N , P ) | M or N Giulio Manzonetto HdR Defense 07/03/17 22 / 38

  33. Quantitative Semantics Parametrized Quantitative Results for PCF or What are we actually counting? This depends on the chosen semi-ring. . . x | λ x . M | MN | Y M | zero | succ M | pred M | ifz ( M , N , P ) | M or N � M � R Π R ! = Red ( M , n ) n Giulio Manzonetto HdR Defense 07/03/17 22 / 38

  34. Quantitative Semantics Parametrized Quantitative Results for PCF or What are we actually counting? This depends on the chosen semi-ring. . . x | λ x . M | MN | Y M | zero | succ M | pred M | ifz ( M , N , P ) | M or N � M � R Π R ! = Red ( M , n ) n ( N , · , 1 , � , ≤ ) number of paths from M to n Giulio Manzonetto HdR Defense 07/03/17 22 / 38

  35. Quantitative Semantics Parametrized Quantitative Results for PCF or What are we actually counting? This depends on the chosen semi-ring. . . x | λ x . M | MN | Y M | zero | succ M | pred M | ifz ( M , N , P ) | 1 2 M or 1 2 N � M � R Π R ! = Red ( M , n ) n ( N , · , 1 , � , ≤ ) number of paths from M to n ( R + , · , 1 , � , ≤ ) probability that M reduces to n [Danos-Ehrhard’11] Giulio Manzonetto HdR Defense 07/03/17 22 / 38

  36. Quantitative Semantics Parametrized Quantitative Results for PCF or What are we actually counting? This depends on the chosen semi-ring. . . x | λ x . 1 M | MN | Y ( 1 M ) | zero | succ M | pred M | ifz ( M , N , P ) | M or N � M � R Π R ! = Red ( M , n ) n ( N , · , 1 , � , ≤ ) number of paths from M to n ( R + , · , 1 , � , ≤ ) probability that M reduces to n [Danos-Ehrhard’11] ( N , + , 0 , min , ≥ ) minimum number of β, Y steps to n Giulio Manzonetto HdR Defense 07/03/17 22 / 38

  37. Quantitative Semantics Parametrized Quantitative Results for PCF or What are we actually counting? This depends on the chosen semi-ring. . . x | λ x . 1 M | MN | Y ( 1 M ) | zero | succ M | pred M | ifz ( M , N , P ) | M or N � M � R Π R ! = Red ( M , n ) n ( N , · , 1 , � , ≤ ) number of paths from M to n ( R + , · , 1 , � , ≤ ) probability that M reduces to n [Danos-Ehrhard’11] ( N , + , 0 , min , ≥ ) minimum number of β, Y steps to n ( N ⊥ , + , 0 , max , ≤ ) maximum number of β, Y steps to n Giulio Manzonetto HdR Defense 07/03/17 22 / 38

  38. Quantitative Semantics Parametrized Quantitative Results for PCF or What are we actually counting? This depends on the chosen semi-ring. . . x | λ x . 1 M | MN | Y ( 1 M ) | zero | succ M | pred M | ifz ( M , N , P ) | M or N � M � R Π R ! = Red ( M , n ) n ( N , · , 1 , � , ≤ ) number of paths from M to n ( R + , · , 1 , � , ≤ ) probability that M reduces to n [Danos-Ehrhard’11] ( N , + , 0 , min , ≥ ) minimum number of β, Y steps to n ( N ⊥ , + , 0 , max , ≤ ) maximum number of β, Y steps to n And more. . . See [Laird-Manzonetto-McCusker-Pagani LICS’2013] Giulio Manzonetto HdR Defense 07/03/17 22 / 38

  39. Quantitative Semantics Parametrized Quantitative Results for PCF or What are we actually counting? This depends on the chosen semi-ring. . . Are there other quantitative properties that can be captured by suitable semirings? x | λ x . 1 M | MN | Y ( 1 M ) | zero | succ M | pred M | ifz ( M , N , P ) | M or N � M � R Π R ! = Red ( M , n ) n ( N , · , 1 , � , ≤ ) number of paths from M to n ( R + , · , 1 , � , ≤ ) probability that M reduces to n [Danos-Ehrhard’11] ( N , + , 0 , min , ≥ ) minimum number of β, Y steps to n ( N ⊥ , + , 0 , max , ≤ ) maximum number of β, Y steps to n And more. . . See [Laird-Manzonetto-McCusker-Pagani LICS’2013] Giulio Manzonetto HdR Defense 07/03/17 22 / 38

  40. Quantitative Semantics Parametrized Quantitative Results for PCF or What are we actually counting? This depends on the chosen semi-ring. . . Are there other quantitative properties that can be captured by suitable semirings? x | λ x . 1 M | MN | Y ( 1 M ) | zero | succ M | pred M | ifz ( M , N , P ) | M or N � M � R Π R ! = Red ( M , n ) n ( N , · , 1 , � , ≤ ) number of paths from M to n Is it possible to get rid of commutativity? ( R + , · , 1 , � , ≤ ) probability that M reduces to n [Danos-Ehrhard’11] ( N , + , 0 , min , ≥ ) minimum number of β, Y steps to n ( N ⊥ , + , 0 , max , ≤ ) maximum number of β, Y steps to n And more. . . See [Laird-Manzonetto-McCusker-Pagani LICS’2013] Giulio Manzonetto HdR Defense 07/03/17 22 / 38

  41. Quantitative Semantics Parametrized Quantitative Results for PCF or What are we actually counting? This depends on the chosen semi-ring. . . Are there other quantitative properties that can be captured by suitable semirings? x | λ x . 1 M | MN | Y ( 1 M ) | zero | succ M | pred M | ifz ( M , N , P ) | M or N � M � R Π R ! = Red ( M , n ) n ( N , · , 1 , � , ≤ ) number of paths from M to n Is it possible to get rid of commutativity? ( R + , · , 1 , � , ≤ ) probability that M reduces to n [Danos-Ehrhard’11] ( N , + , 0 , min , ≥ ) minimum number of β, Y steps to n ( N ⊥ , + , 0 , max , ≤ ) maximum number of β, Y steps to n What about the profunctorial semantics? And more. . . See [Laird-Manzonetto-McCusker-Pagani LICS’2013] Giulio Manzonetto HdR Defense 07/03/17 22 / 38

  42. Factor Algebras at Work 3. Universal Algebra and Symbolic Computation Giulio Manzonetto HdR Defense 07/03/17 23 / 38

  43. Factor Algebras at Work Classical Logic — The Usual Algebraic Approach Propositional variables �→ algebraic variables Connectives �→ Boolean operations Propositional formula �→ Boolean algebraic term Tautology φ �→ equation of Boolean algebra φ = t Peirce Law: (( P → Q ) → P ) → P P Q P → Q ( P → Q ) → P (( P → Q ) → P ) → P t t t t t t f f t t f t t f t f f t f t Logical gates P P P ∧ Q P ∨ Q P ¬ P AND OR NOT Q Q Giulio Manzonetto HdR Defense 07/03/17 24 / 38

  44. Factor Algebras at Work Classical Logic — The Usual Algebraic Approach Propositional variables �→ algebraic variables Connectives �→ Boolean operations Propositional formula �→ Boolean algebraic term Tautology φ �→ equation of Boolean algebra φ = t Peirce Law: (( P → Q ) → P ) → P P Q P → Q ( P → Q ) → P (( P → Q ) → P ) → P t t t t t t f f t t f t t f t f f t f t Logical gates P P P ∧ Q P ∨ Q P ¬ P AND OR NOT Q Q Giulio Manzonetto HdR Defense 07/03/17 24 / 38

  45. Factor Algebras at Work Classical Logic — The Usual Algebraic Approach Propositional variables �→ algebraic variables Connectives �→ Boolean operations Propositional formula �→ Boolean algebraic term Tautology φ �→ equation of Boolean algebra φ = t Peirce Law: (( P → Q ) → P ) → P P Q P → Q ( P → Q ) → P (( P → Q ) → P ) → P t t t t t t f f t t f t t f t f f t f t tautology Logical gates P P P ∧ Q P ∨ Q P ¬ P AND OR NOT Q Q Giulio Manzonetto HdR Defense 07/03/17 24 / 38

  46. Factor Algebras at Work Classical Logic — The Usual Algebraic Approach Propositional variables �→ algebraic variables Connectives �→ Boolean operations Propositional formula �→ Boolean algebraic term Tautology φ �→ equation of Boolean algebra φ = t Peirce Law: (( P → Q ) → P ) → P P Q P → Q ( P → Q ) → P (( P → Q ) → P ) → P t t t t t t f f t t f t t f t f f t f t tautology Logical gates P P P ∧ Q P ∨ Q P ¬ P AND OR NOT Q Q Giulio Manzonetto HdR Defense 07/03/17 24 / 38

  47. Factor Algebras at Work Multi-Valued Matrix Logics: The Usual Approach Propositional variables �→ algebraic variables Connectives �→ operations of some algebra �→ Propositional formula algebraic term Tautology φ �→ equation φ = t n -valued Logics Algebras Łukasiewicz Logic Heyting algebras Gödel Logic MV-algebras Post Logic Post algebras . . etc. . Giulio Manzonetto HdR Defense 07/03/17 25 / 38

  48. Factor Algebras at Work In Practice: Binary Decision Diagrams P 1 P 2 P 3 P 1 f f f f f f t t f t f f P 2 P 2 f t t t t f f f P 3 P 3 P 3 P 3 t f t t t t f t f t f t f t t t t t t t ROBDDs Reduced: maximal sharing, Ordered: to ensure canonicity. Giulio Manzonetto HdR Defense 07/03/17 26 / 38

  49. Factor Algebras at Work In Practice: Binary Decision Diagrams P 1 P 2 P 3 P 3 f f f f f f t t f t f f P 2 f t t t t f f f P 1 t f t t t t f t t f t t t t ROBDDs Reduced: maximal sharing, Ordered: to ensure canonicity. Giulio Manzonetto HdR Defense 07/03/17 26 / 38

  50. Factor Algebras at Work Approach based on Decomposition Operators A τ -algebra A is decomposed into (simpler) factors B , C when: A ∼ = B × C A decomposition operator f : A × A → A is a map satisfying: ( F 1 ) f ( x , x ) = x . ( F 2 ) f ( f ( x , y ) , f ( w , z )) = f ( x , z ) . ( F 3 ) f is an algebra homomorphism. Each f induces a pair of complementary factor congruences ϕ, ¯ ϕ : x ϕ y ⇐ ⇒ f ( x , y ) = x ; x ¯ ϕ y ⇐ ⇒ f ( x , y ) = y . Giulio Manzonetto HdR Defense 07/03/17 27 / 38

  51. Factor Algebras at Work Approach based on Decomposition Operators A τ -algebra A is decomposed into (simpler) factors B , C when: A ∼ = B × C A decomposition operator f : A × A → A is a map satisfying: ( F 1 ) f ( x , x ) = x . ( F 2 ) f ( f ( x , y ) , f ( w , z )) = f ( x , z ) . ( F 3 ) f is an algebra homomorphism. Each f induces a pair of complementary factor congruences ϕ, ¯ ϕ : x ϕ y ⇐ ⇒ f ( x , y ) = x ; x ¯ ϕ y ⇐ ⇒ f ( x , y ) = y . Giulio Manzonetto HdR Defense 07/03/17 27 / 38

  52. Factor Algebras at Work Approach based on Decomposition Operators A τ -algebra A is decomposed into (simpler) factors B ∼ = A /ϕ, C ∼ = A / ¯ ϕ when: A ∼ = A /ϕ × A / ¯ ϕ A decomposition operator f : A × A → A is a map satisfying: ( F 1 ) f ( x , x ) = x . ( F 2 ) f ( f ( x , y ) , f ( w , z )) = f ( x , z ) . ( F 3 ) f is an algebra homomorphism. Each f induces a pair of complementary factor congruences ϕ, ¯ ϕ : x ϕ y ⇐ ⇒ f ( x , y ) = x ; x ¯ ϕ y ⇐ ⇒ f ( x , y ) = y . Giulio Manzonetto HdR Defense 07/03/17 27 / 38

  53. Factor Algebras at Work Classical Logic — Our Approach Truth values t , f �→ algebraic variables ξ f , ξ t ; Propositional variables P �→ decomposition operators f P ( ξ f , ξ t ); �→ Connectives disappear: implemented via substitutions and Boolean operations on indices The Translation t ∗ = ξ t f ∗ = ξ f P ∗ = P ( ξ f , ξ t ) ( ¬ φ ) ∗ φ ∗ ( ξ ¬ f , ξ ¬ t ); = ( φ ∧ ψ ) ∗ ψ ∗ ( φ ∗ ( ξ f ∧ f , ξ f ∧ t ) , φ ∗ ( ξ t ∧ f , ξ t ∧ t )); = ( φ ∨ ψ ) ∗ ψ ∗ ( φ ∗ ( ξ f ∨ f , ξ f ∨ t ) , φ ∗ ( ξ t ∨ f , ξ t ∨ t )); = ( φ → ψ ) ∗ ( ¬ φ ∨ ψ ) ∗ . = Giulio Manzonetto HdR Defense 07/03/17 28 / 38

  54. Factor Algebras at Work Classical Logic — Our Approach Truth values t , f �→ algebraic variables ξ f , ξ t ; Propositional variables P �→ decomposition operators f P ( ξ f , ξ t ); �→ Connectives disappear: implemented via substitutions and Boolean operations on indices The Translation t ∗ = ξ t f ∗ = ξ f P ∗ = P ( ξ f , ξ t ) ( ¬ φ ) ∗ φ ∗ ( ξ t , ξ f ); = ( φ ∧ ψ ) ∗ ψ ∗ ( φ ∗ ( ξ f , ξ f ) , φ ∗ ( ξ f , ξ t )); = ( φ ∨ ψ ) ∗ ψ ∗ ( φ ∗ ( ξ f , ξ t ) , φ ∗ ( ξ t , ξ t )); = ( φ → ψ ) ∗ ψ ∗ ( φ ∗ ( ξ t , ξ f ) , φ ∗ ( ξ t , ξ t )) . = Peirce Law: ((( P → Q ) → P ) → P ) ∗ = P ( P ( Q ( P ( t , f ) , P ( t , t )) , Q ( P ( f , f ) , P ( f , f ))) , P ( Q ( P ( t , t ) , P ( t , t )) , Q ( P ( t , t ) , P ( t , t )))) Giulio Manzonetto HdR Defense 07/03/17 28 / 38

  55. Factor Algebras at Work Classical Logic — Our Approach Truth values t , f �→ algebraic variables ξ f , ξ t ; Propositional variables P �→ decomposition operators f P ( ξ f , ξ t ); �→ Connectives disappear: implemented via substitutions and Boolean operations on indices The Translation t ∗ = ξ t f ∗ = ξ f P ∗ = P ( ξ f , ξ t ) ( ¬ φ ) ∗ φ ∗ ( ξ t , ξ f ); = ( φ ∧ ψ ) ∗ ψ ∗ ( φ ∗ ( ξ f , ξ f ) , φ ∗ ( ξ f , ξ t )); = ( φ ∨ ψ ) ∗ ψ ∗ ( φ ∗ ( ξ f , ξ t ) , φ ∗ ( ξ t , ξ t )); = ( φ → ψ ) ∗ ψ ∗ ( φ ∗ ( ξ t , ξ f ) , φ ∗ ( ξ t , ξ t )) . = The Axioms (F1) P ( x , x ) = x ; (F2) P ( P ( x , y ) , P ( w , z )) = P ( x , z ) ; (F3) P ( Q ( x , y ) , Q ( w , z )) = Q ( P ( x , w ) , P ( y , z )) . Giulio Manzonetto HdR Defense 07/03/17 28 / 38

  56. Factor Algebras at Work Classical Logic — Our Approach These are ROBDDs! Truth values t , f �→ algebraic variables ξ f , ξ t ; Propositional variables P �→ decomposition operators f P ( ξ f , ξ t ); �→ Connectives disappear: implemented via substitutions and Boolean operations on indices The Translation t ∗ = ξ t f ∗ = ξ f P ∗ = P ( ξ f , ξ t ) ( ¬ φ ) ∗ φ ∗ ( ξ t , ξ f ); = ( φ ∧ ψ ) ∗ ψ ∗ ( φ ∗ ( ξ f , ξ f ) , φ ∗ ( ξ f , ξ t )); = ( φ ∨ ψ ) ∗ ψ ∗ ( φ ∗ ( ξ f , ξ t ) , φ ∗ ( ξ t , ξ t )); = ( φ → ψ ) ∗ ψ ∗ ( φ ∗ ( ξ t , ξ f ) , φ ∗ ( ξ t , ξ t )) . = The Axioms (F1) P ( x , x ) = x ; (F2) P ( P ( x , y ) , P ( w , z )) = P ( x , z ) ; (F3) P ( Q ( x , y ) , Q ( w , z )) = Q ( P ( x , w ) , P ( y , z )) . Giulio Manzonetto HdR Defense 07/03/17 28 / 38

  57. Factor Algebras at Work Factor Algebras and Factor Varieties An evaluation of the propositional variable P becomes: P is true ⇐ ⇒ f P ( ξ f , ξ t ) = ξ t ; P is false ⇐ ⇒ f P ( ξ f , ξ t ) = ξ f . Factor Algebras Algebras having decomposition operators f P ( − , − ) which are projections. Factor Variety We study classical propositional logic through the variety of algebras generated by these factor algebras. Giulio Manzonetto HdR Defense 07/03/17 29 / 38

  58. Factor Algebras at Work A Uniform Approach for MV-Matrix Logics Truth values V = { v 1 , . . . , v p } �→ algebraic variables ξ 1 , . . . , ξ p ; �→ n -ary decomposition operators f P ( ξ 1 , . . . , ξ p ); Propositional variables P �→ Connectives disappear: implemented via substitutions and logical operations on indices The translations generalizes without problems. . . Giulio Manzonetto HdR Defense 07/03/17 30 / 38

  59. Factor Algebras at Work A Uniform Approach for MV-Matrix Logics Truth values V = { v 1 , . . . , v p } �→ algebraic variables ξ 1 , . . . , ξ p ; Propositional variables P �→ n -ary decomposition operators f P ( ξ 1 , . . . , ξ p ); �→ Connectives disappear: implemented via substitutions and logical operations on indices The translations generalizes without problems. . . Main Theorem (Propositional Case) [SalibraMF, LICS16] A propositional formula φ is a tautology in a MV-matrix logic L if and only if ξ.φ ∗ = ξ t in the variety generated by all factor algebras. = ∀ � V | Giulio Manzonetto HdR Defense 07/03/17 30 / 38

  60. Factor Circuits Decomposition Gate Factor Circuits New notion of logic circuit Only one kind of gate: P s i 1 o i p - p input ports i 1 , . . . , i p (one for each truth value); - a switch s , called the selector switch ; - an output port o . D -gates represent decomposition operators of an algebra A ∈ Factor Variety. When A is a factor algebra, the gate behaves as a multiplexer. Giulio Manzonetto HdR Defense 07/03/17 31 / 38

  61. Factor Circuits Decomposition Gate Factor Circuits New notion of logic circuit Only one kind of gate: i 1 o P i p - p input ports i 1 , . . . , i p (one for each truth value); - a switch s , called the selector switch ; - an output port o . D -gates represent decomposition operators of an algebra A ∈ Factor Variety. When A is a factor algebra, the gate behaves as a multiplexer. Giulio Manzonetto HdR Defense 07/03/17 31 / 38

  62. Factor Circuits Comparison factor circuit gate AND D-gate ξ f ξ f Q P P ∧ Q P P ξ t Q ξ t logic gate AND D-gate operation connective ∧ decomposition operator f P meaning static ( AND ) dynamic (depends on P ) arity of ∧ # V no. of inputs input values prop. variables P , Q algebraic variables ξ f , ξ t signals carried truth values elements of by the wires the algebra A P ∧ Q f P ( ξ f , ξ t ) output Classical simplification processes for logical circuits are based on Boolean identities, Karnaugh maps, Quine-McClusky methods, . . . Giulio Manzonetto HdR Defense 07/03/17 32 / 38

  63. Factor Circuits Simplification by Term Rewriting F 1 x P i x ֌ x F r x F ℓ x P i P i 2 2 y P i y ֌ ֋ z P i P i z z x x P i F ℓ P j 3 P j y y ֌ P P i i z z x P i F r x P i y 3 P j y ֌ P j P i z z Theorem A propositional formula φ is a tautology if and only if nf ( φ ∗ ) = ξ t Giulio Manzonetto HdR Defense 07/03/17 33 / 38

  64. Factor Circuits Simplification by Term Rewriting F 1 x P i x ֌ x F r x F ℓ x P i P i 2 2 y P i y ֌ ֋ z P i P i z z x x P i F ℓ P j 3 P j y y ֌ P i > j P i i z z x P i F r x P i y 3 P j y ֌ P j i > j P i z z Theorem A propositional formula φ is a tautology if and only if nf ( φ ∗ ) = ξ t Giulio Manzonetto HdR Defense 07/03/17 33 / 38

  65. Factor Circuits Simplification by Term Rewriting F 1 x P i x ֌ x F r x F ℓ x P i P i 2 2 y P i y ֌ ֋ z P i P i z z x x P i F ℓ P j 3 P j y y ֌ P i > j P i i z z x P i F r x P i y 3 P j y ֌ P j i > j P i z z Theorem A propositional formula φ is a tautology if and only if nf ( φ ∗ ) = ξ t Giulio Manzonetto HdR Defense 07/03/17 33 / 38

  66. Factor Circuits Generalization I: Quantified Matrix Logics p -valued Quantified Matrix Logics Φ ::= R ( t 1 , . . . , t m ) | o (Φ 1 , . . . , Φ n ) | ∀ x . Φ | ∃ x . Φ R ( a 1 , . . . , a m ) �→ f R ( a 1 , . . . , a m , ξ 1 , . . . , ξ p ) decomp. operator of arity m + p bijection Factor Algebras ← → Structures Theorem [SalibraMF, LICS16] = ∀ ξ 1 . . . ξ p . Φ ∗ = ξ t holds A universal sentence Φ is a logical truth ⇐ ⇒ V ˆ ν | For classical logic we can do more. . . Giulio Manzonetto HdR Defense 07/03/17 34 / 38

  67. Factor Circuits Generalization I: Quantified Matrix Logics p -valued Quantified Matrix Logics Φ ::= R ( t 1 , . . . , t m ) | o (Φ 1 , . . . , Φ n ) | ∀ x . Φ | ∃ x . Φ R ( a 1 , . . . , a m ) �→ f R ( a 1 , . . . , a m , ξ 1 , . . . , ξ p ) decomp. operator of arity m + p bijection (proper) Factor Algebras ← → (proper) Structures Theorem [SalibraMF, LICS16] = ∀ ξ 1 . . . ξ p . Φ ∗ = ξ t holds A universal sentence Φ is a logical truth ⇐ ⇒ V ˆ ν | and the propositional translation of Φ is a tautology (in presence of equality). For classical logic we can do more. . . Giulio Manzonetto HdR Defense 07/03/17 34 / 38

  68. Factor Circuits Generalization II: First-order Logic First-order Classical Logic Ψ 1 , . . . , Ψ n | = Φ is reduced to an equational problem. Reduction procedure exploiting prenex normal form, Skolemization, etc. Theorem (Completeness) [SalibraMF, LICS16] Ψ 1 , . . . , Ψ n | = Φ if and only if Ax ( V Σ ) ⊢ eq ∀ x ∀ y ( x = y ) and the propositional translation of Ψ 1 ∧ · · · ∧ Ψ n → Φ is a tautology. Giulio Manzonetto HdR Defense 07/03/17 35 / 38

  69. Factor Circuits Generalization II: First-order Logic First-order Classical Logic Ψ 1 , . . . , Ψ n | = Φ is reduced to an equational problem. Reduction procedure exploiting prenex normal form, Skolemization, etc. Is the method generalizable to infinite logics? Theorem (Completeness) [SalibraMF, LICS16] Ψ 1 , . . . , Ψ n | = Φ if and only if Ax ( V Σ ) ⊢ eq ∀ x ∀ y ( x = y ) and the propositional translation of Ψ 1 ∧ · · · ∧ Ψ n → Φ is a tautology. Giulio Manzonetto HdR Defense 07/03/17 35 / 38

  70. Factor Circuits Generalization II: First-order Logic First-order Classical Logic Ψ 1 , . . . , Ψ n | = Φ is reduced to an equational problem. Reduction procedure exploiting prenex normal form, Skolemization, etc. Is the method generalizable to infinite logics? Theorem (Completeness) [SalibraMF, LICS16] Are these techniques useful to theorem provers? Ψ 1 , . . . , Ψ n | = Φ if and only if Ax ( V Σ ) ⊢ eq ∀ x ∀ y ( x = y ) and the propositional translation of Ψ 1 ∧ · · · ∧ Ψ n → Φ is a tautology. Giulio Manzonetto HdR Defense 07/03/17 35 / 38

  71. Conclusions The Big Picture Giulio Manzonetto HdR Defense 07/03/17 36 / 38

  72. Conclusions Algebraic Logic Quantitative Properties Nondeterminism PhD ( λ ) 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 Λ → ⇐ ⇒ Λ ∧ Differential λ -calculus Morris’s Theory SN ML F Giulio Manzonetto HdR Defense 07/03/17 37 / 38

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