### Abstract

We implemented a command that can be used to easily generate elements of a restricted type `{x :: 'a. P x}`, provided the definition is of the form `f ys = (if check ys then Some(generate ys :: 'a) else None)` where `ys` is a list of variables `y1 ... yn` and `check ys ==> P(generate ys)` can be proved.

In principle, such a definition is also directly possible using the `lift_definition` command. However, then this definition will not be suitable for code-generation. To this end, we automated a more complex construction of Joachim Breitner which is amenable for code-generation, and where the test `check ys` will only be performed once. In the automation, one auxiliary type is created, and Isabelle's lifting- and transfer-package is invoked several times.

### License

GNU Lesser General Public License (LGPL)

### Topics

- Computer science/Functional programming

### Session Lifting_Definition_Option

- Lifting_Definition_Option_Examples

## Cite

×

Lifting_Definition_Option-AFP

    @article{Lifting_Definition_Option-AFP,
      author  = {René Thiemann},
      title   = {Lifting Definition Option},
      journal = {Archive of Formal Proofs},
      month   = {October},
      year    = {2014},
      note    = {\url{https://isa-afp.org/entries/Lifting_Definition_Option.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
- Oct 15, 2014 : Isabelle2014