2012-07-24 13 views

risposta

6

È possibile utilizzare l'eliminazione del quantificatore per farlo. Ecco un esempio:

(declare-const t1 Int) 
(declare-const t2 Int) 

(elim-quantifiers (exists ((x Int)) (and (< t1 x) (< x t2)))) 

Si può provare questo esempio online all'indirizzo: http://rise4fun.com/Z3/kp0X

+0

Grazie, ma il motivo per cui il risultato è T1-T2 < = -2? e non t1-t2 <0? – william007

+1

Perché, 't1',' t2' e 'x' sono numeri interi. Per gli interi abbiamo che se 'a

+1

Questa risposta sembra essere superata, in quanto produce "non supportato" come risultato (anche su rise4fun) – DCTLib

1

Possibile soluzione utilizzando Redlog di Reduce:

enter image description here