YES Termination w.r.t. Q proof of Secret_07_TRS_secret4.ari

(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

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))

Q is empty.

(1) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Combined order from the following AFS and order.
a(x1, x2, x3, x4)  =  a(x1, x2, x3, x4)
h  =  h
s(x1)  =  s(x1)
+(x1, x2)  =  +(x1, x2)
1  =  1
app(x1, x2)  =  app(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
sum(x1)  =  x1

Recursive path order with status [RPO].
Quasi-Precedence:
+2 > [s1, 1]
app2 > cons2 > h > a4 > [s1, 1]
app2 > cons2 > nil > [s1, 1]

Status:
a4: [1,2,3,4]
h: multiset
s1: [1]
+2: [1,2]
1: multiset
app2: multiset
nil: multiset
cons2: [2,1]

With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

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))


(2) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

sum(cons(x, nil)) → cons(x, nil)

Q is empty.

(3) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Knuth-Bendix order [KBO] with precedence:
sum1 > nil > cons2

and weight map:

nil=1
sum_1=0
cons_2=0

The variable weight is 1With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

sum(cons(x, nil)) → cons(x, nil)


(4) Obligation:

Q restricted rewrite system:
R is empty.
Q is empty.

(5) RisEmptyProof (EQUIVALENT transformation)

The TRS R is empty. Hence, termination is trivially proven.

(6) YES