val raw_key_serializer: LP.serializer raw_key_parser
val raw_key_serializer: LP.serializer raw_key_parser
let raw_key_serializer =
  [@inline_let] let _ = synth_raw_key_injective () in
  [@inline_let] let _ = synth_raw_key_inverse () in
  [@inline_let] let _ = assert_norm (raw_key_parser_kind == raw_key'_parser_kind) in
  LP.serialize_synth _ synth_raw_key raw_key'_serializer synth_raw_key_recip ()
module Zeta.Formats.Aux.Raw_key

(* This file has been automatically generated by EverParse. *)
open FStar.Bytes
module U8 = FStar.UInt8
module U16 = FStar.UInt16
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module LP = LowParse.Spec
module LT = LowParse.TacLib
module LSZ = LowParse.SLow
module LPI = LowParse.Spec.AllIntegers
module LL = LowParse.Low
module L = FStar.List.Tot
module B = LowStar.Buffer
module BY = FStar.Bytes
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST

#reset-options "--using_facts_from '* -FStar.Tactics -FStar.Reflection' --z3rlimit 16 --z3cliopt smt.arith.nl=false --max_fuel 2 --max_ifuel 2"

type raw_key' = (u256 & significant_digits_t)

inline_for_extraction let synth_raw_key (x: raw_key') : raw_key =
  match x with (raw_key_k,raw_key_significant_digits) -> {
    raw_key_k = raw_key_k;
    raw_key_significant_digits = raw_key_significant_digits;
  }

inline_for_extraction let synth_raw_key_recip (x: raw_key) : raw_key' = (x.raw_key_k,x.raw_key_significant_digits)

let synth_raw_key_recip_inverse () : Lemma (LP.synth_inverse synth_raw_key_recip synth_raw_key) = ()

let synth_raw_key_injective () : Lemma (LP.synth_injective synth_raw_key) =
  LP.synth_inverse_synth_injective synth_raw_key_recip synth_raw_key;
  synth_raw_key_recip_inverse ()

let synth_raw_key_inverse () : Lemma (LP.synth_inverse synth_raw_key synth_raw_key_recip) =
  assert_norm (LP.synth_inverse synth_raw_key synth_raw_key_recip)

let synth_raw_key_recip_injective () : Lemma (LP.synth_injective synth_raw_key_recip) =
  synth_raw_key_recip_inverse ();
  LP.synth_inverse_synth_injective synth_raw_key synth_raw_key_recip

noextract let raw_key'_parser : LP.parser _ raw_key' = (u256_parser `LP.nondep_then` significant_digits_t_parser)

noextract let raw_key'_parser_kind = LP.get_parser_kind raw_key'_parser

let raw_key_parser =
  synth_raw_key_injective ();
  assert_norm (raw_key_parser_kind == raw_key'_parser_kind);
  raw_key'_parser `LP.parse_synth` synth_raw_key

noextract let raw_key'_serializer : LP.serializer raw_key'_parser = (u256_serializer `LP.serialize_nondep_then` significant_digits_t_serializer)
/
prims.fst.checked LowStar.Buffer.fst.checked LowParse.TacLib.fst.checked LowParse.Spec.AllIntegers.fst.checked LowParse.Spec.fst.checked LowParse.SLow.fst.checked LowParse.Low.fst.checked FStar.UInt8.fsti.checked FStar.UInt64.fsti.checked FStar.UInt32.fsti.checked FStar.UInt16.fsti.checked FStar.Seq.fst.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked FStar.List.Tot.fst.checked FStar.HyperStack.ST.fsti.checked FStar.HyperStack.fst.checked FStar.Bytes.fsti.checked
Zeta.Formats.Aux.Raw_key.fst
LowParse.Spec.Base.serializer Zeta.Formats.Aux.Raw_key.raw_key_parser
LowParse.Spec.Combinators.serialize_synth LowParse.Spec.Combinators.and_then_kind Zeta.Formats.Aux.U256.u256_parser_kind Zeta.Formats.Aux.Significant_digits_t.significant_digits_t_parser_kind Zeta.Formats.Aux.Raw_key.raw_key' Zeta.Formats.Aux.Raw_key.raw_key Zeta.Formats.Aux.Raw_key.raw_key'_parser Zeta.Formats.Aux.Raw_key.synth_raw_key Zeta.Formats.Aux.Raw_key.raw_key'_serializer Zeta.Formats.Aux.Raw_key.synth_raw_key_recip Prims.unit FStar.Pervasives.assert_norm Prims.eq2 LowParse.Spec.Base.parser_kind Zeta.Formats.Aux.Raw_key.raw_key_parser_kind Zeta.Formats.Aux.Raw_key.raw_key'_parser_kind Zeta.Formats.Aux.Raw_key.synth_raw_key_inverse Zeta.Formats.Aux.Raw_key.synth_raw_key_injective
let raw_key_serializer =
  
[@@ inline_let ]let _ = synth_raw_key_injective () in
[@@ inline_let ]let _ = synth_raw_key_inverse () in
[@@ inline_let ]let _ = assert_norm (raw_key_parser_kind == raw_key'_parser_kind) in
LP.serialize_synth _ synth_raw_key raw_key'_serializer synth_raw_key_recip ()