val gaccessor_offeredPsks_identities : LL.gaccessor offeredPsks_parser offeredPsks_identities_parser clens_offeredPsks_identities
val gaccessor_offeredPsks_identities : LL.gaccessor offeredPsks_parser offeredPsks_identities_parser clens_offeredPsks_identities
let gaccessor_offeredPsks_identities = LL.gaccessor_ext (gaccessor_offeredPsks_offeredPsks' `LL.gaccessor_compose` gaccessor'_offeredPsks_identities) clens_offeredPsks_identities ()
module MiTLS.Parsers.OfferedPsks

(* 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 identities*)
open MiTLS.Parsers.OfferedPsks_identities

(* Type of field binders*)
open MiTLS.Parsers.OfferedPsks_binders

type offeredPsks' = (offeredPsks_identities & offeredPsks_binders)

inline_for_extraction let synth_offeredPsks (x: offeredPsks') : offeredPsks =
  match x with (identities,binders) -> {
    identities = identities;
    binders = binders;
  }

inline_for_extraction let synth_offeredPsks_recip (x: offeredPsks) : offeredPsks' = (x.identities,x.binders)

let synth_offeredPsks_recip_inverse () : Lemma (LP.synth_inverse synth_offeredPsks_recip synth_offeredPsks) = ()

let synth_offeredPsks_injective () : Lemma (LP.synth_injective synth_offeredPsks) =
  LP.synth_inverse_synth_injective synth_offeredPsks_recip synth_offeredPsks;
  synth_offeredPsks_recip_inverse ()

let synth_offeredPsks_inverse () : Lemma (LP.synth_inverse synth_offeredPsks synth_offeredPsks_recip) =
  assert_norm (LP.synth_inverse synth_offeredPsks synth_offeredPsks_recip)

let synth_offeredPsks_recip_injective () : Lemma (LP.synth_injective synth_offeredPsks_recip) =
  synth_offeredPsks_recip_inverse ();
  LP.synth_inverse_synth_injective synth_offeredPsks synth_offeredPsks_recip

noextract let offeredPsks'_parser : LP.parser _ offeredPsks' = (offeredPsks_identities_parser `LP.nondep_then` offeredPsks_binders_parser)

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

let offeredPsks_parser =
  synth_offeredPsks_injective ();
  assert_norm (offeredPsks_parser_kind == offeredPsks'_parser_kind);
  offeredPsks'_parser `LP.parse_synth` synth_offeredPsks

noextract let offeredPsks'_serializer : LP.serializer offeredPsks'_parser = (offeredPsks_identities_serializer `LP.serialize_nondep_then` offeredPsks_binders_serializer)

let offeredPsks_serializer =
  [@inline_let] let _ = synth_offeredPsks_injective () in
  [@inline_let] let _ = synth_offeredPsks_inverse () in
  [@inline_let] let _ = assert_norm (offeredPsks_parser_kind == offeredPsks'_parser_kind) in
  LP.serialize_synth _ synth_offeredPsks offeredPsks'_serializer synth_offeredPsks_recip ()

let offeredPsks_bytesize (x:offeredPsks) : GTot nat = Seq.length (offeredPsks_serializer x)

let offeredPsks_bytesize_eq x = ()

inline_for_extraction let offeredPsks'_parser32 : LS.parser32 offeredPsks'_parser = (offeredPsks_identities_parser32 `LS.parse32_nondep_then` offeredPsks_binders_parser32)

let offeredPsks_parser32 =
  [@inline_let] let _ = synth_offeredPsks_injective () in
  [@inline_let] let _ = assert_norm (offeredPsks_parser_kind == offeredPsks'_parser_kind) in
  LS.parse32_synth _ synth_offeredPsks (fun x -> synth_offeredPsks x) offeredPsks'_parser32 ()

inline_for_extraction let offeredPsks'_serializer32 : LS.serializer32 offeredPsks'_serializer = (offeredPsks_identities_serializer32 `LS.serialize32_nondep_then` offeredPsks_binders_serializer32)

let offeredPsks_serializer32 =
  [@inline_let] let _ = synth_offeredPsks_injective () in
  [@inline_let] let _ = synth_offeredPsks_inverse () in
  [@inline_let] let _ = assert_norm (offeredPsks_parser_kind == offeredPsks'_parser_kind) in
  LS.serialize32_synth _ synth_offeredPsks _ offeredPsks'_serializer32 synth_offeredPsks_recip (fun x -> synth_offeredPsks_recip x) ()

inline_for_extraction let offeredPsks'_size32 : LSZ.size32 offeredPsks'_serializer = (offeredPsks_identities_size32 `LSZ.size32_nondep_then` offeredPsks_binders_size32)

let offeredPsks_size32 =
  [@inline_let] let _ = synth_offeredPsks_injective () in
  [@inline_let] let _ = synth_offeredPsks_inverse () in
  [@inline_let] let _ = assert_norm (offeredPsks_parser_kind == offeredPsks'_parser_kind) in
  LSZ.size32_synth _ synth_offeredPsks _ offeredPsks'_size32 synth_offeredPsks_recip (fun x -> synth_offeredPsks_recip x) ()

inline_for_extraction let offeredPsks'_validator : LL.validator offeredPsks'_parser = (offeredPsks_identities_validator `LL.validate_nondep_then` offeredPsks_binders_validator)

let offeredPsks_validator =
  [@inline_let] let _ = synth_offeredPsks_injective () in
  [@inline_let] let _ = assert_norm (offeredPsks_parser_kind == offeredPsks'_parser_kind) in
  LL.validate_synth offeredPsks'_validator synth_offeredPsks ()

inline_for_extraction let offeredPsks'_jumper : LL.jumper offeredPsks'_parser = (offeredPsks_identities_jumper `LL.jump_nondep_then` offeredPsks_binders_jumper)

let offeredPsks_jumper =
  [@inline_let] let _ = synth_offeredPsks_injective () in
  [@inline_let] let _ = assert_norm (offeredPsks_parser_kind == offeredPsks'_parser_kind) in
  LL.jump_synth offeredPsks'_jumper synth_offeredPsks ()

let offeredPsks_bytesize_eqn x =
  [@inline_let] let _ = synth_offeredPsks_injective () in
  [@inline_let] let _ = synth_offeredPsks_inverse () in
  [@inline_let] let _ = assert_norm (offeredPsks_parser_kind == offeredPsks'_parser_kind) in
  LP.serialize_synth_eq _ synth_offeredPsks offeredPsks'_serializer synth_offeredPsks_recip () x;
LP.length_serialize_nondep_then offeredPsks_identities_serializer offeredPsks_binders_serializer x.identities x.binders;
  (offeredPsks_identities_bytesize_eq (x.identities));
  (offeredPsks_binders_bytesize_eq (x.binders));
  assert(offeredPsks_bytesize x == Seq.length (LP.serialize offeredPsks_identities_serializer x.identities) + Seq.length (LP.serialize offeredPsks_binders_serializer x.binders))

let gaccessor'_offeredPsks_identities : LL.gaccessor offeredPsks'_parser offeredPsks_identities_parser _ = (LL.gaccessor_then_fst (LL.gaccessor_id offeredPsks'_parser))

let gaccessor'_offeredPsks_binders : LL.gaccessor offeredPsks'_parser offeredPsks_binders_parser _ = (LL.gaccessor_then_snd (LL.gaccessor_id offeredPsks'_parser))

inline_for_extraction noextract let accessor'_offeredPsks_identities : LL.accessor gaccessor'_offeredPsks_identities = (LL.accessor_then_fst (LL.accessor_id offeredPsks'_parser))

inline_for_extraction noextract let accessor'_offeredPsks_binders : LL.accessor gaccessor'_offeredPsks_binders = (LL.accessor_then_snd (LL.accessor_id offeredPsks'_parser) offeredPsks_identities_jumper)

noextract let clens_offeredPsks_offeredPsks' : LL.clens offeredPsks offeredPsks' = synth_offeredPsks_recip_inverse (); synth_offeredPsks_recip_injective (); LL.clens_synth synth_offeredPsks_recip synth_offeredPsks

let gaccessor_offeredPsks_offeredPsks' : LL.gaccessor offeredPsks_parser offeredPsks'_parser clens_offeredPsks_offeredPsks' = synth_offeredPsks_inverse (); synth_offeredPsks_injective (); synth_offeredPsks_recip_inverse (); LL.gaccessor_synth offeredPsks'_parser synth_offeredPsks synth_offeredPsks_recip ()

inline_for_extraction noextract let accessor_offeredPsks_offeredPsks' : LL.accessor gaccessor_offeredPsks_offeredPsks' = synth_offeredPsks_inverse (); synth_offeredPsks_injective (); synth_offeredPsks_recip_inverse (); LL.accessor_synth offeredPsks'_parser synth_offeredPsks synth_offeredPsks_recip ()
/
prims.fst.checked MiTLS.Parsers.OfferedPsks_identities.fsti.checked MiTLS.Parsers.OfferedPsks_binders.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.OfferedPsks.fst
LowParse.Low.Base.Spec.gaccessor MiTLS.Parsers.OfferedPsks.offeredPsks_parser
  MiTLS.Parsers.OfferedPsks_identities.offeredPsks_identities_parser
  MiTLS.Parsers.OfferedPsks.clens_offeredPsks_identities
LowParse.Low.Base.Spec.gaccessor_ext MiTLS.Parsers.OfferedPsks.offeredPsks_parser_kind MiTLS.Parsers.OfferedPsks.offeredPsks MiTLS.Parsers.OfferedPsks.offeredPsks_parser MiTLS.Parsers.OfferedPsks_identities.offeredPsks_identities_parser_kind MiTLS.Parsers.OfferedPsks_identities.offeredPsks_identities MiTLS.Parsers.OfferedPsks_identities.offeredPsks_identities_parser LowParse.Low.Base.Spec.clens_compose MiTLS.Parsers.OfferedPsks.offeredPsks' MiTLS.Parsers.OfferedPsks.clens_offeredPsks_offeredPsks' FStar.Pervasives.Native.tuple2 MiTLS.Parsers.OfferedPsks_binders.offeredPsks_binders LowParse.Low.Base.Spec.clens_id LowParse.Low.Combinators.clens_fst LowParse.Low.Base.Spec.gaccessor_compose LowParse.Spec.Combinators.and_then_kind MiTLS.Parsers.OfferedPsks_binders.offeredPsks_binders_parser_kind MiTLS.Parsers.OfferedPsks.offeredPsks'_parser MiTLS.Parsers.OfferedPsks.gaccessor_offeredPsks_offeredPsks' MiTLS.Parsers.OfferedPsks.gaccessor'_offeredPsks_identities MiTLS.Parsers.OfferedPsks.clens_offeredPsks_identities
let gaccessor_offeredPsks_identities =
  
LL.gaccessor_ext (gaccessor_offeredPsks_offeredPsks'
    `LL.gaccessor_compose`
    gaccessor'_offeredPsks_identities)
  clens_offeredPsks_identities
  ()