val ticketContents_clens_ticket12:LL.clens ticketContents ticketContents12
let ticketContents_clens_ticket12 : LL.clens ticketContents ticketContents12 = {
  LL.clens_cond = (fun (x: ticketContents) -> tag_of_ticketContents x == Ticket12);
  LL.clens_get = (fun (x: ticketContents) -> (match x with T_ticket12 y -> y) <: (Ghost ticketContents12 (requires (tag_of_ticketContents x == Ticket12)) (ensures (fun y -> True))));
}
val ticketContents_clens_ticket12:LL.clens ticketContents ticketContents12
let ticketContents_clens_ticket12:LL.clens ticketContents ticketContents12 =
{
  LL.clens_cond = (fun (x: ticketContents) -> tag_of_ticketContents x == Ticket12);
  LL.clens_get
  =
  (fun (x: ticketContents) ->
      (match x with | T_ticket12 y -> y)
      <:
      (Ghost ticketContents12
          (requires (tag_of_ticketContents x == Ticket12))
          (ensures (fun y -> True))))
}
Parsers.TicketContents.fsti.checked
prims.fst.checked Parsers.TicketVersion.fsti.checked Parsers.TicketContents13.fsti.checked Parsers.TicketContents12.fsti.checked LowStar.Buffer.fst.checked LowParse.Spec.Base.fsti.checked LowParse.Spec.AllIntegers.fst.checked LowParse.SLow.Base.fst.checked LowParse.Low.Base.fst.checked FStar.UInt8.fsti.checked FStar.UInt64.fsti.checked FStar.UInt32.fsti.checked FStar.UInt16.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
Parsers.TicketContents.fsti
LowParse.Low.Base.Spec.Mkclens Parsers.TicketContents.ticketContents Parsers.TicketContents12.ticketContents12 Prims.eq2 Parsers.TicketVersion.ticketVersion Parsers.TicketContents.tag_of_ticketContents Parsers.TicketVersion.Ticket12 Prims.l_True
module 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.Base
module LS = LowParse.SLow.Base
module LSZ = LowParse.SLow.Base
module LPI = LowParse.Spec.AllIntegers
module LL = LowParse.Low.Base
module L = FStar.List.Tot
module B = LowStar.Buffer
module BY = FStar.Bytes
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST

open Parsers.TicketVersion
open Parsers.TicketContents12
open Parsers.TicketContents13

type ticketContents =
  | T_ticket12 of ticketContents12
  | T_ticket13 of ticketContents13

inline_for_extraction let tag_of_ticketContents (x:ticketContents) : ticketVersion = match x with
  | T_ticket12 _ -> Ticket12
  | T_ticket13 _ -> Ticket13

inline_for_extraction noextract let ticketContents_parser_kind = LP.strong_parser_kind 47 66060 None

noextract val ticketContents_parser: LP.parser ticketContents_parser_kind ticketContents

noextract val ticketContents_serializer: LP.serializer ticketContents_parser

noextract val ticketContents_bytesize (x:ticketContents) : GTot nat

noextract val ticketContents_bytesize_eq (x:ticketContents) : Lemma (ticketContents_bytesize x == Seq.length (LP.serialize ticketContents_serializer x))

val ticketContents_parser32: LS.parser32 ticketContents_parser

val ticketContents_serializer32: LS.serializer32 ticketContents_serializer

val ticketContents_size32: LSZ.size32 ticketContents_serializer

val ticketContents_validator: LL.validator ticketContents_parser

val ticketContents_jumper: LL.jumper ticketContents_parser

val lemma_valid_ticketContents_valid_ticketVersion: #rrel: _ -> #rel: _ -> s:LL.slice rrel rel -> pos:U32.t -> h:HyperStack.mem -> Lemma
  (requires LL.valid ticketContents_parser h s pos)
  (ensures (LL.valid ticketVersion_parser h s pos /\ LL.contents ticketVersion_parser h s pos == tag_of_ticketContents (LL.contents ticketContents_parser h s pos)))
  [SMTPat (LL.valid ticketContents_parser h s pos)]

noextract let ticketContents_clens_tag : LL.clens ticketContents ticketVersion = {
  LL.clens_cond = (fun _ -> True);
  LL.clens_get = (fun (x: ticketContents) -> tag_of_ticketContents x);
}

val ticketContents_gaccessor_tag : LL.gaccessor ticketContents_parser ticketVersion_parser ticketContents_clens_tag

val ticketContents_accessor_tag : LL.accessor ticketContents_gaccessor_tag

val ticketContents_bytesize_eqn_ticket12 (x: ticketContents12) : Lemma (ticketContents_bytesize (T_ticket12 x) == 1 + (ticketContents12_bytesize (x))) [SMTPat (ticketContents_bytesize (T_ticket12 x))]

val ticketContents_bytesize_eqn_ticket13 (x: ticketContents13) : Lemma (ticketContents_bytesize (T_ticket13 x) == 1 + (ticketContents13_bytesize (x))) [SMTPat (ticketContents_bytesize (T_ticket13 x))]
val ticketContents_clens_ticket12:LL.clens ticketContents ticketContents12
LowParse.Low.Base.Spec.clens Parsers.TicketContents.ticketContents
  Parsers.TicketContents12.ticketContents12