def model_universe_facts(h,sort,upclose): # get universe elements elems = h.sort_universe(sort) # constraint defining universe uc = [] if not upclose: uc = [[ivy_logic._eq_lit(ivy_logic.Variable('X',c.sort),c) for c in elems]] # universe elements are distinct dc = [[ivy_logic._neq_lit(c1,c2)] for (c1,c2) in ivy_utils.distinct_unordered_pairs(elems)] return uc+dc
def model_universe_facts(h,sort,upclose): if ivy_logic.is_interpreted_sort(sort): return [] # get universe elements elems = h.sort_universe(sort) # constraint defining universe uc = [] if not upclose: uc = [[ivy_logic._eq_lit(ivy_logic.Variable('X',c.sort),c) for c in elems]] # universe elements are distinct dc = [[ivy_logic._neq_lit(c1,c2)] for (c1,c2) in iu.distinct_unordered_pairs(elems)] return uc+dc