src/Tools/isac/Knowledge/Test_Build_Thydata.thy
author Walther Neuper <wneuper@ist.tugraz.at>
Mon, 26 Mar 2018 07:28:39 +0200
changeset 59416 229e5c9cf78b
parent 59405 49d7d410b83c
child 59427 d7a39d815afa
permissions -rw-r--r--
Rule: structure pushed to code files
wneuper@59344
     1
(* Minimal Thydata for test/../thy-hierarchy *)
neuper@55408
     2
neuper@55408
     3
theory Test_Build_Thydata
neuper@55408
     4
imports "~~/src/Tools/isac/ProgLang/ProgLang"
neuper@55408
     5
begin
neuper@55408
     6
ML {*
wneuper@59416
     7
fun termlessI (_: Rule.subst) uv = Term_Ord.termless uv;
neuper@55408
     8
*}
neuper@55408
     9
axiomatization where
neuper@55408
    10
  thm111: "thm111 = thm111 + (111::int)" and
neuper@55408
    11
  thm222: "thm222 = thm222 + (222::int)"
neuper@55408
    12
neuper@55408
    13
ML {*
wneuper@59416
    14
val rls111 = Rule.Rls {id = "rls111", 
wneuper@59416
    15
	preconds = [], rew_ord = ("termlessI", termlessI), erls = Rule.e_rls, 
wneuper@59416
    16
	srls = Rule.Erls, calc = [], errpatts = [],
wneuper@59416
    17
	rules = [Rule.Thm ("thm111", @{thm thm111}), Rule.Thm ("refl", @{thm refl})],
wneuper@59416
    18
	scr = Rule.EmptyScr};
neuper@55408
    19
wneuper@59416
    20
val rls222 = Rule.Rls {id = "rls222", 
wneuper@59416
    21
	preconds = [], rew_ord = ("termlessI", termlessI), erls = Rule.e_rls, 
wneuper@59416
    22
	srls = Rule.Erls, calc = [], errpatts = [],
wneuper@59416
    23
	rules = [Rule.Thm ("sym_thm111", @{thm thm111} RS @{thm sym}), Rule.Thm ("o_def", @{thm o_def})],
wneuper@59416
    24
	scr = Rule.EmptyScr};
s1210629013@55444
    25
wneuper@59374
    26
val prep_rls' = LTool.prep_rls @{theory};
neuper@55408
    27
*}
neuper@55408
    28
neuper@55408
    29
setup {* KEStore_Elems.add_rlss 
s1210629013@55444
    30
  [("rls111", (Context.theory_name @{theory}, prep_rls' rls111)),
s1210629013@55444
    31
   ("rls222", (Context.theory_name @{theory}, prep_rls' rls222))] *}
neuper@55408
    32
neuper@55408
    33
ML {*
neuper@55408
    34
  @{thm refl};
neuper@55408
    35
  @{thm o_def};
neuper@55408
    36
*}
neuper@55408
    37
neuper@55408
    38
end