; @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)) :var ((m Int) (n Int) (count Int)))
(rule (u m n count) (u (+ m 1) n (+ count m)) :guard (<= m n) :var ((m Int) (n Int) (count Int)))
(rule (sum2 m n) (u m n 0) :var ((m Int) (n Int)))