diff -r 52a87574bca9 -r 6c6ccf573479 src/HOL/Bali/Basis.thy --- a/src/HOL/Bali/Basis.thy Sat Jan 02 18:46:36 2016 +0100 +++ b/src/HOL/Bali/Basis.thy Sat Jan 02 18:48:45 2016 +0100 @@ -1,7 +1,7 @@ (* Title: HOL/Bali/Basis.thy Author: David von Oheimb *) -subsection {* Definitions extending HOL as logical basis of Bali *} +subsection \Definitions extending HOL as logical basis of Bali\ theory Basis imports Main "~~/src/HOL/Library/Old_Recdef" @@ -9,10 +9,10 @@ subsubsection "misc" -ML {* fun strip_tac ctxt i = REPEAT (resolve_tac ctxt [impI, allI] i) *} +ML \fun strip_tac ctxt i = REPEAT (resolve_tac ctxt [impI, allI] i)\ declare split_if_asm [split] option.split [split] option.split_asm [split] -setup {* map_theory_simpset (fn ctxt => ctxt addloop ("split_all_tac", split_all_tac)) *} +setup \map_theory_simpset (fn ctxt => ctxt addloop ("split_all_tac", split_all_tac))\ declare if_weak_cong [cong del] option.case_cong_weak [cong del] declare length_Suc_conv [iff] @@ -176,13 +176,13 @@ abbreviation the_In1r :: "('al + 'ar, 'b, 'c) sum3 \ 'ar" where "the_In1r \ the_Inr \ the_In1" -ML {* +ML \ fun sum3_instantiate ctxt thm = map (fn s => simplify (ctxt delsimps @{thms not_None_eq}) (Rule_Insts.read_instantiate ctxt [((("t", 0), Position.none), "In" ^ s ^ " x")] ["x"] thm)) ["1l","2","3","1r"] -*} +\ (* e.g. lemmas is_stmt_rews = is_stmt_def [of "In1l x", simplified] *) @@ -203,7 +203,7 @@ subsubsection "Special map update" -text{* Deemed too special for theory Map. *} +text\Deemed too special for theory Map.\ definition chg_map :: "('b \ 'b) \ 'a \ ('a \ 'b) \ ('a \ 'b)" where "chg_map f a m = (case m a of None \ m | Some b \ m(a\f b))" @@ -255,7 +255,7 @@ definition lsplit :: "[['a, 'a list] \ 'b, 'a list] \ 'b" where "lsplit = (\f l. f (hd l) (tl l))" -text {* list patterns -- extends pre-defined type "pttrn" used in abstractions *} +text \list patterns -- extends pre-defined type "pttrn" used in abstractions\ syntax "_lpttrn" :: "[pttrn, pttrn] \ pttrn" ("_#/_" [901,900] 900) translations