proposition: Lemma TrieOK_subtrie_filter : forall b m l bst_m f k subtrie, Proper (X.eq ==> eq ==> eq) f -> TrieOK (Node b m) l -> InA (PX.eqke (elt:=Trie)) (k, subtrie) (XMap.elements (filter f {| XMap.this := m; XMap.is_bst := bst_m |})) -> TrieOK subtrie (l ++ [k]).
proof: Proof. intros. inversion H0; subst; intros; eapply H8. rewrite <- elements_mapsto_iff in H1. rewrite filter_iff in H1; intuition. Qed.
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