You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* added second trigger set (cf. example3 test case, test3)
71
71
/* could also add {Map_update(m,k1,v), Map_apply(m,k1)} as another alternative trigger, but seems subsumed given that we need to know k2 is in a domain */
72
-
axiom {
72
+
axiom Map_update_domain {
73
73
forall m : $Map[K, V], k1 : K, k2 : K, v : V ::
74
74
{ k2 in Map_domain(Map_update(m, k1, v)) } {k2 in Map_domain(m), Map_update(m, k1, v)} { Map_apply(Map_update(m, k1, v), k2) }
// exists k : K :: { k in Map_domain(m) } { Map_apply(m, k) }
92
92
// k in Map_domain(m) && v == Map_apply(m, k)
93
93
// }
94
-
axiom {
94
+
axiom Map_values_contains {
95
95
forall m : $Map[K, V], v : V :: { v in Map_values(m) }
96
96
v in Map_values(m) ==>
97
97
Map_range_domain_skolem(m,v) in Map_domain(m) && v == Map_apply(m, Map_range_domain_skolem(m,v))
98
98
}
99
99
100
-
axiom {
100
+
axiom Map_values_nonempty {
101
101
forall m : $Map[K, V], k : K :: { Map_apply(m, k) } { k in Map_domain(m) }
102
102
(k in Map_domain(m)
103
103
==> |Map_values(m)| > 0) // weaker than the axiom below, but with weaker triggering
104
104
}
105
105
106
106
/* no need for an "in" term to match this one; cf. example3 test case test5 */
107
-
axiom {
107
+
axiom Map_values_contains {
108
108
forall m : $Map[K, V], k : K :: { Map_apply(m, k) } // { k in Map_domain(m) } // REMOVED trigger - this can create issues if several maps share the domain
function Multiset_subset(ms0: $Multiset[E], ms1: $Multiset[E]): Bool
101
-
axiom {
101
+
axiom MS_subset_def {
102
102
forall a: $Multiset[E], b: $Multiset[E] :: { Multiset_subset(a, b) }
103
103
Multiset_subset(a, b) <==> (forall o: E :: { Multiset_count(a, o) } { Multiset_count(b, o) } Multiset_count(a, o) <= Multiset_count(b, o))
104
104
}
@@ -111,18 +111,18 @@ domain $Multiset[E] {
111
111
}
112
112
*/
113
113
function Multiset_skolem_diff(s0: $Multiset[E], s1: $Multiset[E]): E
114
-
axiom {
114
+
axiom MS_equal_def {
115
115
forall a: $Multiset[E], b: $Multiset[E] :: { Multiset_equal(a, b) }
116
116
(Multiset_equal(a, b) && a==b) ||
117
117
(!Multiset_equal(a, b) && a != b && Multiset_skolem_diff(a, b) == Multiset_skolem_diff(b, a) && Multiset_count(a, Multiset_skolem_diff(a, b)) != Multiset_count(b, Multiset_skolem_diff(a, b)))
118
118
}
119
-
axiom {
119
+
axiom MS_equal_ext {
120
120
forall a: $Multiset[E], b: $Multiset[E] :: { Multiset_equal(a, b) }
121
121
Multiset_equal(a, b) ==> a == b
122
122
}
123
123
124
124
function Multiset_disjoint(ms0: $Multiset[E], ms1: $Multiset[E]): Bool
125
-
axiom {
125
+
axiom MS_disjoint_def {
126
126
forall a: $Multiset[E], b: $Multiset[E] :: { Multiset_disjoint(a, b) }
0 commit comments