val lemma_synth_maxFragmentLength_inj: Prims.unit
  -> Lemma (LP.synth_injective synth_maxFragmentLength)
val lemma_synth_maxFragmentLength_inj: Prims.unit
  -> Lemma (LP.synth_injective synth_maxFragmentLength)
let lemma_synth_maxFragmentLength_inj () : Lemma
  (LP.synth_injective synth_maxFragmentLength) = 
  lemma_synth_maxFragmentLength_inv' ();
  LP.synth_inverse_synth_injective synth_maxFragmentLength synth_maxFragmentLength_inv
module MiTLS.Parsers.MaxFragmentLength

(* 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"

[@LT.Norm] inline_for_extraction let maxFragmentLength_enum : LP.enum maxFragmentLength U8.t =
  [@inline_let] let e = [
    Two_9, 1z;
    Two_10, 2z;
    Two_11, 3z;
    Two_12, 4z;
  ] in
  [@inline_let] let _ =
    assert_norm (L.noRepeats (LP.list_map fst e))
  in
  [@inline_let] let _ = 
    assert_norm (L.noRepeats (LP.list_map snd e))
  in e

noextract let maxFragmentLength_repr_parser = LPI.parse_u8

noextract let maxFragmentLength_repr_serializer = LPI.serialize_u8

inline_for_extraction noextract let maxFragmentLength_repr_parser32 = LS.parse32_u8

inline_for_extraction noextract let maxFragmentLength_repr_serializer32 = LS.serialize32_u8

inline_for_extraction noextract let maxFragmentLength_repr_size32 = LSZ.size32_u8

inline_for_extraction noextract let maxFragmentLength_repr_validator = (LL.validate_u8 ())

inline_for_extraction noextract let maxFragmentLength_repr_jumper = LL.jump_u8

inline_for_extraction noextract let maxFragmentLength_repr_reader = LL.read_u8

inline_for_extraction noextract let maxFragmentLength_repr_writer = LL.write_u8

inline_for_extraction let synth_maxFragmentLength (x:LP.maybe_enum_key maxFragmentLength_enum) : maxFragmentLength = 
  match x with
  | LP.Known k -> k
  | LP.Unknown y ->
    [@inline_let] let v : U8.t = y in
    [@inline_let] let _ = assert_norm (LP.list_mem v (LP.list_map snd maxFragmentLength_enum) == known_maxFragmentLength_repr v) in
    Unknown_maxFragmentLength v

inline_for_extraction let synth_maxFragmentLength_inv (x:maxFragmentLength) : LP.maybe_enum_key maxFragmentLength_enum = 
  match x with
  | Unknown_maxFragmentLength y ->
    [@inline_let] let v : U8.t = y in
    [@inline_let] let _ = assert_norm (LP.list_mem v (LP.list_map snd maxFragmentLength_enum) == known_maxFragmentLength_repr v) in
    LP.Unknown v
  | x ->
    [@inline_let] let x1 : maxFragmentLength = x in
    [@inline_let] let _ : squash(not (Unknown_maxFragmentLength? x1) ==> LP.list_mem x1 (LP.list_map fst maxFragmentLength_enum)) =
      _ by (LP.synth_maybe_enum_key_inv_unknown_tac x1)
    in
    LP.Known (x1 <: LP.enum_key maxFragmentLength_enum)

let lemma_synth_maxFragmentLength_inv' () : Lemma
  (LP.synth_inverse synth_maxFragmentLength_inv synth_maxFragmentLength)
= LP.forall_maybe_enum_key maxFragmentLength_enum (fun x -> synth_maxFragmentLength_inv (synth_maxFragmentLength x) == x)
    (_ by (LP.forall_maybe_enum_key_known_tac ()))
    (_ by (LP.forall_maybe_enum_key_unknown_tac ()))
/
prims.fst.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.Tactics.Effect.fsti.checked FStar.Tactics.fst.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.MaxFragmentLength.fst
_: Prims.unit
  -> FStar.Pervasives.Lemma
    (ensures
      LowParse.Spec.Combinators.synth_injective MiTLS.Parsers.MaxFragmentLength.synth_maxFragmentLength
      )
Prims.unit LowParse.Spec.Combinators.synth_inverse_synth_injective LowParse.Spec.Enum.maybe_enum_key MiTLS.Parsers.MaxFragmentLength.maxFragmentLength FStar.UInt8.t MiTLS.Parsers.MaxFragmentLength.maxFragmentLength_enum MiTLS.Parsers.MaxFragmentLength.synth_maxFragmentLength MiTLS.Parsers.MaxFragmentLength.synth_maxFragmentLength_inv MiTLS.Parsers.MaxFragmentLength.lemma_synth_maxFragmentLength_inv' Prims.l_True Prims.squash LowParse.Spec.Combinators.synth_injective Prims.Nil FStar.Pervasives.pattern
let lemma_synth_maxFragmentLength_inj () : Lemma (LP.synth_injective synth_maxFragmentLength) =
  
lemma_synth_maxFragmentLength_inv' ();
LP.synth_inverse_synth_injective synth_maxFragmentLength synth_maxFragmentLength_inv