Skip to content

Commit

Permalink
add postcondition to forall and exist on Set (#1596)
Browse files Browse the repository at this point in the history
Co-authored-by: Viktor Kunčak <[email protected]>
  • Loading branch information
samuelchassot and vkuncak authored Oct 27, 2024
1 parent a4cb53f commit e2d66f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontends/library/stainless/lang/Set.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ object Set {
@library @extern @pure
def exists(p: A => Boolean): Boolean = {
set.theSet.exists(p)
}
}.ensuring(res => res == set.toList.exists(p))

@library @extern @pure
def forall(p: A => Boolean): Boolean = {
set.theSet.forall(p)
}
}.ensuring(res => res == set.toList.forall(p))

@library @extern @pure
def map[B](f: A => B): Set[B] = {
Expand Down

0 comments on commit e2d66f5

Please sign in to comment.