fact: Definition RangeTreeBag_bdelete (container : RangeTreeBag) (key_searchterm : ((option TKey) * (option TKey)) * SearchTermType) : (list TItem) * RangeTreeBag := let (key, searchterm) := key_searchterm in let key_bags := RangeTreeBag_btraverse container key in List.fold_right (fun (key_bag : TKey * BagType) (res : (list TItem) * RangeTreeBag) => let (key, bag) := (fst key_bag, snd key_bag) in let (deleted, bag') := (fst (bdelete bag searchterm), snd (bdelete bag searchterm)) in ((fst res) ++ deleted, add key bag' (snd res)) ) ([], container) key_bags.
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