val gaccessor_newSessionTicket13_ticket : LL.gaccessor newSessionTicket13_parser newSessionTicket13_ticket_parser clens_newSessionTicket13_ticket
val gaccessor_newSessionTicket13_ticket : LL.gaccessor newSessionTicket13_parser newSessionTicket13_ticket_parser clens_newSessionTicket13_ticket
let gaccessor_newSessionTicket13_ticket = LL.gaccessor_ext (gaccessor_newSessionTicket13_newSessionTicket13' `LL.gaccessor_compose` gaccessor'_newSessionTicket13_ticket) clens_newSessionTicket13_ticket ()
module MiTLS.Parsers.NewSessionTicket13

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

(* Type of field ticket_nonce*)
open MiTLS.Parsers.NewSessionTicket13_ticket_nonce

(* Type of field ticket*)
open MiTLS.Parsers.NewSessionTicket13_ticket

(* Type of field extensions*)
open MiTLS.Parsers.NewSessionTicket13_extensions

type newSessionTicket13' = (((U32.t & U32.t) & (newSessionTicket13_ticket_nonce & newSessionTicket13_ticket)) & newSessionTicket13_extensions)

inline_for_extraction let synth_newSessionTicket13 (x: newSessionTicket13') : newSessionTicket13 =
  match x with (((ticket_lifetime,ticket_age_add),(ticket_nonce,ticket)),extensions) -> {
    ticket_lifetime = ticket_lifetime;
    ticket_age_add = ticket_age_add;
    ticket_nonce = ticket_nonce;
    ticket = ticket;
    extensions = extensions;
  }

inline_for_extraction let synth_newSessionTicket13_recip (x: newSessionTicket13) : newSessionTicket13' = (((x.ticket_lifetime,x.ticket_age_add),(x.ticket_nonce,x.ticket)),x.extensions)

let synth_newSessionTicket13_recip_inverse () : Lemma (LP.synth_inverse synth_newSessionTicket13_recip synth_newSessionTicket13) = ()

let synth_newSessionTicket13_injective () : Lemma (LP.synth_injective synth_newSessionTicket13) =
  LP.synth_inverse_synth_injective synth_newSessionTicket13_recip synth_newSessionTicket13;
  synth_newSessionTicket13_recip_inverse ()

let synth_newSessionTicket13_inverse () : Lemma (LP.synth_inverse synth_newSessionTicket13 synth_newSessionTicket13_recip) =
  assert_norm (LP.synth_inverse synth_newSessionTicket13 synth_newSessionTicket13_recip)

let synth_newSessionTicket13_recip_injective () : Lemma (LP.synth_injective synth_newSessionTicket13_recip) =
  synth_newSessionTicket13_recip_inverse ();
  LP.synth_inverse_synth_injective synth_newSessionTicket13 synth_newSessionTicket13_recip

noextract let newSessionTicket13'_parser : LP.parser _ newSessionTicket13' = (((LPI.parse_u32 `LP.nondep_then` LPI.parse_u32) `LP.nondep_then` (newSessionTicket13_ticket_nonce_parser `LP.nondep_then` newSessionTicket13_ticket_parser)) `LP.nondep_then` newSessionTicket13_extensions_parser)

noextract let newSessionTicket13'_parser_kind = LP.get_parser_kind newSessionTicket13'_parser

let newSessionTicket13_parser =
  synth_newSessionTicket13_injective ();
  assert_norm (newSessionTicket13_parser_kind == newSessionTicket13'_parser_kind);
  newSessionTicket13'_parser `LP.parse_synth` synth_newSessionTicket13

noextract let newSessionTicket13'_serializer : LP.serializer newSessionTicket13'_parser = (((LPI.serialize_u32 `LP.serialize_nondep_then` LPI.serialize_u32) `LP.serialize_nondep_then` (newSessionTicket13_ticket_nonce_serializer `LP.serialize_nondep_then` newSessionTicket13_ticket_serializer)) `LP.serialize_nondep_then` newSessionTicket13_extensions_serializer)

let newSessionTicket13_serializer =
  [@inline_let] let _ = synth_newSessionTicket13_injective () in
  [@inline_let] let _ = synth_newSessionTicket13_inverse () in
  [@inline_let] let _ = assert_norm (newSessionTicket13_parser_kind == newSessionTicket13'_parser_kind) in
  LP.serialize_synth _ synth_newSessionTicket13 newSessionTicket13'_serializer synth_newSessionTicket13_recip ()

let newSessionTicket13_bytesize (x:newSessionTicket13) : GTot nat = Seq.length (newSessionTicket13_serializer x)

let newSessionTicket13_bytesize_eq x = ()

inline_for_extraction let newSessionTicket13'_parser32 : LS.parser32 newSessionTicket13'_parser = (((LS.parse32_u32 `LS.parse32_nondep_then` LS.parse32_u32) `LS.parse32_nondep_then` (newSessionTicket13_ticket_nonce_parser32 `LS.parse32_nondep_then` newSessionTicket13_ticket_parser32)) `LS.parse32_nondep_then` newSessionTicket13_extensions_parser32)

let newSessionTicket13_parser32 =
  [@inline_let] let _ = synth_newSessionTicket13_injective () in
  [@inline_let] let _ = assert_norm (newSessionTicket13_parser_kind == newSessionTicket13'_parser_kind) in
  LS.parse32_synth _ synth_newSessionTicket13 (fun x -> synth_newSessionTicket13 x) newSessionTicket13'_parser32 ()

inline_for_extraction let newSessionTicket13'_serializer32 : LS.serializer32 newSessionTicket13'_serializer = (((LS.serialize32_u32 `LS.serialize32_nondep_then` LS.serialize32_u32) `LS.serialize32_nondep_then` (newSessionTicket13_ticket_nonce_serializer32 `LS.serialize32_nondep_then` newSessionTicket13_ticket_serializer32)) `LS.serialize32_nondep_then` newSessionTicket13_extensions_serializer32)

let newSessionTicket13_serializer32 =
  [@inline_let] let _ = synth_newSessionTicket13_injective () in
  [@inline_let] let _ = synth_newSessionTicket13_inverse () in
  [@inline_let] let _ = assert_norm (newSessionTicket13_parser_kind == newSessionTicket13'_parser_kind) in
  LS.serialize32_synth _ synth_newSessionTicket13 _ newSessionTicket13'_serializer32 synth_newSessionTicket13_recip (fun x -> synth_newSessionTicket13_recip x) ()

inline_for_extraction let newSessionTicket13'_size32 : LSZ.size32 newSessionTicket13'_serializer = (((LSZ.size32_u32 `LSZ.size32_nondep_then` LSZ.size32_u32) `LSZ.size32_nondep_then` (newSessionTicket13_ticket_nonce_size32 `LSZ.size32_nondep_then` newSessionTicket13_ticket_size32)) `LSZ.size32_nondep_then` newSessionTicket13_extensions_size32)

let newSessionTicket13_size32 =
  [@inline_let] let _ = synth_newSessionTicket13_injective () in
  [@inline_let] let _ = synth_newSessionTicket13_inverse () in
  [@inline_let] let _ = assert_norm (newSessionTicket13_parser_kind == newSessionTicket13'_parser_kind) in
  LSZ.size32_synth _ synth_newSessionTicket13 _ newSessionTicket13'_size32 synth_newSessionTicket13_recip (fun x -> synth_newSessionTicket13_recip x) ()

inline_for_extraction let newSessionTicket13'_validator : LL.validator newSessionTicket13'_parser = ((((LL.validate_u32 ()) `LL.validate_nondep_then` (LL.validate_u32 ())) `LL.validate_nondep_then` (newSessionTicket13_ticket_nonce_validator `LL.validate_nondep_then` newSessionTicket13_ticket_validator)) `LL.validate_nondep_then` newSessionTicket13_extensions_validator)

let newSessionTicket13_validator =
  [@inline_let] let _ = synth_newSessionTicket13_injective () in
  [@inline_let] let _ = assert_norm (newSessionTicket13_parser_kind == newSessionTicket13'_parser_kind) in
  LL.validate_synth newSessionTicket13'_validator synth_newSessionTicket13 ()

inline_for_extraction let newSessionTicket13'_jumper : LL.jumper newSessionTicket13'_parser = (((LL.jump_u32 `LL.jump_nondep_then` LL.jump_u32) `LL.jump_nondep_then` (newSessionTicket13_ticket_nonce_jumper `LL.jump_nondep_then` newSessionTicket13_ticket_jumper)) `LL.jump_nondep_then` newSessionTicket13_extensions_jumper)

let newSessionTicket13_jumper =
  [@inline_let] let _ = synth_newSessionTicket13_injective () in
  [@inline_let] let _ = assert_norm (newSessionTicket13_parser_kind == newSessionTicket13'_parser_kind) in
  LL.jump_synth newSessionTicket13'_jumper synth_newSessionTicket13 ()

let newSessionTicket13_bytesize_eqn x =
  [@inline_let] let _ = synth_newSessionTicket13_injective () in
  [@inline_let] let _ = synth_newSessionTicket13_inverse () in
  [@inline_let] let _ = assert_norm (newSessionTicket13_parser_kind == newSessionTicket13'_parser_kind) in
  LP.serialize_synth_eq _ synth_newSessionTicket13 newSessionTicket13'_serializer synth_newSessionTicket13_recip () x;
LP.length_serialize_nondep_then LPI.serialize_u32 LPI.serialize_u32 x.ticket_lifetime x.ticket_age_add;
LP.length_serialize_nondep_then newSessionTicket13_ticket_nonce_serializer newSessionTicket13_ticket_serializer x.ticket_nonce x.ticket;
LP.length_serialize_nondep_then (LPI.serialize_u32 `LP.serialize_nondep_then` LPI.serialize_u32) (newSessionTicket13_ticket_nonce_serializer `LP.serialize_nondep_then` newSessionTicket13_ticket_serializer) (x.ticket_lifetime, x.ticket_age_add) (x.ticket_nonce, x.ticket);
LP.length_serialize_nondep_then ((LPI.serialize_u32 `LP.serialize_nondep_then` LPI.serialize_u32) `LP.serialize_nondep_then` (newSessionTicket13_ticket_nonce_serializer `LP.serialize_nondep_then` newSessionTicket13_ticket_serializer)) newSessionTicket13_extensions_serializer ((x.ticket_lifetime, x.ticket_age_add), (x.ticket_nonce, x.ticket)) x.extensions;
  (assert (FStar.Seq.length (LP.serialize LP.serialize_u32 (x.ticket_lifetime)) == 4));
  (assert (FStar.Seq.length (LP.serialize LP.serialize_u32 (x.ticket_age_add)) == 4));
  (newSessionTicket13_ticket_nonce_bytesize_eq (x.ticket_nonce));
  (newSessionTicket13_ticket_bytesize_eq (x.ticket));
  (newSessionTicket13_extensions_bytesize_eq (x.extensions));
  assert(newSessionTicket13_bytesize x == Seq.length (LP.serialize LPI.serialize_u32 x.ticket_lifetime) + Seq.length (LP.serialize LPI.serialize_u32 x.ticket_age_add) + Seq.length (LP.serialize newSessionTicket13_ticket_nonce_serializer x.ticket_nonce) + Seq.length (LP.serialize newSessionTicket13_ticket_serializer x.ticket) + Seq.length (LP.serialize newSessionTicket13_extensions_serializer x.extensions))

let gaccessor'_newSessionTicket13_ticket_lifetime : LL.gaccessor newSessionTicket13'_parser LPI.parse_u32 _ = (LL.gaccessor_then_fst (LL.gaccessor_then_fst (LL.gaccessor_then_fst (LL.gaccessor_id newSessionTicket13'_parser))))

let gaccessor'_newSessionTicket13_ticket_age_add : LL.gaccessor newSessionTicket13'_parser LPI.parse_u32 _ = (LL.gaccessor_then_snd (LL.gaccessor_then_fst (LL.gaccessor_then_fst (LL.gaccessor_id newSessionTicket13'_parser))))

let gaccessor'_newSessionTicket13_ticket_nonce : LL.gaccessor newSessionTicket13'_parser newSessionTicket13_ticket_nonce_parser _ = (LL.gaccessor_then_fst (LL.gaccessor_then_snd (LL.gaccessor_then_fst (LL.gaccessor_id newSessionTicket13'_parser))))

let gaccessor'_newSessionTicket13_ticket : LL.gaccessor newSessionTicket13'_parser newSessionTicket13_ticket_parser _ = (LL.gaccessor_then_snd (LL.gaccessor_then_snd (LL.gaccessor_then_fst (LL.gaccessor_id newSessionTicket13'_parser))))

let gaccessor'_newSessionTicket13_extensions : LL.gaccessor newSessionTicket13'_parser newSessionTicket13_extensions_parser _ = (LL.gaccessor_then_snd (LL.gaccessor_id newSessionTicket13'_parser))

inline_for_extraction noextract let accessor'_newSessionTicket13_ticket_lifetime : LL.accessor gaccessor'_newSessionTicket13_ticket_lifetime = (LL.accessor_then_fst (LL.accessor_then_fst (LL.accessor_then_fst (LL.accessor_id newSessionTicket13'_parser))))

inline_for_extraction noextract let accessor'_newSessionTicket13_ticket_age_add : LL.accessor gaccessor'_newSessionTicket13_ticket_age_add = (LL.accessor_then_snd (LL.accessor_then_fst (LL.accessor_then_fst (LL.accessor_id newSessionTicket13'_parser))) LL.jump_u32)

inline_for_extraction noextract let accessor'_newSessionTicket13_ticket_nonce : LL.accessor gaccessor'_newSessionTicket13_ticket_nonce = (LL.accessor_then_fst (LL.accessor_then_snd (LL.accessor_then_fst (LL.accessor_id newSessionTicket13'_parser)) (LL.jump_u32 `LL.jump_nondep_then` LL.jump_u32)))

inline_for_extraction noextract let accessor'_newSessionTicket13_ticket : LL.accessor gaccessor'_newSessionTicket13_ticket = (LL.accessor_then_snd (LL.accessor_then_snd (LL.accessor_then_fst (LL.accessor_id newSessionTicket13'_parser)) (LL.jump_u32 `LL.jump_nondep_then` LL.jump_u32)) newSessionTicket13_ticket_nonce_jumper)

inline_for_extraction noextract let accessor'_newSessionTicket13_extensions : LL.accessor gaccessor'_newSessionTicket13_extensions = (LL.accessor_then_snd (LL.accessor_id newSessionTicket13'_parser) ((LL.jump_u32 `LL.jump_nondep_then` LL.jump_u32) `LL.jump_nondep_then` (newSessionTicket13_ticket_nonce_jumper `LL.jump_nondep_then` newSessionTicket13_ticket_jumper)))

noextract let clens_newSessionTicket13_newSessionTicket13' : LL.clens newSessionTicket13 newSessionTicket13' = synth_newSessionTicket13_recip_inverse (); synth_newSessionTicket13_recip_injective (); LL.clens_synth synth_newSessionTicket13_recip synth_newSessionTicket13

let gaccessor_newSessionTicket13_newSessionTicket13' : LL.gaccessor newSessionTicket13_parser newSessionTicket13'_parser clens_newSessionTicket13_newSessionTicket13' = synth_newSessionTicket13_inverse (); synth_newSessionTicket13_injective (); synth_newSessionTicket13_recip_inverse (); LL.gaccessor_synth newSessionTicket13'_parser synth_newSessionTicket13 synth_newSessionTicket13_recip ()

inline_for_extraction noextract let accessor_newSessionTicket13_newSessionTicket13' : LL.accessor gaccessor_newSessionTicket13_newSessionTicket13' = synth_newSessionTicket13_inverse (); synth_newSessionTicket13_injective (); synth_newSessionTicket13_recip_inverse (); LL.accessor_synth newSessionTicket13'_parser synth_newSessionTicket13 synth_newSessionTicket13_recip ()

let gaccessor_newSessionTicket13_ticket_lifetime = LL.gaccessor_ext (gaccessor_newSessionTicket13_newSessionTicket13' `LL.gaccessor_compose` gaccessor'_newSessionTicket13_ticket_lifetime) clens_newSessionTicket13_ticket_lifetime ()

let accessor_newSessionTicket13_ticket_lifetime = LL.accessor_ext (LL.accessor_compose accessor_newSessionTicket13_newSessionTicket13' accessor'_newSessionTicket13_ticket_lifetime ()) clens_newSessionTicket13_ticket_lifetime ()

let gaccessor_newSessionTicket13_ticket_age_add = LL.gaccessor_ext (gaccessor_newSessionTicket13_newSessionTicket13' `LL.gaccessor_compose` gaccessor'_newSessionTicket13_ticket_age_add) clens_newSessionTicket13_ticket_age_add ()

let accessor_newSessionTicket13_ticket_age_add = LL.accessor_ext (LL.accessor_compose accessor_newSessionTicket13_newSessionTicket13' accessor'_newSessionTicket13_ticket_age_add ()) clens_newSessionTicket13_ticket_age_add ()

let gaccessor_newSessionTicket13_ticket_nonce = LL.gaccessor_ext (gaccessor_newSessionTicket13_newSessionTicket13' `LL.gaccessor_compose` gaccessor'_newSessionTicket13_ticket_nonce) clens_newSessionTicket13_ticket_nonce ()

let accessor_newSessionTicket13_ticket_nonce = LL.accessor_ext (LL.accessor_compose accessor_newSessionTicket13_newSessionTicket13' accessor'_newSessionTicket13_ticket_nonce ()) clens_newSessionTicket13_ticket_nonce ()
/
prims.fst.checked MiTLS.Parsers.NewSessionTicket13_ticket_nonce.fsti.checked MiTLS.Parsers.NewSessionTicket13_ticket.fsti.checked MiTLS.Parsers.NewSessionTicket13_extensions.fsti.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.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.NewSessionTicket13.fst
LowParse.Low.Base.Spec.gaccessor MiTLS.Parsers.NewSessionTicket13.newSessionTicket13_parser
  MiTLS.Parsers.NewSessionTicket13_ticket.newSessionTicket13_ticket_parser
  MiTLS.Parsers.NewSessionTicket13.clens_newSessionTicket13_ticket
LowParse.Low.Base.Spec.gaccessor_ext MiTLS.Parsers.NewSessionTicket13.newSessionTicket13_parser_kind MiTLS.Parsers.NewSessionTicket13.newSessionTicket13 MiTLS.Parsers.NewSessionTicket13.newSessionTicket13_parser MiTLS.Parsers.NewSessionTicket13_ticket.newSessionTicket13_ticket_parser_kind MiTLS.Parsers.NewSessionTicket13_ticket.newSessionTicket13_ticket MiTLS.Parsers.NewSessionTicket13_ticket.newSessionTicket13_ticket_parser LowParse.Low.Base.Spec.clens_compose MiTLS.Parsers.NewSessionTicket13.newSessionTicket13' MiTLS.Parsers.NewSessionTicket13.clens_newSessionTicket13_newSessionTicket13' FStar.Pervasives.Native.tuple2 MiTLS.Parsers.NewSessionTicket13_ticket_nonce.newSessionTicket13_ticket_nonce FStar.UInt32.t MiTLS.Parsers.NewSessionTicket13_extensions.newSessionTicket13_extensions LowParse.Low.Base.Spec.clens_id LowParse.Low.Combinators.clens_fst LowParse.Low.Combinators.clens_snd LowParse.Low.Base.Spec.gaccessor_compose LowParse.Spec.Combinators.and_then_kind LowParse.Spec.Int.parse_u32_kind MiTLS.Parsers.NewSessionTicket13_ticket_nonce.newSessionTicket13_ticket_nonce_parser_kind MiTLS.Parsers.NewSessionTicket13_extensions.newSessionTicket13_extensions_parser_kind MiTLS.Parsers.NewSessionTicket13.newSessionTicket13'_parser MiTLS.Parsers.NewSessionTicket13.gaccessor_newSessionTicket13_newSessionTicket13' MiTLS.Parsers.NewSessionTicket13.gaccessor'_newSessionTicket13_ticket MiTLS.Parsers.NewSessionTicket13.clens_newSessionTicket13_ticket
let gaccessor_newSessionTicket13_ticket =
  
LL.gaccessor_ext (gaccessor_newSessionTicket13_newSessionTicket13'
    `LL.gaccessor_compose`
    gaccessor'_newSessionTicket13_ticket)
  clens_newSessionTicket13_ticket
  ()