Skip to content

Commit

Permalink
Add emptylist
Browse files Browse the repository at this point in the history
  • Loading branch information
ajreynol committed Feb 2, 2024
1 parent e32a2a2 commit 57b34b6
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tests/emptylist.smt3
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
(declare-const a Bool)
(declare-const b Bool)
(declare-const = (-> (! Type :var T :implicit) T T Bool))
(declare-const or (-> Bool Bool Bool) :right-assoc-nil false)
(declare-const and (-> Bool Bool Bool) :right-assoc-nil true)


(program mk_nary_cong_lhs ((U Type) (f (-> U U)) (t1 U) (t2 U) (s1 U) (s2 U) (tail Bool :list))
((-> U U) Bool) Bool
(
((mk_nary_cong_lhs f (and (= s1 s2) tail)) (f s1 (mk_nary_cong_lhs f tail)))
((mk_nary_cong_lhs f true) (alf.emptylist f))
)
)
(program mk_nary_cong_rhs ((U Type) (f (-> U U)) (t1 U) (t2 U) (s1 U) (s2 U) (tail Bool :list))
((-> U U) Bool) Bool
(
((mk_nary_cong_rhs f (and (= s1 s2) tail)) (f s2 (mk_nary_cong_rhs f tail)))
((mk_nary_cong_rhs f true) (alf.emptylist f))
)
)

(declare-rule nary_cong ((U Type) (E Bool) (f (-> U U)) (nil U))
:premise-list E and
:args (f)
:conclusion (= (mk_nary_cong_lhs f E) (mk_nary_cong_rhs f E))
)

(assume @p0 (= a b))

(step @p1 (= (or a a a) (or b b b)) :rule nary_cong :premises (@p0 @p0 @p0) :args (or))

0 comments on commit 57b34b6

Please sign in to comment.