(0) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
app(app(app(sort, f), g), nil) → nil
app(app(app(sort, f), g), app(app(cons, x), y)) → app(app(app(app(insert, f), g), app(app(app(sort, f), g), y)), x)
app(app(app(app(insert, f), g), nil), y) → app(app(cons, y), nil)
app(app(app(app(insert, f), g), app(app(cons, x), z)), y) → app(app(cons, app(app(f, x), y)), app(app(app(app(insert, f), g), z), app(app(g, x), y)))
app(app(max, 0), y) → y
app(app(max, x), 0) → x
app(app(max, app(s, x)), app(s, y)) → app(app(max, x), y)
app(app(min, 0), y) → 0
app(app(min, x), 0) → 0
app(app(min, app(s, x)), app(s, y)) → app(app(min, x), y)
app(asort, z) → app(app(app(sort, min), max), z)
app(dsort, z) → app(app(app(sort, max), min), z)
Q is empty.
(1) Overlay + Local Confluence (EQUIVALENT transformation)
The TRS is overlay and locally confluent. By [NOC] we can switch to innermost.
(2) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
app(app(app(sort, f), g), nil) → nil
app(app(app(sort, f), g), app(app(cons, x), y)) → app(app(app(app(insert, f), g), app(app(app(sort, f), g), y)), x)
app(app(app(app(insert, f), g), nil), y) → app(app(cons, y), nil)
app(app(app(app(insert, f), g), app(app(cons, x), z)), y) → app(app(cons, app(app(f, x), y)), app(app(app(app(insert, f), g), z), app(app(g, x), y)))
app(app(max, 0), y) → y
app(app(max, x), 0) → x
app(app(max, app(s, x)), app(s, y)) → app(app(max, x), y)
app(app(min, 0), y) → 0
app(app(min, x), 0) → 0
app(app(min, app(s, x)), app(s, y)) → app(app(min, x), y)
app(asort, z) → app(app(app(sort, min), max), z)
app(dsort, z) → app(app(app(sort, max), min), z)
The set Q consists of the following terms:
app(app(app(sort, x0), x1), nil)
app(app(app(sort, x0), x1), app(app(cons, x2), x3))
app(app(app(app(insert, x0), x1), nil), x2)
app(app(app(app(insert, x0), x1), app(app(cons, x2), x3)), x4)
app(app(max, 0), x0)
app(app(max, x0), 0)
app(app(max, app(s, x0)), app(s, x1))
app(app(min, 0), x0)
app(app(min, x0), 0)
app(app(min, app(s, x0)), app(s, x1))
app(asort, x0)
app(dsort, x0)
(3) DependencyPairsProof (EQUIVALENT transformation)
Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.
(4) Obligation:
Q DP problem:
The TRS P consists of the following rules:
APP(app(app(sort, f), g), app(app(cons, x), y)) → APP(app(app(app(insert, f), g), app(app(app(sort, f), g), y)), x)
APP(app(app(sort, f), g), app(app(cons, x), y)) → APP(app(app(insert, f), g), app(app(app(sort, f), g), y))
APP(app(app(sort, f), g), app(app(cons, x), y)) → APP(app(insert, f), g)
APP(app(app(sort, f), g), app(app(cons, x), y)) → APP(insert, f)
APP(app(app(sort, f), g), app(app(cons, x), y)) → APP(app(app(sort, f), g), y)
APP(app(app(app(insert, f), g), nil), y) → APP(app(cons, y), nil)
APP(app(app(app(insert, f), g), nil), y) → APP(cons, y)
APP(app(app(app(insert, f), g), app(app(cons, x), z)), y) → APP(app(cons, app(app(f, x), y)), app(app(app(app(insert, f), g), z), app(app(g, x), y)))
APP(app(app(app(insert, f), g), app(app(cons, x), z)), y) → APP(cons, app(app(f, x), y))
APP(app(app(app(insert, f), g), app(app(cons, x), z)), y) → APP(app(f, x), y)
APP(app(app(app(insert, f), g), app(app(cons, x), z)), y) → APP(f, x)
APP(app(app(app(insert, f), g), app(app(cons, x), z)), y) → APP(app(app(app(insert, f), g), z), app(app(g, x), y))
APP(app(app(app(insert, f), g), app(app(cons, x), z)), y) → APP(app(app(insert, f), g), z)
APP(app(app(app(insert, f), g), app(app(cons, x), z)), y) → APP(app(g, x), y)
APP(app(app(app(insert, f), g), app(app(cons, x), z)), y) → APP(g, x)
APP(app(max, app(s, x)), app(s, y)) → APP(app(max, x), y)
APP(app(max, app(s, x)), app(s, y)) → APP(max, x)
APP(app(min, app(s, x)), app(s, y)) → APP(app(min, x), y)
APP(app(min, app(s, x)), app(s, y)) → APP(min, x)
APP(asort, z) → APP(app(app(sort, min), max), z)
APP(asort, z) → APP(app(sort, min), max)
APP(asort, z) → APP(sort, min)
APP(dsort, z) → APP(app(app(sort, max), min), z)
APP(dsort, z) → APP(app(sort, max), min)
APP(dsort, z) → APP(sort, max)
The TRS R consists of the following rules:
app(app(app(sort, f), g), nil) → nil
app(app(app(sort, f), g), app(app(cons, x), y)) → app(app(app(app(insert, f), g), app(app(app(sort, f), g), y)), x)
app(app(app(app(insert, f), g), nil), y) → app(app(cons, y), nil)
app(app(app(app(insert, f), g), app(app(cons, x), z)), y) → app(app(cons, app(app(f, x), y)), app(app(app(app(insert, f), g), z), app(app(g, x), y)))
app(app(max, 0), y) → y
app(app(max, x), 0) → x
app(app(max, app(s, x)), app(s, y)) → app(app(max, x), y)
app(app(min, 0), y) → 0
app(app(min, x), 0) → 0
app(app(min, app(s, x)), app(s, y)) → app(app(min, x), y)
app(asort, z) → app(app(app(sort, min), max), z)
app(dsort, z) → app(app(app(sort, max), min), z)
The set Q consists of the following terms:
app(app(app(sort, x0), x1), nil)
app(app(app(sort, x0), x1), app(app(cons, x2), x3))
app(app(app(app(insert, x0), x1), nil), x2)
app(app(app(app(insert, x0), x1), app(app(cons, x2), x3)), x4)
app(app(max, 0), x0)
app(app(max, x0), 0)
app(app(max, app(s, x0)), app(s, x1))
app(app(min, 0), x0)
app(app(min, x0), 0)
app(app(min, app(s, x0)), app(s, x1))
app(asort, x0)
app(dsort, x0)
We have to consider all minimal (P,Q,R)-chains.
(5) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 3 SCCs with 14 less nodes.
(6) Complex Obligation (AND)
(7) Obligation:
Q DP problem:
The TRS P consists of the following rules:
APP(app(min, app(s, x)), app(s, y)) → APP(app(min, x), y)
The TRS R consists of the following rules:
app(app(app(sort, f), g), nil) → nil
app(app(app(sort, f), g), app(app(cons, x), y)) → app(app(app(app(insert, f), g), app(app(app(sort, f), g), y)), x)
app(app(app(app(insert, f), g), nil), y) → app(app(cons, y), nil)
app(app(app(app(insert, f), g), app(app(cons, x), z)), y) → app(app(cons, app(app(f, x), y)), app(app(app(app(insert, f), g), z), app(app(g, x), y)))
app(app(max, 0), y) → y
app(app(max, x), 0) → x
app(app(max, app(s, x)), app(s, y)) → app(app(max, x), y)
app(app(min, 0), y) → 0
app(app(min, x), 0) → 0
app(app(min, app(s, x)), app(s, y)) → app(app(min, x), y)
app(asort, z) → app(app(app(sort, min), max), z)
app(dsort, z) → app(app(app(sort, max), min), z)
The set Q consists of the following terms:
app(app(app(sort, x0), x1), nil)
app(app(app(sort, x0), x1), app(app(cons, x2), x3))
app(app(app(app(insert, x0), x1), nil), x2)
app(app(app(app(insert, x0), x1), app(app(cons, x2), x3)), x4)
app(app(max, 0), x0)
app(app(max, x0), 0)
app(app(max, app(s, x0)), app(s, x1))
app(app(min, 0), x0)
app(app(min, x0), 0)
app(app(min, app(s, x0)), app(s, x1))
app(asort, x0)
app(dsort, x0)
We have to consider all minimal (P,Q,R)-chains.
(8) Obligation:
Q DP problem:
The TRS P consists of the following rules:
APP(app(max, app(s, x)), app(s, y)) → APP(app(max, x), y)
The TRS R consists of the following rules:
app(app(app(sort, f), g), nil) → nil
app(app(app(sort, f), g), app(app(cons, x), y)) → app(app(app(app(insert, f), g), app(app(app(sort, f), g), y)), x)
app(app(app(app(insert, f), g), nil), y) → app(app(cons, y), nil)
app(app(app(app(insert, f), g), app(app(cons, x), z)), y) → app(app(cons, app(app(f, x), y)), app(app(app(app(insert, f), g), z), app(app(g, x), y)))
app(app(max, 0), y) → y
app(app(max, x), 0) → x
app(app(max, app(s, x)), app(s, y)) → app(app(max, x), y)
app(app(min, 0), y) → 0
app(app(min, x), 0) → 0
app(app(min, app(s, x)), app(s, y)) → app(app(min, x), y)
app(asort, z) → app(app(app(sort, min), max), z)
app(dsort, z) → app(app(app(sort, max), min), z)
The set Q consists of the following terms:
app(app(app(sort, x0), x1), nil)
app(app(app(sort, x0), x1), app(app(cons, x2), x3))
app(app(app(app(insert, x0), x1), nil), x2)
app(app(app(app(insert, x0), x1), app(app(cons, x2), x3)), x4)
app(app(max, 0), x0)
app(app(max, x0), 0)
app(app(max, app(s, x0)), app(s, x1))
app(app(min, 0), x0)
app(app(min, x0), 0)
app(app(min, app(s, x0)), app(s, x1))
app(asort, x0)
app(dsort, x0)
We have to consider all minimal (P,Q,R)-chains.
(9) Obligation:
Q DP problem:
The TRS P consists of the following rules:
APP(app(app(app(insert, f), g), app(app(cons, x), z)), y) → APP(app(f, x), y)
APP(app(app(sort, f), g), app(app(cons, x), y)) → APP(app(app(app(insert, f), g), app(app(app(sort, f), g), y)), x)
APP(app(app(app(insert, f), g), app(app(cons, x), z)), y) → APP(f, x)
APP(app(app(sort, f), g), app(app(cons, x), y)) → APP(app(app(sort, f), g), y)
APP(app(app(app(insert, f), g), app(app(cons, x), z)), y) → APP(app(app(app(insert, f), g), z), app(app(g, x), y))
APP(app(app(app(insert, f), g), app(app(cons, x), z)), y) → APP(app(g, x), y)
APP(app(app(app(insert, f), g), app(app(cons, x), z)), y) → APP(g, x)
APP(asort, z) → APP(app(app(sort, min), max), z)
APP(dsort, z) → APP(app(app(sort, max), min), z)
The TRS R consists of the following rules:
app(app(app(sort, f), g), nil) → nil
app(app(app(sort, f), g), app(app(cons, x), y)) → app(app(app(app(insert, f), g), app(app(app(sort, f), g), y)), x)
app(app(app(app(insert, f), g), nil), y) → app(app(cons, y), nil)
app(app(app(app(insert, f), g), app(app(cons, x), z)), y) → app(app(cons, app(app(f, x), y)), app(app(app(app(insert, f), g), z), app(app(g, x), y)))
app(app(max, 0), y) → y
app(app(max, x), 0) → x
app(app(max, app(s, x)), app(s, y)) → app(app(max, x), y)
app(app(min, 0), y) → 0
app(app(min, x), 0) → 0
app(app(min, app(s, x)), app(s, y)) → app(app(min, x), y)
app(asort, z) → app(app(app(sort, min), max), z)
app(dsort, z) → app(app(app(sort, max), min), z)
The set Q consists of the following terms:
app(app(app(sort, x0), x1), nil)
app(app(app(sort, x0), x1), app(app(cons, x2), x3))
app(app(app(app(insert, x0), x1), nil), x2)
app(app(app(app(insert, x0), x1), app(app(cons, x2), x3)), x4)
app(app(max, 0), x0)
app(app(max, x0), 0)
app(app(max, app(s, x0)), app(s, x1))
app(app(min, 0), x0)
app(app(min, x0), 0)
app(app(min, app(s, x0)), app(s, x1))
app(asort, x0)
app(dsort, x0)
We have to consider all minimal (P,Q,R)-chains.