proposition: Lemma Find_MatchingIndexesOK_Subset_iff : forall (st : IndexSearchTermT) (MKey : KeyMapT) (MValues : ValuesMapT), (forall key indexes, MKeys.MapsTo key indexes MKey -> forall idx, List.In idx indexes -> exists item, MValues.MapsTo idx item MValues /\ InA E.eq key (projection item)) -> (forall idx item, MValues.MapsTo idx item MValues -> forall key, InA E.eq key (projection item) -> exists indexes, MKeys.MapsTo key indexes MKey /\ List.In idx indexes) -> forall item idx, MValues.MapsTo idx item (Find_MatchingIndexes MKey st MValues) <-> MValues.MapsTo idx item MValues /\ inclA E.eq st (projection item).
proof: Proof. repeat split; intros. eapply Find_MatchingIndexesOK_Subset; eauto. eapply Find_MatchingIndexesOK_InclA; eauto. intuition; eapply Find_MatchingIndexesOK_Subset'; eauto. Qed.
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