From: John Munroe <munddr@gmail.com>
Hi,
If a function f takes a type as an argument, is there a way to reason about
the 'parent' type of the argument type? Perhaps, something like:
Suppose U is a type.
definition "f s = (if s is a parent type of U then True else False"
Thanks in advance.
John
From: John Munroe <munddr@gmail.com>
A related question: Are types first-class citizens in Isabelle/HOL?
Thanks
John
From: Makarius <makarius@sketis.net>
It depends what exactly you mean by "is a parent type of". The Isabelle
framework allows some restricted reasoning about types, as cultivated
quite sucessfully for type classes, for example. Other (schematic)
relations over types also work, but there is no abstraction,
quantification, comparison of types.
Makarius
From: Makarius <makarius@sketis.net>
No, types are somewhat restrained. The HOL community has accumulated
certain smart tricks to do funny things with the little flexibilty that
the type language provides, see src/HOL/Library/Numeral_Type.thy for
example.
Makarius
Last updated: Nov 21 2024 at 12:39 UTC