Common — library colibrilib.modulo — module SBV
147
module SBV
148
use int.Int
149
150
function
sbv_of_ubv
(x:int) (size:int) : int = if 2*x < size then x else x - size
151
function
ubv_of_sbv
(x:int) (size:int) : int = if 0 <= x then x else size + x
152
Valid (15ms) (colibri2)
153
goal
G
: forall size x. 0 <= x < size -> ubv_of_sbv (sbv_of_ubv x size) size = x
154
Valid (18ms) (colibri2)
155
goal
G2
: forall size x. 0 <= x < size -> -size <= 2*(sbv_of_ubv x size) < size
156
157
end