fact: Fixpoint Trie_delete (trie : Trie) (st : list X.t) (search_term : SearchTermType) : (list TItem) * Trie := match st with | nil => let (deletedItems, bag') := bdelete (TrieNode trie) search_term in (deletedItems, Node bag' (SubTries trie)) | key :: st' => let (deletedItems, bag') := bdelete (TrieNode trie) search_term in match find key (SubTries trie) with | Some subtrie => let (deletedSubItems, bag'') := Trie_delete subtrie st' search_term in (deletedItems ++ deletedSubItems, Node bag' (add key bag'' (SubTries trie))) | None => (deletedItems, Node bag' (SubTries trie)) end end.
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