I asked a series of question to get to the point I can define the following simple model in Isabelle, But I still stuck in getting what I wanted. I try to very briefly describe the problem with an example:
Example:
Suppose I have two classes Person and Car, Person owns cars and also drives cars. So I need the following types/sets:
Person
Car
owns (* owns relates elements of Person to Car *)
drives (* drives relate elements of Person to car as well *)
Problem:
I would like to formulate above example in Isabelle is a way that provides the following flexibilities:
Enable me to define some constraint; for example: if a Person owns a car, he/she definitely drives the car. I can do this by using a kind answer from here.
Enable me to define a new set/type namely C whose elements are disjoint union of elements of Car and owns. This is the first place I stuck: Car and owns are different types, so how I can union them?
Be able to continue the process numerous time in number (2); for example, define a new type/set namely D which is disjoint union of C and drives.
In number (2) and (3), I would like to keep the properties/characteristics of the elements of newly defined sets/types; for example, if I would have defined a property age for a Person (see here), I would like the elements of C retain this property in the sense that I can access this property for the elements in C whose type are Person. Consequently, if o1 is an element in C whose type is owns, I would like to access the source (i.e., the Person) and the target (the Car) that are related by o1.
I would appreciate any comments and suggestions.