val gaccessor_u256_v2 : LL.gaccessor u256_parser LPI.parse_u64 clens_u256_v2
val gaccessor_u256_v2 : LL.gaccessor u256_parser LPI.parse_u64 clens_u256_v2
let gaccessor_u256_v2 = LL.gaccessor_ext (gaccessor_u256_u256' `LL.gaccessor_compose` gaccessor'_u256_v2) clens_u256_v2 ()
module Zeta.Formats.Aux.U256

(* 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 u256' = ((U64.t & U64.t) & (U64.t & U64.t))

inline_for_extraction let synth_u256 (x: u256') : u256 =
  match x with ((v3,v2),(v1,v0)) -> {
    v3 = v3;
    v2 = v2;
    v1 = v1;
    v0 = v0;
  }

inline_for_extraction let synth_u256_recip (x: u256) : u256' = ((x.v3,x.v2),(x.v1,x.v0))

let synth_u256_recip_inverse () : Lemma (LP.synth_inverse synth_u256_recip synth_u256) = ()

let synth_u256_injective () : Lemma (LP.synth_injective synth_u256) =
  LP.synth_inverse_synth_injective synth_u256_recip synth_u256;
  synth_u256_recip_inverse ()

let synth_u256_inverse () : Lemma (LP.synth_inverse synth_u256 synth_u256_recip) =
  assert_norm (LP.synth_inverse synth_u256 synth_u256_recip)

let synth_u256_recip_injective () : Lemma (LP.synth_injective synth_u256_recip) =
  synth_u256_recip_inverse ();
  LP.synth_inverse_synth_injective synth_u256 synth_u256_recip

noextract let u256'_parser : LP.parser _ u256' = ((LPI.parse_u64 `LP.nondep_then` LPI.parse_u64) `LP.nondep_then` (LPI.parse_u64 `LP.nondep_then` LPI.parse_u64))

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

let u256_parser =
  synth_u256_injective ();
  assert_norm (u256_parser_kind == u256'_parser_kind);
  u256'_parser `LP.parse_synth` synth_u256

noextract let u256'_serializer : LP.serializer u256'_parser = ((LPI.serialize_u64 `LP.serialize_nondep_then` LPI.serialize_u64) `LP.serialize_nondep_then` (LPI.serialize_u64 `LP.serialize_nondep_then` LPI.serialize_u64))

let u256_serializer =
  [@inline_let] let _ = synth_u256_injective () in
  [@inline_let] let _ = synth_u256_inverse () in
  [@inline_let] let _ = assert_norm (u256_parser_kind == u256'_parser_kind) in
  LP.serialize_synth _ synth_u256 u256'_serializer synth_u256_recip ()

let u256_bytesize (x:u256) : GTot nat = Seq.length (u256_serializer x)

let u256_bytesize_eq x = ()

inline_for_extraction let u256'_size32 : LSZ.size32 u256'_serializer = ((LSZ.size32_u64 `LSZ.size32_nondep_then` LSZ.size32_u64) `LSZ.size32_nondep_then` (LSZ.size32_u64 `LSZ.size32_nondep_then` LSZ.size32_u64))

let u256_size32 =
  [@inline_let] let _ = synth_u256_injective () in
  [@inline_let] let _ = synth_u256_inverse () in
  [@inline_let] let _ = assert_norm (u256_parser_kind == u256'_parser_kind) in
  LSZ.size32_synth _ synth_u256 _ u256'_size32 synth_u256_recip (fun x -> synth_u256_recip x) ()

inline_for_extraction let u256'_reader : LL.leaf_reader u256'_parser = (LL.read_nondep_then (LL.jump_u64 `LL.jump_nondep_then` LL.jump_u64) (LL.read_nondep_then LL.jump_u64 LL.read_u64 LL.read_u64) (LL.read_nondep_then LL.jump_u64 LL.read_u64 LL.read_u64))

let u256_reader =
  [@inline_let] let _ = synth_u256_injective () in
  [@inline_let] let _ = assert_norm (u256_parser_kind == u256'_parser_kind) in
  LL.read_synth _ synth_u256 (fun x -> synth_u256 x) u256'_reader ()

inline_for_extraction let u256'_lserializer : LL.serializer32 u256'_serializer = ((LL.serialize32_u64 `LL.serialize32_nondep_then` LL.serialize32_u64) `LL.serialize32_nondep_then` (LL.serialize32_u64 `LL.serialize32_nondep_then` LL.serialize32_u64))

let u256_lserializer =
  [@inline_let] let _ = synth_u256_injective () in
  [@inline_let] let _ = synth_u256_inverse () in
  [@inline_let] let _ = assert_norm (u256_parser_kind == u256'_parser_kind) in
  LL.serialize32_synth u256'_lserializer synth_u256 synth_u256_recip (fun x -> synth_u256_recip x) ()

let u256_bytesize_eqn x =
  [@inline_let] let _ = synth_u256_injective () in
  [@inline_let] let _ = synth_u256_inverse () in
  [@inline_let] let _ = assert_norm (u256_parser_kind == u256'_parser_kind) in
  LP.serialize_synth_eq _ synth_u256 u256'_serializer synth_u256_recip () x;
LP.length_serialize_nondep_then LPI.serialize_u64 LPI.serialize_u64 x.v3 x.v2;
LP.length_serialize_nondep_then LPI.serialize_u64 LPI.serialize_u64 x.v1 x.v0;
LP.length_serialize_nondep_then (LPI.serialize_u64 `LP.serialize_nondep_then` LPI.serialize_u64) (LPI.serialize_u64 `LP.serialize_nondep_then` LPI.serialize_u64) (x.v3, x.v2) (x.v1, x.v0);
  (assert (FStar.Seq.length (LP.serialize LP.serialize_u64 (x.v3)) == 8));
  (assert (FStar.Seq.length (LP.serialize LP.serialize_u64 (x.v2)) == 8));
  (assert (FStar.Seq.length (LP.serialize LP.serialize_u64 (x.v1)) == 8));
  (assert (FStar.Seq.length (LP.serialize LP.serialize_u64 (x.v0)) == 8));
  assert(u256_bytesize x == Seq.length (LP.serialize LPI.serialize_u64 x.v3) + Seq.length (LP.serialize LPI.serialize_u64 x.v2) + Seq.length (LP.serialize LPI.serialize_u64 x.v1) + Seq.length (LP.serialize LPI.serialize_u64 x.v0))

let gaccessor'_u256_v3 : LL.gaccessor u256'_parser LPI.parse_u64 _ = (LL.gaccessor_then_fst (LL.gaccessor_then_fst (LL.gaccessor_id u256'_parser)))

let gaccessor'_u256_v2 : LL.gaccessor u256'_parser LPI.parse_u64 _ = (LL.gaccessor_then_snd (LL.gaccessor_then_fst (LL.gaccessor_id u256'_parser)))

let gaccessor'_u256_v1 : LL.gaccessor u256'_parser LPI.parse_u64 _ = (LL.gaccessor_then_fst (LL.gaccessor_then_snd (LL.gaccessor_id u256'_parser)))

let gaccessor'_u256_v0 : LL.gaccessor u256'_parser LPI.parse_u64 _ = (LL.gaccessor_then_snd (LL.gaccessor_then_snd (LL.gaccessor_id u256'_parser)))

inline_for_extraction noextract let accessor'_u256_v3 : LL.accessor gaccessor'_u256_v3 = (LL.accessor_then_fst (LL.accessor_then_fst (LL.accessor_id u256'_parser)))

inline_for_extraction noextract let accessor'_u256_v2 : LL.accessor gaccessor'_u256_v2 = (LL.accessor_then_snd (LL.accessor_then_fst (LL.accessor_id u256'_parser)) LL.jump_u64)

inline_for_extraction noextract let accessor'_u256_v1 : LL.accessor gaccessor'_u256_v1 = (LL.accessor_then_fst (LL.accessor_then_snd (LL.accessor_id u256'_parser) (LL.jump_u64 `LL.jump_nondep_then` LL.jump_u64)))

inline_for_extraction noextract let accessor'_u256_v0 : LL.accessor gaccessor'_u256_v0 = (LL.accessor_then_snd (LL.accessor_then_snd (LL.accessor_id u256'_parser) (LL.jump_u64 `LL.jump_nondep_then` LL.jump_u64)) LL.jump_u64)

noextract let clens_u256_u256' : LL.clens u256 u256' = synth_u256_recip_inverse (); synth_u256_recip_injective (); LL.clens_synth synth_u256_recip synth_u256

let gaccessor_u256_u256' : LL.gaccessor u256_parser u256'_parser clens_u256_u256' = synth_u256_inverse (); synth_u256_injective (); synth_u256_recip_inverse (); LL.gaccessor_synth u256'_parser synth_u256 synth_u256_recip ()

inline_for_extraction noextract let accessor_u256_u256' : LL.accessor gaccessor_u256_u256' = synth_u256_inverse (); synth_u256_injective (); synth_u256_recip_inverse (); LL.accessor_synth u256'_parser synth_u256 synth_u256_recip ()

let gaccessor_u256_v3 = LL.gaccessor_ext (gaccessor_u256_u256' `LL.gaccessor_compose` gaccessor'_u256_v3) clens_u256_v3 ()

let accessor_u256_v3 = LL.accessor_ext (LL.accessor_compose accessor_u256_u256' accessor'_u256_v3 ()) clens_u256_v3 ()
/
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.U256.fst
LowParse.Low.Base.Spec.gaccessor Zeta.Formats.Aux.U256.u256_parser
  LowParse.Spec.Int.parse_u64
  Zeta.Formats.Aux.U256.clens_u256_v2
LowParse.Low.Base.Spec.gaccessor_ext Zeta.Formats.Aux.U256.u256_parser_kind Zeta.Formats.Aux.U256.u256 Zeta.Formats.Aux.U256.u256_parser LowParse.Spec.Int.parse_u64_kind FStar.UInt64.t LowParse.Spec.Int.parse_u64 LowParse.Low.Base.Spec.clens_compose Zeta.Formats.Aux.U256.u256' Zeta.Formats.Aux.U256.clens_u256_u256' FStar.Pervasives.Native.tuple2 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.U256.u256'_parser Zeta.Formats.Aux.U256.gaccessor_u256_u256' Zeta.Formats.Aux.U256.gaccessor'_u256_v2 Zeta.Formats.Aux.U256.clens_u256_v2
let gaccessor_u256_v2 =
  
LL.gaccessor_ext (gaccessor_u256_u256' `LL.gaccessor_compose` gaccessor'_u256_v2) clens_u256_v2 ()