0

I have the following code in Isabelle:

typedecl type1
typedecl type2

consts 
  A::"type1 set"
  B::"type2 set"

When I want to use union operation with A and B as bellow:

axiomatization where
 c0: "A  ∩ B = {}"

Since A and B are sets of different types, I get an error of clash of types which makes sense!

I am wondering if there are any counterparts for set operations that they implicitly consider their operands as pure sets (i.e., ignore their types), therefore something like A ∩' B become possible ( ∩' is ∩ operation counterpart in above sense).

PS: Another workaround is type casting that I wrote this as a separate question here to better organize my questions.

Thanks

Community
  • 1
  • 1
qartal
  • 2,024
  • 19
  • 31

1 Answers1

3

Sets in Isabelle/HOL are always typed, i.e., they contain only elements of one type. If you want to have untyped sets, you have to switch to another logic such as Isabelle/ZF.

Similarly, all values in HOL are annotated with their type, and this is fundamental to the logic. Equality, for example, can only be applied to two values of the same type. Hence, there is no notion of equality between values of different types. Consequently, there is no set operation that ignores the type of values, because such an operation would necessarily have to know how to identify values of different types.

Andreas Lochbihler
  • 4,998
  • 12
  • 10
  • Thanks, Can you please give me some hints that how can I switch to Isabelle/ZF? I am using JEdit with isabelle installed, and I am importing Main theory in my thy file. Is the syntax of Isabelle/ZF different from Isabelle/HOL? I would appreciate a little bit more explanation. – qartal Nov 11 '14 at 12:47
  • 1
    To switch to the ZF logic, select the logic images ZF in the theory panel and restart. Note that ZF is completely disjoint from HOL, i.e., none of the definitions in HOL is available as such in ZF. Also, ZF uses different syntax. The `ROOT` file in `$ISABELLE_HOME/src/ZF` contains some references to literature on the ZF logic. – Andreas Lochbihler Nov 11 '14 at 14:15
  • I would consider the switch to Isabelle/ZF as rather theoretical. Unlike Isabelle/HOL, its library and tools have not been developed in the past 20 years. Looking once again closely at your application, you should find ways to work with the HOL type system. – Makarius Nov 11 '14 at 21:38