为什么Z3不能提出一个没有元素的排序?

为什么Z3不能提出一个没有元素的排序?,z3,Z3,使用Z3Py,我试图构建一个程序,Z3将决定这意味着排序人是空的 from z3 import * from z3_helper import Z3Helper Human = DeclareSort("Human") is_mortal = Function("is_mortal", Human, BoolSort()) h = Const('h', Human) s = Solver() s.add([ ForAll([h], And(is_mortal(h), Not(is_m

使用Z3Py,我试图构建一个程序,Z3将决定这意味着排序人是空的

from z3 import *
from z3_helper import Z3Helper

Human = DeclareSort("Human")
is_mortal = Function("is_mortal", Human, BoolSort())
h = Const('h', Human)

s = Solver()
s.add([
    ForAll([h], And(is_mortal(h), Not(is_mortal(h))))
])

print s.check()
s.model()
但它不是返回一个Human为空的模型,而是返回unsat。为什么会这样

如果我删除“人人都是凡人”的公理,它将返回一个空集作为模型


常量h的存在是否意味着至少需要一个人的存在?SMT-LIB和Z3的观点是,简单类型的一阶逻辑假设所有种类都是非空的。另见第5.1节及以后