2018-06-11 16:48:49 +00:00
|
|
|
theory Conceptual
|
2018-05-24 09:30:01 +00:00
|
|
|
imports "../Isa_DOF"
|
2018-04-28 13:15:25 +00:00
|
|
|
begin
|
2018-05-24 09:30:01 +00:00
|
|
|
|
2018-04-28 13:15:25 +00:00
|
|
|
doc_class A =
|
2018-08-20 09:36:04 +00:00
|
|
|
x :: int
|
2018-04-28 13:15:25 +00:00
|
|
|
|
|
|
|
doc_class B =
|
2018-08-20 09:36:04 +00:00
|
|
|
x :: "string" (* attributes live in their own name-space *)
|
|
|
|
y :: "string list" <= "[]" (* and can have arbitrary type constructors *)
|
|
|
|
(* LaTeX may have problems with this, though *)
|
2018-04-28 13:15:25 +00:00
|
|
|
|
|
|
|
doc_class C = B +
|
2018-08-20 09:36:04 +00:00
|
|
|
z :: "A option" <= None (* A LINK, i.e. an attribute that has a type
|
|
|
|
referring to a document class. Mathematical
|
|
|
|
relations over document items can be modeled. *)
|
2018-08-30 10:53:02 +00:00
|
|
|
g :: "thm"
|
2018-04-28 13:15:25 +00:00
|
|
|
|
|
|
|
datatype enum = X1 | X2 | X3
|
|
|
|
|
|
|
|
doc_class D = B +
|
2018-08-20 09:36:04 +00:00
|
|
|
x :: "string" <= "''def''" (* overriding default *)
|
|
|
|
a1 :: enum <= "X2" (* class - definitions may be mixed
|
|
|
|
with arbitrary HOL-commands, thus
|
|
|
|
also local definitions of enumerations *)
|
2018-04-28 13:15:25 +00:00
|
|
|
a2 :: int <= 0
|
|
|
|
|
2018-08-24 14:58:06 +00:00
|
|
|
doc_class E = D +
|
|
|
|
x :: "string" <= "''qed''" (* overriding default *)
|
|
|
|
|
2018-04-28 13:15:25 +00:00
|
|
|
doc_class F =
|
|
|
|
r :: "thm list"
|
2018-09-11 06:50:51 +00:00
|
|
|
u :: "file"
|
2018-09-11 10:08:25 +00:00
|
|
|
s :: "typ list"
|
2018-05-15 07:11:17 +00:00
|
|
|
b :: "(A \<times> C) set" <= "{}"
|
2018-04-28 13:15:25 +00:00
|
|
|
|
|
|
|
doc_class M =
|
|
|
|
trace :: "(A + C + D + F) list"
|
2018-05-15 07:11:17 +00:00
|
|
|
where "A ~~ \<lbrace>C || D\<rbrace>\<^sup>* ~~ \<lbrakk>F\<rbrakk>"
|
2018-04-28 13:15:25 +00:00
|
|
|
|
|
|
|
end
|