val value_kind_reader: LL.leaf_reader value_kind_parser
val value_kind_reader: LL.leaf_reader value_kind_parser
let value_kind_reader =
 [@inline_let] let _ = lemma_synth_value_kind_inj () in
 LL.read_synth' parse_value_kind_key synth_value_kind read_value_kind_key ()
module Zeta.Formats.Aux.Value_kind

(* 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"

[@LT.Norm] inline_for_extraction let value_kind_enum : LP.enum value_kind U8.t =
  [@inline_let] let e = [
    MV, 0z;
    DVNone, 1z;
    DVSome, 2z;
  ] in
  [@inline_let] let _ =
    assert_norm (L.noRepeats (LP.list_map fst e))
  in
  [@inline_let] let _ = 
    assert_norm (L.noRepeats (LP.list_map snd e))
  in e

noextract let value_kind_repr_parser = LPI.parse_u8

noextract let value_kind_repr_serializer = LPI.serialize_u8

inline_for_extraction noextract let value_kind_repr_size32 = LSZ.size32_u8

inline_for_extraction noextract let value_kind_repr_validator = (LL.validate_u8 ())

inline_for_extraction noextract let value_kind_repr_jumper = LL.jump_u8

inline_for_extraction noextract let value_kind_repr_reader = LL.read_u8

inline_for_extraction noextract let value_kind_repr_writer = LL.write_u8

inline_for_extraction let synth_value_kind (x: LP.enum_key value_kind_enum) : Tot value_kind = x

inline_for_extraction let synth_value_kind_inv (x: value_kind) : Tot (LP.enum_key value_kind_enum) =
  [@inline_let] let _ : squash (LP.list_mem x (LP.list_map fst value_kind_enum)) =
    _ by (LP.synth_maybe_enum_key_inv_unknown_tac x)
  in
  x

let lemma_synth_value_kind_inj () : Lemma
  (LP.synth_injective synth_value_kind) = ()

let lemma_synth_value_kind_inv () : Lemma
  (LP.synth_inverse synth_value_kind synth_value_kind_inv) = ()

noextract let parse_value_kind_key : LP.parser _ (LP.enum_key value_kind_enum) =
  LP.parse_enum_key value_kind_repr_parser value_kind_enum

noextract let serialize_value_kind_key : LP.serializer parse_value_kind_key =
  LP.serialize_enum_key value_kind_repr_parser value_kind_repr_serializer value_kind_enum

noextract let value_kind_parser : LP.parser _ value_kind =
  lemma_synth_value_kind_inj ();
  parse_value_kind_key `LP.parse_synth` synth_value_kind

noextract let value_kind_serializer : LP.serializer value_kind_parser =
  lemma_synth_value_kind_inj ();
  lemma_synth_value_kind_inv ();
  LP.serialize_synth _ synth_value_kind serialize_value_kind_key synth_value_kind_inv ()

let value_kind_bytesize (x:value_kind) : GTot nat = Seq.length (value_kind_serializer x)

let value_kind_bytesize_eq x = ()

let value_kind_size32 =
  [@inline_let] let _ = assert_norm (LSZ.size32_constant_precond value_kind_serializer 1ul) in
  LSZ.size32_constant value_kind_serializer 1ul ()

[@@ (LT.postprocess_with LT.pp_norm_tac)]
inline_for_extraction let validate_value_kind_key : LL.validator parse_value_kind_key =
    LL.mk_validate_enum_key value_kind_repr_validator value_kind_repr_reader value_kind_enum

let value_kind_validator =
  lemma_synth_value_kind_inj ();
  LL.validate_synth validate_value_kind_key synth_value_kind ()

[@@ (LT.postprocess_with LT.pp_norm_tac) ]
inline_for_extraction let read_value_kind_key : LL.leaf_reader parse_value_kind_key =
  LL.mk_read_enum_key value_kind_repr_reader value_kind_enum
/
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.Tactics.Effect.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.Value_kind.fst
LowParse.Low.Base.leaf_reader Zeta.Formats.Aux.Value_kind.value_kind_parser
LowParse.Low.Combinators.read_synth' LowParse.Spec.Combinators.parse_filter_kind LowParse.Spec.Int.parse_u8_kind LowParse.Spec.Enum.enum_key Zeta.Formats.Aux.Value_kind.value_kind FStar.UInt8.t Zeta.Formats.Aux.Value_kind.value_kind_enum Zeta.Formats.Aux.Value_kind.parse_value_kind_key Zeta.Formats.Aux.Value_kind.synth_value_kind Zeta.Formats.Aux.Value_kind.read_value_kind_key Prims.unit Zeta.Formats.Aux.Value_kind.lemma_synth_value_kind_inj
let value_kind_reader =
  
[@@ inline_let ]let _ = lemma_synth_value_kind_inj () in
LL.read_synth' parse_value_kind_key synth_value_kind read_value_kind_key ()