I'm trying to write an assertion that a certain sequence of integers contains at least 2 occurrences of some integer (say 8). Here is what I wrote:
(declare-const s (Seq Int))
(assert (seq.in.re s
(re.++
re.all
(re.++
(seq.to.re (seq.unit 8))
(re.++
re.all
(re.++
(seq.to.re (seq.unit 8))
re.all))))))
When I tried to run it I get the following error:
(error "line 11 column 11: Sort of function 're.++' does not match the declared type. Given domain: (RegEx (Seq Int)) (RegEx String) ")
So I guess re.all
is defined only for strings? Is there any way to create a regular expression for all integers?