proposition: Lemma map_if_filter_eq {A B} (f f' : A -> B) (dec : A -> bool) : forall ls, List.map (fun x => if dec x then f x else f' x) (List.filter dec ls) = List.map (fun x => f x) (List.filter dec ls).
proof: Proof. induction ls. reflexivity. simpl. destruct (dec a) eqn: eq. simpl. rewrite eq. rewrite IHls. reflexivity. exact IHls. Qed.
imports: Fiat.QueryStructure.Implementation.DataStructures.Bags.BagsInterface Fiat.QueryStructure.Implementation.DataStructures.Bags.BagsProperties Coq.Arith.PeanoNat Coq.FSets.FMapInterface Coq.FSets.FMapFacts Coq.FSets.FMapAVL Fiat.Common Fiat.Common.List.ListFacts Fiat.Common.List.FlattenList Fiat.Common.SetEqProperties Fiat.Common.FMapExtensions Fiat.Common.List.PermutationFacts