val log_entry_kind_validator: LL.validator log_entry_kind_parser
val log_entry_kind_validator: LL.validator log_entry_kind_parser
let log_entry_kind_validator =
  lemma_synth_log_entry_kind_inj ();
  LL.validate_synth validate_log_entry_kind_key synth_log_entry_kind ()
module Zeta.Formats.Aux.Log_entry_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 log_entry_kind_enum : LP.enum log_entry_kind U8.t =
  [@inline_let] let e = [
    AddM, 0z;
    AddB, 1z;
    EvictM, 2z;
    EvictB, 3z;
    EvictBM, 4z;
    NextEpoch, 5z;
    VerifyEpoch, 6z;
    RunApp, 7z;
  ] 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 log_entry_kind_repr_parser = LPI.parse_u8

noextract let log_entry_kind_repr_serializer = LPI.serialize_u8

inline_for_extraction noextract let log_entry_kind_repr_size32 = LSZ.size32_u8

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

inline_for_extraction noextract let log_entry_kind_repr_jumper = LL.jump_u8

inline_for_extraction noextract let log_entry_kind_repr_reader = LL.read_u8

inline_for_extraction noextract let log_entry_kind_repr_writer = LL.write_u8

inline_for_extraction let synth_log_entry_kind (x: LP.enum_key log_entry_kind_enum) : Tot log_entry_kind = x

inline_for_extraction let synth_log_entry_kind_inv (x: log_entry_kind) : Tot (LP.enum_key log_entry_kind_enum) =
  [@inline_let] let _ : squash (LP.list_mem x (LP.list_map fst log_entry_kind_enum)) =
    _ by (LP.synth_maybe_enum_key_inv_unknown_tac x)
  in
  x

let lemma_synth_log_entry_kind_inj () : Lemma
  (LP.synth_injective synth_log_entry_kind) = ()

let lemma_synth_log_entry_kind_inv () : Lemma
  (LP.synth_inverse synth_log_entry_kind synth_log_entry_kind_inv) = ()

noextract let parse_log_entry_kind_key : LP.parser _ (LP.enum_key log_entry_kind_enum) =
  LP.parse_enum_key log_entry_kind_repr_parser log_entry_kind_enum

noextract let serialize_log_entry_kind_key : LP.serializer parse_log_entry_kind_key =
  LP.serialize_enum_key log_entry_kind_repr_parser log_entry_kind_repr_serializer log_entry_kind_enum

noextract let log_entry_kind_parser : LP.parser _ log_entry_kind =
  lemma_synth_log_entry_kind_inj ();
  parse_log_entry_kind_key `LP.parse_synth` synth_log_entry_kind

noextract let log_entry_kind_serializer : LP.serializer log_entry_kind_parser =
  lemma_synth_log_entry_kind_inj ();
  lemma_synth_log_entry_kind_inv ();
  LP.serialize_synth _ synth_log_entry_kind serialize_log_entry_kind_key synth_log_entry_kind_inv ()

let log_entry_kind_bytesize (x:log_entry_kind) : GTot nat = Seq.length (log_entry_kind_serializer x)

let log_entry_kind_bytesize_eq x = ()

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

[@@ (LT.postprocess_with LT.pp_norm_tac)]
inline_for_extraction let validate_log_entry_kind_key : LL.validator parse_log_entry_kind_key =
    LL.mk_validate_enum_key log_entry_kind_repr_validator log_entry_kind_repr_reader log_entry_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.Log_entry_kind.fst
LowParse.Low.Base.validator Zeta.Formats.Aux.Log_entry_kind.log_entry_kind_parser
LowParse.Low.Combinators.validate_synth LowParse.Spec.Combinators.parse_filter_kind LowParse.Spec.Int.parse_u8_kind LowParse.Spec.Enum.enum_key Zeta.Formats.Aux.Log_entry_kind.log_entry_kind FStar.UInt8.t Zeta.Formats.Aux.Log_entry_kind.log_entry_kind_enum Zeta.Formats.Aux.Log_entry_kind.parse_log_entry_kind_key Zeta.Formats.Aux.Log_entry_kind.validate_log_entry_kind_key Zeta.Formats.Aux.Log_entry_kind.synth_log_entry_kind Prims.unit Zeta.Formats.Aux.Log_entry_kind.lemma_synth_log_entry_kind_inj
let log_entry_kind_validator =
  
lemma_synth_log_entry_kind_inj ();
LL.validate_synth validate_log_entry_kind_key synth_log_entry_kind ()