library colibrilib.spec — module OptThe shapes of the results that may give nothing, and of a relation with an element of an abstract value.
module Opt171use option.Option172
When r is Some x, p x holds (None: no claim)
predicate when_some (p: 'a -> bool) (r: option 'a) =175match r with Some x -> p x | None -> true end176
The abstract value r contains the set p, None when p is empty
predicate includes_opt (mem: 'v -> 'd -> bool) (p: 'v -> bool) (r: option 'd) =179forall x. p x -> match r with None -> false | Some r -> mem x r end180
Every x in the relation rel x y with a y of a is in r (the numbers below an element of a)
predicate sound_rel (mem: 'v -> 'd -> bool) (rel: 'v -> 'v -> bool) (a r: 'd) =184forall x y. mem y a -> rel x y -> mem x r185end186