; EXPECT: unsat (set-logic ALL) (declare-sort group1_id 0) (declare-fun group1_idqtint (group1_id) Int) (define-fun in_range1 ((x Int)) Bool (and (<= x 64))) (define-fun to_rep ((x group1_id)) Int (group1_idqtint x)) (declare-fun is_permutation_1 ((Array Int group1_id)) Bool) (declare-fun is_permutation_1__function_guard (Bool (Array Int group1_id)) Bool) (declare-fun is_preferred_1 (Int Int (Array Int group1_id)) Bool) (declare-fun is_preferred_1__function_guard (Bool Int Int (Array Int group1_id)) Bool) (declare-sort ranking 0) (declare-fun rankingqtint (ranking) Int) (define-fun in_range2 ((x Int)) Bool (and (<= 1 x))) (define-fun to_rep1 ((x ranking)) Int (rankingqtint x)) (define-fun bool_eq1 ((a (Array Int ranking)) (a__first Int) (a__last Int) (b (Array Int ranking)) (b__first Int) (b__last Int)) Bool (ite (and (forall ((temp___idx_160 Int)) (=> (and (<= temp___idx_160 a__last)) (= (to_rep1 (select a temp___idx_160)) (to_rep1 (select b (+ (- a__first) temp___idx_160))))))) true false)) (define-fun dynamic_invariant ((temp___expr_177 Int) (temp___is_init_173 Bool) (temp___skip_constant_174 Bool) (temp___do_toplevel_175 Bool) (temp___do_typ_inv_176 Bool)) Bool (=> (or (<= 1 64)) (in_range1 temp___expr_177))) (declare-sort group2_id 0) (declare-fun group2_idqtint (group2_id) Int) (define-fun in_range3 ((x Int)) Bool (and (<= x 64))) (define-fun to_rep2 ((x group2_id)) Int (group2_idqtint x)) (declare-const ranking_1 (Array Int (Array Int group2_id))) (declare-const ranking_2 (Array Int (Array Int group1_id))) (define-fun bool_eq5 ((a (Array Int (Array Int ranking))) (a__first Int) (a__last Int) (b (Array Int (Array Int ranking))) (b__first Int) (b__last Int)) Bool (ite (and (forall ((temp___idx_168 Int)) (=> (and (<= temp___idx_168 a__last)) (= (bool_eq1 (select a temp___idx_168) 1 64 (select b (+ (- a__first) temp___idx_168)) 1 64) true)))) true false)) (declare-sort count 0) (declare-fun countqtint (count) Int) (define-fun in_range4 ((x Int)) Bool (and (<= x 64))) (define-fun to_rep3 ((x count)) Int (countqtint x)) (declare-datatypes ((us_split_fields 0)) (((us_split_fieldsqtmk (rec__stable_marriage__matching__group1_set__elements (Array Int group1_id)) (rec__stable_marriage__matching__group1_set__cardinality count))))) (declare-datatypes ((us_rep 0)) (((us_repqtmk (us_split_fields1 us_split_fields))))) (declare-fun invert ((Array Int (Array Int group1_id))) (Array Int (Array Int ranking))) (declare-fun invert__function_guard ((Array Int (Array Int ranking)) (Array Int (Array Int group1_id))) Bool) (declare-fun all_unmatched_g1_set_elements_distinct (us_split_fields) Bool) (declare-fun all_unmatched_g1_set_elements_distinct__function_guard (Bool us_split_fields) Bool) (declare-fun invariant_holds (us_split_fields (Array Int Bool) (Array Int group1_id) (Array Int count)) Bool) (declare-fun invariant_holds__function_guard (Bool us_split_fields (Array Int Bool) (Array Int group1_id) (Array Int count)) Bool) (assert (forall ((stable_marriage__matching__unmatched_g1_set__fields us_split_fields)) (forall ((stable_marriage__matching__unmatched_g2_set (Array Int Bool))) (forall ((stable_marriage__matching__result (Array Int group1_id))) (forall ((stable_marriage__matching__proposals_made (Array Int count))) (! (and (and (and (= (= (invariant_holds stable_marriage__matching__unmatched_g1_set__fields stable_marriage__matching__unmatched_g2_set stable_marriage__matching__result stable_marriage__matching__proposals_made) true) (and (and (forall ((g1_id Int)) (=> (and (<= g1_id 64)) (=> (forall ((idx Int)) (=> (and (<= idx (to_rep3 (rec__stable_marriage__matching__group1_set__cardinality (us_split_fields1 (us_repqtmk stable_marriage__matching__unmatched_g1_set__fields)))))) (not (= (to_rep (let ((temp___476 (rec__stable_marriage__matching__group1_set__elements (us_split_fields1 (us_repqtmk stable_marriage__matching__unmatched_g1_set__fields))))) (select temp___476 idx))) g1_id)))) (and (< 0 (to_rep3 (select stable_marriage__matching__proposals_made g1_id))))))))))))) :pattern ((invariant_holds stable_marriage__matching__unmatched_g1_set__fields stable_marriage__matching__unmatched_g2_set stable_marriage__matching__result stable_marriage__matching__proposals_made)))))))) (define-fun dynamic_invariant1 ((temp___expr_184 Int) (temp___is_init_180 Bool) (temp___skip_constant_181 Bool) (temp___do_toplevel_182 Bool) (temp___do_typ_inv_183 Bool)) Bool (=> (or (<= 1 64)) (in_range3 temp___expr_184))) (define-fun dynamic_invariant2 ((temp___expr_191 Int) (temp___is_init_187 Bool) (temp___skip_constant_188 Bool) (temp___do_toplevel_189 Bool) (temp___do_typ_inv_190 Bool)) Bool (=> (or (<= 1 64)) (in_range2 temp___expr_191))) (define-fun dynamic_invariant3 ((temp___expr_377 Int) (temp___is_init_373 Bool) (temp___skip_constant_374 Bool) (temp___do_toplevel_375 Bool) (temp___do_typ_inv_376 Bool)) Bool (=> (or (<= 0 64)) (in_range4 temp___expr_377))) (assert (not (forall ((ranking_2_inverted (Array Int (Array Int ranking))) (proposals_made (Array Int count)) (unmatched_g1_set__split_fields us_split_fields) (unmatched_g2_set (Array Int Bool)) (result__ (Array Int group1_id)) (g1 Int) (g2 Int) (already_asked Int) (rank Int) (temp___753 Int) (o Int) (g11 Int) (o1 Int)) (=> (forall ((g21 Int)) (is_permutation_1__function_guard (is_permutation_1 (select ranking_2 g21)) (select ranking_2 g21))) (=> (forall ((g21 Int)) (=> (and (<= g21 64)) (= (is_permutation_1 (select ranking_2 g21)) true))) (=> (invert__function_guard (invert ranking_2) ranking_2) (=> (= (bool_eq5 (invert ranking_2) 1 64 ranking_2_inverted 1 64) true) (=> (forall ((proposals_made1 (Array Int count)) (unmatched_g1_set__split_fields1 us_split_fields) (unmatched_g2_set1 (Array Int Bool)) (result__1 (Array Int group1_id))) (invariant_holds__function_guard (invariant_holds unmatched_g1_set__split_fields1 unmatched_g2_set1 result__1 proposals_made1) unmatched_g1_set__split_fields1 unmatched_g2_set1 result__1 proposals_made1)) (=> (= (invariant_holds unmatched_g1_set__split_fields unmatched_g2_set result__ proposals_made) true) (=> (< 0 (to_rep3 (rec__stable_marriage__matching__group1_set__cardinality unmatched_g1_set__split_fields))) (=> (dynamic_invariant g1 false false true true) (=> (dynamic_invariant1 g2 false false true true) (=> (= rank 1) (=> (dynamic_invariant2 rank true false true true) (=> (dynamic_invariant3 already_asked false false true true) (=> (= (to_rep3 (rec__stable_marriage__matching__group1_set__cardinality unmatched_g1_set__split_fields)) temp___753) (=> (<= 1 temp___753) (=> (<= temp___753 64) (=> (= (to_rep (select (rec__stable_marriage__matching__group1_set__elements unmatched_g1_set__split_fields) temp___753)) o) (=> (= g11 o) (=> (= (to_rep3 (rec__stable_marriage__matching__group1_set__cardinality unmatched_g1_set__split_fields)) o1) (let ((o2 (- o1 1))) (=> (in_range4 o2) (forall ((o3 count)) (=> (= (to_rep3 o3) o2) (forall ((unmatched_g1_set__split_fields1 us_split_fields)) (=> (= unmatched_g1_set__split_fields1 (us_split_fieldsqtmk (rec__stable_marriage__matching__group1_set__elements unmatched_g1_set__split_fields) o3)) (=> (< (to_rep3 (select proposals_made g11)) 64) (forall ((o4 Int)) (=> (= (to_rep3 (select proposals_made g11)) o4) (forall ((already_asked1 Int)) (=> (= already_asked1 o4) (forall ((spark__branch Bool) (rank1 Int)) (=> (forall ((result__1 (Array Int group1_id)) (g12 Int)) (is_preferred_1__function_guard (is_preferred_1 g12 (to_rep (select result__1 (to_rep2 (select (select ranking_1 g12) (- 1))))) (select ranking_2 (to_rep2 (select (select ranking_1 g12) (- 1))))) g12 (to_rep (select result__1 (to_rep2 (select (select ranking_1 g12) (- 1))))) (select ranking_2 (to_rep2 (select (select ranking_1 g12) (- 1)))))) (=> (and (= spark__branch (ite (= already_asked1 0) false true)) (ite (= spark__branch true) (and (let ((o5 (+ already_asked1 1))) (and (in_range2 o5)))) (= rank1 rank))) (forall ((o5 Int)) (=> (= (to_rep2 (select (select ranking_1 g11) rank1)) o5) (forall ((g21 Int)) (=> (= g21 o5) (forall ((o6 Int)) (=> (= (to_rep3 (select proposals_made g11)) o6) (let ((o7 (+ o6 1))) (=> (in_range4 o7) (forall ((o8 count)) (=> (= (to_rep3 o8) o7) (forall ((proposals_made1 (Array Int count))) (=> (= proposals_made1 (store proposals_made g11 o8)) (forall ((spark__branch1 Bool) (unmatched_g1_set__split_fields2 us_split_fields) (unmatched_g2_set1 (Array Int Bool))) (=> (forall ((result__1 (Array Int group1_id)) (g12 Int) (g22 Int)) (is_preferred_1__function_guard (is_preferred_1 g12 (to_rep (select result__1 g22)) (select ranking_2 g22)) g12 (to_rep (select result__1 g22)) (select ranking_2 g22))) (=> (exists ((spark__branch2 Bool)) (and (ite (= spark__branch2 true) (and (= unmatched_g1_set__split_fields2 unmatched_g1_set__split_fields1)) (and (exists ((o9 Int)) (and (exists ((o10 Int)) (and (exists ((o11 Int)) (and (and (ite (= spark__branch1 true) (and (exists ((stable_marriage__matching__make_one_proposal__C129b__assume Int)) (and (and (and (exists ((o12 Int)) (and (= (to_rep3 (rec__stable_marriage__matching__group1_set__cardinality unmatched_g1_set__split_fields1)) o12) (let ((o13 (+ o12 1))) (and (exists ((o14 count)) (and (= (to_rep3 o14) o13) (exists ((unmatched_g1_set__split_fields3 us_split_fields)) (and (= unmatched_g1_set__split_fields3 (us_split_fieldsqtmk (rec__stable_marriage__matching__group1_set__elements unmatched_g1_set__split_fields1) o14)) (exists ((o15 group1_id)) (and (exists ((temp___773 Int)) (and (= (to_rep3 (rec__stable_marriage__matching__group1_set__cardinality unmatched_g1_set__split_fields3)) temp___773) (and (and (= unmatched_g1_set__split_fields2 (us_split_fieldsqtmk (store (rec__stable_marriage__matching__group1_set__elements unmatched_g1_set__split_fields3) temp___773 o15) (rec__stable_marriage__matching__group1_set__cardinality unmatched_g1_set__split_fields3)))))))))))))))))))))) (and (and (and (exists ((o12 Int)) (and (= (to_rep3 (rec__stable_marriage__matching__group1_set__cardinality unmatched_g1_set__split_fields1)) o12) (let ((o13 (+ o12 1))) (and (exists ((o14 count)) (and (= (to_rep3 o14) o13) (exists ((unmatched_g1_set__split_fields3 us_split_fields)) (and (= unmatched_g1_set__split_fields3 (us_split_fieldsqtmk (rec__stable_marriage__matching__group1_set__elements unmatched_g1_set__split_fields1) o14)) (exists ((o15 group1_id)) (and (exists ((temp___767 Int)) (and (= (to_rep3 (rec__stable_marriage__matching__group1_set__cardinality unmatched_g1_set__split_fields3)) temp___767) (and (= unmatched_g1_set__split_fields2 (us_split_fieldsqtmk (store (rec__stable_marriage__matching__group1_set__elements unmatched_g1_set__split_fields3) temp___767 o15) (rec__stable_marriage__matching__group1_set__cardinality unmatched_g1_set__split_fields3))))))))))))))))))))))))))))))) (forall ((result__1 (Array Int group1_id))) (=> (exists ((spark__branch2 Bool)) (and (ite (= spark__branch2 true) (exists ((o9 group1_id)) (and (= result__1 (store result__ g21 o9)))) (= result__1 result__)))) (=> (forall ((unmatched_g1_set__split_fields3 us_split_fields)) (all_unmatched_g1_set_elements_distinct__function_guard (all_unmatched_g1_set_elements_distinct unmatched_g1_set__split_fields3) unmatched_g1_set__split_fields3)) (=> (= (all_unmatched_g1_set_elements_distinct unmatched_g1_set__split_fields2) true) (=> (forall ((g21_id Int)) (=> (and (<= g21_id 64)) (forall ((g22_id Int)) (=> (and (<= g22_id 64)) (=> (and (not (= g21_id g22_id))) (not (= (to_rep (select result__1 g21_id)) (to_rep (select result__1 g22_id))))))))) (=> (forall ((g2_id Int)) (=> (and (<= g2_id 64)) (=> (not (= (select unmatched_g2_set1 g2_id) true)) (forall ((idx Int)) (=> (and (<= idx (to_rep3 (rec__stable_marriage__matching__group1_set__cardinality unmatched_g1_set__split_fields2)))) (not (= (to_rep (select (rec__stable_marriage__matching__group1_set__elements unmatched_g1_set__split_fields2) idx)) (to_rep (select result__1 g2_id))))))))) (=> (forall ((result__2 (Array Int group1_id)) (g1_id Int) (rank2 Int)) (is_preferred_1__function_guard (is_preferred_1 g1_id (to_rep (select result__2 (to_rep2 (select (select ranking_1 g1_id) rank2)))) (select ranking_2 (to_rep2 (select (select ranking_1 g1_id) rank2)))) g1_id (to_rep (select result__2 (to_rep2 (select (select ranking_1 g1_id) rank2)))) (select ranking_2 (to_rep2 (select (select ranking_1 g1_id) rank2))))) (=> (forall ((g1_id Int)) (=> (and (<= g1_id 64)) (forall ((rank2 Int)) (=> (and (<= rank2 (to_rep3 (select proposals_made1 g1_id)))) (and (=> (not (= (to_rep (select result__1 (to_rep2 (select (select ranking_1 g1_id) rank2)))) g1_id)) (not (= (is_preferred_1 g1_id (to_rep (select result__1 (to_rep2 (select (select ranking_1 g1_id) rank2)))) (select ranking_2 (to_rep2 (select (select ranking_1 g1_id) rank2)))) true)))))))) (forall ((g1_id Int)) (=> (and (<= g1_id 64)) (=> (= (to_rep3 (select proposals_made1 g1_id)) 0) (exists ((idx Int)) (and (= (to_rep (select (rec__stable_marriage__matching__group1_set__elements unmatched_g1_set__split_fields2) idx)) g1_id)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) (check-sat)