free c:channel.
free d:channel [private].

fun h(bitstring):bitstring.
fun pair(bitstring,bitstring):bitstring.
fun proj1(bitstring):bitstring.
fun proj2(bitstring):bitstring.

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

equation
  forall x,y:bitstring; proj1(pair(x,y)) = x;
  forall x,y:bitstring; proj2(pair(x,y)) = y.

query x,y:bitstring;
  event(A(x)) ==> event(B(y)).


query x,y:bitstring;
  event(A(x)) && event(B(y)) ==> x <> h(y).

set preciseActions = true.
set verboseClauses = short.

process
  in(c,x:bitstring);
  (
    (
      in(c,y:bitstring); event B(y); out(d,pair(x,y))
    ) | (
      in(d,z:bitstring); if x <> h(proj2(z)) then event A(x)

    )
  )

(* EXPECTPV
RESULT event(A(x_1)) ==> event(B(y_1)) is true.
RESULT event(A(x_1)) && event(B(y_1)) ==> x_1 ≠ h(y_1) is true.
0.012s (user 0.008s + system 0.004s), max rss 8404K
END *)
