Debian Codegraph @

test/regress/cli/regress0/ufdt/leon-bsearch-tree-goal15.smt2

raw
1 ; COMMAND-LINE: --dt-stc-ind
2 ; EXPECT: unsat
3 (set-logic UFDT)
4 (declare-datatype Nat ((succ (pred Nat)) (zero)))
5 (declare-datatype Lst ((cons (head Nat) (tail Lst)) (nil)))
6 (declare-datatype Tree ((node (data Nat) (left Tree) (right Tree)) (leaf)))
7 (declare-fun less (Nat Nat) Bool)
8 (declare-fun mem (Nat Lst) Bool)
9 (assert (forall ((x Nat)) (not (mem x nil))))
10 (assert (forall ((x Nat) (y Nat) (z Lst)) (= (mem x (cons y z)) (or (= x y) (mem x z)))))
11 (declare-fun tinsert (Tree Nat) Tree)
12 (assert (forall ((i Nat)) (= (tinsert leaf i) (node i leaf leaf))))
13 (assert (forall ((r Tree) (l Tree) (d Nat) (i Nat)) (= (tinsert (node d l r) i) (ite (less d i) (node d l (tinsert r i)) (node d (tinsert l i) r)))))
14 (declare-fun tinsert-all (Tree Lst) Tree)
15 (assert (forall ((x Tree)) (= (tinsert-all x nil) x)))
16 (assert (forall ((x Tree) (n Nat) (l Lst)) (= (tinsert-all x (cons n l)) (tinsert (tinsert-all x l) n))))
17 (declare-fun tcontains (Tree Nat) Bool)
18 (assert (forall ((i Nat)) (not (tcontains leaf i))))
19 (assert (forall ((d Nat) (l Tree) (r Tree) (i Nat)) (= (tcontains (node d l r) i) (or (= d i) (tcontains l i) (tcontains r i)))))
20 (assert (forall ((i Nat) (x Tree) (j Nat)) (= (or (= i j) (tcontains x j)) (tcontains (tinsert x i) j))))
21 (assert (not (forall ((x Lst) (i Nat)) (= (mem i x) (tcontains (tinsert-all leaf x) i)))))
22 (check-sat)