proposition: Lemma Same_set_Setminus_fold {A} S0 ls : Same_set _ (Setminus A S0 (elements ls)) (List.fold_right (fun x S => Subtract _ S x) S0 ls).
proof: Proof. revert S0; induction ls; simpl; repeat match goal with | _ => intro | _ => split | _ => progress subst | _ => progress split_and | _ => progress destruct_head_hnf and | _ => progress destruct_head_hnf or | _ => progress destruct_head_hnf Singleton | _ => progress unfold Ensembles.In, elements, Same_set, Included, Setminus, not in * | _ => progress simpl in * | [ H : ~(_ \/ _) |- _ ] => apply Decidable.not_or in H | _ => solve [ eauto ] | [ H : _ |- _ ] => apply H; solve [ eauto ] | [ H : Singleton _ ?x ?x -> False |- _ ] => exfalso; apply H end. 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