“Extra type variables in representing set” while defining type in Isabelle

♀尐吖头ヾ 提交于 2020-03-26 06:57:26

问题


I'm working on a theory that uses topology and it would be helpful to have a type of open sets. I tried the following:

context topology
begin
typedef openset = "{U. U ∈ T}"
end

where topology is a locale and the context command correctly gives the output

locale topology =
  fixes T :: "'a set set" 
  assumes "topology T"

However, I get the following error:

Extra type variables in representing set: "'a" The error(s) above occurred in typedef "openset"

What does it mean? Here T is just a set of sets and I want to have a type consisting of the sets belonging to T, is there a way this can be done?


回答1:


First of all, this is not a data type – it is a ‘normal’ type definition.

The problem is that you cannot have type definitions that depend on locale parameters. The logical foundations of Isabelle do not permit such a thing at the moment. Cf. also this question: What Kind of Type Definitions are Legal in Local Contexts?



来源:https://stackoverflow.com/questions/38096508/extra-type-variables-in-representing-set-while-defining-type-in-isabelle

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!