transductions in affjne logic
play

Transductions in affjne logic LIPN, Universit Paris 13 Trends in - PowerPoint PPT Presentation

Transductions in affjne logic LIPN, Universit Paris 13 Trends in Linear Logic and Applications, Dortmund, June 30th, 2019 1/18 Nguyn L Thnh Dng (a.k.a. Tito) nltd@nguyentito.eu functions on Church encodings and automata theory


  1. Transductions in affjne logic LIPN, Université Paris 13 Trends in Linear Logic and Applications, Dortmund, June 30th, 2019 1/18 Nguyễn Lê Thành Dũng (a.k.a. Tito) — nltd@nguyentito.eu

  2. functions on Church encodings and automata theory • Claim: i.e. automata with output (many possible variants). 2. Capturing a class of transductions with affjne typing , via linearity in streaming string transducers Details on (2) in my 5-page abstract. I’ve come to think that (1) is more important. But (2) came fjrst, triggered by a question by M. Bojańczyk. Counterexample to “provinciality” of linear logic. 2/18 Transductions in typed λ -calculi 1. Motivation: the simply-typed λ -calculus λ -defjnable string functions are related to transducers ,

  3. functions on Church encodings and automata theory • Claim: i.e. automata with output (many possible variants). 2. Capturing a class of transductions with affjne typing , via linearity in streaming string transducers Details on (2) in my 5-page abstract. I’ve come to think that (1) is more important. But (2) came fjrst, triggered by a question by M. Bojańczyk. 2/18 Transductions in typed λ -calculi 1. Motivation: the simply-typed λ -calculus λ -defjnable string functions are related to transducers , − → Counterexample to “provinciality” of linear logic.

  4. Simply typed functions on Church numerals (1) Nat A o Nat Nat A A simple type t t Open question A A A A where Nat A Church encodings of (unary) natural numbers: Nat Nat A Let’s add a bit of (meta-level) polymorphism: t Theorem (Schwichtenberg 1975) 3/18 • Nat = o → ( o → o ) → o • n ∈ N ⇝ n = λ x . λ f . f ( . . . ( f x ) . . . ) : Nat with n times f For t : Nat → Nat , F ( t )( n ) = m ⇐ ⇒ t n = β m . The functions defjnable by simply-typed λ -terms of type Nat → Nat are the extended polynomials (generated by 0,1, + , × , ifzero ).

  5. Simply typed functions on Church numerals (1) Church encodings of (unary) natural numbers: Theorem (Schwichtenberg 1975) Open question 3/18 • Nat = o → ( o → o ) → o • n ∈ N ⇝ n = λ x . λ f . f ( . . . ( f x ) . . . ) : Nat with n times f For t : Nat → Nat , F ( t )( n ) = m ⇐ ⇒ t n = β m . The functions defjnable by simply-typed λ -terms of type Nat → Nat are the extended polynomials (generated by 0,1, + , × , ifzero ). Let’s add a bit of (meta-level) polymorphism: t = Nat [ A ] → Nat where Nat [ A ] = Nat [ A / o ] = A → ( A → A ) → A {F ( t ) | A simple type , t : Nat [ A ] → Nat } = ?

  6. n n 2 Nat o -terms. This is the fastest possible growth for simply typed Nat A . Towers of exponentials of any fjxed height Nat T A Nat o Simply typed functions on Church numerals (2) exp2 Smaller types, still heterogenous: which cannot be iterated! 4/18 Take mult = λ n .λ m .λ f . n ( m f ) : Nat → Nat → Nat . mult 2 : Nat → Nat can be iterated by a Nat [ Nat ] … − → exp2 = λ n . n ( mult 2 ) 1 : Nat [ Nat ] → Nat

  7. Simply typed functions on Church numerals (2) which cannot be iterated! Smaller types, still heterogenous: Towers of exponentials of any fjxed height Nat T A Nat A . This is the fastest possible growth for simply typed -terms. 4/18 Take mult = λ n .λ m .λ f . n ( m f ) : Nat → Nat → Nat . mult 2 : Nat → Nat can be iterated by a Nat [ Nat ] … − → exp2 = λ n . n ( mult 2 ) 1 : Nat [ Nat ] → Nat exp2 = λ n . n 2 : Nat [ o → o ] → Nat

  8. Simply typed functions on Church numerals (2) which cannot be iterated! Smaller types, still heterogenous: 4/18 Take mult = λ n .λ m .λ f . n ( m f ) : Nat → Nat → Nat . mult 2 : Nat → Nat can be iterated by a Nat [ Nat ] … − → exp2 = λ n . n ( mult 2 ) 1 : Nat [ Nat ] → Nat exp2 = λ n . n 2 : Nat [ o → o ] → Nat Towers of exponentials of any fjxed height Nat [ T [ A ]] → Nat [ A ] . This is the fastest possible growth for simply typed λ -terms.

  9. Simply typed functions on Church numerals (3) On the other hand: Theorem (Statman 198?) More weirdness: some “easy” 1-variable functions, Does this really correspond to any interesting class, or is our open problem a “typical misguided natural question”? (cf. Gromov, Spaces and questions ) Might explain lack of progress on this question… 5/18 Towers of exponentials of any fjxed height Nat [ T [ A ]] → Nat [ A ] . Subtraction cannot be defjned as a simply typed λ -term of type Nat [ A ] → Nat [ B ] → Nat . e.g. n �→ ⌊√ n ⌋ , are also undefjnable.

  10. Simply typed functions on Church numerals (3) On the other hand: Theorem (Statman 198?) More weirdness: some “easy” 1-variable functions, our open problem a “typical misguided natural question”? (cf. Gromov, Spaces and questions ) Might explain lack of progress on this question… 5/18 Towers of exponentials of any fjxed height Nat [ T [ A ]] → Nat [ A ] . Subtraction cannot be defjned as a simply typed λ -term of type Nat [ A ] → Nat [ B ] → Nat . e.g. n �→ ⌊√ n ⌋ , are also undefjnable. − → Does this really correspond to any interesting class, or is

  11. 1 X ultimately periodic. A fjrst interesting result: predicates on Church integers My POV: the question is actually interesting. Theorem (Joly 2001) it is ultimately periodic . Corollary For all simple types A and all t Nat A Nat , X ultimately periodic t A not quite trivial necessary condition! 6/18 Illustration on restricted case: predicates ( Bool = o → o → o ). A subset of N is decidable by some t : Nat [ A ] → Bool if and only if

  12. A fjrst interesting result: predicates on Church integers My POV: the question is actually interesting. Theorem (Joly 2001) it is ultimately periodic . Corollary A not quite trivial necessary condition! 6/18 Illustration on restricted case: predicates ( Bool = o → o → o ). A subset of N is decidable by some t : Nat [ A ] → Bool if and only if For all simple types A and all t : Nat [ A ] → Nat , ⇒ F ( t ) − 1 ( X ) ultimately periodic. X ⊆ N ultimately periodic =

  13. Simply typed functions on Church-encoded strings Open question 7/18 To gain more insight, let’s generalize ! Nat = Str { 1 } Church encodings of strings over alphabet Σ = { a 1 , . . . , a | Σ | } : • Str Σ = o → ( o → o ) → . . . | Σ | times . . . → ( o → o ) → o • w ∈ Σ ∗ ⇝ w = λ x . λ f 1 . . . . λ f | Σ | . f i 1 ( . . . ( f i n x ) . . . ) : Str Σ where w = a i 1 . . . a i n Characterizations of {F ( t ) | t : Str Γ → Str Σ } (no subst.) exist 1 . {F ( t ) | A simple type , t : Str Γ [ A ] → Str Σ } = ? 1 e.g. Zaionc 1987, Word operation defjnable in the typed λ -calculus

  14. Simply typed predicates on Church-encoded strings Theorem (Hillebrand & Kanellakis 1995) regular language . Corollary regularity preservation + hyperexponential growth 8/18 A subset of Σ ∗ is decidable by some t : Str Σ [ A ] → Bool ifg it is a (Note: X ⊆ { 1 } ∗ regular ⇐ ⇒ X ⊆ N ultimately periodic) L ⊆ Σ ∗ regular = ⇒ F ( t ) − 1 ( L ) regular for t : Str Γ [ A ] → Str Σ . − → look for an automata-theoretic function class with

  15. Register transducers Execution over : start with Y X 9/18 For input alphabet Γ , output alphabet Σ : • Finite set of Σ ∗ -valued registers e.g. R = { X , Y } • Initial values R → Σ ∗ e.g. X init = Y init = ε • Register update function u : Γ → ( R → (Σ ∪ R ) ∗ ) e.g.   X �→ Xa X �→ Xb   a �→ b �→ Y �→ aY Y �→ bY   • “output function” ∈ (Σ ∪ R ) ∗ e.g. out = XY

  16. Register transducers Execution over : start with Y X 9/18 For input alphabet Γ , output alphabet Σ : • Finite set of Σ ∗ -valued registers e.g. R = { X , Y } • Initial values R → Σ ∗ e.g. X init = Y init = ε • Register update function u : Γ → ( R → (Σ ∪ R ) ∗ ) e.g.   X := Xa X := Xb   a �→ b �→ Y := aY Y := bY   • “output function” ∈ (Σ ∪ R ) ∗ e.g. out = XY

  17. Register transducers Execution over abaa : start with 9/18 For input alphabet Γ , output alphabet Σ : • Finite set of Σ ∗ -valued registers e.g. R = { X , Y } • Initial values R → Σ ∗ e.g. X init = Y init = ε • Register update function u : Γ → ( R → (Σ ∪ R ) ∗ ) e.g.   X := Xa X := Xb   a �→ b �→ Y := aY Y := bY   • “output function” ∈ (Σ ∪ R ) ∗ e.g. out = XY X = ε Y = ε

  18. Register transducers Execution over abaa : 9/18 For input alphabet Γ , output alphabet Σ : • Finite set of Σ ∗ -valued registers e.g. R = { X , Y } • Initial values R → Σ ∗ e.g. X init = Y init = ε • Register update function u : Γ → ( R → (Σ ∪ R ) ∗ ) e.g.   X := Xa X := Xb   a �→ b �→ Y := aY Y := bY   • “output function” ∈ (Σ ∪ R ) ∗ e.g. out = XY X = a Y = a

  19. Register transducers Execution over abaa : 9/18 For input alphabet Γ , output alphabet Σ : • Finite set of Σ ∗ -valued registers e.g. R = { X , Y } • Initial values R → Σ ∗ e.g. X init = Y init = ε • Register update function u : Γ → ( R → (Σ ∪ R ) ∗ ) e.g.   X := Xa X := Xb   a �→ b �→ Y := aY Y := bY   • “output function” ∈ (Σ ∪ R ) ∗ e.g. out = XY X = ab Y = ba

Recommend


More recommend