free c:channel.

fun h(bitstring):bitstring.

const a,b:bitstring.

event A(bitstring).
event B(bitstring).
event C(bitstring).

const ok,ko:bitstring.

lemma x:bitstring,y:bitstring; event(A(x)) ==> x=a.

lemma x:bitstring,y:bitstring; event(A(x)) && event(C(x)) ==> x=b.

lemma x:bitstring,y:bitstring; event(C(x)) ==> x=b && event(A(x)).

lemma x:bitstring,y:bitstring; event(C(x)) ==> x=b || event(A(x)).

process
  ! in(c,x:bitstring);
  if x = diff[a,a]
  then
    event A(a);
    out(c,ok)
  else
    out(c,ko)

(* EXPECTPV
RESULT event(A(x_1)) ==> x_1 = a is true.
RESULT event(A(x_1)) && event(C(x_1)) ==> x_1 = b is true.
RESULT event(C(x_1)) ==> x_1 = b && event(A(x_1)) is true.
RESULT event(C(x_1)) ==> x_1 = b || event(A(x_1)) is true.
RESULT Observational equivalence is true.
0.096s (user 0.068s + system 0.028s), max rss 9312K
END *)
