proposition: Lemma reverse_ensemble_list_equivalence_iff (S : Ensemble W) : refineEquiv (ls <- {ls : list W | EnsembleListEquivalence S ls}; {S0 : Ensemble W | forall x : W, Ensembles.In W S0 x <-> List.In x ls}) (ls <- {ls : list W | EnsembleListEquivalence S ls}; { S' : _ | Same_set _ S' S }).
proof: Proof. split; repeat intro; inversion_by computes_to_inv; subst; repeat constructor; let x := match goal with H : EnsembleListEquivalence _ ?x |- _ => constr:(x) end in apply BindComputes with (comp_a_value := x); destruct_head_hnf and; split_iff; repeat constructor; hnf; auto. Qed.
imports: Coq.Strings.String Coq.Sets.Ensembles Coq.Sets.Finite_sets Coq.Lists.List Coq.Sorting.Permutation Coq.Classes.RelationPairs Fiat.ADT Fiat.ADT.ComputationalADT Fiat.ADTRefinement.Core Fiat.ADTNotation Fiat.ADTRefinement.GeneralRefinements Fiat.Computation Fiat.Common Fiat.Common.Ensembles Fiat.Common.Ensembles.Tactics Fiat.ComputationalEnsembles Fiat.FiniteSetADTs.FiniteSetADTMethodLaws Fiat.FiniteSetADTs.FiniteSetADT