val synth_ticketContents_cases_recip_pre
      (k: LP.enum_key ticketVersion_enum)
      (x: LP.refine_with_tag key_of_ticketContents k)
    : GTot bool
val synth_ticketContents_cases_recip_pre
      (k: LP.enum_key ticketVersion_enum)
      (x: LP.refine_with_tag key_of_ticketContents k)
    : GTot bool
let synth_ticketContents_cases_recip_pre (k:LP.enum_key ticketVersion_enum)
  (x:LP.refine_with_tag key_of_ticketContents k) : GTot bool =
  match k with
  | Ticket12 -> T_ticket12? x
  | Ticket13 -> T_ticket13? x
module MiTLS.Parsers.TicketContents

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

friend MiTLS.Parsers.TicketVersion

// Need high Z3 limits for large sum types
#set-options "--z3rlimit 120"

inline_for_extraction unfold let ticketVersion_as_enum_key (x:ticketVersion) : Pure (LP.enum_key ticketVersion_enum)
  (requires norm [delta; zeta; iota; primops] (LP.list_mem x (LP.list_map fst ticketVersion_enum)) == true) (ensures fun _ -> True) =
  [@inline_let] let _ = norm_spec [delta; zeta; iota; primops] (LP.list_mem x (LP.list_map fst ticketVersion_enum)) in x

inline_for_extraction let key_of_ticketContents (x:ticketContents) : LP.enum_key ticketVersion_enum =
  match x with
  | T_ticket12 _ -> ticketVersion_as_enum_key Ticket12
  | T_ticket13 _ -> ticketVersion_as_enum_key Ticket13

inline_for_extraction let ticketContents_case_of_ticketVersion (x:ticketVersion) : Type0 =
  match x with
  | Ticket12 -> ticketContents12
  | Ticket13 -> ticketContents13

unfold inline_for_extraction let to_ticketContents_case_of_ticketVersion (x:ticketVersion) (#x':ticketVersion) (y:ticketContents_case_of_ticketVersion x')  : Pure (norm [delta_only [(`%ticketContents_case_of_ticketVersion)]; iota] (ticketContents_case_of_ticketVersion x))
  (requires (x == x')) (ensures (fun y' -> y' == y)) =
  [@inline_let] let _ = norm_spec [delta_only [(`%ticketContents_case_of_ticketVersion)] ; iota] (ticketContents_case_of_ticketVersion x) in y

unfold inline_for_extraction let ticketContents_refine (k:LP.enum_key ticketVersion_enum) (x:ticketContents)
  : Pure (LP.refine_with_tag key_of_ticketContents k)  (requires norm [delta; iota; zeta] (key_of_ticketContents x) == k) (ensures (fun y -> y == x)) =
  [@inline_let] let _ = norm_spec [delta; iota; zeta] (key_of_ticketContents x) in x

inline_for_extraction let synth_ticketContents_cases (x:LP.enum_key ticketVersion_enum) (y:ticketContents_case_of_ticketVersion x)
  : LP.refine_with_tag key_of_ticketContents x =
  match x with
  | Ticket12 -> ticketContents_refine x (T_ticket12 (to_ticketContents_case_of_ticketVersion Ticket12 y))
  | Ticket13 -> ticketContents_refine x (T_ticket13 (to_ticketContents_case_of_ticketVersion Ticket13 y))

unfold inline_for_extraction let from_ticketContents_case_of_ticketVersion (#x':ticketVersion) (x:ticketVersion)
  (y: norm [delta_only [(`%ticketContents_case_of_ticketVersion)]; iota] (ticketContents_case_of_ticketVersion x))
  : Pure (ticketContents_case_of_ticketVersion x') (requires (x == x')) (ensures (fun y' -> y' == y)) =
  [@inline_let] let _ = norm_spec [delta_only [(`%ticketContents_case_of_ticketVersion)] ; iota] (ticketContents_case_of_ticketVersion x) in y
/
prims.fst.checked MiTLS.Parsers.TicketVersion.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.fsti.checked FStar.List.Tot.fst.checked FStar.HyperStack.ST.fsti.checked FStar.HyperStack.fst.checked FStar.Bytes.fsti.checked
MiTLS.Parsers.TicketContents.fst

    k: LowParse.Spec.Enum.enum_key MiTLS.Parsers.TicketVersion.ticketVersion_enum ->
    x: LowParse.Spec.Base.refine_with_tag MiTLS.Parsers.TicketContents.key_of_ticketContents k
  -> Prims.GTot Prims.bool
LowParse.Spec.Enum.enum_key MiTLS.Parsers.TicketVersion.ticketVersion FStar.UInt8.t MiTLS.Parsers.TicketVersion.ticketVersion_enum LowParse.Spec.Base.refine_with_tag MiTLS.Parsers.TicketContents.ticketContents MiTLS.Parsers.TicketContents.key_of_ticketContents MiTLS.Parsers.TicketContents.uu___is_T_ticket12 MiTLS.Parsers.TicketContents.uu___is_T_ticket13 Prims.bool
let synth_ticketContents_cases_recip_pre
      (k: LP.enum_key ticketVersion_enum)
      (x: LP.refine_with_tag key_of_ticketContents k)
    : GTot bool =
  
match k with
| Ticket12 -> T_ticket12? x
| Ticket13 -> T_ticket13? x