val lemma_serialize_subjectPublicKeyInfo_payload_size
  (x: subjectPublicKeyInfo_payload_t)
: Lemma (
  Seq.length (serialize (serialize_subjectPublicKeyInfo_payload) x) ==
  Seq.length (serialize (serialize_algorithmIdentifier) x.subjectPubKey_alg) +
  Seq.length (serialize (serialize_asn1_TLV_of_type BIT_STRING) x.subjectPubKey)
)
val lemma_serialize_subjectPublicKeyInfo_payload_size
  (x: subjectPublicKeyInfo_payload_t)
: Lemma (
  Seq.length (serialize (serialize_subjectPublicKeyInfo_payload) x) ==
  Seq.length (serialize (serialize_algorithmIdentifier) x.subjectPubKey_alg) +
  Seq.length (serialize (serialize_asn1_TLV_of_type BIT_STRING) x.subjectPubKey)
)
let lemma_serialize_subjectPublicKeyInfo_payload_size x
= lemma_serialize_subjectPublicKeyInfo_payload_unfold x
module X509.BasicFields.SubjectPublicKeyInfo
open ASN1.Spec
open ASN1.Low

open X509.Base
open X509.Crypto

open FStar.Integers

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

let filter_subjectPublicKeyInfo_payload_t'
  (x: (algorithmIdentifier_t) `tuple2` (datatype_of_asn1_type BIT_STRING))
: GTot bool
= (snd x).bs_len = 33ul &&
  (snd x).bs_unused_bits = 0ul

let subjectPublicKeyInfo_payload_t'
= parse_filter_refine (filter_subjectPublicKeyInfo_payload_t')

let synth_subjectPublicKeyInfo_payload_t
  (x': subjectPublicKeyInfo_payload_t')
: GTot (subjectPublicKeyInfo_payload_t)
= { subjectPubKey_alg = fst x';
    subjectPubKey     = snd x' }

inline_for_extraction noextract
let synth_subjectPublicKeyInfo_payload_t'
  (x: subjectPublicKeyInfo_payload_t)
: Tot (x': subjectPublicKeyInfo_payload_t' { x == synth_subjectPublicKeyInfo_payload_t x' })
= (x.subjectPubKey_alg , x.subjectPubKey)

let parse_subjectPublicKeyInfo_payload
= parse_algorithmIdentifier
  `nondep_then`
  parse_asn1_TLV_of_type BIT_STRING
  `parse_filter`
  filter_subjectPublicKeyInfo_payload_t'
  `parse_synth`
  synth_subjectPublicKeyInfo_payload_t

let serialize_subjectPublicKeyInfo_payload
= serialize_synth
  (* p1 *) (parse_algorithmIdentifier
            `nondep_then`
            parse_asn1_TLV_of_type BIT_STRING
            `parse_filter`
            filter_subjectPublicKeyInfo_payload_t')
  (* f2 *) (synth_subjectPublicKeyInfo_payload_t)
  (* s1 *) (serialize_algorithmIdentifier
            `serialize_nondep_then`
            serialize_asn1_TLV_of_type BIT_STRING
            `serialize_filter`
            filter_subjectPublicKeyInfo_payload_t')
  (* g1 *) (synth_subjectPublicKeyInfo_payload_t')
  (* prf*) ()

let lemma_serialize_subjectPublicKeyInfo_payload_unfold x
= serialize_nondep_then_eq
  (* s1 *) (serialize_algorithmIdentifier)
  (* s2 *) (serialize_asn1_TLV_of_type BIT_STRING)
  (* in *) (synth_subjectPublicKeyInfo_payload_t' x);
  serialize_synth_eq
  (* p1 *) (parse_algorithmIdentifier
            `nondep_then`
            parse_asn1_TLV_of_type BIT_STRING
            `parse_filter`
            filter_subjectPublicKeyInfo_payload_t')
  (* f2 *) (synth_subjectPublicKeyInfo_payload_t)
  (* s1 *) (serialize_algorithmIdentifier
            `serialize_nondep_then`
            serialize_asn1_TLV_of_type BIT_STRING
            `serialize_filter`
            filter_subjectPublicKeyInfo_payload_t')
  (* g1 *) (synth_subjectPublicKeyInfo_payload_t')
  (* prf*) ()
  (* in *) x
/
X509.Crypto.fst.checked X509.Base.fst.checked prims.fst.checked FStar.UInt32.fsti.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked FStar.Integers.fst.checked ASN1.Spec.fst.checked ASN1.Low.fst.checked
X509.BasicFields.SubjectPublicKeyInfo.fst
x: X509.BasicFields.SubjectPublicKeyInfo.subjectPublicKeyInfo_payload_t
  -> FStar.Pervasives.Lemma
    (ensures
      FStar.Seq.Base.length (LowParse.Spec.Base.serialize X509.BasicFields.SubjectPublicKeyInfo.serialize_subjectPublicKeyInfo_payload
            x) ==
      FStar.Seq.Base.length (LowParse.Spec.Base.serialize X509.Crypto.AlgorithmIdentifier.serialize_algorithmIdentifier
            (MksubjectPublicKeyInfo_payload_t?.subjectPubKey_alg x)) +
      FStar.Seq.Base.length (LowParse.Spec.Base.serialize (ASN1.Spec.TLV.serialize_asn1_TLV_of_type ASN1.Base.BIT_STRING
              )
            (MksubjectPublicKeyInfo_payload_t?.subjectPubKey x)))
X509.BasicFields.SubjectPublicKeyInfo.subjectPublicKeyInfo_payload_t X509.BasicFields.SubjectPublicKeyInfo.lemma_serialize_subjectPublicKeyInfo_payload_unfold Prims.unit
let lemma_serialize_subjectPublicKeyInfo_payload_size x =
  
lemma_serialize_subjectPublicKeyInfo_payload_unfold x