fact: Definition IndexedBag_bdelete (container: IndexedBag) (key_searchterm: (option TKey) * SearchTermType) : (list TItem) * IndexedBag := match fst (key_searchterm) with | Some k => match find k container with | Some bag => let (d,r) := bdelete bag (snd key_searchterm) in (d, add k r container) | None => (nil, container) end | None => fold (fun k bag (res : (list TItem) * (t BagType)) => match bdelete bag (snd key_searchterm) with | (d, r) => let (d', r') := res in (d ++ d', add k r r') end) (container) ([], empty BagType) 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