fact: Fixpoint Trie_update (trie : Trie) (st : list _) (search_term : SearchTermType) (updateTerm : UpdateTermType) : (list TItem) * Trie := match st with | nil => let (updatedItems, bag') := bupdate (TrieNode trie) search_term updateTerm in (updatedItems, Node bag' (SubTries trie)) | key :: st' => let (updatedItems, bag') := bupdate (TrieNode trie) search_term updateTerm in match find key (SubTries trie) with | Some subtrie => let (updatedSubItems, bag'') := Trie_update subtrie st' search_term updateTerm in (updatedItems ++ updatedSubItems, Node bag' (add key bag'' (SubTries trie))) | None => (updatedItems, 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