proposition: Lemma RangeTreeBag_bcollect_correct : forall container key bag, InA (@eq_key_elt _) (key, bag) (RangeTreeBag_bcollect container.(this)) <-> MapsTo key bag container.
proof: Proof. unfold RangeTreeBag_bcollect. intros container key' bag'. change (Raw.elements container) with (elements container). split; intro H. - rewrite elements_mapsto_iff. assumption. - apply elements_1 in H. remember (elements (elt := BagType) container) as ls. clear Heqls. induction ls; simpl; inversion H; subst. + left. assumption. + assumption. Qed.
imports: Fiat.QueryStructure.Implementation.DataStructures.Bags.BagsInterface Fiat.QueryStructure.Implementation.DataStructures.Bags.BagsProperties Coq.Arith.PeanoNat Coq.FSets.FMapInterface Coq.FSets.FMapFacts Coq.FSets.FMapAVL Fiat.Common Fiat.Common.List.ListFacts Fiat.Common.List.FlattenList Fiat.Common.SetEqProperties Fiat.Common.FMapExtensions Fiat.Common.List.PermutationFacts