val accessor_internal_record_ir_key : LL.accessor gaccessor_internal_record_ir_key
val accessor_internal_record_ir_key : LL.accessor gaccessor_internal_record_ir_key
let accessor_internal_record_ir_key = LL.accessor_ext (LL.accessor_compose accessor_internal_record_internal_record' accessor'_internal_record_ir_key ()) clens_internal_record_ir_key ()
module Zeta.Formats.Aux.Internal_record

(* 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 internal_record' = (internal_key & mval_value)

inline_for_extraction let synth_internal_record (x: internal_record') : internal_record =
  match x with (ir_key,ir_value) -> {
    ir_key = ir_key;
    ir_value = ir_value;
  }

inline_for_extraction let synth_internal_record_recip (x: internal_record) : internal_record' = (x.ir_key,x.ir_value)

let synth_internal_record_recip_inverse () : Lemma (LP.synth_inverse synth_internal_record_recip synth_internal_record) = ()

let synth_internal_record_injective () : Lemma (LP.synth_injective synth_internal_record) =
  LP.synth_inverse_synth_injective synth_internal_record_recip synth_internal_record;
  synth_internal_record_recip_inverse ()

let synth_internal_record_inverse () : Lemma (LP.synth_inverse synth_internal_record synth_internal_record_recip) =
  assert_norm (LP.synth_inverse synth_internal_record synth_internal_record_recip)

let synth_internal_record_recip_injective () : Lemma (LP.synth_injective synth_internal_record_recip) =
  synth_internal_record_recip_inverse ();
  LP.synth_inverse_synth_injective synth_internal_record synth_internal_record_recip

noextract let internal_record'_parser : LP.parser _ internal_record' = (internal_key_parser `LP.nondep_then` mval_value_parser)

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

let internal_record_parser =
  synth_internal_record_injective ();
  assert_norm (internal_record_parser_kind == internal_record'_parser_kind);
  internal_record'_parser `LP.parse_synth` synth_internal_record

noextract let internal_record'_serializer : LP.serializer internal_record'_parser = (internal_key_serializer `LP.serialize_nondep_then` mval_value_serializer)

let internal_record_serializer =
  [@inline_let] let _ = synth_internal_record_injective () in
  [@inline_let] let _ = synth_internal_record_inverse () in
  [@inline_let] let _ = assert_norm (internal_record_parser_kind == internal_record'_parser_kind) in
  LP.serialize_synth _ synth_internal_record internal_record'_serializer synth_internal_record_recip ()

let internal_record_bytesize (x:internal_record) : GTot nat = Seq.length (internal_record_serializer x)

let internal_record_bytesize_eq x = ()

inline_for_extraction let internal_record'_size32 : LSZ.size32 internal_record'_serializer = (internal_key_size32 `LSZ.size32_nondep_then` mval_value_size32)

let internal_record_size32 =
  [@inline_let] let _ = synth_internal_record_injective () in
  [@inline_let] let _ = synth_internal_record_inverse () in
  [@inline_let] let _ = assert_norm (internal_record_parser_kind == internal_record'_parser_kind) in
  LSZ.size32_synth _ synth_internal_record _ internal_record'_size32 synth_internal_record_recip (fun x -> synth_internal_record_recip x) ()

inline_for_extraction let internal_record'_validator : LL.validator internal_record'_parser = (internal_key_validator `LL.validate_nondep_then` mval_value_validator)

let internal_record_validator =
  [@inline_let] let _ = synth_internal_record_injective () in
  [@inline_let] let _ = assert_norm (internal_record_parser_kind == internal_record'_parser_kind) in
  LL.validate_synth internal_record'_validator synth_internal_record ()

inline_for_extraction let internal_record'_jumper : LL.jumper internal_record'_parser = (internal_key_jumper `LL.jump_nondep_then` mval_value_jumper)

let internal_record_jumper =
  [@inline_let] let _ = synth_internal_record_injective () in
  [@inline_let] let _ = assert_norm (internal_record_parser_kind == internal_record'_parser_kind) in
  LL.jump_synth internal_record'_jumper synth_internal_record ()

inline_for_extraction let internal_record'_reader : LL.leaf_reader internal_record'_parser = (LL.read_nondep_then internal_key_jumper internal_key_reader mval_value_reader)

let internal_record_reader =
  [@inline_let] let _ = synth_internal_record_injective () in
  [@inline_let] let _ = assert_norm (internal_record_parser_kind == internal_record'_parser_kind) in
  LL.read_synth _ synth_internal_record (fun x -> synth_internal_record x) internal_record'_reader ()

inline_for_extraction let internal_record'_lserializer : LL.serializer32 internal_record'_serializer = (internal_key_lserializer `LL.serialize32_nondep_then` mval_value_lserializer)

let internal_record_lserializer =
  [@inline_let] let _ = synth_internal_record_injective () in
  [@inline_let] let _ = synth_internal_record_inverse () in
  [@inline_let] let _ = assert_norm (internal_record_parser_kind == internal_record'_parser_kind) in
  LL.serialize32_synth internal_record'_lserializer synth_internal_record synth_internal_record_recip (fun x -> synth_internal_record_recip x) ()

let internal_record_bytesize_eqn x =
  [@inline_let] let _ = synth_internal_record_injective () in
  [@inline_let] let _ = synth_internal_record_inverse () in
  [@inline_let] let _ = assert_norm (internal_record_parser_kind == internal_record'_parser_kind) in
  LP.serialize_synth_eq _ synth_internal_record internal_record'_serializer synth_internal_record_recip () x;
LP.length_serialize_nondep_then internal_key_serializer mval_value_serializer x.ir_key x.ir_value;
  (internal_key_bytesize_eq (x.ir_key));
  (mval_value_bytesize_eq (x.ir_value));
  assert(internal_record_bytesize x == Seq.length (LP.serialize internal_key_serializer x.ir_key) + Seq.length (LP.serialize mval_value_serializer x.ir_value))

let gaccessor'_internal_record_ir_key : LL.gaccessor internal_record'_parser internal_key_parser _ = (LL.gaccessor_then_fst (LL.gaccessor_id internal_record'_parser))

let gaccessor'_internal_record_ir_value : LL.gaccessor internal_record'_parser mval_value_parser _ = (LL.gaccessor_then_snd (LL.gaccessor_id internal_record'_parser))

inline_for_extraction noextract let accessor'_internal_record_ir_key : LL.accessor gaccessor'_internal_record_ir_key = (LL.accessor_then_fst (LL.accessor_id internal_record'_parser))

inline_for_extraction noextract let accessor'_internal_record_ir_value : LL.accessor gaccessor'_internal_record_ir_value = (LL.accessor_then_snd (LL.accessor_id internal_record'_parser) internal_key_jumper)

noextract let clens_internal_record_internal_record' : LL.clens internal_record internal_record' = synth_internal_record_recip_inverse (); synth_internal_record_recip_injective (); LL.clens_synth synth_internal_record_recip synth_internal_record

let gaccessor_internal_record_internal_record' : LL.gaccessor internal_record_parser internal_record'_parser clens_internal_record_internal_record' = synth_internal_record_inverse (); synth_internal_record_injective (); synth_internal_record_recip_inverse (); LL.gaccessor_synth internal_record'_parser synth_internal_record synth_internal_record_recip ()

inline_for_extraction noextract let accessor_internal_record_internal_record' : LL.accessor gaccessor_internal_record_internal_record' = synth_internal_record_inverse (); synth_internal_record_injective (); synth_internal_record_recip_inverse (); LL.accessor_synth internal_record'_parser synth_internal_record synth_internal_record_recip ()

let gaccessor_internal_record_ir_key = LL.gaccessor_ext (gaccessor_internal_record_internal_record' `LL.gaccessor_compose` gaccessor'_internal_record_ir_key) clens_internal_record_ir_key ()
/
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.Internal_record.fst
LowParse.Low.Base.accessor Zeta.Formats.Aux.Internal_record.gaccessor_internal_record_ir_key
LowParse.Low.Base.accessor_ext Zeta.Formats.Aux.Internal_record.internal_record_parser_kind Zeta.Formats.Aux.Internal_record.internal_record Zeta.Formats.Aux.Internal_record.internal_record_parser Zeta.Formats.Aux.Internal_key.internal_key_parser_kind Zeta.Formats.Aux.Internal_key.internal_key Zeta.Formats.Aux.Internal_key.internal_key_parser LowParse.Low.Base.Spec.clens_compose Zeta.Formats.Aux.Internal_record.internal_record' Zeta.Formats.Aux.Internal_record.clens_internal_record_internal_record' FStar.Pervasives.Native.tuple2 Zeta.Formats.Aux.Mval_value.mval_value LowParse.Low.Base.Spec.clens_id LowParse.Low.Combinators.clens_fst LowParse.Low.Base.Spec.gaccessor_compose LowParse.Spec.Combinators.and_then_kind Zeta.Formats.Aux.Mval_value.mval_value_parser_kind Zeta.Formats.Aux.Internal_record.internal_record'_parser Zeta.Formats.Aux.Internal_record.gaccessor_internal_record_internal_record' Zeta.Formats.Aux.Internal_record.gaccessor'_internal_record_ir_key LowParse.Low.Base.accessor_compose Zeta.Formats.Aux.Internal_record.accessor_internal_record_internal_record' Zeta.Formats.Aux.Internal_record.accessor'_internal_record_ir_key Zeta.Formats.Aux.Internal_record.clens_internal_record_ir_key
let accessor_internal_record_ir_key =
  
LL.accessor_ext (LL.accessor_compose accessor_internal_record_internal_record'
      accessor'_internal_record_ir_key
      ())
  clens_internal_record_ir_key
  ()