val length_of_x509_version_payload: Prims.unit
  -> GTot
    (l:
      asn1_value_length_of_type SEQUENCE
        { forall (x: x509_version_payload_t).
            l == length_of_opaque_serialization serialize_x509_version_payload x })
val length_of_x509_version_payload: Prims.unit
  -> GTot
    (l:
      asn1_value_length_of_type SEQUENCE
        { forall (x: x509_version_payload_t).
            l == length_of_opaque_serialization serialize_x509_version_payload x })
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
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
/
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
  -> Prims.GTot
    (l:
      ASN1.Base.asn1_value_length_of_type ASN1.Base.SEQUENCE
        { forall (x: X509.BasicFields.Version.x509_version_payload_t).
            l ==
            ASN1.Spec.Base.length_of_opaque_serialization X509.BasicFields.Version.serialize_x509_version_payload
              x })
Prims.unit 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_length_of_type ASN1.Base.SEQUENCE Prims.l_Forall
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