Section PedersenBinding.
Variable A :  GroupElement -> Comp (GroupElement * (nat * nat) * (nat * nat)).
Definition B (x : GroupElement) :=
[c, p1, p2] <-$3 A x;
[v1, r1] <-2 p1;
[v2, r2] <-2 p2;
ret (modNat ((v1 + (modNatAddInverse v2 order)) * (multInverseModOrder (r2 + (modNatAddInverse r1 order)))) order)%nat.
Local Open Scope nat_scope.
intuition; omega.
Qed.

Theorem modNat_eq_compat_gen :
forall c a b,
a = b ->
modNat a c = modNat b c.