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

fun h(bitstring):bitstring.

const a,b:bitstring.

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

const ok,ko,k:bitstring[private].

table tbl(bitstring).

axiom x:bitstring,y:bitstring; event(A(x)) ==> event(B(x)) [fullSat].

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

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

process
  (in(c,x:bitstring);
  if x = a
  then
    event A(a);
    event C(a);
    out(d,k)
  else
    out(c,ko))

  | in(d,x:bitstring); out(c,ok)

(* EXPECTPV
RESULT event(A(x_2)) ==> event(B(x_2)) is true.
RESULT inj-event(C(x_2)) ==> (inj-event(A(x_2)) ==> event(B(x_2))) is true.
RESULT event(A(x_2)) ==> event(B(x_2)) is true.
RESULT inj-event(C(x_2)) ==> (inj-event(A(x_2)) ==> event(B(x_2))) is true.
0.020s (user 0.004s + system 0.016s), max rss 8528K
END *)
