val clens_serverDHParams_serverDHParams':LL.clens serverDHParams serverDHParams'
val clens_serverDHParams_serverDHParams':LL.clens serverDHParams serverDHParams'
let clens_serverDHParams_serverDHParams' : LL.clens serverDHParams serverDHParams' = synth_serverDHParams_recip_inverse (); synth_serverDHParams_recip_injective (); LL.clens_synth synth_serverDHParams_recip synth_serverDHParams
module MiTLS.Parsers.ServerDHParams

(* 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 dh_p*)
open MiTLS.Parsers.ServerDHParams_dh_p

(* Type of field dh_g*)
open MiTLS.Parsers.ServerDHParams_dh_g

(* Type of field dh_Ys*)
open MiTLS.Parsers.ServerDHParams_dh_Ys

type serverDHParams' = ((serverDHParams_dh_p & serverDHParams_dh_g) & serverDHParams_dh_Ys)

inline_for_extraction let synth_serverDHParams (x: serverDHParams') : serverDHParams =
  match x with ((dh_p,dh_g),dh_Ys) -> {
    dh_p = dh_p;
    dh_g = dh_g;
    dh_Ys = dh_Ys;
  }

inline_for_extraction let synth_serverDHParams_recip (x: serverDHParams) : serverDHParams' = ((x.dh_p,x.dh_g),x.dh_Ys)

let synth_serverDHParams_recip_inverse () : Lemma (LP.synth_inverse synth_serverDHParams_recip synth_serverDHParams) = ()

let synth_serverDHParams_injective () : Lemma (LP.synth_injective synth_serverDHParams) =
  LP.synth_inverse_synth_injective synth_serverDHParams_recip synth_serverDHParams;
  synth_serverDHParams_recip_inverse ()

let synth_serverDHParams_inverse () : Lemma (LP.synth_inverse synth_serverDHParams synth_serverDHParams_recip) =
  assert_norm (LP.synth_inverse synth_serverDHParams synth_serverDHParams_recip)

let synth_serverDHParams_recip_injective () : Lemma (LP.synth_injective synth_serverDHParams_recip) =
  synth_serverDHParams_recip_inverse ();
  LP.synth_inverse_synth_injective synth_serverDHParams synth_serverDHParams_recip

noextract let serverDHParams'_parser : LP.parser _ serverDHParams' = ((serverDHParams_dh_p_parser `LP.nondep_then` serverDHParams_dh_g_parser) `LP.nondep_then` serverDHParams_dh_Ys_parser)

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

let serverDHParams_parser =
  synth_serverDHParams_injective ();
  assert_norm (serverDHParams_parser_kind == serverDHParams'_parser_kind);
  serverDHParams'_parser `LP.parse_synth` synth_serverDHParams

noextract let serverDHParams'_serializer : LP.serializer serverDHParams'_parser = ((serverDHParams_dh_p_serializer `LP.serialize_nondep_then` serverDHParams_dh_g_serializer) `LP.serialize_nondep_then` serverDHParams_dh_Ys_serializer)

let serverDHParams_serializer =
  [@inline_let] let _ = synth_serverDHParams_injective () in
  [@inline_let] let _ = synth_serverDHParams_inverse () in
  [@inline_let] let _ = assert_norm (serverDHParams_parser_kind == serverDHParams'_parser_kind) in
  LP.serialize_synth _ synth_serverDHParams serverDHParams'_serializer synth_serverDHParams_recip ()

let serverDHParams_bytesize (x:serverDHParams) : GTot nat = Seq.length (serverDHParams_serializer x)

let serverDHParams_bytesize_eq x = ()

inline_for_extraction let serverDHParams'_parser32 : LS.parser32 serverDHParams'_parser = ((serverDHParams_dh_p_parser32 `LS.parse32_nondep_then` serverDHParams_dh_g_parser32) `LS.parse32_nondep_then` serverDHParams_dh_Ys_parser32)

let serverDHParams_parser32 =
  [@inline_let] let _ = synth_serverDHParams_injective () in
  [@inline_let] let _ = assert_norm (serverDHParams_parser_kind == serverDHParams'_parser_kind) in
  LS.parse32_synth _ synth_serverDHParams (fun x -> synth_serverDHParams x) serverDHParams'_parser32 ()

inline_for_extraction let serverDHParams'_serializer32 : LS.serializer32 serverDHParams'_serializer = ((serverDHParams_dh_p_serializer32 `LS.serialize32_nondep_then` serverDHParams_dh_g_serializer32) `LS.serialize32_nondep_then` serverDHParams_dh_Ys_serializer32)

let serverDHParams_serializer32 =
  [@inline_let] let _ = synth_serverDHParams_injective () in
  [@inline_let] let _ = synth_serverDHParams_inverse () in
  [@inline_let] let _ = assert_norm (serverDHParams_parser_kind == serverDHParams'_parser_kind) in
  LS.serialize32_synth _ synth_serverDHParams _ serverDHParams'_serializer32 synth_serverDHParams_recip (fun x -> synth_serverDHParams_recip x) ()

inline_for_extraction let serverDHParams'_size32 : LSZ.size32 serverDHParams'_serializer = ((serverDHParams_dh_p_size32 `LSZ.size32_nondep_then` serverDHParams_dh_g_size32) `LSZ.size32_nondep_then` serverDHParams_dh_Ys_size32)

let serverDHParams_size32 =
  [@inline_let] let _ = synth_serverDHParams_injective () in
  [@inline_let] let _ = synth_serverDHParams_inverse () in
  [@inline_let] let _ = assert_norm (serverDHParams_parser_kind == serverDHParams'_parser_kind) in
  LSZ.size32_synth _ synth_serverDHParams _ serverDHParams'_size32 synth_serverDHParams_recip (fun x -> synth_serverDHParams_recip x) ()

inline_for_extraction let serverDHParams'_validator : LL.validator serverDHParams'_parser = ((serverDHParams_dh_p_validator `LL.validate_nondep_then` serverDHParams_dh_g_validator) `LL.validate_nondep_then` serverDHParams_dh_Ys_validator)

let serverDHParams_validator =
  [@inline_let] let _ = synth_serverDHParams_injective () in
  [@inline_let] let _ = assert_norm (serverDHParams_parser_kind == serverDHParams'_parser_kind) in
  LL.validate_synth serverDHParams'_validator synth_serverDHParams ()

inline_for_extraction let serverDHParams'_jumper : LL.jumper serverDHParams'_parser = ((serverDHParams_dh_p_jumper `LL.jump_nondep_then` serverDHParams_dh_g_jumper) `LL.jump_nondep_then` serverDHParams_dh_Ys_jumper)

let serverDHParams_jumper =
  [@inline_let] let _ = synth_serverDHParams_injective () in
  [@inline_let] let _ = assert_norm (serverDHParams_parser_kind == serverDHParams'_parser_kind) in
  LL.jump_synth serverDHParams'_jumper synth_serverDHParams ()

let serverDHParams_bytesize_eqn x =
  [@inline_let] let _ = synth_serverDHParams_injective () in
  [@inline_let] let _ = synth_serverDHParams_inverse () in
  [@inline_let] let _ = assert_norm (serverDHParams_parser_kind == serverDHParams'_parser_kind) in
  LP.serialize_synth_eq _ synth_serverDHParams serverDHParams'_serializer synth_serverDHParams_recip () x;
LP.length_serialize_nondep_then serverDHParams_dh_p_serializer serverDHParams_dh_g_serializer x.dh_p x.dh_g;
LP.length_serialize_nondep_then (serverDHParams_dh_p_serializer `LP.serialize_nondep_then` serverDHParams_dh_g_serializer) serverDHParams_dh_Ys_serializer (x.dh_p, x.dh_g) x.dh_Ys;
  (serverDHParams_dh_p_bytesize_eq (x.dh_p));
  (serverDHParams_dh_g_bytesize_eq (x.dh_g));
  (serverDHParams_dh_Ys_bytesize_eq (x.dh_Ys));
  assert(serverDHParams_bytesize x == Seq.length (LP.serialize serverDHParams_dh_p_serializer x.dh_p) + Seq.length (LP.serialize serverDHParams_dh_g_serializer x.dh_g) + Seq.length (LP.serialize serverDHParams_dh_Ys_serializer x.dh_Ys))

let gaccessor'_serverDHParams_dh_p : LL.gaccessor serverDHParams'_parser serverDHParams_dh_p_parser _ = (LL.gaccessor_then_fst (LL.gaccessor_then_fst (LL.gaccessor_id serverDHParams'_parser)))

let gaccessor'_serverDHParams_dh_g : LL.gaccessor serverDHParams'_parser serverDHParams_dh_g_parser _ = (LL.gaccessor_then_snd (LL.gaccessor_then_fst (LL.gaccessor_id serverDHParams'_parser)))

let gaccessor'_serverDHParams_dh_Ys : LL.gaccessor serverDHParams'_parser serverDHParams_dh_Ys_parser _ = (LL.gaccessor_then_snd (LL.gaccessor_id serverDHParams'_parser))

inline_for_extraction noextract let accessor'_serverDHParams_dh_p : LL.accessor gaccessor'_serverDHParams_dh_p = (LL.accessor_then_fst (LL.accessor_then_fst (LL.accessor_id serverDHParams'_parser)))

inline_for_extraction noextract let accessor'_serverDHParams_dh_g : LL.accessor gaccessor'_serverDHParams_dh_g = (LL.accessor_then_snd (LL.accessor_then_fst (LL.accessor_id serverDHParams'_parser)) serverDHParams_dh_p_jumper)

inline_for_extraction noextract let accessor'_serverDHParams_dh_Ys : LL.accessor gaccessor'_serverDHParams_dh_Ys = (LL.accessor_then_snd (LL.accessor_id serverDHParams'_parser) (serverDHParams_dh_p_jumper `LL.jump_nondep_then` serverDHParams_dh_g_jumper))
/
prims.fst.checked MiTLS.Parsers.ServerDHParams_dh_Ys.fsti.checked MiTLS.Parsers.ServerDHParams_dh_p.fsti.checked MiTLS.Parsers.ServerDHParams_dh_g.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.ServerDHParams.fst
LowParse.Low.Base.Spec.clens MiTLS.Parsers.ServerDHParams.serverDHParams
  MiTLS.Parsers.ServerDHParams.serverDHParams'
LowParse.Low.Combinators.clens_synth MiTLS.Parsers.ServerDHParams.serverDHParams MiTLS.Parsers.ServerDHParams.serverDHParams' MiTLS.Parsers.ServerDHParams.synth_serverDHParams_recip MiTLS.Parsers.ServerDHParams.synth_serverDHParams Prims.unit MiTLS.Parsers.ServerDHParams.synth_serverDHParams_recip_injective MiTLS.Parsers.ServerDHParams.synth_serverDHParams_recip_inverse
let clens_serverDHParams_serverDHParams':LL.clens serverDHParams serverDHParams' =
  
synth_serverDHParams_recip_inverse ();
synth_serverDHParams_recip_injective ();
LL.clens_synth synth_serverDHParams_recip synth_serverDHParams