1
votes

Does

(=> (f g))

always mean the same thing as

(or (not f) g))

?

The two expressions behave differently in my model. While using => gives me UNSAT, using the other variant does not yield any result (timeout). I would be content just having a list of operators and their meanings. I am aware of the SMTLIB standard, but the documents don't explicitly talk about the meanings of operators. Specifically '=>' seems to double as an alias for the 'ite' (if_then_else) operator if used in a ternary expression and I'm quite confused about that.

I set the AUFLIA logic, if that's relevant.

I'm looking for a simple yes or no answer first. And a proper documentation about SMT2 (maybe a book) second.

I have this rather large model generated from Daniel Jackson's marksweep model for alloy4 of those of you who are willing to see for yourself.

1

1 Answers

2
votes

Your expressions are incorrect/unwellformed.

=> indeed means 'implies'. In other words, (=> f g) is equivalent to (or (not f) g).

If in doubt, you could prove it using Z3. The below query is unsat:

(declare-const p Bool)
(declare-const q Bool)

(define-fun conjecture () Bool
    (= (=> p q) 
       (or (not p) q)))

(assert (not conjecture))
(check-sat)