val from_application_record_v_payload_case_of_dvalue_kind
      (#x' x: dvalue_kind)
      (y:
          norm [delta_only [(`%application_record_v_payload_case_of_dvalue_kind)]; iota]
            (application_record_v_payload_case_of_dvalue_kind x))
    : Pure (application_record_v_payload_case_of_dvalue_kind x')
      (requires (x == x'))
      (ensures (fun y' -> y' == y))
val from_application_record_v_payload_case_of_dvalue_kind
      (#x' x: dvalue_kind)
      (y:
          norm [delta_only [(`%application_record_v_payload_case_of_dvalue_kind)]; iota]
            (application_record_v_payload_case_of_dvalue_kind x))
    : Pure (application_record_v_payload_case_of_dvalue_kind x')
      (requires (x == x'))
      (ensures (fun y' -> y' == y))
let from_application_record_v_payload_case_of_dvalue_kind (#x':dvalue_kind) (x:dvalue_kind)
  (y: norm [delta_only [(`%application_record_v_payload_case_of_dvalue_kind)]; iota] (application_record_v_payload_case_of_dvalue_kind x))
  : Pure (application_record_v_payload_case_of_dvalue_kind x') (requires (x == x')) (ensures (fun y' -> y' == y)) =
  [@inline_let] let _ = norm_spec [delta_only [(`%application_record_v_payload_case_of_dvalue_kind)] ; iota] (application_record_v_payload_case_of_dvalue_kind x) in y
module Zeta.Formats.Aux.Application_record_v_payload

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

friend Zeta.Formats.Aux.Dvalue_kind

// Need high Z3 limits for large sum types
#set-options "--z3rlimit 120"

inline_for_extraction unfold let dvalue_kind_as_enum_key (x:dvalue_kind) : Pure (LP.enum_key dvalue_kind_enum)
  (requires norm [delta; zeta; iota; primops] (LP.list_mem x (LP.list_map fst dvalue_kind_enum)) == true) (ensures fun _ -> True) =
  [@inline_let] let _ = norm_spec [delta; zeta; iota; primops] (LP.list_mem x (LP.list_map fst dvalue_kind_enum)) in x

inline_for_extraction let key_of_application_record_v_payload (x:application_record_v_payload) : LP.enum_key dvalue_kind_enum =
  match x with
  | V_payload_DValueNone _ -> dvalue_kind_as_enum_key DValueNone
  | V_payload_DValueSome _ -> dvalue_kind_as_enum_key DValueSome

inline_for_extraction let application_record_v_payload_case_of_dvalue_kind (x:dvalue_kind) : Type0 =
  match x with
  | DValueNone -> unit
  | DValueSome -> application_value

unfold inline_for_extraction let to_application_record_v_payload_case_of_dvalue_kind (x:dvalue_kind) (#x':dvalue_kind) (y:application_record_v_payload_case_of_dvalue_kind x')  : Pure (norm [delta_only [(`%application_record_v_payload_case_of_dvalue_kind)]; iota] (application_record_v_payload_case_of_dvalue_kind x))
  (requires (x == x')) (ensures (fun y' -> y' == y)) =
  [@inline_let] let _ = norm_spec [delta_only [(`%application_record_v_payload_case_of_dvalue_kind)] ; iota] (application_record_v_payload_case_of_dvalue_kind x) in y

unfold inline_for_extraction let application_record_v_payload_refine (k:LP.enum_key dvalue_kind_enum) (x:application_record_v_payload)
  : Pure (LP.refine_with_tag key_of_application_record_v_payload k)  (requires norm [delta; iota; zeta] (key_of_application_record_v_payload x) == k) (ensures (fun y -> y == x)) =
  [@inline_let] let _ = norm_spec [delta; iota; zeta] (key_of_application_record_v_payload x) in x

inline_for_extraction let synth_application_record_v_payload_cases (x:LP.enum_key dvalue_kind_enum) (y:application_record_v_payload_case_of_dvalue_kind x)
  : LP.refine_with_tag key_of_application_record_v_payload x =
  match x with
  | DValueNone -> application_record_v_payload_refine x (V_payload_DValueNone (to_application_record_v_payload_case_of_dvalue_kind DValueNone y))
  | DValueSome -> application_record_v_payload_refine x (V_payload_DValueSome (to_application_record_v_payload_case_of_dvalue_kind DValueSome y))
/
Zeta.Formats.Aux.Dvalue_kind.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.Tactics.Effect.fsti.checked FStar.Seq.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.Application_record_v_payload.fst

    x: Zeta.Formats.Aux.Dvalue_kind.dvalue_kind ->
    y:
      FStar.Pervasives.norm [
          FStar.Pervasives.delta_only [
              "Zeta.Formats.Aux.Application_record_v_payload.application_record_v_payload_case_of_dvalue_kind"
            ];
          FStar.Pervasives.iota
        ]
        (Zeta.Formats.Aux.Application_record_v_payload.application_record_v_payload_case_of_dvalue_kind
            x)
  -> Prims.Pure
    (Zeta.Formats.Aux.Application_record_v_payload.application_record_v_payload_case_of_dvalue_kind x'
      )
Zeta.Formats.Aux.Dvalue_kind.dvalue_kind FStar.Pervasives.norm Prims.Cons FStar.Pervasives.norm_step FStar.Pervasives.delta_only Prims.string Prims.Nil FStar.Pervasives.iota Zeta.Formats.Aux.Application_record_v_payload.application_record_v_payload_case_of_dvalue_kind Prims.unit FStar.Pervasives.norm_spec Prims.eq2
let from_application_record_v_payload_case_of_dvalue_kind
      (#x' x: dvalue_kind)
      (y:
          norm [delta_only [(`%application_record_v_payload_case_of_dvalue_kind)]; iota]
            (application_record_v_payload_case_of_dvalue_kind x))
    : Pure (application_record_v_payload_case_of_dvalue_kind x')
      (requires (x == x'))
      (ensures (fun y' -> y' == y)) =
  
[@@ inline_let ]let _ =
  norm_spec [delta_only [(`%application_record_v_payload_case_of_dvalue_kind)]; iota]
    (application_record_v_payload_case_of_dvalue_kind x)
in
y