Cargando…
Deep Induction: Induction Rules for (Truly) Nested Types
This paper introduces deep induction, and shows that it is the notion of induction most appropriate to nested types and other data types defined over, or mutually recursively with, (other) such types. Standard induction rules induct over only the top-level structure of data, leaving any data interna...
Autores principales: | , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
2020
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7788624/ http://dx.doi.org/10.1007/978-3-030-45231-5_18 |
_version_ | 1783633066764271616 |
---|---|
author | Johann, Patricia Polonsky, Andrew |
author_facet | Johann, Patricia Polonsky, Andrew |
author_sort | Johann, Patricia |
collection | PubMed |
description | This paper introduces deep induction, and shows that it is the notion of induction most appropriate to nested types and other data types defined over, or mutually recursively with, (other) such types. Standard induction rules induct over only the top-level structure of data, leaving any data internal to the top-level structure untouched. By contrast, deep induction rules induct over all of the structured data present. We give a grammar generating a robust class of nested types (and thus ADTs), and develop a fundamental theory of deep induction for them using their recently defined semantics as fixed points of accessible functors on locally presentable categories. We then use our theory to derive deep induction rules for some common ADTs and nested types, and show how these rules specialize to give the standard structural induction rules for these types. We also show how deep induction specializes to solve the long-standing problem of deriving principled and practically useful structural induction rules for bushes and other truly nested types. Overall, deep induction opens the way to making induction principles appropriate to richly structured data types available in programming languages and proof assistants. Agda implementations of our development and examples, including two extended case studies, are available. |
format | Online Article Text |
id | pubmed-7788624 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2020 |
record_format | MEDLINE/PubMed |
spelling | pubmed-77886242021-01-07 Deep Induction: Induction Rules for (Truly) Nested Types Johann, Patricia Polonsky, Andrew Foundations of Software Science and Computation Structures Article This paper introduces deep induction, and shows that it is the notion of induction most appropriate to nested types and other data types defined over, or mutually recursively with, (other) such types. Standard induction rules induct over only the top-level structure of data, leaving any data internal to the top-level structure untouched. By contrast, deep induction rules induct over all of the structured data present. We give a grammar generating a robust class of nested types (and thus ADTs), and develop a fundamental theory of deep induction for them using their recently defined semantics as fixed points of accessible functors on locally presentable categories. We then use our theory to derive deep induction rules for some common ADTs and nested types, and show how these rules specialize to give the standard structural induction rules for these types. We also show how deep induction specializes to solve the long-standing problem of deriving principled and practically useful structural induction rules for bushes and other truly nested types. Overall, deep induction opens the way to making induction principles appropriate to richly structured data types available in programming languages and proof assistants. Agda implementations of our development and examples, including two extended case studies, are available. 2020-04-17 /pmc/articles/PMC7788624/ http://dx.doi.org/10.1007/978-3-030-45231-5_18 Text en © The Author(s) 2020 Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made. The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. |
spellingShingle | Article Johann, Patricia Polonsky, Andrew Deep Induction: Induction Rules for (Truly) Nested Types |
title | Deep Induction: Induction Rules for (Truly) Nested Types |
title_full | Deep Induction: Induction Rules for (Truly) Nested Types |
title_fullStr | Deep Induction: Induction Rules for (Truly) Nested Types |
title_full_unstemmed | Deep Induction: Induction Rules for (Truly) Nested Types |
title_short | Deep Induction: Induction Rules for (Truly) Nested Types |
title_sort | deep induction: induction rules for (truly) nested types |
topic | Article |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7788624/ http://dx.doi.org/10.1007/978-3-030-45231-5_18 |
work_keys_str_mv | AT johannpatricia deepinductioninductionrulesfortrulynestedtypes AT polonskyandrew deepinductioninductionrulesfortrulynestedtypes |