For some reason, the following program verifies even if the apply_on tigger is not used in test. Removing the precondition of apply_on makes the program fail as expected. Both versions of the program don't verify in Carbon.
function apply_on(a: Int): Bool
requires 0 <= a && a <= 18446744073709551615
function opaque_property(a: Int, k: Int): Int
method test() {
var a: Int
assume forall k: Int :: { apply_on(k) } opaque_property(a, k) == 100
assert opaque_property(a, 123) == 100
}
For some reason, the following program verifies even if the
apply_ontigger is not used intest. Removing the precondition ofapply_onmakes the program fail as expected. Both versions of the program don't verify in Carbon.