val len_of_x509_version_payload: Prims.unit
  -> Tot
    (len:
      asn1_value_int32_of_type SEQUENCE
        { forall (x: x509_version_payload_t).
            v len == length_of_opaque_serialization serialize_x509_version_payload x })
val len_of_x509_version_payload: Prims.unit
  -> Tot
    (len:
      asn1_value_int32_of_type SEQUENCE
        { forall (x: x509_version_payload_t).
            v len == length_of_opaque_serialization serialize_x509_version_payload x })
let len_of_x509_version_payload ()
: Tot (len: asn1_value_int32_of_type SEQUENCE
           { forall (x: x509_version_payload_t). v len == length_of_opaque_serialization serialize_x509_version_payload x })
= Classical.forall_intro lemma_serialize_x509_version_payload_size_exact;
  3ul
module X509.BasicFields.Version

open LowParse.Low.Base

open ASN1.Spec
open ASN1.Low

open X509.Base

open FStar.Integers

#set-options "--z3rlimit 32 --fuel 0 --ifuel 0"

let filter_x509_version
  (x: datatype_of_asn1_type INTEGER)
: GTot bool
= 0l <= x && x <= 2l

let x509_version_payload_t: Type
= parse_filter_refine filter_x509_version

inline_for_extraction noextract
let parse_x509_version_payload_kind
: parser_kind
= parse_filter_kind (parse_asn1_TLV_kind_of_type INTEGER)

val parse_x509_version_payload
: parser parse_x509_version_payload_kind x509_version_payload_t

val serialize_x509_version_payload
: serializer parse_x509_version_payload

let lemma_serialize_x509_version_payload_unfold
  (x: x509_version_payload_t)
= lemma_serialize_asn1_integer_TLV_unfold x

let lemma_serialize_x509_version_payload_size
  (x: x509_version_payload_t)
= lemma_serialize_asn1_integer_TLV_size x

val lemma_serialize_x509_version_payload_size_exact
  (x: x509_version_payload_t)
: Lemma (length_of_opaque_serialization serialize_x509_version_payload x == 3)

val serialize32_x509_version_payload_backwards
: serializer32_backwards serialize_x509_version_payload

let length_of_x509_version_payload ()
: GTot (l: asn1_value_length_of_type SEQUENCE
           { forall (x: x509_version_payload_t). l == length_of_opaque_serialization serialize_x509_version_payload x })
= Classical.forall_intro lemma_serialize_x509_version_payload_size_exact;
  3
/
X509.Base.fst.checked prims.fst.checked LowParse.Low.Base.fst.checked FStar.UInt8.fsti.checked FStar.UInt32.fsti.checked FStar.Pervasives.fsti.checked FStar.Integers.fst.checked FStar.Int32.fsti.checked FStar.Classical.fsti.checked ASN1.Spec.fst.checked ASN1.Low.fst.checked
X509.BasicFields.Version.fsti
_: Prims.unit
  -> len:
    ASN1.Base.asn1_value_int32_of_type ASN1.Base.SEQUENCE
      { forall (x: X509.BasicFields.Version.x509_version_payload_t).
          FStar.Integers.v len ==
          ASN1.Spec.Base.length_of_opaque_serialization X509.BasicFields.Version.serialize_x509_version_payload
            x }
Prims.unit FStar.UInt32.__uint_to_t FStar.Classical.forall_intro X509.BasicFields.Version.x509_version_payload_t Prims.eq2 Prims.int ASN1.Spec.Base.length_of_opaque_serialization X509.BasicFields.Version.parse_x509_version_payload_kind X509.BasicFields.Version.parse_x509_version_payload X509.BasicFields.Version.serialize_x509_version_payload X509.BasicFields.Version.lemma_serialize_x509_version_payload_size_exact ASN1.Base.asn1_value_int32_of_type ASN1.Base.SEQUENCE Prims.l_Forall Prims.l_or FStar.Integers.within_bounds FStar.Integers.Unsigned FStar.Integers.W32 Prims.b2t Prims.op_GreaterThanOrEqual FStar.Integers.v
let len_of_x509_version_payload ()
    : Tot
    (len:
      asn1_value_int32_of_type SEQUENCE
        { forall (x: x509_version_payload_t).
            v len == length_of_opaque_serialization serialize_x509_version_payload x }) =
  
Classical.forall_intro lemma_serialize_x509_version_payload_size_exact;
3ul