val serverDHParams_validator: LL.validator serverDHParams_parser
val serverDHParams_validator: LL.validator serverDHParams_parser
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 ()
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)
/
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.validator MiTLS.Parsers.ServerDHParams.serverDHParams_parser
LowParse.Low.Combinators.validate_synth LowParse.Spec.Combinators.and_then_kind MiTLS.Parsers.ServerDHParams_dh_p.serverDHParams_dh_p_parser_kind MiTLS.Parsers.ServerDHParams_dh_g.serverDHParams_dh_g_parser_kind MiTLS.Parsers.ServerDHParams_dh_Ys.serverDHParams_dh_Ys_parser_kind MiTLS.Parsers.ServerDHParams.serverDHParams' MiTLS.Parsers.ServerDHParams.serverDHParams MiTLS.Parsers.ServerDHParams.serverDHParams'_parser MiTLS.Parsers.ServerDHParams.serverDHParams'_validator MiTLS.Parsers.ServerDHParams.synth_serverDHParams Prims.unit FStar.Pervasives.assert_norm Prims.eq2 LowParse.Spec.Base.parser_kind MiTLS.Parsers.ServerDHParams.serverDHParams_parser_kind MiTLS.Parsers.ServerDHParams.serverDHParams'_parser_kind MiTLS.Parsers.ServerDHParams.synth_serverDHParams_injective
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 ()