val montgomeryPoint32'_size32:LSZ.size32 montgomeryPoint32'_serializer
val montgomeryPoint32'_size32:LSZ.size32 montgomeryPoint32'_serializer
let montgomeryPoint32'_size32 : LSZ.size32 montgomeryPoint32'_serializer = (LSZ.size32_u8 `LSZ.size32_nondep_then` montgomeryPoint32_point_size32)
module MiTLS.Parsers.MontgomeryPoint32

(* 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 point*)
open MiTLS.Parsers.MontgomeryPoint32_point

type montgomeryPoint32' = (U8.t & montgomeryPoint32_point)

inline_for_extraction let synth_montgomeryPoint32 (x: montgomeryPoint32') : montgomeryPoint32 =
  match x with (legacy_form,point) -> {
    legacy_form = legacy_form;
    point = point;
  }

inline_for_extraction let synth_montgomeryPoint32_recip (x: montgomeryPoint32) : montgomeryPoint32' = (x.legacy_form,x.point)

let synth_montgomeryPoint32_recip_inverse () : Lemma (LP.synth_inverse synth_montgomeryPoint32_recip synth_montgomeryPoint32) = ()

let synth_montgomeryPoint32_injective () : Lemma (LP.synth_injective synth_montgomeryPoint32) =
  LP.synth_inverse_synth_injective synth_montgomeryPoint32_recip synth_montgomeryPoint32;
  synth_montgomeryPoint32_recip_inverse ()

let synth_montgomeryPoint32_inverse () : Lemma (LP.synth_inverse synth_montgomeryPoint32 synth_montgomeryPoint32_recip) =
  assert_norm (LP.synth_inverse synth_montgomeryPoint32 synth_montgomeryPoint32_recip)

let synth_montgomeryPoint32_recip_injective () : Lemma (LP.synth_injective synth_montgomeryPoint32_recip) =
  synth_montgomeryPoint32_recip_inverse ();
  LP.synth_inverse_synth_injective synth_montgomeryPoint32 synth_montgomeryPoint32_recip

noextract let montgomeryPoint32'_parser : LP.parser _ montgomeryPoint32' = (LPI.parse_u8 `LP.nondep_then` montgomeryPoint32_point_parser)

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

let montgomeryPoint32_parser =
  synth_montgomeryPoint32_injective ();
  assert_norm (montgomeryPoint32_parser_kind == montgomeryPoint32'_parser_kind);
  montgomeryPoint32'_parser `LP.parse_synth` synth_montgomeryPoint32

noextract let montgomeryPoint32'_serializer : LP.serializer montgomeryPoint32'_parser = (LPI.serialize_u8 `LP.serialize_nondep_then` montgomeryPoint32_point_serializer)

let montgomeryPoint32_serializer =
  [@inline_let] let _ = synth_montgomeryPoint32_injective () in
  [@inline_let] let _ = synth_montgomeryPoint32_inverse () in
  [@inline_let] let _ = assert_norm (montgomeryPoint32_parser_kind == montgomeryPoint32'_parser_kind) in
  LP.serialize_synth _ synth_montgomeryPoint32 montgomeryPoint32'_serializer synth_montgomeryPoint32_recip ()

let montgomeryPoint32_bytesize (x:montgomeryPoint32) : GTot nat = Seq.length (montgomeryPoint32_serializer x)

let montgomeryPoint32_bytesize_eq x = ()

inline_for_extraction let montgomeryPoint32'_parser32 : LS.parser32 montgomeryPoint32'_parser = (LS.parse32_u8 `LS.parse32_nondep_then` montgomeryPoint32_point_parser32)

let montgomeryPoint32_parser32 =
  [@inline_let] let _ = synth_montgomeryPoint32_injective () in
  [@inline_let] let _ = assert_norm (montgomeryPoint32_parser_kind == montgomeryPoint32'_parser_kind) in
  LS.parse32_synth _ synth_montgomeryPoint32 (fun x -> synth_montgomeryPoint32 x) montgomeryPoint32'_parser32 ()

inline_for_extraction let montgomeryPoint32'_serializer32 : LS.serializer32 montgomeryPoint32'_serializer = (LS.serialize32_u8 `LS.serialize32_nondep_then` montgomeryPoint32_point_serializer32)

let montgomeryPoint32_serializer32 =
  [@inline_let] let _ = synth_montgomeryPoint32_injective () in
  [@inline_let] let _ = synth_montgomeryPoint32_inverse () in
  [@inline_let] let _ = assert_norm (montgomeryPoint32_parser_kind == montgomeryPoint32'_parser_kind) in
  LS.serialize32_synth _ synth_montgomeryPoint32 _ montgomeryPoint32'_serializer32 synth_montgomeryPoint32_recip (fun x -> synth_montgomeryPoint32_recip x) ()
/
prims.fst.checked MiTLS.Parsers.MontgomeryPoint32_point.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.MontgomeryPoint32.fst
LowParse.SLow.Base.size32 MiTLS.Parsers.MontgomeryPoint32.montgomeryPoint32'_serializer
LowParse.SLow.Combinators.size32_nondep_then LowParse.Spec.Int.parse_u8_kind FStar.UInt8.t LowParse.Spec.Int.parse_u8 LowParse.Spec.Int.serialize_u8 LowParse.SLow.Int.size32_u8 MiTLS.Parsers.MontgomeryPoint32_point.montgomeryPoint32_point_parser_kind MiTLS.Parsers.MontgomeryPoint32_point.montgomeryPoint32_point MiTLS.Parsers.MontgomeryPoint32_point.montgomeryPoint32_point_parser MiTLS.Parsers.MontgomeryPoint32_point.montgomeryPoint32_point_serializer MiTLS.Parsers.MontgomeryPoint32_point.montgomeryPoint32_point_size32
let montgomeryPoint32'_size32:LSZ.size32 montgomeryPoint32'_serializer =
  
(LSZ.size32_u8 `LSZ.size32_nondep_then` montgomeryPoint32_point_size32)