proposition: Lemma refine_format_nat_map {S} {sz} (f : S -> nat) : forall s ce, refine (FMapFormat.Projection_Format (format_nat sz) f s ce) (FMapFormat.Projection_Format format_word (Basics.compose (natToWord sz) f) s ce).
proof: Proof. intros; unfold FMapFormat.Projection_Format, FMapFormat.Compose_Format, format_nat; intros ? ?. rewrite unfold_computes in H; destruct_ex; intuition. apply unfold_computes; eexists; split; eauto; subst. try rewrite <- plus_n_O with (n := f s). eauto. Qed.
imports: Fiat.Common.Coq__8_4__8_5__Compat Coq.ZArith.ZArith Fiat.Narcissus.BinLib Fiat.Narcissus.Common.Specs Fiat.Narcissus.Common.ComposeOpt Fiat.Narcissus.Common.ComposeCheckSum Fiat.Narcissus.Common.ComposeIf Fiat.Narcissus.Formats Fiat.Narcissus.BaseFormats Fiat.Narcissus.Automation.Solver Fiat.Narcissus.Automation.NormalizeFormats Bedrock.Word