YES
0 QTRS
↳1 QTRSRRRProof (⇔, 79 ms)
↳2 QTRS
↳3 QTRSRRRProof (⇔, 0 ms)
↳4 QTRS
↳5 RisEmptyProof (⇔, 0 ms)
↳6 YES
a(h, h, h, x) → s(x)
a(l, x, s(y), h) → a(l, x, y, s(h))
a(l, x, s(y), s(z)) → a(l, x, y, a(l, x, s(y), z))
a(l, s(x), h, z) → a(l, x, z, z)
a(s(l), h, h, z) → a(l, z, h, z)
+(x, h) → x
+(h, x) → x
+(s(x), s(y)) → s(s(+(x, y)))
+(+(x, y), z) → +(x, +(y, z))
s(h) → 1
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h, h), l))
+2 > [s1, 1]
app2 > cons2 > h > a4 > [s1, 1]
app2 > cons2 > nil > [s1, 1]
a4: [1,2,3,4]
h: multiset
s1: [1]
+2: [1,2]
1: multiset
app2: multiset
nil: multiset
cons2: [2,1]
a(h, h, h, x) → s(x)
a(l, x, s(y), h) → a(l, x, y, s(h))
a(l, x, s(y), s(z)) → a(l, x, y, a(l, x, s(y), z))
a(l, s(x), h, z) → a(l, x, z, z)
a(s(l), h, h, z) → a(l, z, h, z)
+(x, h) → x
+(h, x) → x
+(s(x), s(y)) → s(s(+(x, y)))
+(+(x, y), z) → +(x, +(y, z))
s(h) → 1
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h, h), l))
sum(cons(x, nil)) → cons(x, nil)
sum1 > nil > cons2
nil=1
sum_1=0
cons_2=0
sum(cons(x, nil)) → cons(x, nil)