Function vstd::set::axiom_set_insert_len

source ·
pub broadcast proof fn axiom_set_insert_len<A>(s: Set<A>, a: A)
Expand description
requires
s.finite(),
ensures
#[trigger] s.insert(a).len() == s.len() + (if s.contains(a) { 0int } else { 1 }),

The result of inserting an element a into a finite set s has length s.len() + 1 if a is not already in s and length s.len() otherwise.