proposition: Lemma refine_For_Bind {A B} : forall (c : Comp (list A)) (f : A -> B), refine (For (l <- c; ret (map f l))) (l <- For c; ret (map f l)).
proof: Proof. intros. Local Transparent Query_For. unfold Query_For; repeat rewrite refineEquiv_bind_bind. simplify with monad laws. f_equiv; intro. intros ? ?; computes_to_inv; subst; computes_to_econstructor. rewrite H; reflexivity. Local Opaque Query_For. Qed.
imports: Coq.Vectors.Vector Coq.Strings.Ascii Coq.Bool.Bool Coq.Bool.Bvector Coq.Lists.List Fiat.Computation.ListComputations Fiat.QueryStructure.Automation.AutoDB Fiat.QueryStructure.Implementation.DataStructures.BagADT.BagADT Fiat.QueryStructure.Automation.IndexSelection Fiat.QueryStructure.Specification.SearchTerms.ListPrefix Fiat.QueryStructure.Automation.SearchTerms.FindPrefixSearchTerms Fiat.QueryStructure.Automation.QSImplementation Fiat.Narcissus.Formats.DomainNameOpt Fiat.Narcissus.Examples.DNS.SimpleDnsOpt Fiat.Narcissus.Examples.DNS.SimpleDNSPacket Fiat.Examples.DnsServer.DecomposeSumField Fiat.Computation.FoldComp Fiat.Examples.DnsServer.SimpleAuthoritativeDNSSchema