(* Copyright 2012-2017 by Adam Petcher and FCF Contributors.	* * Use of this source code is governed by the license described	* * in the LICENSE file at the root of the source tree.		*)
(* An argument that is used to prove that the "two worlds" style of security definition is equivalent to the "coin flipping" style. *)
Set Implicit Arguments.
intuition.
specialize (support_NoDup c); intuition.
rewrite <- H0 in H1.
destruct ls; intuition.
specialize (getSupport_length_nz H); intuition.
rewrite <- H0 in H2.
simpl in *.
omega.
destruct b.
destruct ls.
unfold sumList; simpl.
eapply ratAdd_eqRat_compat.
symmetry.
eapply getSupport_not_In_evalDist.
intuition.
rewrite <- H0 in H2.
simpl in *.
intuition.
intuition.
destruct b.
inversion H1; clear H1; subst.
simpl in *.
intuition.
destruct ls.
unfold sumList.
simpl.
rewrite <- ratAdd_0_l.
eapply ratAdd_comm.
destruct b.
inversion H1; clear H1; subst.
simpl in *.
intuition.
inversion H1; clear H1; subst.
simpl in *.
intuition.
inversion H5; clear H5; subst.
simpl in *; intuition.
destruct ls.
unfold sumList; simpl.
rewrite ratAdd_comm.
eapply ratAdd_eqRat_compat.
intuition.
symmetry.
eapply getSupport_not_In_evalDist.
intuition.
rewrite <- H0 in H2.
simpl in *.
intuition.
destruct b.
destruct ls.
unfold sumList.
simpl.
rewrite <- ratAdd_0_l.
intuition.
destruct b.
inversion H1; clear H1; subst.
simpl in *.
intuition.
inversion H5; clear H5; subst.
simpl in *; intuition.
inversion H1; clear H1; subst.
simpl in *; intuition.
inversion H1; clear H1; subst.
simpl in *; intuition.
Qed.

Theorem evalDist_bool_complement :
forall (c : Comp bool),
well_formed_comp c ->
evalDist c false == ratSubtract 1 (evalDist c true).