proposition: Corollary In_fold_left_split : forall (k : X.t) t bag l acc, List.In (k, bag) (List.map (fun bag0 : BagType => (t, bag0)) (acc ++ fold_left (fun (a0 : list BagType) (p : key * Trie) => Trie_enumerate (snd p) ++ a0) l [ ])) <-> List.In (k, bag) (List.map (fun bag0 : BagType => (t, bag0)) (fold_left (fun (a0 : list BagType) (p : key * Trie) => Trie_enumerate (snd p) ++ a0) l acc)).
proof: Proof. intros; rewrite !in_map_iff; split; intros; destruct_ex; intuition; eexists; split; eauto. rewrite In_fold_left_split' in H1; eauto. rewrite <- In_fold_left_split' in H1; eauto. Qed.
imports: Fiat.Common.Coq__8_4__8_5__Compat Fiat.QueryStructure.Implementation.DataStructures.Bags.BagsInterface Fiat.QueryStructure.Implementation.DataStructures.Bags.BagsProperties Coq.FSets.FMapInterface Coq.FSets.FMapFacts Coq.FSets.FMapAVL Coq.ZArith.ZArith Fiat.Common Fiat.Common.List.ListFacts Fiat.Common.List.FlattenList Fiat.Common.SetEqProperties Fiat.Common.FMapExtensions Fiat.Common.List.PermutationFacts Fiat.QueryStructure.Specification.SearchTerms.ListPrefix