val ticketVersion_serializer32: LS.serializer32 ticketVersion_serializer
val ticketVersion_serializer32: LS.serializer32 ticketVersion_serializer
let ticketVersion_serializer32 : LS.serializer32 ticketVersion_serializer =
  lemma_synth_ticketVersion_inj ();
  lemma_synth_ticketVersion_inv ();
  LS.serialize32_synth _ synth_ticketVersion _ serialize32_ticketVersion_key synth_ticketVersion_inv (fun x->synth_ticketVersion_inv x) ()
module MiTLS.Parsers.TicketVersion

(* 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 LS = LowParse.SLow
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 ticketVersion_enum : LP.enum ticketVersion U8.t =
  [@inline_let] let e = [
    Ticket12, 0z;
    Ticket13, 1z;
  ] 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 ticketVersion_repr_parser = LPI.parse_u8

noextract let ticketVersion_repr_serializer = LPI.serialize_u8

inline_for_extraction noextract let ticketVersion_repr_parser32 = LS.parse32_u8

inline_for_extraction noextract let ticketVersion_repr_serializer32 = LS.serialize32_u8

inline_for_extraction noextract let ticketVersion_repr_size32 = LSZ.size32_u8

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

inline_for_extraction noextract let ticketVersion_repr_jumper = LL.jump_u8

inline_for_extraction noextract let ticketVersion_repr_reader = LL.read_u8

inline_for_extraction noextract let ticketVersion_repr_writer = LL.write_u8

inline_for_extraction let synth_ticketVersion (x: LP.enum_key ticketVersion_enum) : Tot ticketVersion = x

inline_for_extraction let synth_ticketVersion_inv (x: ticketVersion) : Tot (LP.enum_key ticketVersion_enum) =
  [@inline_let] let _ : squash (LP.list_mem x (LP.list_map fst ticketVersion_enum)) =
    _ by (LP.synth_maybe_enum_key_inv_unknown_tac x)
  in
  x

let lemma_synth_ticketVersion_inj () : Lemma
  (LP.synth_injective synth_ticketVersion) = ()

let lemma_synth_ticketVersion_inv () : Lemma
  (LP.synth_inverse synth_ticketVersion synth_ticketVersion_inv) = ()

noextract let parse_ticketVersion_key : LP.parser _ (LP.enum_key ticketVersion_enum) =
  LP.parse_enum_key ticketVersion_repr_parser ticketVersion_enum

noextract let serialize_ticketVersion_key : LP.serializer parse_ticketVersion_key =
  LP.serialize_enum_key ticketVersion_repr_parser ticketVersion_repr_serializer ticketVersion_enum

noextract let ticketVersion_parser : LP.parser _ ticketVersion =
  lemma_synth_ticketVersion_inj ();
  parse_ticketVersion_key `LP.parse_synth` synth_ticketVersion

noextract let ticketVersion_serializer : LP.serializer ticketVersion_parser =
  lemma_synth_ticketVersion_inj ();
  lemma_synth_ticketVersion_inv ();
  LP.serialize_synth _ synth_ticketVersion serialize_ticketVersion_key synth_ticketVersion_inv ()

let ticketVersion_bytesize (x:ticketVersion) : GTot nat = Seq.length (ticketVersion_serializer x)

let ticketVersion_bytesize_eq x = ()

let parse32_ticketVersion_key : LS.parser32 parse_ticketVersion_key =
  FStar.Tactics.synth_by_tactic (LS.parse32_enum_key_tac ticketVersion_repr_parser32 ticketVersion_enum)

let ticketVersion_parser32 : LS.parser32 ticketVersion_parser =
  lemma_synth_ticketVersion_inj ();
  LS.parse32_synth _ synth_ticketVersion (fun x->synth_ticketVersion x) parse32_ticketVersion_key ()

let serialize32_ticketVersion_key : LS.serializer32 serialize_ticketVersion_key =
  FStar.Tactics.synth_by_tactic (LS.serialize32_enum_key_gen_tac
    ticketVersion_repr_serializer32 ticketVersion_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.Tactics.fst.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
MiTLS.Parsers.TicketVersion.fst
LowParse.SLow.Base.serializer32 MiTLS.Parsers.TicketVersion.ticketVersion_serializer
LowParse.SLow.Combinators.serialize32_synth LowParse.Spec.Combinators.parse_filter_kind LowParse.Spec.Int.parse_u8_kind LowParse.Spec.Enum.enum_key MiTLS.Parsers.TicketVersion.ticketVersion FStar.UInt8.t MiTLS.Parsers.TicketVersion.ticketVersion_enum MiTLS.Parsers.TicketVersion.parse_ticketVersion_key MiTLS.Parsers.TicketVersion.synth_ticketVersion MiTLS.Parsers.TicketVersion.serialize_ticketVersion_key MiTLS.Parsers.TicketVersion.serialize32_ticketVersion_key MiTLS.Parsers.TicketVersion.synth_ticketVersion_inv Prims.eq2 Prims.unit MiTLS.Parsers.TicketVersion.lemma_synth_ticketVersion_inv MiTLS.Parsers.TicketVersion.lemma_synth_ticketVersion_inj LowParse.SLow.Base.serializer32 MiTLS.Parsers.TicketVersion.ticketVersion_parser_kind MiTLS.Parsers.TicketVersion.ticketVersion_parser MiTLS.Parsers.TicketVersion.ticketVersion_serializer
let ticketVersion_serializer32:LS.serializer32 ticketVersion_serializer =
  
lemma_synth_ticketVersion_inj ();
lemma_synth_ticketVersion_inv ();
LS.serialize32_synth _
  synth_ticketVersion
  _
  serialize32_ticketVersion_key
  synth_ticketVersion_inv
  (fun x -> synth_ticketVersion_inv x)
  ()