coalgebras in type theory
play

Coalgebras in Type Theory Equations CoInductive Types - PowerPoint PPT Presentation

Coalgebras in Type Theory Venanzio Capretta Corecursive Coalgebras in Type Theory Equations CoInductive Types Bisimulations Venanzio Capretta Constructive Infinity Tabulations General CMCS 2010, Paphos, Cyprus Recursion Non-Standard


  1. Coalgebras in Type Theory Venanzio Capretta Corecursive Coalgebras in Type Theory Equations CoInductive Types Bisimulations Venanzio Capretta Constructive Infinity Tabulations General CMCS 2010, Paphos, Cyprus Recursion Non-Standard Type Theory Mixing Induction and Coinduction Venanzio Capretta Coalgebras in Type Theory

  2. Corecursive Equations Coalgebras in Type Theory Venanzio Capretta Corecursive Equations CoInductive Types Bisimulations Constructive Infinity Tabulations General Recursion Non-Standard Type Theory Mixing Induction and Coinduction Venanzio Capretta Coalgebras in Type Theory

  3. Streams Coalgebras in Type Theory Venanzio Capretta Corecursive Equations Streams: infinite sequence over a domain D , S D . CoInductive Types nat = 0 : : 1 : : 2 : : 3 : : 4 : : 5 : : 6 : : · · · : S N Bisimulations fib = 0 : : 1 : : 1 : : 2 : : 3 : : 5 : : 8 : : · · · : S N Constructive Infinity Tabulations General Recursion Non-Standard Type Theory Mixing Induction and Coinduction Venanzio Capretta Coalgebras in Type Theory

  4. Streams Coalgebras in Type Theory Venanzio Capretta Streams: infinite sequence over a domain D , S D . Corecursive nat = 0 : : 1 : : 2 : : 3 : : 4 : : 5 : : 6 : : · · · : S N Equations CoInductive fib = 0 : : 1 : : 1 : : 2 : : 3 : : 5 : : 8 : : · · · : S N Types Bisimulations Notation: Constructive Infinity h head : nat = 0 Tabulations t tail : nat = 1 : : 2 : : 3 : : 4 : : 5 : : 6 : : 7 : : · · · General Recursion Non-Standard Type Theory Mixing Induction and Coinduction Venanzio Capretta Coalgebras in Type Theory

  5. Streams Coalgebras in Type Theory Venanzio Capretta Streams: infinite sequence over a domain D , S D . Corecursive nat = 0 : : 1 : : 2 : : 3 : : 4 : : 5 : : 6 : : · · · : S N Equations CoInductive fib = 0 : : 1 : : 1 : : 2 : : 3 : : 5 : : 8 : : · · · : S N Types Bisimulations Notation: Constructive Infinity h 3 nat = 3 h 3 fib = 2 h head : nat = 0 Tabulations t tail : nat = 1 : : 2 : : 3 : : 4 : : 5 : : 6 : : 7 : : · · · General Recursion Non-Standard Type Theory Mixing Induction and Coinduction Venanzio Capretta Coalgebras in Type Theory

  6. Streams Coalgebras in Type Theory Venanzio Streams: infinite sequence over a domain D , S D . Capretta Corecursive nat = 0 : : 1 : : 2 : : 3 : : 4 : : 5 : : 6 : : · · · : S N Equations fib = 0 : : 1 : : 1 : : 2 : : 3 : : 5 : : 8 : : · · · : S N CoInductive Types Notation: Bisimulations Constructive h h 3 nat = 3 h 3 fib = 2 Infinity head : nat = 0 Tabulations t tail : nat = 1 : : 2 : : 3 : : 4 : : 5 : : 6 : : 7 : : · · · General 4 t nat = 4 : : 5 : : 6 : : 7 : : 8 : : 9 : : 10 : : · · · Recursion 4 t fib = 3 : : 5 : : 8 : : 13 : : 21 : : 34 : : 55 : : · · · Non-Standard Type Theory Mixing Induction and Coinduction Venanzio Capretta Coalgebras in Type Theory

  7. Streams Streams: infinite sequence over a domain D , S D . Coalgebras in Type Theory nat = 0 : : 1 : : 2 : : 3 : : 4 : : 5 : : 6 : : · · · : S N Venanzio Capretta fib = 0 : : 1 : : 1 : : 2 : : 3 : : 5 : : 8 : : · · · : S N Corecursive Equations Notation: CoInductive h 3 nat = 3 h 3 fib = 2 Types h head : nat = 0 Bisimulations t tail : nat = 1 : : 2 : : 3 : : 4 : : 5 : : 6 : : 7 : : · · · Constructive 4 t nat = 4 : : 5 : : 6 : : 7 : : 8 : : 9 : : 10 : : · · · Infinity 4 t fib = 3 : : 5 : : 8 : : 13 : : 21 : : 34 : : 55 : : · · · Tabulations General Corecursive equations on streams: Recursion [Rutten 2007] Non-Standard nat = 0 : : nat + 1 fib = 0 : : fib + (1 : : fib) Type Theory Mixing ( x : : s 1 ) ⋉ s 2 = x : : s 2 ⋉ s 1 Induction and even ( x : : s ) = x : : odd s odd ( x : : s ) = even s Coinduction Venanzio Capretta Coalgebras in Type Theory

  8. Harder corecursive equations Equations that are more difficult to solve [Zantema 2009] Coalgebras in Type Theory Three functions of type S → S : Venanzio Capretta φ s = h : φ (even t s ) ⋉ φ (odd t s : s ) Corecursive Equations CoInductive Types Bisimulations Constructive Infinity Tabulations General Recursion Non-Standard Type Theory Mixing Induction and Coinduction Venanzio Capretta Coalgebras in Type Theory

  9. Harder corecursive equations Equations that are more difficult to solve [Zantema 2009] Coalgebras in Type Theory Three functions of type S → S : Venanzio Capretta φ s = h : φ (even t s ) ⋉ φ (odd t s : s ) Corecursive χ s = h : t s ⋉ t ( χ t s : s ) Equations CoInductive Types Bisimulations Constructive Infinity Tabulations General Recursion Non-Standard Type Theory Mixing Induction and Coinduction Venanzio Capretta Coalgebras in Type Theory

  10. Harder corecursive equations Equations that are more difficult to solve [Zantema 2009] Coalgebras in Type Theory Three functions of type S → S : Venanzio Capretta φ s = h : φ (even t s ) ⋉ φ (odd t s : s ) Corecursive χ s = h : t s ⋉ t ( χ t s : s ) Equations CoInductive ψ s = h : even( ψ (odd t s )) ⋉ odd( ψ (even t s : s )) Types Bisimulations Constructive Infinity Tabulations General Recursion Non-Standard Type Theory Mixing Induction and Coinduction Venanzio Capretta Coalgebras in Type Theory

  11. Harder corecursive equations Equations that are more difficult to solve [Zantema 2009] Coalgebras in Type Theory Three functions of type S → S : Venanzio Capretta φ s = h : φ (even t s ) ⋉ φ (odd t s : s ) Corecursive χ s = h : t s ⋉ t ( χ t s : s ) Equations CoInductive ψ s = h : even( ψ (odd t s )) ⋉ odd( ψ (even t s : s )) Types Bisimulations Puzzle: Find equation f s = C [ s , f ] that generates: Constructive Infinity f nat = 0 : : 0 : : 1 : : 0 : : 2 : : 1 : : 3 : : 0 : : 4 : : 2 : : 5 : : 1 : : 6 : : 3 : : 7 : : 0 : : 8 Tabulations General : :4 : : 9 : : 2 : : 10 : : 5 : : 11 : : 1 : : 12 : : 6 : : 13 : : 3 : : 14 : : 7 : : 15 Recursion : :0 : : 16 : : 8 : : 17 : : 4 : : 18 : : 9 : : 19 : : 2 : : 20 : : 10 : : 21 : : 5 : : 22 Non-Standard Type Theory : :11 : : 23 : : 1 : : 24 : : 12 : : 25 : : 6 : : 26 : : 13 : : 27 : : 3 : : 28 : : 14 Mixing : :29 : : 7 : : 30 : : 15 : : 31 : : 0 : : 32 : : 16 : : 33 : : 8 : : 34 : : 17 : : 35 Induction and Coinduction : :4 : : 36 : : 18 : : 37 : : 9 : : 38 : : · · · Venanzio Capretta Coalgebras in Type Theory

  12. Images of recursive streams Puzzle: 0 : : 0 : : 1 : : 0 : : 2 : : 1 : : 3 : : 0 : : 4 : : 2 : : 5 : : 1 : : 6 : : 3 : : 7 : : 0 : : 8 : : 4 : : 9 : : 2 : : 10 : : 5 : : 11 : : 1 : : 12 : : 6 : : 13 : : 3 : : 14 : : 7 : : 15 Images of streams of Booleans [Zantema] Coalgebras in Type Theory The Boolean Fibonacci stream: Venanzio Capretta f (0 : : s ) = 0 : : 1 : : f s bfib = f bfib f (1 : : s ) = 0 : : f s Corecursive Equations CoInductive Types Bisimulations Constructive Infinity Tabulations General Recursion Non-Standard Type Theory Mixing Induction and Coinduction Venanzio Capretta Coalgebras in Type Theory

  13. Images of recursive streams Puzzle: 0 : : 0 : : 1 : : 0 : : 2 : : 1 : : 3 : : 0 : : 4 : : 2 : : 5 : : 1 : : 6 : : 3 : : 7 : : 0 : : 8 : : 4 : : 9 : : 2 : : 10 : : 5 : : 11 : : 1 : : 12 : : 6 : : 13 : : 3 : : 14 : : 7 : : 15 Images of streams of Booleans [Zantema] Coalgebras in Type Theory The Boolean Fibonacci stream: Venanzio Capretta f (0 : : s ) = 0 : : 1 : : f s bfib = f bfib f (1 : : s ) = 0 : : f s Corecursive Equations CoInductive Types bfib = 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 0 :1 : : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 0 : : 1 Bisimulations : :0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : :1 : : 0 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 Constructive :0 : : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 0 : : 1 Infinity :0 : : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 :1 : : : 0 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 Tabulations : :0 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : :0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 General Recursion :1 : : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : :0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 Non-Standard :0 : : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 Type Theory : :1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : :0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 Mixing :0 : : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 Induction and : :1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 Coinduction : :0 : : 0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : 0 : :0 : : 1 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 0 : : 1 : : 0 : : 1 : : · · · Venanzio Capretta Coalgebras in Type Theory

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