val accessor_alert_description : LL.accessor gaccessor_alert_description
let accessor_alert_description = LL.accessor_ext (LL.accessor_compose accessor_alert_alert' accessor'_alert_description ()) clens_alert_description ()
val accessor_alert_description : LL.accessor gaccessor_alert_description
let accessor_alert_description =
LL.accessor_ext (LL.accessor_compose accessor_alert_alert' accessor'_alert_description ())
  clens_alert_description
  ()
Parsers.Alert.fst.checked
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.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.Alert.fst
LowParse.Low.Base.accessor_ext Parsers.Alert.alert_parser_kind Parsers.Alert.alert Parsers.Alert.alert_parser Parsers.AlertDescription.alertDescription_parser_kind Parsers.AlertDescription.alertDescription Parsers.AlertDescription.alertDescription_parser LowParse.Low.Base.Spec.clens_compose Parsers.Alert.alert' Parsers.Alert.clens_alert_alert' FStar.Pervasives.Native.tuple2 Parsers.AlertLevel.alertLevel LowParse.Low.Base.Spec.clens_id LowParse.Low.Combinators.clens_snd LowParse.Low.Base.Spec.gaccessor_compose LowParse.Spec.Combinators.and_then_kind Parsers.AlertLevel.alertLevel_parser_kind Parsers.Alert.alert'_parser Parsers.Alert.gaccessor_alert_alert' Parsers.Alert.gaccessor'_alert_description LowParse.Low.Base.accessor_compose Parsers.Alert.accessor_alert_alert' Parsers.Alert.accessor'_alert_description Parsers.Alert.clens_alert_description
module Parsers.Alert

(* 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 alert' = (alertLevel & alertDescription)

inline_for_extraction let synth_alert (x: alert') : alert =
  match x with (level,description) -> {
    level = level;
    description = description;
  }

inline_for_extraction let synth_alert_recip (x: alert) : alert' = (x.level,x.description)

let synth_alert_recip_inverse () : Lemma (LP.synth_inverse synth_alert_recip synth_alert) = ()

let synth_alert_injective () : Lemma (LP.synth_injective synth_alert) =
  LP.synth_inverse_synth_injective synth_alert_recip synth_alert;
  synth_alert_recip_inverse ()

let synth_alert_inverse () : Lemma (LP.synth_inverse synth_alert synth_alert_recip) =
  assert_norm (LP.synth_inverse synth_alert synth_alert_recip)

let synth_alert_recip_injective () : Lemma (LP.synth_injective synth_alert_recip) =
  synth_alert_recip_inverse ();
  LP.synth_inverse_synth_injective synth_alert synth_alert_recip

noextract let alert'_parser : LP.parser _ alert' = (alertLevel_parser `LP.nondep_then` alertDescription_parser)

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

let alert_parser =
  synth_alert_injective ();
  assert_norm (alert_parser_kind == alert'_parser_kind);
  alert'_parser `LP.parse_synth` synth_alert

noextract let alert'_serializer : LP.serializer alert'_parser = (alertLevel_serializer `LP.serialize_nondep_then` alertDescription_serializer)

let alert_serializer =
  [@inline_let] let _ = synth_alert_injective () in
  [@inline_let] let _ = synth_alert_inverse () in
  [@inline_let] let _ = assert_norm (alert_parser_kind == alert'_parser_kind) in
  LP.serialize_synth _ synth_alert alert'_serializer synth_alert_recip ()

let alert_bytesize (x:alert) : GTot nat = Seq.length (alert_serializer x)

let alert_bytesize_eq x = ()

inline_for_extraction let alert'_parser32 : LS.parser32 alert'_parser = (alertLevel_parser32 `LS.parse32_nondep_then` alertDescription_parser32)

let alert_parser32 =
  [@inline_let] let _ = synth_alert_injective () in
  [@inline_let] let _ = assert_norm (alert_parser_kind == alert'_parser_kind) in
  LS.parse32_synth _ synth_alert (fun x -> synth_alert x) alert'_parser32 ()

inline_for_extraction let alert'_serializer32 : LS.serializer32 alert'_serializer = (alertLevel_serializer32 `LS.serialize32_nondep_then` alertDescription_serializer32)

let alert_serializer32 =
  [@inline_let] let _ = synth_alert_injective () in
  [@inline_let] let _ = synth_alert_inverse () in
  [@inline_let] let _ = assert_norm (alert_parser_kind == alert'_parser_kind) in
  LS.serialize32_synth _ synth_alert _ alert'_serializer32 synth_alert_recip (fun x -> synth_alert_recip x) ()

inline_for_extraction let alert'_size32 : LSZ.size32 alert'_serializer = (alertLevel_size32 `LSZ.size32_nondep_then` alertDescription_size32)

let alert_size32 =
  [@inline_let] let _ = synth_alert_injective () in
  [@inline_let] let _ = synth_alert_inverse () in
  [@inline_let] let _ = assert_norm (alert_parser_kind == alert'_parser_kind) in
  LSZ.size32_synth _ synth_alert _ alert'_size32 synth_alert_recip (fun x -> synth_alert_recip x) ()

inline_for_extraction let alert'_validator : LL.validator alert'_parser = (alertLevel_validator `LL.validate_nondep_then` alertDescription_validator)

let alert_validator =
  [@inline_let] let _ = synth_alert_injective () in
  [@inline_let] let _ = assert_norm (alert_parser_kind == alert'_parser_kind) in
  LL.validate_synth alert'_validator synth_alert ()

inline_for_extraction let alert'_reader : LL.leaf_reader alert'_parser = (LL.read_nondep_then alertLevel_jumper alertLevel_reader alertDescription_reader)

let alert_reader =
  [@inline_let] let _ = synth_alert_injective () in
  [@inline_let] let _ = assert_norm (alert_parser_kind == alert'_parser_kind) in
  LL.read_synth _ synth_alert (fun x -> synth_alert x) alert'_reader ()

inline_for_extraction let alert'_lserializer : LL.serializer32 alert'_serializer = (alertLevel_lserializer `LL.serialize32_nondep_then` alertDescription_lserializer)

let alert_lserializer =
  [@inline_let] let _ = synth_alert_injective () in
  [@inline_let] let _ = synth_alert_inverse () in
  [@inline_let] let _ = assert_norm (alert_parser_kind == alert'_parser_kind) in
  LL.serialize32_synth alert'_lserializer synth_alert synth_alert_recip (fun x -> synth_alert_recip x) ()

let alert_bytesize_eqn x =
  [@inline_let] let _ = synth_alert_injective () in
  [@inline_let] let _ = synth_alert_inverse () in
  [@inline_let] let _ = assert_norm (alert_parser_kind == alert'_parser_kind) in
  LP.serialize_synth_eq _ synth_alert alert'_serializer synth_alert_recip () x;
LP.length_serialize_nondep_then alertLevel_serializer alertDescription_serializer x.level x.description;
  (alertLevel_bytesize_eq (x.level));
  (alertDescription_bytesize_eq (x.description));
  assert(alert_bytesize x == Seq.length (LP.serialize alertLevel_serializer x.level) + Seq.length (LP.serialize alertDescription_serializer x.description))

let gaccessor'_alert_level : LL.gaccessor alert'_parser alertLevel_parser _ = (LL.gaccessor_then_fst (LL.gaccessor_id alert'_parser))

let gaccessor'_alert_description : LL.gaccessor alert'_parser alertDescription_parser _ = (LL.gaccessor_then_snd (LL.gaccessor_id alert'_parser))

inline_for_extraction noextract let accessor'_alert_level : LL.accessor gaccessor'_alert_level = (LL.accessor_then_fst (LL.accessor_id alert'_parser))

inline_for_extraction noextract let accessor'_alert_description : LL.accessor gaccessor'_alert_description = (LL.accessor_then_snd (LL.accessor_id alert'_parser) alertLevel_jumper)

noextract let clens_alert_alert' : LL.clens alert alert' = synth_alert_recip_inverse (); synth_alert_recip_injective (); LL.clens_synth synth_alert_recip synth_alert

let gaccessor_alert_alert' : LL.gaccessor alert_parser alert'_parser clens_alert_alert' = synth_alert_inverse (); synth_alert_injective (); synth_alert_recip_inverse (); LL.gaccessor_synth alert'_parser synth_alert synth_alert_recip ()

inline_for_extraction noextract let accessor_alert_alert' : LL.accessor gaccessor_alert_alert' = synth_alert_inverse (); synth_alert_injective (); synth_alert_recip_inverse (); LL.accessor_synth alert'_parser synth_alert synth_alert_recip ()

let gaccessor_alert_level = LL.gaccessor_ext (gaccessor_alert_alert' `LL.gaccessor_compose` gaccessor'_alert_level) clens_alert_level ()

let accessor_alert_level = LL.accessor_ext (LL.accessor_compose accessor_alert_alert' accessor'_alert_level ()) clens_alert_level ()

let gaccessor_alert_description = LL.gaccessor_ext (gaccessor_alert_alert' `LL.gaccessor_compose` gaccessor'_alert_description) clens_alert_description ()
val accessor_alert_description : LL.accessor gaccessor_alert_description
LowParse.Low.Base.accessor Parsers.Alert.gaccessor_alert_description