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.
intuition.
subst.
intuition.
Qed.
induction c; intuition; simpl in *.
Qed.

Theorem modNatAddInverse_mult :
forall a b c,
modNat (modNatAddInverse (a * b) c) c =
modNat (a * modNatAddInverse b c) c.