# HG changeset patch # User nipkow # Date 1367202042 -7200 # Node ID 1006b9b08d7394d6f720d2e37402a964bf0fa972 # Parent 674522b0d06d4fca62de4597b99d0d95c42f15f5 tuned diff -r 674522b0d06d -r 1006b9b08d73 src/HOL/IMP/Abs_Int1_const.thy --- a/src/HOL/IMP/Abs_Int1_const.thy Sun Apr 28 09:10:43 2013 +0200 +++ b/src/HOL/IMP/Abs_Int1_const.thy Mon Apr 29 04:20:42 2013 +0200 @@ -9,29 +9,26 @@ datatype const = Const val | Any fun \_const where -"\_const (Const n) = {n}" | +"\_const (Const i) = {i}" | "\_const (Any) = UNIV" fun plus_const where -"plus_const (Const m) (Const n) = Const(m+n)" | +"plus_const (Const i) (Const j) = Const(i+j)" | "plus_const _ _ = Any" lemma plus_const_cases: "plus_const a1 a2 = - (case (a1,a2) of (Const m, Const n) \ Const(m+n) | _ \ Any)" + (case (a1,a2) of (Const i, Const j) \ Const(i+j) | _ \ Any)" by(auto split: prod.split const.split) instantiation const :: semilattice begin -fun less_eq_const where -"_ \ Any = True" | -"Const n \ Const m = (n=m)" | -"Any \ Const _ = False" +fun less_eq_const where "x \ y = (y = Any | x=y)" -definition "a < (b::const) = (a \ b & ~ b \ a)" +definition "x < (y::const) = (x \ y & \ y \ x)" fun sup_const where -"Const m \ Const n = (if n=m then Const m else Any)" | +"Const i \ Const j = (if i=j then Const i else Any)" | "_ \ _ = Any" definition "\ = Any"