; @author Jonas Schöpf
; Ctrl example from examples/student/sumfrom05.ctrs
(format LCTRS :smtlib 2.6)

(theory Ints)

(sort Unit)

(fun u (-> Int Int Int Unit))
(fun return (-> Int Unit))
(fun sum2 (-> Int Int Unit))

(rule (u m n count) (return count) :guard (not (<= m n)))
(rule (u m n count) (u (+ m 1) n (+ count m)) :guard (<= m n))
(rule (sum2 m n) (u m n 0))
