Stream: Archive Mirror: Isabelle Users Mailing List

Topic: [isabelle] Records definitions: mutual + self-referencing


view this post on Zulip Email Gateway (Aug 18 2022 at 10:35):

From: "Nauman ..." <recluze@gmail.com>
Hey,

I'm trying to create a record "A" which includes a field of type another
record "B". "B" itself contains a field of type "A". Is there a way to
define them mutually as we did in, for example, mutually recursive
datatypes?

record A =
a : int
b : B

record B =
x : int
y : A

Secondly, how do I define a record which contains a field of type itself:

record Block =
a : int
b : Block

(p.s. I know both these example contain syntax errors. They're just to
explain what I'm trying to do.)


Last updated: May 03 2024 at 08:18 UTC