https://github.com/EasyCrypt/easycrypt
Raw File
Tip revision: acfd4ea7d779487e774eb6aa8c3deeae783aafd8 authored by Pierre-Yves Strub on 16 April 2020, 14:56:46 UTC
Definition of quotient types w.r.t. a equivalence relation
Tip revision: acfd4ea
TCR.eca
require import AllCore.

type K.
op dk : K distr.

type t_from.
type t_to.

op H : K -> t_from -> t_to.

module type ADV_TCR = {
  proc c1 () : t_from
  proc c2 (k:K) : t_from
}.

module TCR (A:ADV_TCR) = {
  proc main() = {
    var x,y,k;
    x <- A.c1();
    k <$ dk;
    y <- A.c2(k);
    return (H k x = H k y /\ x <> y);
  }
}.


    
back to top