2018-06-11 16:48:49 +00:00
|
|
|
theory Conceptual
|
2018-10-30 14:50:01 +00:00
|
|
|
imports "../Isa_DOF" "../Isa_COL"
|
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-12-18 13:29:08 +00:00
|
|
|
level :: "int option"
|
2018-08-20 09:36:04 +00:00
|
|
|
x :: int
|
2018-04-28 13:15:25 +00:00
|
|
|
|
|
|
|
doc_class B =
|
2018-12-18 13:29:08 +00:00
|
|
|
level :: "int option"
|
2018-12-04 14:04:50 +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 *)
|
|
|
|
|
|
|
|
doc_class C = B +
|
|
|
|
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 +
|
2018-12-04 14:04:50 +00:00
|
|
|
x :: "string" <= "''qed''" (* overriding default *)
|
2018-08-24 14:58:06 +00:00
|
|
|
|
2018-04-28 13:15:25 +00:00
|
|
|
doc_class F =
|
2019-01-08 09:34:49 +00:00
|
|
|
property :: "term list"
|
|
|
|
r :: "thm list"
|
|
|
|
u :: "file"
|
|
|
|
s :: "typ list"
|
|
|
|
b :: "(A \<times> C) set" <= "{}" (* This is a relation link, roughly corresponding
|
2018-12-04 14:04:50 +00:00
|
|
|
to an association class. It can be used to track
|
|
|
|
claims to result - relations, for example.*)
|
2018-09-18 06:57:53 +00:00
|
|
|
doc_class G = C +
|
|
|
|
g :: "thm" <= "@{thm ''HOL.refl''}"
|
2018-04-28 13:15:25 +00:00
|
|
|
|
|
|
|
doc_class M =
|
|
|
|
trace :: "(A + C + D + F) list"
|
2018-11-13 14:19:02 +00:00
|
|
|
accepts "A ~~ \<lbrace>C || D\<rbrace>\<^sup>* ~~ \<lbrakk>F\<rbrakk>"
|
2018-12-03 12:19:31 +00:00
|
|
|
|
|
|
|
|
2019-05-23 13:17:24 +00:00
|
|
|
|
|
|
|
(*
|
2019-05-27 09:03:32 +00:00
|
|
|
ML\<open> Document.state();\<close>
|
2019-05-23 13:17:24 +00:00
|
|
|
ML\<open> Session.get_keywords(); (* this looks to be really session global. *)
|
|
|
|
Outer_Syntax.command; \<close>
|
|
|
|
ML\<open> Thy_Header.get_keywords @{theory};(* this looks to be really theory global. *) \<close>
|
|
|
|
*)
|
|
|
|
|
2019-05-17 10:05:04 +00:00
|
|
|
section* [ test :: A ] \<open> Test and Validation\<close>
|
2018-12-03 21:18:47 +00:00
|
|
|
text\<open>Defining some document elements to be referenced in later on in another theory: \<close>
|
2019-05-23 13:17:24 +00:00
|
|
|
text* [ sdf ] \<open> f @{thm refl}\<close>
|
2019-05-17 10:05:04 +00:00
|
|
|
text* [ sdfg ] \<open> fg @{thm refl}\<close>
|
|
|
|
text* [ xxxy ] \<open> dd @{docitem \<open>sdfg\<close>} @{thm refl}\<close>
|
2018-12-03 12:19:31 +00:00
|
|
|
|
|
|
|
|
2019-05-14 07:13:42 +00:00
|
|
|
end
|