fact: Definition IndexedBag_bfind (container: IndexedBag) (key_searchterm: (option TKey) * SearchTermType) := match fst key_searchterm with | Some k => match find k container with | Some bag => bfind (Bag := TBag) bag (snd key_searchterm) | None => nil end | None => flatten (List.map (fun bag : BagType => bfind bag (snd key_searchterm)) (Values container)) end.
imports: Fiat.QueryStructure.Implementation.DataStructures.Bags.BagsInterface Fiat.QueryStructure.Implementation.DataStructures.Bags.BagsProperties Coq.FSets.FMapInterface Coq.FSets.FMapFacts Coq.Arith.PeanoNat Fiat.Common Fiat.Common.List.ListFacts Fiat.Common.List.FlattenList Fiat.Common.SetEqProperties Fiat.Common.FMapExtensions Fiat.Common.List.PermutationFacts