### Abstract

We provide a framework for registering automatic methods to derive class instances of datatypes, as it is possible using Haskell's “`deriving Ord, Show, ...`” feature.

We further implemented such automatic methods to derive (linear) orders or hash-functions which are required in the Isabelle Collection Framework. Moreover, for the tactic of Huffman and Krauss to show that a datatype is countable, we implemented a wrapper so that this tactic becomes accessible in our framework.

Our formalization was performed as part of the IsaFoR/CeTA project. With our new tactic we could completely remove tedious proofs for linear orders of two datatypes.

This development is aimed at datatypes generated by the "`old_datatype`" command.

### License

BSD License

### Topics

- Computer science/Data structures

### Session Datatype_Order_Generator

- Derive_Aux
- Order_Generator
- Hash_Generator
- Derive
- Derive_Examples

### Depends on

- Deriving class instances for datatypes
- Native Word

### Used by

- A First Complete Algorithm for Real Quantifier Elimination in Isabelle/HOL
- Verified Complete Test Strategies for Finite State Machines
- Strong Eventual Consistency of the Collaborative Editing Framework WOOT
- An Algebra for Higher-Order Terms
- Haskell’s Show Class in Isabelle/HOL

### Auto-related entries

- Certification Monads
- XML
- Automatic Data Refinement
- Executable Transitive Closures
- Dijkstra’s Shortest Path Algorithm

## Cite

×

Datatype_Order_Generator-AFP

    @article{Datatype_Order_Generator-AFP,
      author  = {René Thiemann},
      title   = {Generating linear orders for datatypes},
      journal = {Archive of Formal Proofs},
      month   = {August},
      year    = {2012},
      note    = {\url{https://isa-afp.org/entries/Datatype_Order_Generator.html},
                 Formal proof development},
      ISSN    = {2150-914x},
    }

Download

## Download

× Download latest

Older releases:

- Sep 13, 2023 : Isabelle2023
- Oct 27, 2022 : Isabelle2022
- Dec 14, 2021 : Isabelle2021-1
- Feb 23, 2021 : Isabelle2021
- Apr 18, 2020 : Isabelle2020
- Jun 11, 2019 : Isabelle2019
- Aug 16, 2018 : Isabelle2018
- Oct 10, 2017 : Isabelle2017
- Dec 17, 2016 : Isabelle2016-1
- Feb 22, 2016 : Isabelle2016
- May 27, 2015 : Isabelle2015
- Aug 28, 2014 : Isabelle2014
- Dec 11, 2013 : Isabelle2013-2
- Nov 17, 2013 : Isabelle2013-1
- Mar 2, 2013 : Isabelle2013
- Feb 16, 2013 : Isabelle2013
- Aug 7, 2012 : Isabelle2012