R
↳Dependency Pair Analysis
REV1(X, cons(Y, L)) -> REV1(Y, L)
REV(cons(X, L)) -> REV1(X, L)
REV(cons(X, L)) -> REV2(X, L)
REV2(X, cons(Y, L)) -> REV(cons(X, rev(rev2(Y, L))))
REV2(X, cons(Y, L)) -> REV(rev2(Y, L))
REV2(X, cons(Y, L)) -> REV2(Y, L)
R
↳DPs
→DP Problem 1
↳Polynomial Ordering
→DP Problem 2
↳Nar
REV1(X, cons(Y, L)) -> REV1(Y, L)
rev1(0, nil) -> 0
rev1(s(X), nil) -> s(X)
rev1(X, cons(Y, L)) -> rev1(Y, L)
rev(nil) -> nil
rev(cons(X, L)) -> cons(rev1(X, L), rev2(X, L))
rev2(X, nil) -> nil
rev2(X, cons(Y, L)) -> rev(cons(X, rev(rev2(Y, L))))
REV1(X, cons(Y, L)) -> REV1(Y, L)
POL(REV1(x1, x2)) = x2 POL(cons(x1, x2)) = 1 + x2
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 3
↳Dependency Graph
→DP Problem 2
↳Nar
rev1(0, nil) -> 0
rev1(s(X), nil) -> s(X)
rev1(X, cons(Y, L)) -> rev1(Y, L)
rev(nil) -> nil
rev(cons(X, L)) -> cons(rev1(X, L), rev2(X, L))
rev2(X, nil) -> nil
rev2(X, cons(Y, L)) -> rev(cons(X, rev(rev2(Y, L))))
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Narrowing Transformation
REV2(X, cons(Y, L)) -> REV2(Y, L)
REV2(X, cons(Y, L)) -> REV(rev2(Y, L))
REV2(X, cons(Y, L)) -> REV(cons(X, rev(rev2(Y, L))))
REV(cons(X, L)) -> REV2(X, L)
rev1(0, nil) -> 0
rev1(s(X), nil) -> s(X)
rev1(X, cons(Y, L)) -> rev1(Y, L)
rev(nil) -> nil
rev(cons(X, L)) -> cons(rev1(X, L), rev2(X, L))
rev2(X, nil) -> nil
rev2(X, cons(Y, L)) -> rev(cons(X, rev(rev2(Y, L))))
two new Dependency Pairs are created:
REV2(X, cons(Y, L)) -> REV(rev2(Y, L))
REV2(X, cons(Y', nil)) -> REV(nil)
REV2(X, cons(Y0, cons(Y'', L''))) -> REV(rev(cons(Y0, rev(rev2(Y'', L'')))))
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Nar
→DP Problem 4
↳Narrowing Transformation
REV2(X, cons(Y0, cons(Y'', L''))) -> REV(rev(cons(Y0, rev(rev2(Y'', L'')))))
REV(cons(X, L)) -> REV2(X, L)
REV2(X, cons(Y, L)) -> REV(cons(X, rev(rev2(Y, L))))
REV2(X, cons(Y, L)) -> REV2(Y, L)
rev1(0, nil) -> 0
rev1(s(X), nil) -> s(X)
rev1(X, cons(Y, L)) -> rev1(Y, L)
rev(nil) -> nil
rev(cons(X, L)) -> cons(rev1(X, L), rev2(X, L))
rev2(X, nil) -> nil
rev2(X, cons(Y, L)) -> rev(cons(X, rev(rev2(Y, L))))
three new Dependency Pairs are created:
REV2(X, cons(Y0, cons(Y'', L''))) -> REV(rev(cons(Y0, rev(rev2(Y'', L'')))))
REV2(X, cons(Y0', cons(Y''', L'''))) -> REV(cons(rev1(Y0', rev(rev2(Y''', L'''))), rev2(Y0', rev(rev2(Y''', L''')))))
REV2(X, cons(Y0, cons(Y''', nil))) -> REV(rev(cons(Y0, rev(nil))))
REV2(X, cons(Y0, cons(Y''', cons(Y', L')))) -> REV(rev(cons(Y0, rev(rev(cons(Y''', rev(rev2(Y', L'))))))))
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Nar
→DP Problem 4
↳Nar
...
→DP Problem 5
↳Polynomial Ordering
REV2(X, cons(Y0, cons(Y''', cons(Y', L')))) -> REV(rev(cons(Y0, rev(rev(cons(Y''', rev(rev2(Y', L'))))))))
REV2(X, cons(Y0, cons(Y''', nil))) -> REV(rev(cons(Y0, rev(nil))))
REV2(X, cons(Y0', cons(Y''', L'''))) -> REV(cons(rev1(Y0', rev(rev2(Y''', L'''))), rev2(Y0', rev(rev2(Y''', L''')))))
REV2(X, cons(Y, L)) -> REV2(Y, L)
REV2(X, cons(Y, L)) -> REV(cons(X, rev(rev2(Y, L))))
REV(cons(X, L)) -> REV2(X, L)
rev1(0, nil) -> 0
rev1(s(X), nil) -> s(X)
rev1(X, cons(Y, L)) -> rev1(Y, L)
rev(nil) -> nil
rev(cons(X, L)) -> cons(rev1(X, L), rev2(X, L))
rev2(X, nil) -> nil
rev2(X, cons(Y, L)) -> rev(cons(X, rev(rev2(Y, L))))
REV2(X, cons(Y0, cons(Y''', cons(Y', L')))) -> REV(rev(cons(Y0, rev(rev(cons(Y''', rev(rev2(Y', L'))))))))
REV2(X, cons(Y0, cons(Y''', nil))) -> REV(rev(cons(Y0, rev(nil))))
REV2(X, cons(Y0', cons(Y''', L'''))) -> REV(cons(rev1(Y0', rev(rev2(Y''', L'''))), rev2(Y0', rev(rev2(Y''', L''')))))
REV2(X, cons(Y, L)) -> REV2(Y, L)
REV(cons(X, L)) -> REV2(X, L)
rev2(X, nil) -> nil
rev2(X, cons(Y, L)) -> rev(cons(X, rev(rev2(Y, L))))
rev(nil) -> nil
rev(cons(X, L)) -> cons(rev1(X, L), rev2(X, L))
POL(rev2(x1, x2)) = x2 POL(rev(x1)) = x1 POL(0) = 0 POL(REV(x1)) = x1 POL(cons(x1, x2)) = 1 + x2 POL(rev1(x1, x2)) = 0 POL(REV2(x1, x2)) = x2 POL(nil) = 0 POL(s(x1)) = 0
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Nar
→DP Problem 4
↳Nar
...
→DP Problem 6
↳Dependency Graph
REV2(X, cons(Y, L)) -> REV(cons(X, rev(rev2(Y, L))))
rev1(0, nil) -> 0
rev1(s(X), nil) -> s(X)
rev1(X, cons(Y, L)) -> rev1(Y, L)
rev(nil) -> nil
rev(cons(X, L)) -> cons(rev1(X, L), rev2(X, L))
rev2(X, nil) -> nil
rev2(X, cons(Y, L)) -> rev(cons(X, rev(rev2(Y, L))))