val clens_hkdfLabel_hkdfLabel':LL.clens hkdfLabel hkdfLabel'
let clens_hkdfLabel_hkdfLabel' : LL.clens hkdfLabel hkdfLabel' = synth_hkdfLabel_recip_inverse (); synth_hkdfLabel_recip_injective (); LL.clens_synth synth_hkdfLabel_recip synth_hkdfLabel
val clens_hkdfLabel_hkdfLabel':LL.clens hkdfLabel hkdfLabel'
let clens_hkdfLabel_hkdfLabel':LL.clens hkdfLabel hkdfLabel' =
synth_hkdfLabel_recip_inverse ();
synth_hkdfLabel_recip_injective ();
LL.clens_synth synth_hkdfLabel_recip synth_hkdfLabel
Parsers.HKDF.HkdfLabel.fst.checked
prims.fst.checked Parsers.HKDF.HkdfLabel_label.fsti.checked Parsers.HKDF.HkdfLabel_context.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
Parsers.HKDF.HkdfLabel.fst
LowParse.Low.Combinators.clens_synth Parsers.HKDF.HkdfLabel.hkdfLabel Parsers.HKDF.HkdfLabel.hkdfLabel' Parsers.HKDF.HkdfLabel.synth_hkdfLabel_recip Parsers.HKDF.HkdfLabel.synth_hkdfLabel Prims.unit Parsers.HKDF.HkdfLabel.synth_hkdfLabel_recip_injective Parsers.HKDF.HkdfLabel.synth_hkdfLabel_recip_inverse
module Parsers.HKDF.HkdfLabel

(* 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 label*)
open Parsers.HKDF.HkdfLabel_label

(* Type of field context*)
open Parsers.HKDF.HkdfLabel_context

type hkdfLabel' = ((U16.t & hkdfLabel_label) & hkdfLabel_context)

inline_for_extraction let synth_hkdfLabel (x: hkdfLabel') : hkdfLabel =
  match x with ((length,label),context) -> {
    length = length;
    label = label;
    context = context;
  }

inline_for_extraction let synth_hkdfLabel_recip (x: hkdfLabel) : hkdfLabel' = ((x.length,x.label),x.context)

let synth_hkdfLabel_recip_inverse () : Lemma (LP.synth_inverse synth_hkdfLabel_recip synth_hkdfLabel) = ()

let synth_hkdfLabel_injective () : Lemma (LP.synth_injective synth_hkdfLabel) =
  LP.synth_inverse_synth_injective synth_hkdfLabel_recip synth_hkdfLabel;
  synth_hkdfLabel_recip_inverse ()

let synth_hkdfLabel_inverse () : Lemma (LP.synth_inverse synth_hkdfLabel synth_hkdfLabel_recip) =
  assert_norm (LP.synth_inverse synth_hkdfLabel synth_hkdfLabel_recip)

let synth_hkdfLabel_recip_injective () : Lemma (LP.synth_injective synth_hkdfLabel_recip) =
  synth_hkdfLabel_recip_inverse ();
  LP.synth_inverse_synth_injective synth_hkdfLabel synth_hkdfLabel_recip

noextract let hkdfLabel'_parser : LP.parser _ hkdfLabel' = ((LPI.parse_u16 `LP.nondep_then` hkdfLabel_label_parser) `LP.nondep_then` hkdfLabel_context_parser)

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

let hkdfLabel_parser =
  synth_hkdfLabel_injective ();
  assert_norm (hkdfLabel_parser_kind == hkdfLabel'_parser_kind);
  hkdfLabel'_parser `LP.parse_synth` synth_hkdfLabel

noextract let hkdfLabel'_serializer : LP.serializer hkdfLabel'_parser = ((LPI.serialize_u16 `LP.serialize_nondep_then` hkdfLabel_label_serializer) `LP.serialize_nondep_then` hkdfLabel_context_serializer)

let hkdfLabel_serializer =
  [@inline_let] let _ = synth_hkdfLabel_injective () in
  [@inline_let] let _ = synth_hkdfLabel_inverse () in
  [@inline_let] let _ = assert_norm (hkdfLabel_parser_kind == hkdfLabel'_parser_kind) in
  LP.serialize_synth _ synth_hkdfLabel hkdfLabel'_serializer synth_hkdfLabel_recip ()

let hkdfLabel_bytesize (x:hkdfLabel) : GTot nat = Seq.length (hkdfLabel_serializer x)

let hkdfLabel_bytesize_eq x = ()

inline_for_extraction let hkdfLabel'_parser32 : LS.parser32 hkdfLabel'_parser = ((LS.parse32_u16 `LS.parse32_nondep_then` hkdfLabel_label_parser32) `LS.parse32_nondep_then` hkdfLabel_context_parser32)

let hkdfLabel_parser32 =
  [@inline_let] let _ = synth_hkdfLabel_injective () in
  [@inline_let] let _ = assert_norm (hkdfLabel_parser_kind == hkdfLabel'_parser_kind) in
  LS.parse32_synth _ synth_hkdfLabel (fun x -> synth_hkdfLabel x) hkdfLabel'_parser32 ()

inline_for_extraction let hkdfLabel'_serializer32 : LS.serializer32 hkdfLabel'_serializer = ((LS.serialize32_u16 `LS.serialize32_nondep_then` hkdfLabel_label_serializer32) `LS.serialize32_nondep_then` hkdfLabel_context_serializer32)

let hkdfLabel_serializer32 =
  [@inline_let] let _ = synth_hkdfLabel_injective () in
  [@inline_let] let _ = synth_hkdfLabel_inverse () in
  [@inline_let] let _ = assert_norm (hkdfLabel_parser_kind == hkdfLabel'_parser_kind) in
  LS.serialize32_synth _ synth_hkdfLabel _ hkdfLabel'_serializer32 synth_hkdfLabel_recip (fun x -> synth_hkdfLabel_recip x) ()

inline_for_extraction let hkdfLabel'_size32 : LSZ.size32 hkdfLabel'_serializer = ((LSZ.size32_u16 `LSZ.size32_nondep_then` hkdfLabel_label_size32) `LSZ.size32_nondep_then` hkdfLabel_context_size32)

let hkdfLabel_size32 =
  [@inline_let] let _ = synth_hkdfLabel_injective () in
  [@inline_let] let _ = synth_hkdfLabel_inverse () in
  [@inline_let] let _ = assert_norm (hkdfLabel_parser_kind == hkdfLabel'_parser_kind) in
  LSZ.size32_synth _ synth_hkdfLabel _ hkdfLabel'_size32 synth_hkdfLabel_recip (fun x -> synth_hkdfLabel_recip x) ()

inline_for_extraction let hkdfLabel'_validator : LL.validator hkdfLabel'_parser = (((LL.validate_u16 ()) `LL.validate_nondep_then` hkdfLabel_label_validator) `LL.validate_nondep_then` hkdfLabel_context_validator)

let hkdfLabel_validator =
  [@inline_let] let _ = synth_hkdfLabel_injective () in
  [@inline_let] let _ = assert_norm (hkdfLabel_parser_kind == hkdfLabel'_parser_kind) in
  LL.validate_synth hkdfLabel'_validator synth_hkdfLabel ()

inline_for_extraction let hkdfLabel'_jumper : LL.jumper hkdfLabel'_parser = ((LL.jump_u16 `LL.jump_nondep_then` hkdfLabel_label_jumper) `LL.jump_nondep_then` hkdfLabel_context_jumper)

let hkdfLabel_jumper =
  [@inline_let] let _ = synth_hkdfLabel_injective () in
  [@inline_let] let _ = assert_norm (hkdfLabel_parser_kind == hkdfLabel'_parser_kind) in
  LL.jump_synth hkdfLabel'_jumper synth_hkdfLabel ()

let hkdfLabel_bytesize_eqn x =
  [@inline_let] let _ = synth_hkdfLabel_injective () in
  [@inline_let] let _ = synth_hkdfLabel_inverse () in
  [@inline_let] let _ = assert_norm (hkdfLabel_parser_kind == hkdfLabel'_parser_kind) in
  LP.serialize_synth_eq _ synth_hkdfLabel hkdfLabel'_serializer synth_hkdfLabel_recip () x;
LP.length_serialize_nondep_then LPI.serialize_u16 hkdfLabel_label_serializer x.length x.label;
LP.length_serialize_nondep_then (LPI.serialize_u16 `LP.serialize_nondep_then` hkdfLabel_label_serializer) hkdfLabel_context_serializer (x.length, x.label) x.context;
  (assert (FStar.Seq.length (LP.serialize LP.serialize_u16 (x.length)) == 2));
  (hkdfLabel_label_bytesize_eq (x.label));
  (hkdfLabel_context_bytesize_eq (x.context));
  assert(hkdfLabel_bytesize x == Seq.length (LP.serialize LPI.serialize_u16 x.length) + Seq.length (LP.serialize hkdfLabel_label_serializer x.label) + Seq.length (LP.serialize hkdfLabel_context_serializer x.context))

let gaccessor'_hkdfLabel_length : LL.gaccessor hkdfLabel'_parser LPI.parse_u16 _ = (LL.gaccessor_then_fst (LL.gaccessor_then_fst (LL.gaccessor_id hkdfLabel'_parser)))

let gaccessor'_hkdfLabel_label : LL.gaccessor hkdfLabel'_parser hkdfLabel_label_parser _ = (LL.gaccessor_then_snd (LL.gaccessor_then_fst (LL.gaccessor_id hkdfLabel'_parser)))

let gaccessor'_hkdfLabel_context : LL.gaccessor hkdfLabel'_parser hkdfLabel_context_parser _ = (LL.gaccessor_then_snd (LL.gaccessor_id hkdfLabel'_parser))

inline_for_extraction noextract let accessor'_hkdfLabel_length : LL.accessor gaccessor'_hkdfLabel_length = (LL.accessor_then_fst (LL.accessor_then_fst (LL.accessor_id hkdfLabel'_parser)))

inline_for_extraction noextract let accessor'_hkdfLabel_label : LL.accessor gaccessor'_hkdfLabel_label = (LL.accessor_then_snd (LL.accessor_then_fst (LL.accessor_id hkdfLabel'_parser)) LL.jump_u16)

inline_for_extraction noextract let accessor'_hkdfLabel_context : LL.accessor gaccessor'_hkdfLabel_context = (LL.accessor_then_snd (LL.accessor_id hkdfLabel'_parser) (LL.jump_u16 `LL.jump_nondep_then` hkdfLabel_label_jumper))
val clens_hkdfLabel_hkdfLabel':LL.clens hkdfLabel hkdfLabel'
LowParse.Low.Base.Spec.clens Parsers.HKDF.HkdfLabel.hkdfLabel Parsers.HKDF.HkdfLabel.hkdfLabel'