pattern covering by set approximations
play

Pattern covering by set approximations Nicolas Oury Laboratoire de - PowerPoint PPT Presentation

Outline Pattern covering by set approximations Nicolas Oury Laboratoire de Recherche en Informatique Universit e ParisSud, France TYPES, 2006 Nicolas Oury Pattern covering by set approximations Outline Outline Introduction 1 The


  1. Outline Pattern covering by set approximations Nicolas Oury Laboratoire de Recherche en Informatique Universit´ e Paris–Sud, France TYPES, 2006 Nicolas Oury Pattern covering by set approximations

  2. Outline Outline Introduction 1 The Calculus of Inductive Constructions Inductive data types Definitions by pattern matching Useless cases in a pattern matching Elimination of useless cases 2 Undecidability Splitting Approximations of inductive sets 3 Set computations Examples Prototype Refutations reconstruction Conclusions 4 Nicolas Oury Pattern covering by set approximations

  3. Introduction The Calculus of Inductive Constructions Elimination of useless cases Inductive data types Approximations of inductive sets Definitions by pattern matching Conclusions Useless cases in a pattern matching Outline Introduction 1 The Calculus of Inductive Constructions Inductive data types Definitions by pattern matching Useless cases in a pattern matching Elimination of useless cases 2 Undecidability Splitting Approximations of inductive sets 3 Set computations Examples Prototype Refutations reconstruction Conclusions 4 Nicolas Oury Pattern covering by set approximations

  4. Introduction The Calculus of Inductive Constructions Elimination of useless cases Inductive data types Approximations of inductive sets Definitions by pattern matching Conclusions Useless cases in a pattern matching The Calculus of Inductive Constructions Proof theory used in the Coq proof assistant Proving is typing a proof term Dependent inductive data types: list n . . . Nicolas Oury Pattern covering by set approximations

  5. Introduction The Calculus of Inductive Constructions Elimination of useless cases Inductive data types Approximations of inductive sets Definitions by pattern matching Conclusions Useless cases in a pattern matching The Calculus of Inductive Constructions Proof theory used in the Coq proof assistant Proving is typing a proof term Dependent inductive data types: list n . . . Nicolas Oury Pattern covering by set approximations

  6. Introduction The Calculus of Inductive Constructions Elimination of useless cases Inductive data types Approximations of inductive sets Definitions by pattern matching Conclusions Useless cases in a pattern matching Inductive data types Types defined by different constructors : nat = O : nat S : nat → nat Values are constructed inductively: O , S O , S (S O) , . . . Elements are finite: x = S x is forbidden Dependent types: list _ = nil : list O : A → list n → list (S n) cons Nicolas Oury Pattern covering by set approximations

  7. Introduction The Calculus of Inductive Constructions Elimination of useless cases Inductive data types Approximations of inductive sets Definitions by pattern matching Conclusions Useless cases in a pattern matching Inductive data types Types defined by different constructors : nat = O : nat S : nat → nat Values are constructed inductively: O , S O , S (S O) , . . . Elements are finite: x = S x is forbidden Dependent types: list _ = nil : list O : A → list n → list (S n) cons Nicolas Oury Pattern covering by set approximations

  8. Introduction The Calculus of Inductive Constructions Elimination of useless cases Inductive data types Approximations of inductive sets Definitions by pattern matching Conclusions Useless cases in a pattern matching Inductive data types Types defined by different constructors : nat = O : nat S : nat → nat Values are constructed inductively: O , S O , S (S O) , . . . Elements are finite: x = S x is forbidden Dependent types: list _ = nil : list O : A → list n → list (S n) cons Nicolas Oury Pattern covering by set approximations

  9. Introduction The Calculus of Inductive Constructions Elimination of useless cases Inductive data types Approximations of inductive sets Definitions by pattern matching Conclusions Useless cases in a pattern matching Pattern matching Functions can be defined by pattern matching plus O n = n plus (S m) n = S (plus m n) With dependent types append :: list n → list m → list (n +m) append nil l = l append (cons a l’) l = cons a (append l’ l) Nicolas Oury Pattern covering by set approximations

  10. Introduction The Calculus of Inductive Constructions Elimination of useless cases Inductive data types Approximations of inductive sets Definitions by pattern matching Conclusions Useless cases in a pattern matching Pattern matching Functions can be defined by pattern matching plus O n = n plus (S m) n = S (plus m n) With dependent types append :: list n → list m → list (n +m) append nil l = l append (cons a l’) l = cons a (append l’ l) Nicolas Oury Pattern covering by set approximations

  11. Introduction The Calculus of Inductive Constructions Elimination of useless cases Inductive data types Approximations of inductive sets Definitions by pattern matching Conclusions Useless cases in a pattern matching Useless cases Another example : head :: list (S n) → A head (cons a ) = a head nil = ??? What do we want to write here? A default case? A proof that the case is impossible? We want to automaticaly eliminate these cases Nicolas Oury Pattern covering by set approximations

  12. Introduction The Calculus of Inductive Constructions Elimination of useless cases Inductive data types Approximations of inductive sets Definitions by pattern matching Conclusions Useless cases in a pattern matching Useless cases Another example : head :: list (S n) → A head (cons a ) = a head nil = ??? What do we want to write here? A default case? A proof that the case is impossible? We want to automaticaly eliminate these cases Nicolas Oury Pattern covering by set approximations

  13. Introduction The Calculus of Inductive Constructions Elimination of useless cases Inductive data types Approximations of inductive sets Definitions by pattern matching Conclusions Useless cases in a pattern matching Useless cases Another example : head :: list (S n) → A head (cons a ) = a head nil = ??? What do we want to write here? A default case? A proof that the case is impossible? We want to automaticaly eliminate these cases Nicolas Oury Pattern covering by set approximations

  14. Introduction The Calculus of Inductive Constructions Elimination of useless cases Inductive data types Approximations of inductive sets Definitions by pattern matching Conclusions Useless cases in a pattern matching Useless cases Another example : head :: list (S n) → A head (cons a ) = a head nil = ??? What do we want to write here? A default case? A proof that the case is impossible? We want to automaticaly eliminate these cases Nicolas Oury Pattern covering by set approximations

  15. Introduction The Calculus of Inductive Constructions Elimination of useless cases Inductive data types Approximations of inductive sets Definitions by pattern matching Conclusions Useless cases in a pattern matching Useless cases Another example : head :: list (S n) → A head (cons a ) = a head nil = ??? What do we want to write here? A default case? A proof that the case is impossible? We want to automaticaly eliminate these cases Nicolas Oury Pattern covering by set approximations

  16. Introduction The Calculus of Inductive Constructions Elimination of useless cases Inductive data types Approximations of inductive sets Definitions by pattern matching Conclusions Useless cases in a pattern matching Useless cases Another example : head :: list (S n) → A head (cons a ) = a head nil = ??? What do we want to write here? A default case? A proof that the case is impossible? We want to automaticaly eliminate these cases Nicolas Oury Pattern covering by set approximations

  17. Introduction Elimination of useless cases Undecidability Approximations of inductive sets Splitting Conclusions Outline Introduction 1 The Calculus of Inductive Constructions Inductive data types Definitions by pattern matching Useless cases in a pattern matching Elimination of useless cases 2 Undecidability Splitting Approximations of inductive sets 3 Set computations Examples Prototype Refutations reconstruction Conclusions 4 Nicolas Oury Pattern covering by set approximations

  18. Introduction Elimination of useless cases Undecidability Approximations of inductive sets Splitting Conclusions Undecidability Post problem ( u 1 , v 1 ) . . . ( u n , v n ) words on { a ; b } u i 1 . . . u i k = v i 1 . . . v i k for some non empty ( i j ) 1 ≤ j ≤ k ? This problem is undecidable Encoding words : Word = ǫ : Word : Word → Word A : Word → Word B To each word we asociate a context: abb [] = A(B(B[])) Nicolas Oury Pattern covering by set approximations

  19. Introduction Elimination of useless cases Undecidability Approximations of inductive sets Splitting Conclusions Undecidability Post problem ( u 1 , v 1 ) . . . ( u n , v n ) words on { a ; b } u i 1 . . . u i k = v i 1 . . . v i k for some non empty ( i j ) 1 ≤ j ≤ k ? This problem is undecidable Encoding words : Word = ǫ : Word : Word → Word A : Word → Word B To each word we asociate a context: abb [] = A(B(B[])) Nicolas Oury Pattern covering by set approximations

Recommend


More recommend