val ticketContents13_bytesize_eqn (x: ticketContents13) : Lemma (ticketContents13_bytesize x == (cipherSuite_bytesize (x.cs)) + (ticketContents13_rms_bytesize (x.rms)) + (ticketContents13_nonce_bytesize (x.nonce)) + 4 + 4 + (ticketContents13_custom_data_bytesize (x.custom_data))) [SMTPat (ticketContents13_bytesize x)]
val ticketContents13_bytesize_eqn (x: ticketContents13) : Lemma (ticketContents13_bytesize x == (cipherSuite_bytesize (x.cs)) + (ticketContents13_rms_bytesize (x.rms)) + (ticketContents13_nonce_bytesize (x.nonce)) + 4 + 4 + (ticketContents13_custom_data_bytesize (x.custom_data))) [SMTPat (ticketContents13_bytesize x)]
let ticketContents13_bytesize_eqn x =
  [@inline_let] let _ = synth_ticketContents13_injective () in
  [@inline_let] let _ = synth_ticketContents13_inverse () in
  [@inline_let] let _ = assert_norm (ticketContents13_parser_kind == ticketContents13'_parser_kind) in
  LP.serialize_synth_eq _ synth_ticketContents13 ticketContents13'_serializer synth_ticketContents13_recip () x;
LP.length_serialize_nondep_then cipherSuite_serializer ticketContents13_rms_serializer x.cs x.rms;
LP.length_serialize_nondep_then ticketContents13_nonce_serializer LPI.serialize_u32 x.nonce x.creation_time;
LP.length_serialize_nondep_then (cipherSuite_serializer `LP.serialize_nondep_then` ticketContents13_rms_serializer) (ticketContents13_nonce_serializer `LP.serialize_nondep_then` LPI.serialize_u32) (x.cs, x.rms) (x.nonce, x.creation_time);
LP.length_serialize_nondep_then LPI.serialize_u32 ticketContents13_custom_data_serializer x.age_add x.custom_data;
LP.length_serialize_nondep_then ((cipherSuite_serializer `LP.serialize_nondep_then` ticketContents13_rms_serializer) `LP.serialize_nondep_then` (ticketContents13_nonce_serializer `LP.serialize_nondep_then` LPI.serialize_u32)) (LPI.serialize_u32 `LP.serialize_nondep_then` ticketContents13_custom_data_serializer) ((x.cs, x.rms), (x.nonce, x.creation_time)) (x.age_add, x.custom_data);
  (cipherSuite_bytesize_eq (x.cs));
  (ticketContents13_rms_bytesize_eq (x.rms));
  (ticketContents13_nonce_bytesize_eq (x.nonce));
  (assert (FStar.Seq.length (LP.serialize LP.serialize_u32 (x.creation_time)) == 4));
  (assert (FStar.Seq.length (LP.serialize LP.serialize_u32 (x.age_add)) == 4));
  (ticketContents13_custom_data_bytesize_eq (x.custom_data));
  assert(ticketContents13_bytesize x == Seq.length (LP.serialize cipherSuite_serializer x.cs) + Seq.length (LP.serialize ticketContents13_rms_serializer x.rms) + Seq.length (LP.serialize ticketContents13_nonce_serializer x.nonce) + Seq.length (LP.serialize LPI.serialize_u32 x.creation_time) + Seq.length (LP.serialize LPI.serialize_u32 x.age_add) + Seq.length (LP.serialize ticketContents13_custom_data_serializer x.custom_data))
module MiTLS.Parsers.TicketContents13

(* 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 rms*)
open MiTLS.Parsers.TicketContents13_rms

(* Type of field nonce*)
open MiTLS.Parsers.TicketContents13_nonce

(* Type of field custom_data*)
open MiTLS.Parsers.TicketContents13_custom_data

type ticketContents13' = (((cipherSuite & ticketContents13_rms) & (ticketContents13_nonce & U32.t)) & (U32.t & ticketContents13_custom_data))

inline_for_extraction let synth_ticketContents13 (x: ticketContents13') : ticketContents13 =
  match x with (((cs,rms),(nonce,creation_time)),(age_add,custom_data)) -> {
    cs = cs;
    rms = rms;
    nonce = nonce;
    creation_time = creation_time;
    age_add = age_add;
    custom_data = custom_data;
  }

inline_for_extraction let synth_ticketContents13_recip (x: ticketContents13) : ticketContents13' = (((x.cs,x.rms),(x.nonce,x.creation_time)),(x.age_add,x.custom_data))

let synth_ticketContents13_recip_inverse () : Lemma (LP.synth_inverse synth_ticketContents13_recip synth_ticketContents13) = ()

let synth_ticketContents13_injective () : Lemma (LP.synth_injective synth_ticketContents13) =
  LP.synth_inverse_synth_injective synth_ticketContents13_recip synth_ticketContents13;
  synth_ticketContents13_recip_inverse ()

let synth_ticketContents13_inverse () : Lemma (LP.synth_inverse synth_ticketContents13 synth_ticketContents13_recip) =
  assert_norm (LP.synth_inverse synth_ticketContents13 synth_ticketContents13_recip)

let synth_ticketContents13_recip_injective () : Lemma (LP.synth_injective synth_ticketContents13_recip) =
  synth_ticketContents13_recip_inverse ();
  LP.synth_inverse_synth_injective synth_ticketContents13 synth_ticketContents13_recip

noextract let ticketContents13'_parser : LP.parser _ ticketContents13' = (((cipherSuite_parser `LP.nondep_then` ticketContents13_rms_parser) `LP.nondep_then` (ticketContents13_nonce_parser `LP.nondep_then` LPI.parse_u32)) `LP.nondep_then` (LPI.parse_u32 `LP.nondep_then` ticketContents13_custom_data_parser))

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

let ticketContents13_parser =
  synth_ticketContents13_injective ();
  assert_norm (ticketContents13_parser_kind == ticketContents13'_parser_kind);
  ticketContents13'_parser `LP.parse_synth` synth_ticketContents13

noextract let ticketContents13'_serializer : LP.serializer ticketContents13'_parser = (((cipherSuite_serializer `LP.serialize_nondep_then` ticketContents13_rms_serializer) `LP.serialize_nondep_then` (ticketContents13_nonce_serializer `LP.serialize_nondep_then` LPI.serialize_u32)) `LP.serialize_nondep_then` (LPI.serialize_u32 `LP.serialize_nondep_then` ticketContents13_custom_data_serializer))

let ticketContents13_serializer =
  [@inline_let] let _ = synth_ticketContents13_injective () in
  [@inline_let] let _ = synth_ticketContents13_inverse () in
  [@inline_let] let _ = assert_norm (ticketContents13_parser_kind == ticketContents13'_parser_kind) in
  LP.serialize_synth _ synth_ticketContents13 ticketContents13'_serializer synth_ticketContents13_recip ()

let ticketContents13_bytesize (x:ticketContents13) : GTot nat = Seq.length (ticketContents13_serializer x)

let ticketContents13_bytesize_eq x = ()

inline_for_extraction let ticketContents13'_parser32 : LS.parser32 ticketContents13'_parser = (((cipherSuite_parser32 `LS.parse32_nondep_then` ticketContents13_rms_parser32) `LS.parse32_nondep_then` (ticketContents13_nonce_parser32 `LS.parse32_nondep_then` LS.parse32_u32)) `LS.parse32_nondep_then` (LS.parse32_u32 `LS.parse32_nondep_then` ticketContents13_custom_data_parser32))

let ticketContents13_parser32 =
  [@inline_let] let _ = synth_ticketContents13_injective () in
  [@inline_let] let _ = assert_norm (ticketContents13_parser_kind == ticketContents13'_parser_kind) in
  LS.parse32_synth _ synth_ticketContents13 (fun x -> synth_ticketContents13 x) ticketContents13'_parser32 ()

inline_for_extraction let ticketContents13'_serializer32 : LS.serializer32 ticketContents13'_serializer = (((cipherSuite_serializer32 `LS.serialize32_nondep_then` ticketContents13_rms_serializer32) `LS.serialize32_nondep_then` (ticketContents13_nonce_serializer32 `LS.serialize32_nondep_then` LS.serialize32_u32)) `LS.serialize32_nondep_then` (LS.serialize32_u32 `LS.serialize32_nondep_then` ticketContents13_custom_data_serializer32))

let ticketContents13_serializer32 =
  [@inline_let] let _ = synth_ticketContents13_injective () in
  [@inline_let] let _ = synth_ticketContents13_inverse () in
  [@inline_let] let _ = assert_norm (ticketContents13_parser_kind == ticketContents13'_parser_kind) in
  LS.serialize32_synth _ synth_ticketContents13 _ ticketContents13'_serializer32 synth_ticketContents13_recip (fun x -> synth_ticketContents13_recip x) ()

inline_for_extraction let ticketContents13'_size32 : LSZ.size32 ticketContents13'_serializer = (((cipherSuite_size32 `LSZ.size32_nondep_then` ticketContents13_rms_size32) `LSZ.size32_nondep_then` (ticketContents13_nonce_size32 `LSZ.size32_nondep_then` LSZ.size32_u32)) `LSZ.size32_nondep_then` (LSZ.size32_u32 `LSZ.size32_nondep_then` ticketContents13_custom_data_size32))

let ticketContents13_size32 =
  [@inline_let] let _ = synth_ticketContents13_injective () in
  [@inline_let] let _ = synth_ticketContents13_inverse () in
  [@inline_let] let _ = assert_norm (ticketContents13_parser_kind == ticketContents13'_parser_kind) in
  LSZ.size32_synth _ synth_ticketContents13 _ ticketContents13'_size32 synth_ticketContents13_recip (fun x -> synth_ticketContents13_recip x) ()

inline_for_extraction let ticketContents13'_validator : LL.validator ticketContents13'_parser = (((cipherSuite_validator `LL.validate_nondep_then` ticketContents13_rms_validator) `LL.validate_nondep_then` (ticketContents13_nonce_validator `LL.validate_nondep_then` (LL.validate_u32 ()))) `LL.validate_nondep_then` ((LL.validate_u32 ()) `LL.validate_nondep_then` ticketContents13_custom_data_validator))

let ticketContents13_validator =
  [@inline_let] let _ = synth_ticketContents13_injective () in
  [@inline_let] let _ = assert_norm (ticketContents13_parser_kind == ticketContents13'_parser_kind) in
  LL.validate_synth ticketContents13'_validator synth_ticketContents13 ()

inline_for_extraction let ticketContents13'_jumper : LL.jumper ticketContents13'_parser = (((cipherSuite_jumper `LL.jump_nondep_then` ticketContents13_rms_jumper) `LL.jump_nondep_then` (ticketContents13_nonce_jumper `LL.jump_nondep_then` LL.jump_u32)) `LL.jump_nondep_then` (LL.jump_u32 `LL.jump_nondep_then` ticketContents13_custom_data_jumper))

let ticketContents13_jumper =
  [@inline_let] let _ = synth_ticketContents13_injective () in
  [@inline_let] let _ = assert_norm (ticketContents13_parser_kind == ticketContents13'_parser_kind) in
  LL.jump_synth ticketContents13'_jumper synth_ticketContents13 ()
/
prims.fst.checked MiTLS.Parsers.TicketContents13_rms.fsti.checked MiTLS.Parsers.TicketContents13_nonce.fsti.checked MiTLS.Parsers.TicketContents13_custom_data.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.TicketContents13.fst
x: MiTLS.Parsers.TicketContents13.ticketContents13
  -> FStar.Pervasives.Lemma
      (ensures
        MiTLS.Parsers.TicketContents13.ticketContents13_bytesize x ==
        MiTLS.Parsers.CipherSuite.cipherSuite_bytesize (MkticketContents13?.cs x) +
        MiTLS.Parsers.TicketContents13_rms.ticketContents13_rms_bytesize (MkticketContents13?.rms x) +
        MiTLS.Parsers.TicketContents13_nonce.ticketContents13_nonce_bytesize (MkticketContents13?.nonce
              x) +
        4 +
        4 +
        MiTLS.Parsers.TicketContents13_custom_data.ticketContents13_custom_data_bytesize (MkticketContents13?.custom_data
              x)) [SMTPat (MiTLS.Parsers.TicketContents13.ticketContents13_bytesize x)]
MiTLS.Parsers.TicketContents13.ticketContents13 Prims._assert Prims.eq2 Prims.int MiTLS.Parsers.TicketContents13.ticketContents13_bytesize Prims.op_Addition FStar.Seq.Base.length LowParse.Bytes.byte LowParse.Spec.Base.serialize MiTLS.Parsers.CipherSuite.cipherSuite_parser_kind MiTLS.Parsers.CipherSuite.cipherSuite MiTLS.Parsers.CipherSuite.cipherSuite_parser MiTLS.Parsers.CipherSuite.cipherSuite_serializer MiTLS.Parsers.TicketContents13.__proj__MkticketContents13__item__cs MiTLS.Parsers.TicketContents13_rms.ticketContents13_rms_parser_kind MiTLS.Parsers.TicketContents13_rms.ticketContents13_rms MiTLS.Parsers.TicketContents13_rms.ticketContents13_rms_parser MiTLS.Parsers.TicketContents13_rms.ticketContents13_rms_serializer MiTLS.Parsers.TicketContents13.__proj__MkticketContents13__item__rms MiTLS.Parsers.TicketContents13_nonce.ticketContents13_nonce_parser_kind MiTLS.Parsers.TicketContents13_nonce.ticketContents13_nonce MiTLS.Parsers.TicketContents13_nonce.ticketContents13_nonce_parser MiTLS.Parsers.TicketContents13_nonce.ticketContents13_nonce_serializer MiTLS.Parsers.TicketContents13.__proj__MkticketContents13__item__nonce LowParse.Spec.Int.parse_u32_kind FStar.UInt32.t LowParse.Spec.Int.parse_u32 LowParse.Spec.Int.serialize_u32 MiTLS.Parsers.TicketContents13.__proj__MkticketContents13__item__creation_time MiTLS.Parsers.TicketContents13.__proj__MkticketContents13__item__age_add MiTLS.Parsers.TicketContents13_custom_data.ticketContents13_custom_data_parser_kind MiTLS.Parsers.TicketContents13_custom_data.ticketContents13_custom_data MiTLS.Parsers.TicketContents13_custom_data.ticketContents13_custom_data_parser MiTLS.Parsers.TicketContents13_custom_data.ticketContents13_custom_data_serializer MiTLS.Parsers.TicketContents13.__proj__MkticketContents13__item__custom_data Prims.unit MiTLS.Parsers.TicketContents13_custom_data.ticketContents13_custom_data_bytesize_eq MiTLS.Parsers.TicketContents13_nonce.ticketContents13_nonce_bytesize_eq MiTLS.Parsers.TicketContents13_rms.ticketContents13_rms_bytesize_eq MiTLS.Parsers.CipherSuite.cipherSuite_bytesize_eq LowParse.Spec.Combinators.length_serialize_nondep_then LowParse.Spec.Combinators.and_then_kind FStar.Pervasives.Native.tuple2 LowParse.Spec.Combinators.nondep_then LowParse.Spec.Combinators.serialize_nondep_then FStar.Pervasives.Native.Mktuple2 LowParse.Spec.Combinators.serialize_synth_eq MiTLS.Parsers.TicketContents13.ticketContents13' MiTLS.Parsers.TicketContents13.ticketContents13'_parser MiTLS.Parsers.TicketContents13.synth_ticketContents13 MiTLS.Parsers.TicketContents13.ticketContents13'_serializer MiTLS.Parsers.TicketContents13.synth_ticketContents13_recip FStar.Pervasives.assert_norm LowParse.Spec.Base.parser_kind MiTLS.Parsers.TicketContents13.ticketContents13_parser_kind MiTLS.Parsers.TicketContents13.ticketContents13'_parser_kind MiTLS.Parsers.TicketContents13.synth_ticketContents13_inverse MiTLS.Parsers.TicketContents13.synth_ticketContents13_injective
let ticketContents13_bytesize_eqn x =
  
[@@ inline_let ]let _ = synth_ticketContents13_injective () in
[@@ inline_let ]let _ = synth_ticketContents13_inverse () in
[@@ inline_let ]let _ =
  assert_norm (ticketContents13_parser_kind == ticketContents13'_parser_kind)
in
LP.serialize_synth_eq _
  synth_ticketContents13
  ticketContents13'_serializer
  synth_ticketContents13_recip
  ()
  x;
LP.length_serialize_nondep_then cipherSuite_serializer ticketContents13_rms_serializer x.cs x.rms;
LP.length_serialize_nondep_then ticketContents13_nonce_serializer
  LPI.serialize_u32
  x.nonce
  x.creation_time;
LP.length_serialize_nondep_then (cipherSuite_serializer
    `LP.serialize_nondep_then`
    ticketContents13_rms_serializer)
  (ticketContents13_nonce_serializer `LP.serialize_nondep_then` LPI.serialize_u32)
  (x.cs, x.rms)
  (x.nonce, x.creation_time);
LP.length_serialize_nondep_then LPI.serialize_u32
  ticketContents13_custom_data_serializer
  x.age_add
  x.custom_data;
LP.length_serialize_nondep_then ((cipherSuite_serializer
      `LP.serialize_nondep_then`
      ticketContents13_rms_serializer)
    `LP.serialize_nondep_then`
    (ticketContents13_nonce_serializer `LP.serialize_nondep_then` LPI.serialize_u32))
  (LPI.serialize_u32 `LP.serialize_nondep_then` ticketContents13_custom_data_serializer)
  ((x.cs, x.rms), (x.nonce, x.creation_time))
  (x.age_add, x.custom_data);
(cipherSuite_bytesize_eq (x.cs));
(ticketContents13_rms_bytesize_eq (x.rms));
(ticketContents13_nonce_bytesize_eq (x.nonce));
(assert (FStar.Seq.length (LP.serialize LP.serialize_u32 (x.creation_time)) == 4));
(assert (FStar.Seq.length (LP.serialize LP.serialize_u32 (x.age_add)) == 4));
(ticketContents13_custom_data_bytesize_eq (x.custom_data));
assert (ticketContents13_bytesize x ==
    Seq.length (LP.serialize cipherSuite_serializer x.cs) +
    Seq.length (LP.serialize ticketContents13_rms_serializer x.rms) +
    Seq.length (LP.serialize ticketContents13_nonce_serializer x.nonce) +
    Seq.length (LP.serialize LPI.serialize_u32 x.creation_time) +
    Seq.length (LP.serialize LPI.serialize_u32 x.age_add) +
    Seq.length (LP.serialize ticketContents13_custom_data_serializer x.custom_data))