proposition: Lemma refine_decode_packet : forall b, refine (Pick_Decoder_For DNS_Packet_OK encode_packet_Spec b list_CacheEncode_empty) (ret match fst packetDecoderImpl b list_CacheDecode_empty with | Some (p, _, _) => Some p | None => None end).
proof: Proof. intros; eapply refine_Pick_Decoder_For with (decoderImpl := packet_decoder); eauto. apply list_cache_empty_Equiv. simpl. unfold GoodCache; simpl; intuition; congruence. Qed.
imports: Coq.Vectors.Vector Coq.Strings.Ascii Coq.Bool.Bool Coq.Lists.List Fiat.Common.Tactics.CacheStringConstant Fiat.Computation.Decidable Fiat.Computation.IfDec Fiat.Computation.FoldComp Fiat.Computation.FueledFix Fiat.Computation.ListComputations Fiat.QueryStructure.Automation.Common Fiat.QueryStructure.Automation.MasterPlan Fiat.QueryStructure.Implementation.DataStructures.BagADT.BagADT Fiat.QueryStructure.Automation.IndexSelection Fiat.QueryStructure.Specification.SearchTerms.ListPrefix Fiat.QueryStructure.Automation.SearchTerms.FindStringPrefixSearchTerms Fiat.QueryStructure.Automation.QSImplementation Bedrock.Word Fiat.Narcissus.Common.Specs Fiat.Narcissus.BinLib.Core Fiat.Narcissus.Examples.SimpleDnsOpt Fiat.Narcissus.Lib2.DomainNameOpt Fiat.Examples.DnsServer.SimplePacket Fiat.Examples.DnsServer.DecomposeSumField Fiat.Examples.DnsServer.SimpleDnsLemmas Fiat.Examples.DnsServer.DnsAutomation Fiat.Examples.DnsServer.SimpleAuthoritativeDNSSchema