val accessor_stamped_record_sr_timestamp : LL.accessor gaccessor_stamped_record_sr_timestamp
val accessor_stamped_record_sr_timestamp : LL.accessor gaccessor_stamped_record_sr_timestamp
let accessor_stamped_record_sr_timestamp = LL.accessor_ext (LL.accessor_compose accessor_stamped_record_stamped_record' accessor'_stamped_record_sr_timestamp ()) clens_stamped_record_sr_timestamp ()
module Zeta.Formats.Aux.Stamped_record

(* 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 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 stamped_record' = ((record & timestamp) & thread_id)

inline_for_extraction let synth_stamped_record (x: stamped_record') : stamped_record =
  match x with ((sr_record,sr_timestamp),sr_thread_id) -> {
    sr_record = sr_record;
    sr_timestamp = sr_timestamp;
    sr_thread_id = sr_thread_id;
  }

inline_for_extraction let synth_stamped_record_recip (x: stamped_record) : stamped_record' = ((x.sr_record,x.sr_timestamp),x.sr_thread_id)

let synth_stamped_record_recip_inverse () : Lemma (LP.synth_inverse synth_stamped_record_recip synth_stamped_record) = ()

let synth_stamped_record_injective () : Lemma (LP.synth_injective synth_stamped_record) =
  LP.synth_inverse_synth_injective synth_stamped_record_recip synth_stamped_record;
  synth_stamped_record_recip_inverse ()

let synth_stamped_record_inverse () : Lemma (LP.synth_inverse synth_stamped_record synth_stamped_record_recip) =
  assert_norm (LP.synth_inverse synth_stamped_record synth_stamped_record_recip)

let synth_stamped_record_recip_injective () : Lemma (LP.synth_injective synth_stamped_record_recip) =
  synth_stamped_record_recip_inverse ();
  LP.synth_inverse_synth_injective synth_stamped_record synth_stamped_record_recip

noextract let stamped_record'_parser : LP.parser _ stamped_record' = ((record_parser `LP.nondep_then` timestamp_parser) `LP.nondep_then` thread_id_parser)

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

let stamped_record_parser =
  synth_stamped_record_injective ();
  assert_norm (stamped_record_parser_kind == stamped_record'_parser_kind);
  stamped_record'_parser `LP.parse_synth` synth_stamped_record

noextract let stamped_record'_serializer : LP.serializer stamped_record'_parser = ((record_serializer `LP.serialize_nondep_then` timestamp_serializer) `LP.serialize_nondep_then` thread_id_serializer)

let stamped_record_serializer =
  [@inline_let] let _ = synth_stamped_record_injective () in
  [@inline_let] let _ = synth_stamped_record_inverse () in
  [@inline_let] let _ = assert_norm (stamped_record_parser_kind == stamped_record'_parser_kind) in
  LP.serialize_synth _ synth_stamped_record stamped_record'_serializer synth_stamped_record_recip ()

let stamped_record_bytesize (x:stamped_record) : GTot nat = Seq.length (stamped_record_serializer x)

let stamped_record_bytesize_eq x = ()

inline_for_extraction let stamped_record'_size32 : LSZ.size32 stamped_record'_serializer = ((record_size32 `LSZ.size32_nondep_then` timestamp_size32) `LSZ.size32_nondep_then` thread_id_size32)

let stamped_record_size32 =
  [@inline_let] let _ = synth_stamped_record_injective () in
  [@inline_let] let _ = synth_stamped_record_inverse () in
  [@inline_let] let _ = assert_norm (stamped_record_parser_kind == stamped_record'_parser_kind) in
  LSZ.size32_synth _ synth_stamped_record _ stamped_record'_size32 synth_stamped_record_recip (fun x -> synth_stamped_record_recip x) ()

inline_for_extraction let stamped_record'_validator : LL.validator stamped_record'_parser = ((record_validator `LL.validate_nondep_then` timestamp_validator) `LL.validate_nondep_then` thread_id_validator)

let stamped_record_validator =
  [@inline_let] let _ = synth_stamped_record_injective () in
  [@inline_let] let _ = assert_norm (stamped_record_parser_kind == stamped_record'_parser_kind) in
  LL.validate_synth stamped_record'_validator synth_stamped_record ()

inline_for_extraction let stamped_record'_jumper : LL.jumper stamped_record'_parser = ((record_jumper `LL.jump_nondep_then` timestamp_jumper) `LL.jump_nondep_then` thread_id_jumper)

let stamped_record_jumper =
  [@inline_let] let _ = synth_stamped_record_injective () in
  [@inline_let] let _ = assert_norm (stamped_record_parser_kind == stamped_record'_parser_kind) in
  LL.jump_synth stamped_record'_jumper synth_stamped_record ()

inline_for_extraction let stamped_record'_reader : LL.leaf_reader stamped_record'_parser = (LL.read_nondep_then (record_jumper `LL.jump_nondep_then` timestamp_jumper) (LL.read_nondep_then record_jumper record_reader timestamp_reader) thread_id_reader)

let stamped_record_reader =
  [@inline_let] let _ = synth_stamped_record_injective () in
  [@inline_let] let _ = assert_norm (stamped_record_parser_kind == stamped_record'_parser_kind) in
  LL.read_synth _ synth_stamped_record (fun x -> synth_stamped_record x) stamped_record'_reader ()

inline_for_extraction let stamped_record'_lserializer : LL.serializer32 stamped_record'_serializer = ((record_lserializer `LL.serialize32_nondep_then` timestamp_lserializer) `LL.serialize32_nondep_then` thread_id_lserializer)

let stamped_record_lserializer =
  [@inline_let] let _ = synth_stamped_record_injective () in
  [@inline_let] let _ = synth_stamped_record_inverse () in
  [@inline_let] let _ = assert_norm (stamped_record_parser_kind == stamped_record'_parser_kind) in
  LL.serialize32_synth stamped_record'_lserializer synth_stamped_record synth_stamped_record_recip (fun x -> synth_stamped_record_recip x) ()

let stamped_record_bytesize_eqn x =
  [@inline_let] let _ = synth_stamped_record_injective () in
  [@inline_let] let _ = synth_stamped_record_inverse () in
  [@inline_let] let _ = assert_norm (stamped_record_parser_kind == stamped_record'_parser_kind) in
  LP.serialize_synth_eq _ synth_stamped_record stamped_record'_serializer synth_stamped_record_recip () x;
LP.length_serialize_nondep_then record_serializer timestamp_serializer x.sr_record x.sr_timestamp;
LP.length_serialize_nondep_then (record_serializer `LP.serialize_nondep_then` timestamp_serializer) thread_id_serializer (x.sr_record, x.sr_timestamp) x.sr_thread_id;
  (record_bytesize_eq (x.sr_record));
  (timestamp_bytesize_eq (x.sr_timestamp));
  (thread_id_bytesize_eq (x.sr_thread_id));
  assert(stamped_record_bytesize x == Seq.length (LP.serialize record_serializer x.sr_record) + Seq.length (LP.serialize timestamp_serializer x.sr_timestamp) + Seq.length (LP.serialize thread_id_serializer x.sr_thread_id))

let gaccessor'_stamped_record_sr_record : LL.gaccessor stamped_record'_parser record_parser _ = (LL.gaccessor_then_fst (LL.gaccessor_then_fst (LL.gaccessor_id stamped_record'_parser)))

let gaccessor'_stamped_record_sr_timestamp : LL.gaccessor stamped_record'_parser timestamp_parser _ = (LL.gaccessor_then_snd (LL.gaccessor_then_fst (LL.gaccessor_id stamped_record'_parser)))

let gaccessor'_stamped_record_sr_thread_id : LL.gaccessor stamped_record'_parser thread_id_parser _ = (LL.gaccessor_then_snd (LL.gaccessor_id stamped_record'_parser))

inline_for_extraction noextract let accessor'_stamped_record_sr_record : LL.accessor gaccessor'_stamped_record_sr_record = (LL.accessor_then_fst (LL.accessor_then_fst (LL.accessor_id stamped_record'_parser)))

inline_for_extraction noextract let accessor'_stamped_record_sr_timestamp : LL.accessor gaccessor'_stamped_record_sr_timestamp = (LL.accessor_then_snd (LL.accessor_then_fst (LL.accessor_id stamped_record'_parser)) record_jumper)

inline_for_extraction noextract let accessor'_stamped_record_sr_thread_id : LL.accessor gaccessor'_stamped_record_sr_thread_id = (LL.accessor_then_snd (LL.accessor_id stamped_record'_parser) (record_jumper `LL.jump_nondep_then` timestamp_jumper))

noextract let clens_stamped_record_stamped_record' : LL.clens stamped_record stamped_record' = synth_stamped_record_recip_inverse (); synth_stamped_record_recip_injective (); LL.clens_synth synth_stamped_record_recip synth_stamped_record

let gaccessor_stamped_record_stamped_record' : LL.gaccessor stamped_record_parser stamped_record'_parser clens_stamped_record_stamped_record' = synth_stamped_record_inverse (); synth_stamped_record_injective (); synth_stamped_record_recip_inverse (); LL.gaccessor_synth stamped_record'_parser synth_stamped_record synth_stamped_record_recip ()

inline_for_extraction noextract let accessor_stamped_record_stamped_record' : LL.accessor gaccessor_stamped_record_stamped_record' = synth_stamped_record_inverse (); synth_stamped_record_injective (); synth_stamped_record_recip_inverse (); LL.accessor_synth stamped_record'_parser synth_stamped_record synth_stamped_record_recip ()

let gaccessor_stamped_record_sr_record = LL.gaccessor_ext (gaccessor_stamped_record_stamped_record' `LL.gaccessor_compose` gaccessor'_stamped_record_sr_record) clens_stamped_record_sr_record ()

let accessor_stamped_record_sr_record = LL.accessor_ext (LL.accessor_compose accessor_stamped_record_stamped_record' accessor'_stamped_record_sr_record ()) clens_stamped_record_sr_record ()

let gaccessor_stamped_record_sr_timestamp = LL.gaccessor_ext (gaccessor_stamped_record_stamped_record' `LL.gaccessor_compose` gaccessor'_stamped_record_sr_timestamp) clens_stamped_record_sr_timestamp ()
/
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
Zeta.Formats.Aux.Stamped_record.fst
LowParse.Low.Base.accessor Zeta.Formats.Aux.Stamped_record.gaccessor_stamped_record_sr_timestamp
LowParse.Low.Base.accessor_ext Zeta.Formats.Aux.Stamped_record.stamped_record_parser_kind Zeta.Formats.Aux.Stamped_record.stamped_record Zeta.Formats.Aux.Stamped_record.stamped_record_parser Zeta.Formats.Aux.Timestamp.timestamp_parser_kind Zeta.Formats.Aux.Timestamp.timestamp Zeta.Formats.Aux.Timestamp.timestamp_parser LowParse.Low.Base.Spec.clens_compose Zeta.Formats.Aux.Stamped_record.stamped_record' Zeta.Formats.Aux.Stamped_record.clens_stamped_record_stamped_record' FStar.Pervasives.Native.tuple2 Zeta.Formats.Aux.Record.record Zeta.Formats.Aux.Thread_id.thread_id LowParse.Low.Base.Spec.clens_id LowParse.Low.Combinators.clens_fst LowParse.Low.Combinators.clens_snd LowParse.Low.Base.Spec.gaccessor_compose LowParse.Spec.Combinators.and_then_kind Zeta.Formats.Aux.Record.record_parser_kind Zeta.Formats.Aux.Thread_id.thread_id_parser_kind Zeta.Formats.Aux.Stamped_record.stamped_record'_parser Zeta.Formats.Aux.Stamped_record.gaccessor_stamped_record_stamped_record' Zeta.Formats.Aux.Stamped_record.gaccessor'_stamped_record_sr_timestamp LowParse.Low.Base.accessor_compose Zeta.Formats.Aux.Stamped_record.accessor_stamped_record_stamped_record' Zeta.Formats.Aux.Stamped_record.accessor'_stamped_record_sr_timestamp Zeta.Formats.Aux.Stamped_record.clens_stamped_record_sr_timestamp
let accessor_stamped_record_sr_timestamp =
  
LL.accessor_ext (LL.accessor_compose accessor_stamped_record_stamped_record'
      accessor'_stamped_record_sr_timestamp
      ())
  clens_stamped_record_sr_timestamp
  ()