pub use crate::combinators::*;
pub use crate::core::exec::{
ByteLen, InputBuf, InputSlice, OutputBuf, OutputSlice, PResult, ParseError, ParseErrorKind,
Parser, PreSerializeError, Prepare, Serializer, SerializerExt,
};
pub use crate::core::{proof::*, spec::*};
pub use vstd::prelude::*;
#[cfg(verus_keep_ghost)]
pub use crate::combinators::star::spec::lemma_star_static_byte_len;
#[cfg(feature = "alloc")]
use alloc::vec::Vec;
verus! {
pub broadcast proof fn lemma_byte_slice_view(bytes: &[u8])
ensures
#[trigger] bytes.deep_view() == bytes@,
{
assert(bytes.deep_view() =~= bytes@);
}
pub broadcast proof fn lemma_byte_array_view<const N: usize>(bytes: &[u8; N])
ensures
#[trigger] bytes.deep_view() == bytes@,
{
assert(bytes.deep_view() =~= bytes@);
}
#[cfg(feature = "alloc")]
pub broadcast proof fn lemma_identity_vec_view<T: DeepView<V = T>>(values: &Vec<T>)
requires
forall|item: T| #[trigger] item.deep_view() == item,
ensures
#[trigger] values.deep_view() == values@,
{
assert(values.deep_view() =~= values@);
}
#[cfg_attr(verus_keep_ghost, verifier::broadcast_use_by_default_when_this_crate_is_imported)]
pub broadcast group basic_lemmas {
StaticByteLen::lemma_static_len_matches_byte_len,
GoodSerializer::lemma_serialize_len,
lemma_star_static_byte_len,
lemma_byte_slice_view,
lemma_byte_array_view,
#[cfg(feature = "alloc")]
lemma_identity_vec_view,
}
pub broadcast group parser_lemmas {
SafeParser::lemma_parse_safe,
SoundParser::lemma_parse_sound_consumption,
SoundParser::lemma_parse_sound_value,
}
}