Skip to content

Instantly share code, notes, and snippets.

@t3rmin4t0r
Created November 24, 2021 05:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t3rmin4t0r/d16e0cf986199ef560c4eebc357d2f51 to your computer and use it in GitHub Desktop.
Save t3rmin4t0r/d16e0cf986199ef560c4eebc357d2f51 to your computer and use it in GitHub Desktop.
; Variable declarations
(declare-fun a () Int)
(declare-fun b () Int)
(declare-fun c () Int)
(declare-fun d () Int)
(declare-fun e () Int)
(declare-fun f () Int)
(declare-fun g () Int)
(declare-fun h () Int)
(declare-fun i () Int)
(declare-fun j () Int)
; Constraints
(assert (>= a 0))
(assert (>= b 0))
(assert (>= c 0))
(assert (>= d 0))
(assert (>= e 0))
(assert (>= f 0))
(assert (>= g 0))
(assert (>= h 0))
(assert (>= i 0))
(assert (>= j 0))
(assert (< a 10))
(assert (< b 10))
(assert (< c 10))
(assert (< d 10))
(assert (< e 10))
(assert (< f 10))
(assert (< g 10))
(assert (< h 10))
(assert (< i 10))
(assert (< j 10))
(assert(not (= a b)))
(assert(not (= a c)))
(assert(not (= a d)))
(assert(not (= a e)))
(assert(not (= a f)))
(assert(not (= a g)))
(assert(not (= a h)))
(assert(not (= a i)))
(assert(not (= a j)))
(assert(not (= b a)))
(assert(not (= b c)))
(assert(not (= b d)))
(assert(not (= b e)))
(assert(not (= b f)))
(assert(not (= b g)))
(assert(not (= b h)))
(assert(not (= b i)))
(assert(not (= b j)))
(assert(not (= c a)))
(assert(not (= c b)))
(assert(not (= c d)))
(assert(not (= c e)))
(assert(not (= c f)))
(assert(not (= c g)))
(assert(not (= c h)))
(assert(not (= c i)))
(assert(not (= c j)))
(assert(not (= d a)))
(assert(not (= d b)))
(assert(not (= d c)))
(assert(not (= d e)))
(assert(not (= d f)))
(assert(not (= d g)))
(assert(not (= d h)))
(assert(not (= d i)))
(assert(not (= d j)))
(assert(not (= e a)))
(assert(not (= e b)))
(assert(not (= e c)))
(assert(not (= e d)))
(assert(not (= e f)))
(assert(not (= e g)))
(assert(not (= e h)))
(assert(not (= e i)))
(assert(not (= e j)))
(assert(not (= f a)))
(assert(not (= f b)))
(assert(not (= f c)))
(assert(not (= f d)))
(assert(not (= f e)))
(assert(not (= f g)))
(assert(not (= f h)))
(assert(not (= f i)))
(assert(not (= f j)))
(assert(not (= g a)))
(assert(not (= g b)))
(assert(not (= g c)))
(assert(not (= g d)))
(assert(not (= g e)))
(assert(not (= g f)))
(assert(not (= g h)))
(assert(not (= g i)))
(assert(not (= g j)))
(assert(not (= h a)))
(assert(not (= h b)))
(assert(not (= h c)))
(assert(not (= h d)))
(assert(not (= h e)))
(assert(not (= h f)))
(assert(not (= h g)))
(assert(not (= h i)))
(assert(not (= h j)))
(assert(not (= i a)))
(assert(not (= i b)))
(assert(not (= i c)))
(assert(not (= i d)))
(assert(not (= i e)))
(assert(not (= i f)))
(assert(not (= i g)))
(assert(not (= i h)))
(assert(not (= i j)))
(assert(not (= j a)))
(assert(not (= j b)))
(assert(not (= j c)))
(assert(not (= j d)))
(assert(not (= j e)))
(assert(not (= j f)))
(assert(not (= j g)))
(assert(not (= j h)))
(assert(not (= j i)))
(assert (=
(+
(+(* a 100) (+ (* b 10) c))
(+ (+(* d 100) (+ (* e 10) f))
(+(* g 100) (+ (* h 10) i))
))
(+ 1230 j)))
; Solve
(check-sat)
(get-model)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment