Here are some examples of how what I'm describing would work:
(define-set Complex)
(define-set Imaginary)
(define-set Real)
(define-set Integers)
(define-set Positive)
; define properties these sets must follow
(assert (subset Imaginary Complex))
(assert (subset Real Complex))
(assert (subset Integers Real))
(assert (subset Positive Real))
(assert (disjoint Imaginary Real))
Example 1
(define-var x)
(assert (in x Real))
(assert (in x Imaginary))
; unsat because Real and Imaginary are disjoint
Example 2
(define-var x)
(define-var y)
(assert (in x Real))
(assert (in y Imaginary))
(assert (= y x))
; unsat
Example 3
(define-var x)
(assert (in x Positive))
(assert (not (in Real))
; unsat
I found this stackoverflow question where someone asks how to implement this sort of theory within z3. It doesn't seem like z3 is very good at answering this sort of question.
One important detail is that I want to handle infinite sets.
Do any SMT solvers exist for this sort of theory? Are there papers about how to implement this?