fact: Definition InvertedIndex_bdelete (it : InvertedIndexMap) (st : SearchTerm) : (list TItem) * InvertedIndexMap := let (matchedItems, unmatchedItems) := MValuesProperties.partition (fun _ => InvertedIndex_bfind_matcher st) (ValuesMap it) in (map snd (MValues.elements matchedItems), {| KeyMap := let matchedKeys := map fst (MValues.elements matchedItems) in MKeys.map (List.filter (fun key => if (List.In_dec eq_nat_dec key matchedKeys) then false else true)) (KeyMap it); ValuesMap := unmatchedItems; NumValues := NumValues it |}).
imports: Fiat.Common.Coq__8_4__8_5__Compat Fiat.QueryStructure.Implementation.DataStructures.Bags.BagsInterface Fiat.QueryStructure.Implementation.DataStructures.Bags.BagsProperties Coq.Arith.Peano_dec Coq.Structures.OrdersEx Coq.FSets.FMapInterface Coq.FSets.FMapFacts Coq.FSets.FMapAVL Coq.ZArith.ZArith Fiat.Common Fiat.Common.String_as_OT Fiat.Common.List.ListFacts Fiat.Common.List.FlattenList Fiat.Common.SetEqProperties Fiat.Common.FMapExtensions Fiat.Common.List.PermutationFacts Fiat.QueryStructure.Specification.SearchTerms.ListInclusion