| 1 |
; REQUIRES: cocoa |
| 2 |
; EXPECT: unsat |
| 3 |
; Tests the ff rewriter |
| 4 |
(set-info :smt-lib-version 2.6) |
| 5 |
(set-info :category "crafted") |
| 6 |
(set-logic QF_FF) |
| 7 |
; all disjuncts should be false |
| 8 |
(declare-fun x () (_ FiniteField 5)) |
| 9 |
(assert (or |
| 10 |
; direct != |
| 11 |
(= #f2m5 #f1m5 ) |
| 12 |
; direct == |
| 13 |
(not (= #f1m5 #f1m5 )) |
| 14 |
; neg: all constants |
| 15 |
(not (= (ff.neg #f1m5) #f4m5 )) |
| 16 |
; add: all constants |
| 17 |
(not (= (ff.add #f0m5 #f1m5 #f2m5 #f3m5) #f1m5 )) |
| 18 |
; add: vars cancel (w/ neg) |
| 19 |
(not (= (ff.add #f0m5 (ff.neg x) x) #f0m5 )) |
| 20 |
; add: vars cancel |
| 21 |
(not (= (ff.add #f0m5 (ff.mul #f4m5 x) x) #f0m5 )) |
| 22 |
; mul: a direct zero |
| 23 |
(= (ff.mul #f0m5 #f1m5 #f2m5 #f3m5) #f1m5 ) |
| 24 |
; mul: a direct zero w/ var |
| 25 |
(= (ff.mul #f0m5 #f1m5 x #f3m5) #f1m5 ) |
| 26 |
; mul: all constants |
| 27 |
(not (= (ff.mul #f1m5 #f2m5 #f3m5) #f1m5 )) |
| 28 |
; mul: a direct zero w/ var |
| 29 |
(not (= (ff.mul x #f3m5) (ff.add x x x))) |
| 30 |
; mul: a direct zero w/ monomials |
| 31 |
(not (= (ff.mul x x #f3m5) (ff.add (ff.mul x x) (ff.mul #f2m5 x x)))) |
| 32 |
)) |
| 33 |
(check-sat) |