induction recursion
play

Induction-Recursion Capretta University of A polymorphic - PowerPoint PPT Presentation

Induction- Recursion A polymorphic representation Venanzio Induction-Recursion Capretta University of A polymorphic representation Nottingham IR definitions Leftist Heaps Venanzio Capretta Slice Categories University of Nottingham


  1. Induction- Recursion A polymorphic representation Venanzio Induction-Recursion Capretta University of A polymorphic representation Nottingham IR definitions Leftist Heaps Venanzio Capretta Slice Categories University of Nottingham Wander Types Conclusion Coda DTP 2011, Nijmegen Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  2. IR definitions Induction- Recursion A polymorphic representation Inductive-Recursive (IR) definitions Venanzio Capretta University of Nottingham IR definitions Leftist Heaps Slice Categories Wander Types Conclusion Coda Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  3. IR definitions Induction- Recursion A polymorphic representation Inductive-Recursive (IR) definitions Venanzio Simultaneously define Capretta University of � an inductive type T : Set Nottingham � a recursive function on it f : T → D IR definitions Leftist Heaps mutually dependent Slice Categories Wander Types Conclusion Coda Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  4. IR definitions Induction- Recursion A polymorphic representation Inductive-Recursive (IR) definitions Venanzio Simultaneously define Capretta University of � an inductive type T : Set Nottingham � a recursive function on it f : T → D IR definitions Leftist Heaps mutually dependent Slice � The constructors of T can use f Categories Wander Types Conclusion Coda Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  5. IR definitions Induction- Recursion A polymorphic representation Inductive-Recursive (IR) definitions Venanzio Simultaneously define Capretta University of � an inductive type T : Set Nottingham � a recursive function on it f : T → D IR definitions Leftist Heaps mutually dependent Slice � The constructors of T can use f Categories Wander Types � f recursive over T Conclusion Coda Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  6. IR definitions Induction- Recursion A polymorphic representation Inductive-Recursive (IR) definitions Venanzio Simultaneously define Capretta University of � an inductive type T : Set Nottingham � a recursive function on it f : T → D IR definitions Leftist Heaps mutually dependent Slice � The constructors of T can use f Categories Wander Types � f recursive over T Conclusion Coda Definition of Type Universes [Martin-L¨ of 1984, Palmgren 1998] General Definition [Dybjier 2001, Dybjier/Setzer 1999] Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  7. Type Universes Induction- Recursion A polymorphic representation � U : Type Venanzio Capretta (large) type of codes for (small) types University of Nottingham IR definitions Leftist Heaps Slice Categories Wander Types Conclusion Coda Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  8. Type Universes Induction- Recursion A polymorphic representation � U : Type Venanzio Capretta (large) type of codes for (small) types University of Nottingham IR definitions Leftist Heaps Slice Categories � El : U → Type Wander Types decoding function, giving type of elements of codes Conclusion Coda Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  9. Type Universes Induction- Recursion A polymorphic representation Venanzio � U : Type Capretta University of Nottingham nat : U IR definitions Leftist Heaps Slice � El : U → Type Categories Wander Types El nat = N Conclusion Coda Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  10. Type Universes Induction- Recursion A polymorphic representation � U : Type Venanzio Capretta University of nat : U Nottingham prod : U → U → U IR definitions Leftist Heaps Slice � El : U → Type Categories Wander Types El nat = N Conclusion El (prod a b ) = (El a ) × (El b ) Coda Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  11. Type Universes Induction- Recursion A polymorphic � U : Type representation Venanzio nat : U Capretta University of prod : U → U → U Nottingham sum : U → U → U IR definitions Leftist Heaps Slice Categories � El : U → Type Wander Types El nat = N Conclusion El (prod a b ) = (El a ) × (El b ) Coda El (sum a b ) = (El a ) + (El b ) Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  12. Type Universes Induction- Recursion A polymorphic � U : Type representation Venanzio nat : U Capretta University of prod : U → U → U Nottingham sum : U → U → U IR definitions arrow : U → U → U Leftist Heaps Slice Categories � El : U → Type Wander Types El nat = N Conclusion El (prod a b ) = (El a ) × (El b ) Coda El (sum a b ) = (El a ) + (El b ) El (arrow a b ) = (El a ) → (El b ) Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  13. Type Universes Induction- Recursion A polymorphic representation � U : Type Venanzio Capretta University of · · · Nottingham pi : ( a : U; b : El a → U) → U IR definitions Leftist Heaps Slice � El : U → Type Categories Wander Types · · · Conclusion El (pi a b ) = Π x : El a . El ( b x ) Coda Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  14. Type Universes Induction- Recursion A polymorphic representation � U : Type Venanzio Capretta University of · · · Nottingham pi : ( a : U; b : El a → U) → U IR definitions sig : ( a : U; b : El a → U) → U Leftist Heaps Slice � El : U → Type Categories Wander Types · · · Conclusion El (pi a b ) = Π x : El a . El ( b x ) Coda El (sig a b ) = Σ x : El a . El ( b x ) Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  15. Advanced Data Structures Induction- Heap (priority queue) on ordered set A , � Recursion A polymorphic representation Venanzio Capretta University of Nottingham IR definitions Leftist Heaps Slice Categories Wander Types Conclusion Coda Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  16. Advanced Data Structures Induction- Heap (priority queue) on ordered set A , � Recursion A polymorphic representation Heap : Set Venanzio Capretta University of Nottingham IR definitions Leftist Heaps Slice Categories Wander Types Conclusion Coda Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  17. Advanced Data Structures Induction- Heap (priority queue) on ordered set A , � Recursion A polymorphic representation Heap : Set Venanzio Capretta University of Nottingham empty : Heap isEmpty : Heap → B IR definitions Leftist Heaps Slice Categories Wander Types Conclusion Coda Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  18. Advanced Data Structures Induction- Heap (priority queue) on ordered set A , � Recursion A polymorphic representation Heap : Set Venanzio Capretta University of Nottingham empty : Heap isEmpty : Heap → B IR definitions insert : A → Heap → Heap Leftist Heaps Slice Categories Wander Types Conclusion Coda Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  19. Advanced Data Structures Induction- Heap (priority queue) on ordered set A , � Recursion A polymorphic representation Heap : Set Venanzio Capretta University of Nottingham empty : Heap isEmpty : Heap → B IR definitions insert : A → Heap → Heap Leftist Heaps findMin : Heap → A Slice Categories Wander Types Conclusion Coda Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  20. Advanced Data Structures Induction- Heap (priority queue) on ordered set A , � Recursion A polymorphic representation Heap : Set Venanzio Capretta University of Nottingham empty : Heap isEmpty : Heap → B IR definitions insert : A → Heap → Heap Leftist Heaps findMin : Heap → A Slice Categories deleteMin : Heap → Heap Wander Types Conclusion Coda Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  21. Advanced Data Structures Induction- Heap (priority queue) on ordered set A , � Recursion A polymorphic representation Heap : Set Venanzio Capretta University of Nottingham empty : Heap isEmpty : Heap → B IR definitions insert : A → Heap → Heap Leftist Heaps findMin : Heap → A Slice Categories deleteMin : Heap → Heap Wander Types Conclusion merge : Heap → Heap → Heap Coda Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

  22. Advanced Data Structures Induction- Heap (priority queue) on ordered set A , � Recursion A polymorphic representation Heap : Set Venanzio Capretta University of Nottingham empty : Heap isEmpty : Heap → B IR definitions insert : A → Heap → Heap Leftist Heaps findMin : Heap → A Slice Categories deleteMin : Heap → Heap Wander Types Conclusion merge : Heap → Heap → Heap Coda With lists: linear complexity With leftist heaps: logarithmic complexity Venanzio CaprettaUniversity of Nottingham Induction-Recursion A polymorphic representation

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