(0) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
#abs(#0) → #0
#abs(#neg(@x)) → #pos(@x)
#abs(#pos(@x)) → #pos(@x)
#abs(#s(@x)) → #pos(#s(@x))
#less(@x, @y) → #cklt(#compare(@x, @y))
insert(@x, @l) → insert#1(@l, @x)
insert#1(::(@y, @ys), @x) → insert#2(#less(@y, @x), @x, @y, @ys)
insert#1(nil, @x) → ::(@x, nil)
insert#2(#false, @x, @y, @ys) → ::(@x, ::(@y, @ys))
insert#2(#true, @x, @y, @ys) → ::(@y, insert(@x, @ys))
insertD(@x, @l) → insertD#1(@l, @x)
insertD#1(::(@y, @ys), @x) → insertD#2(#less(@y, @x), @x, @y, @ys)
insertD#1(nil, @x) → ::(@x, nil)
insertD#2(#false, @x, @y, @ys) → ::(@x, ::(@y, @ys))
insertD#2(#true, @x, @y, @ys) → ::(@y, insertD(@x, @ys))
insertionsort(@l) → insertionsort#1(@l)
insertionsort#1(::(@x, @xs)) → insert(@x, insertionsort(@xs))
insertionsort#1(nil) → nil
insertionsortD(@l) → insertionsortD#1(@l)
insertionsortD#1(::(@x, @xs)) → insertD(@x, insertionsortD(@xs))
insertionsortD#1(nil) → nil
testInsertionsort(@x) → insertionsort(testList(#unit))
testInsertionsortD(@x) → insertionsortD(testList(#unit))
testList(@_) → ::(#abs(#0), ::(#abs(#pos(#s(#s(#s(#s(#0)))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#0))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#s(#0))))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#0))))))))), ::(#abs(#pos(#s(#0))), ::(#abs(#pos(#s(#s(#0)))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#0)))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#0)))))))), ::(#abs(#pos(#s(#s(#s(#0))))), nil))))))))))
The (relative) TRS S consists of the following rules:
#cklt(#EQ) → #false
#cklt(#GT) → #false
#cklt(#LT) → #true
#compare(#0, #0) → #EQ
#compare(#0, #neg(@y)) → #GT
#compare(#0, #pos(@y)) → #LT
#compare(#0, #s(@y)) → #LT
#compare(#neg(@x), #0) → #LT
#compare(#neg(@x), #neg(@y)) → #compare(@y, @x)
#compare(#neg(@x), #pos(@y)) → #LT
#compare(#pos(@x), #0) → #GT
#compare(#pos(@x), #neg(@y)) → #GT
#compare(#pos(@x), #pos(@y)) → #compare(@x, @y)
#compare(#s(@x), #0) → #GT
#compare(#s(@x), #s(@y)) → #compare(@x, @y)
Rewrite Strategy: INNERMOST
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
insert(#pos(@y5602_3), ::(#0, @ys5355_3)) →+ ::(#0, insert(#pos(@y5602_3), @ys5355_3))
gives rise to a decreasing loop by considering the right hand sides subterm at position [1].
The pumping substitution is [@ys5355_3 / ::(#0, @ys5355_3)].
The result substitution is [ ].
(2) BOUNDS(n^1, INF)
(3) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
#abs(#0) → #0
#abs(#neg(@x)) → #pos(@x)
#abs(#pos(@x)) → #pos(@x)
#abs(#s(@x)) → #pos(#s(@x))
#less(@x, @y) → #cklt(#compare(@x, @y))
insert(@x, @l) → insert#1(@l, @x)
insert#1(::(@y, @ys), @x) → insert#2(#less(@y, @x), @x, @y, @ys)
insert#1(nil, @x) → ::(@x, nil)
insert#2(#false, @x, @y, @ys) → ::(@x, ::(@y, @ys))
insert#2(#true, @x, @y, @ys) → ::(@y, insert(@x, @ys))
insertD(@x, @l) → insertD#1(@l, @x)
insertD#1(::(@y, @ys), @x) → insertD#2(#less(@y, @x), @x, @y, @ys)
insertD#1(nil, @x) → ::(@x, nil)
insertD#2(#false, @x, @y, @ys) → ::(@x, ::(@y, @ys))
insertD#2(#true, @x, @y, @ys) → ::(@y, insertD(@x, @ys))
insertionsort(@l) → insertionsort#1(@l)
insertionsort#1(::(@x, @xs)) → insert(@x, insertionsort(@xs))
insertionsort#1(nil) → nil
insertionsortD(@l) → insertionsortD#1(@l)
insertionsortD#1(::(@x, @xs)) → insertD(@x, insertionsortD(@xs))
insertionsortD#1(nil) → nil
testInsertionsort(@x) → insertionsort(testList(#unit))
testInsertionsortD(@x) → insertionsortD(testList(#unit))
testList(@_) → ::(#abs(#0), ::(#abs(#pos(#s(#s(#s(#s(#0)))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#0))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#s(#0))))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#0))))))))), ::(#abs(#pos(#s(#0))), ::(#abs(#pos(#s(#s(#0)))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#0)))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#0)))))))), ::(#abs(#pos(#s(#s(#s(#0))))), nil))))))))))
The (relative) TRS S consists of the following rules:
#cklt(#EQ) → #false
#cklt(#GT) → #false
#cklt(#LT) → #true
#compare(#0, #0) → #EQ
#compare(#0, #neg(@y)) → #GT
#compare(#0, #pos(@y)) → #LT
#compare(#0, #s(@y)) → #LT
#compare(#neg(@x), #0) → #LT
#compare(#neg(@x), #neg(@y)) → #compare(@y, @x)
#compare(#neg(@x), #pos(@y)) → #LT
#compare(#pos(@x), #0) → #GT
#compare(#pos(@x), #neg(@y)) → #GT
#compare(#pos(@x), #pos(@y)) → #compare(@x, @y)
#compare(#s(@x), #0) → #GT
#compare(#s(@x), #s(@y)) → #compare(@x, @y)
Rewrite Strategy: INNERMOST
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
Innermost TRS:
Rules:
#abs(#0) → #0
#abs(#neg(@x)) → #pos(@x)
#abs(#pos(@x)) → #pos(@x)
#abs(#s(@x)) → #pos(#s(@x))
#less(@x, @y) → #cklt(#compare(@x, @y))
insert(@x, @l) → insert#1(@l, @x)
insert#1(::(@y, @ys), @x) → insert#2(#less(@y, @x), @x, @y, @ys)
insert#1(nil, @x) → ::(@x, nil)
insert#2(#false, @x, @y, @ys) → ::(@x, ::(@y, @ys))
insert#2(#true, @x, @y, @ys) → ::(@y, insert(@x, @ys))
insertD(@x, @l) → insertD#1(@l, @x)
insertD#1(::(@y, @ys), @x) → insertD#2(#less(@y, @x), @x, @y, @ys)
insertD#1(nil, @x) → ::(@x, nil)
insertD#2(#false, @x, @y, @ys) → ::(@x, ::(@y, @ys))
insertD#2(#true, @x, @y, @ys) → ::(@y, insertD(@x, @ys))
insertionsort(@l) → insertionsort#1(@l)
insertionsort#1(::(@x, @xs)) → insert(@x, insertionsort(@xs))
insertionsort#1(nil) → nil
insertionsortD(@l) → insertionsortD#1(@l)
insertionsortD#1(::(@x, @xs)) → insertD(@x, insertionsortD(@xs))
insertionsortD#1(nil) → nil
testInsertionsort(@x) → insertionsort(testList(#unit))
testInsertionsortD(@x) → insertionsortD(testList(#unit))
testList(@_) → ::(#abs(#0), ::(#abs(#pos(#s(#s(#s(#s(#0)))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#0))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#s(#0))))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#0))))))))), ::(#abs(#pos(#s(#0))), ::(#abs(#pos(#s(#s(#0)))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#0)))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#0)))))))), ::(#abs(#pos(#s(#s(#s(#0))))), nil))))))))))
#cklt(#EQ) → #false
#cklt(#GT) → #false
#cklt(#LT) → #true
#compare(#0, #0) → #EQ
#compare(#0, #neg(@y)) → #GT
#compare(#0, #pos(@y)) → #LT
#compare(#0, #s(@y)) → #LT
#compare(#neg(@x), #0) → #LT
#compare(#neg(@x), #neg(@y)) → #compare(@y, @x)
#compare(#neg(@x), #pos(@y)) → #LT
#compare(#pos(@x), #0) → #GT
#compare(#pos(@x), #neg(@y)) → #GT
#compare(#pos(@x), #pos(@y)) → #compare(@x, @y)
#compare(#s(@x), #0) → #GT
#compare(#s(@x), #s(@y)) → #compare(@x, @y)
Types:
#abs :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#0 :: #0:#neg:#pos:#s
#neg :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#pos :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#s :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#less :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #false:#true
#cklt :: #EQ:#GT:#LT → #false:#true
#compare :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #EQ:#GT:#LT
insert :: #0:#neg:#pos:#s → :::nil → :::nil
insert#1 :: :::nil → #0:#neg:#pos:#s → :::nil
:: :: #0:#neg:#pos:#s → :::nil → :::nil
insert#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
nil :: :::nil
#false :: #false:#true
#true :: #false:#true
insertD :: #0:#neg:#pos:#s → :::nil → :::nil
insertD#1 :: :::nil → #0:#neg:#pos:#s → :::nil
insertD#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
insertionsort :: :::nil → :::nil
insertionsort#1 :: :::nil → :::nil
insertionsortD :: :::nil → :::nil
insertionsortD#1 :: :::nil → :::nil
testInsertionsort :: a → :::nil
testList :: #unit → :::nil
#unit :: #unit
testInsertionsortD :: b → :::nil
#EQ :: #EQ:#GT:#LT
#GT :: #EQ:#GT:#LT
#LT :: #EQ:#GT:#LT
hole_#0:#neg:#pos:#s1_3 :: #0:#neg:#pos:#s
hole_#false:#true2_3 :: #false:#true
hole_#EQ:#GT:#LT3_3 :: #EQ:#GT:#LT
hole_:::nil4_3 :: :::nil
hole_a5_3 :: a
hole_#unit6_3 :: #unit
hole_b7_3 :: b
gen_#0:#neg:#pos:#s8_3 :: Nat → #0:#neg:#pos:#s
gen_:::nil9_3 :: Nat → :::nil
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
#compare,
insert,
insert#1,
insertD,
insertD#1,
insertionsort,
insertionsort#1,
insertionsortD,
insertionsortD#1They will be analysed ascendingly in the following order:
insert = insert#1
insert < insertionsort#1
insertD = insertD#1
insertD < insertionsortD#1
insertionsort = insertionsort#1
insertionsortD = insertionsortD#1
(8) Obligation:
Innermost TRS:
Rules:
#abs(
#0) →
#0#abs(
#neg(
@x)) →
#pos(
@x)
#abs(
#pos(
@x)) →
#pos(
@x)
#abs(
#s(
@x)) →
#pos(
#s(
@x))
#less(
@x,
@y) →
#cklt(
#compare(
@x,
@y))
insert(
@x,
@l) →
insert#1(
@l,
@x)
insert#1(
::(
@y,
@ys),
@x) →
insert#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insert#1(
nil,
@x) →
::(
@x,
nil)
insert#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insert#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insert(
@x,
@ys))
insertD(
@x,
@l) →
insertD#1(
@l,
@x)
insertD#1(
::(
@y,
@ys),
@x) →
insertD#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insertD#1(
nil,
@x) →
::(
@x,
nil)
insertD#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insertD#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insertD(
@x,
@ys))
insertionsort(
@l) →
insertionsort#1(
@l)
insertionsort#1(
::(
@x,
@xs)) →
insert(
@x,
insertionsort(
@xs))
insertionsort#1(
nil) →
nilinsertionsortD(
@l) →
insertionsortD#1(
@l)
insertionsortD#1(
::(
@x,
@xs)) →
insertD(
@x,
insertionsortD(
@xs))
insertionsortD#1(
nil) →
niltestInsertionsort(
@x) →
insertionsort(
testList(
#unit))
testInsertionsortD(
@x) →
insertionsortD(
testList(
#unit))
testList(
@_) →
::(
#abs(
#0),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#0)))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#0))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))),
::(
#abs(
#pos(
#s(
#0))),
::(
#abs(
#pos(
#s(
#s(
#0)))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#0))))),
nil))))))))))
#cklt(
#EQ) →
#false#cklt(
#GT) →
#false#cklt(
#LT) →
#true#compare(
#0,
#0) →
#EQ#compare(
#0,
#neg(
@y)) →
#GT#compare(
#0,
#pos(
@y)) →
#LT#compare(
#0,
#s(
@y)) →
#LT#compare(
#neg(
@x),
#0) →
#LT#compare(
#neg(
@x),
#neg(
@y)) →
#compare(
@y,
@x)
#compare(
#neg(
@x),
#pos(
@y)) →
#LT#compare(
#pos(
@x),
#0) →
#GT#compare(
#pos(
@x),
#neg(
@y)) →
#GT#compare(
#pos(
@x),
#pos(
@y)) →
#compare(
@x,
@y)
#compare(
#s(
@x),
#0) →
#GT#compare(
#s(
@x),
#s(
@y)) →
#compare(
@x,
@y)
Types:
#abs :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#0 :: #0:#neg:#pos:#s
#neg :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#pos :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#s :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#less :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #false:#true
#cklt :: #EQ:#GT:#LT → #false:#true
#compare :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #EQ:#GT:#LT
insert :: #0:#neg:#pos:#s → :::nil → :::nil
insert#1 :: :::nil → #0:#neg:#pos:#s → :::nil
:: :: #0:#neg:#pos:#s → :::nil → :::nil
insert#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
nil :: :::nil
#false :: #false:#true
#true :: #false:#true
insertD :: #0:#neg:#pos:#s → :::nil → :::nil
insertD#1 :: :::nil → #0:#neg:#pos:#s → :::nil
insertD#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
insertionsort :: :::nil → :::nil
insertionsort#1 :: :::nil → :::nil
insertionsortD :: :::nil → :::nil
insertionsortD#1 :: :::nil → :::nil
testInsertionsort :: a → :::nil
testList :: #unit → :::nil
#unit :: #unit
testInsertionsortD :: b → :::nil
#EQ :: #EQ:#GT:#LT
#GT :: #EQ:#GT:#LT
#LT :: #EQ:#GT:#LT
hole_#0:#neg:#pos:#s1_3 :: #0:#neg:#pos:#s
hole_#false:#true2_3 :: #false:#true
hole_#EQ:#GT:#LT3_3 :: #EQ:#GT:#LT
hole_:::nil4_3 :: :::nil
hole_a5_3 :: a
hole_#unit6_3 :: #unit
hole_b7_3 :: b
gen_#0:#neg:#pos:#s8_3 :: Nat → #0:#neg:#pos:#s
gen_:::nil9_3 :: Nat → :::nil
Generator Equations:
gen_#0:#neg:#pos:#s8_3(0) ⇔ #0
gen_#0:#neg:#pos:#s8_3(+(x, 1)) ⇔ #neg(gen_#0:#neg:#pos:#s8_3(x))
gen_:::nil9_3(0) ⇔ nil
gen_:::nil9_3(+(x, 1)) ⇔ ::(#0, gen_:::nil9_3(x))
The following defined symbols remain to be analysed:
#compare, insert, insert#1, insertD, insertD#1, insertionsort, insertionsort#1, insertionsortD, insertionsortD#1
They will be analysed ascendingly in the following order:
insert = insert#1
insert < insertionsort#1
insertD = insertD#1
insertD < insertionsortD#1
insertionsort = insertionsort#1
insertionsortD = insertionsortD#1
(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
#compare(
gen_#0:#neg:#pos:#s8_3(
n11_3),
gen_#0:#neg:#pos:#s8_3(
n11_3)) →
#EQ, rt ∈ Ω(0)
Induction Base:
#compare(gen_#0:#neg:#pos:#s8_3(0), gen_#0:#neg:#pos:#s8_3(0)) →RΩ(0)
#EQ
Induction Step:
#compare(gen_#0:#neg:#pos:#s8_3(+(n11_3, 1)), gen_#0:#neg:#pos:#s8_3(+(n11_3, 1))) →RΩ(0)
#compare(gen_#0:#neg:#pos:#s8_3(n11_3), gen_#0:#neg:#pos:#s8_3(n11_3)) →IH
#EQ
We have rt ∈ Ω(1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n0).
(10) Complex Obligation (BEST)
(11) Obligation:
Innermost TRS:
Rules:
#abs(
#0) →
#0#abs(
#neg(
@x)) →
#pos(
@x)
#abs(
#pos(
@x)) →
#pos(
@x)
#abs(
#s(
@x)) →
#pos(
#s(
@x))
#less(
@x,
@y) →
#cklt(
#compare(
@x,
@y))
insert(
@x,
@l) →
insert#1(
@l,
@x)
insert#1(
::(
@y,
@ys),
@x) →
insert#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insert#1(
nil,
@x) →
::(
@x,
nil)
insert#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insert#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insert(
@x,
@ys))
insertD(
@x,
@l) →
insertD#1(
@l,
@x)
insertD#1(
::(
@y,
@ys),
@x) →
insertD#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insertD#1(
nil,
@x) →
::(
@x,
nil)
insertD#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insertD#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insertD(
@x,
@ys))
insertionsort(
@l) →
insertionsort#1(
@l)
insertionsort#1(
::(
@x,
@xs)) →
insert(
@x,
insertionsort(
@xs))
insertionsort#1(
nil) →
nilinsertionsortD(
@l) →
insertionsortD#1(
@l)
insertionsortD#1(
::(
@x,
@xs)) →
insertD(
@x,
insertionsortD(
@xs))
insertionsortD#1(
nil) →
niltestInsertionsort(
@x) →
insertionsort(
testList(
#unit))
testInsertionsortD(
@x) →
insertionsortD(
testList(
#unit))
testList(
@_) →
::(
#abs(
#0),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#0)))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#0))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))),
::(
#abs(
#pos(
#s(
#0))),
::(
#abs(
#pos(
#s(
#s(
#0)))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#0))))),
nil))))))))))
#cklt(
#EQ) →
#false#cklt(
#GT) →
#false#cklt(
#LT) →
#true#compare(
#0,
#0) →
#EQ#compare(
#0,
#neg(
@y)) →
#GT#compare(
#0,
#pos(
@y)) →
#LT#compare(
#0,
#s(
@y)) →
#LT#compare(
#neg(
@x),
#0) →
#LT#compare(
#neg(
@x),
#neg(
@y)) →
#compare(
@y,
@x)
#compare(
#neg(
@x),
#pos(
@y)) →
#LT#compare(
#pos(
@x),
#0) →
#GT#compare(
#pos(
@x),
#neg(
@y)) →
#GT#compare(
#pos(
@x),
#pos(
@y)) →
#compare(
@x,
@y)
#compare(
#s(
@x),
#0) →
#GT#compare(
#s(
@x),
#s(
@y)) →
#compare(
@x,
@y)
Types:
#abs :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#0 :: #0:#neg:#pos:#s
#neg :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#pos :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#s :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#less :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #false:#true
#cklt :: #EQ:#GT:#LT → #false:#true
#compare :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #EQ:#GT:#LT
insert :: #0:#neg:#pos:#s → :::nil → :::nil
insert#1 :: :::nil → #0:#neg:#pos:#s → :::nil
:: :: #0:#neg:#pos:#s → :::nil → :::nil
insert#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
nil :: :::nil
#false :: #false:#true
#true :: #false:#true
insertD :: #0:#neg:#pos:#s → :::nil → :::nil
insertD#1 :: :::nil → #0:#neg:#pos:#s → :::nil
insertD#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
insertionsort :: :::nil → :::nil
insertionsort#1 :: :::nil → :::nil
insertionsortD :: :::nil → :::nil
insertionsortD#1 :: :::nil → :::nil
testInsertionsort :: a → :::nil
testList :: #unit → :::nil
#unit :: #unit
testInsertionsortD :: b → :::nil
#EQ :: #EQ:#GT:#LT
#GT :: #EQ:#GT:#LT
#LT :: #EQ:#GT:#LT
hole_#0:#neg:#pos:#s1_3 :: #0:#neg:#pos:#s
hole_#false:#true2_3 :: #false:#true
hole_#EQ:#GT:#LT3_3 :: #EQ:#GT:#LT
hole_:::nil4_3 :: :::nil
hole_a5_3 :: a
hole_#unit6_3 :: #unit
hole_b7_3 :: b
gen_#0:#neg:#pos:#s8_3 :: Nat → #0:#neg:#pos:#s
gen_:::nil9_3 :: Nat → :::nil
Lemmas:
#compare(gen_#0:#neg:#pos:#s8_3(n11_3), gen_#0:#neg:#pos:#s8_3(n11_3)) → #EQ, rt ∈ Ω(0)
Generator Equations:
gen_#0:#neg:#pos:#s8_3(0) ⇔ #0
gen_#0:#neg:#pos:#s8_3(+(x, 1)) ⇔ #neg(gen_#0:#neg:#pos:#s8_3(x))
gen_:::nil9_3(0) ⇔ nil
gen_:::nil9_3(+(x, 1)) ⇔ ::(#0, gen_:::nil9_3(x))
The following defined symbols remain to be analysed:
insertD#1, insert, insert#1, insertD, insertionsort, insertionsort#1, insertionsortD, insertionsortD#1
They will be analysed ascendingly in the following order:
insert = insert#1
insert < insertionsort#1
insertD = insertD#1
insertD < insertionsortD#1
insertionsort = insertionsort#1
insertionsortD = insertionsortD#1
(12) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol insertD#1.
(13) Obligation:
Innermost TRS:
Rules:
#abs(
#0) →
#0#abs(
#neg(
@x)) →
#pos(
@x)
#abs(
#pos(
@x)) →
#pos(
@x)
#abs(
#s(
@x)) →
#pos(
#s(
@x))
#less(
@x,
@y) →
#cklt(
#compare(
@x,
@y))
insert(
@x,
@l) →
insert#1(
@l,
@x)
insert#1(
::(
@y,
@ys),
@x) →
insert#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insert#1(
nil,
@x) →
::(
@x,
nil)
insert#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insert#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insert(
@x,
@ys))
insertD(
@x,
@l) →
insertD#1(
@l,
@x)
insertD#1(
::(
@y,
@ys),
@x) →
insertD#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insertD#1(
nil,
@x) →
::(
@x,
nil)
insertD#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insertD#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insertD(
@x,
@ys))
insertionsort(
@l) →
insertionsort#1(
@l)
insertionsort#1(
::(
@x,
@xs)) →
insert(
@x,
insertionsort(
@xs))
insertionsort#1(
nil) →
nilinsertionsortD(
@l) →
insertionsortD#1(
@l)
insertionsortD#1(
::(
@x,
@xs)) →
insertD(
@x,
insertionsortD(
@xs))
insertionsortD#1(
nil) →
niltestInsertionsort(
@x) →
insertionsort(
testList(
#unit))
testInsertionsortD(
@x) →
insertionsortD(
testList(
#unit))
testList(
@_) →
::(
#abs(
#0),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#0)))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#0))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))),
::(
#abs(
#pos(
#s(
#0))),
::(
#abs(
#pos(
#s(
#s(
#0)))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#0))))),
nil))))))))))
#cklt(
#EQ) →
#false#cklt(
#GT) →
#false#cklt(
#LT) →
#true#compare(
#0,
#0) →
#EQ#compare(
#0,
#neg(
@y)) →
#GT#compare(
#0,
#pos(
@y)) →
#LT#compare(
#0,
#s(
@y)) →
#LT#compare(
#neg(
@x),
#0) →
#LT#compare(
#neg(
@x),
#neg(
@y)) →
#compare(
@y,
@x)
#compare(
#neg(
@x),
#pos(
@y)) →
#LT#compare(
#pos(
@x),
#0) →
#GT#compare(
#pos(
@x),
#neg(
@y)) →
#GT#compare(
#pos(
@x),
#pos(
@y)) →
#compare(
@x,
@y)
#compare(
#s(
@x),
#0) →
#GT#compare(
#s(
@x),
#s(
@y)) →
#compare(
@x,
@y)
Types:
#abs :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#0 :: #0:#neg:#pos:#s
#neg :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#pos :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#s :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#less :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #false:#true
#cklt :: #EQ:#GT:#LT → #false:#true
#compare :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #EQ:#GT:#LT
insert :: #0:#neg:#pos:#s → :::nil → :::nil
insert#1 :: :::nil → #0:#neg:#pos:#s → :::nil
:: :: #0:#neg:#pos:#s → :::nil → :::nil
insert#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
nil :: :::nil
#false :: #false:#true
#true :: #false:#true
insertD :: #0:#neg:#pos:#s → :::nil → :::nil
insertD#1 :: :::nil → #0:#neg:#pos:#s → :::nil
insertD#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
insertionsort :: :::nil → :::nil
insertionsort#1 :: :::nil → :::nil
insertionsortD :: :::nil → :::nil
insertionsortD#1 :: :::nil → :::nil
testInsertionsort :: a → :::nil
testList :: #unit → :::nil
#unit :: #unit
testInsertionsortD :: b → :::nil
#EQ :: #EQ:#GT:#LT
#GT :: #EQ:#GT:#LT
#LT :: #EQ:#GT:#LT
hole_#0:#neg:#pos:#s1_3 :: #0:#neg:#pos:#s
hole_#false:#true2_3 :: #false:#true
hole_#EQ:#GT:#LT3_3 :: #EQ:#GT:#LT
hole_:::nil4_3 :: :::nil
hole_a5_3 :: a
hole_#unit6_3 :: #unit
hole_b7_3 :: b
gen_#0:#neg:#pos:#s8_3 :: Nat → #0:#neg:#pos:#s
gen_:::nil9_3 :: Nat → :::nil
Lemmas:
#compare(gen_#0:#neg:#pos:#s8_3(n11_3), gen_#0:#neg:#pos:#s8_3(n11_3)) → #EQ, rt ∈ Ω(0)
Generator Equations:
gen_#0:#neg:#pos:#s8_3(0) ⇔ #0
gen_#0:#neg:#pos:#s8_3(+(x, 1)) ⇔ #neg(gen_#0:#neg:#pos:#s8_3(x))
gen_:::nil9_3(0) ⇔ nil
gen_:::nil9_3(+(x, 1)) ⇔ ::(#0, gen_:::nil9_3(x))
The following defined symbols remain to be analysed:
insertD, insert, insert#1, insertionsort, insertionsort#1, insertionsortD, insertionsortD#1
They will be analysed ascendingly in the following order:
insert = insert#1
insert < insertionsort#1
insertD = insertD#1
insertD < insertionsortD#1
insertionsort = insertionsort#1
insertionsortD = insertionsortD#1
(14) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol insertD.
(15) Obligation:
Innermost TRS:
Rules:
#abs(
#0) →
#0#abs(
#neg(
@x)) →
#pos(
@x)
#abs(
#pos(
@x)) →
#pos(
@x)
#abs(
#s(
@x)) →
#pos(
#s(
@x))
#less(
@x,
@y) →
#cklt(
#compare(
@x,
@y))
insert(
@x,
@l) →
insert#1(
@l,
@x)
insert#1(
::(
@y,
@ys),
@x) →
insert#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insert#1(
nil,
@x) →
::(
@x,
nil)
insert#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insert#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insert(
@x,
@ys))
insertD(
@x,
@l) →
insertD#1(
@l,
@x)
insertD#1(
::(
@y,
@ys),
@x) →
insertD#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insertD#1(
nil,
@x) →
::(
@x,
nil)
insertD#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insertD#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insertD(
@x,
@ys))
insertionsort(
@l) →
insertionsort#1(
@l)
insertionsort#1(
::(
@x,
@xs)) →
insert(
@x,
insertionsort(
@xs))
insertionsort#1(
nil) →
nilinsertionsortD(
@l) →
insertionsortD#1(
@l)
insertionsortD#1(
::(
@x,
@xs)) →
insertD(
@x,
insertionsortD(
@xs))
insertionsortD#1(
nil) →
niltestInsertionsort(
@x) →
insertionsort(
testList(
#unit))
testInsertionsortD(
@x) →
insertionsortD(
testList(
#unit))
testList(
@_) →
::(
#abs(
#0),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#0)))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#0))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))),
::(
#abs(
#pos(
#s(
#0))),
::(
#abs(
#pos(
#s(
#s(
#0)))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#0))))),
nil))))))))))
#cklt(
#EQ) →
#false#cklt(
#GT) →
#false#cklt(
#LT) →
#true#compare(
#0,
#0) →
#EQ#compare(
#0,
#neg(
@y)) →
#GT#compare(
#0,
#pos(
@y)) →
#LT#compare(
#0,
#s(
@y)) →
#LT#compare(
#neg(
@x),
#0) →
#LT#compare(
#neg(
@x),
#neg(
@y)) →
#compare(
@y,
@x)
#compare(
#neg(
@x),
#pos(
@y)) →
#LT#compare(
#pos(
@x),
#0) →
#GT#compare(
#pos(
@x),
#neg(
@y)) →
#GT#compare(
#pos(
@x),
#pos(
@y)) →
#compare(
@x,
@y)
#compare(
#s(
@x),
#0) →
#GT#compare(
#s(
@x),
#s(
@y)) →
#compare(
@x,
@y)
Types:
#abs :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#0 :: #0:#neg:#pos:#s
#neg :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#pos :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#s :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#less :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #false:#true
#cklt :: #EQ:#GT:#LT → #false:#true
#compare :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #EQ:#GT:#LT
insert :: #0:#neg:#pos:#s → :::nil → :::nil
insert#1 :: :::nil → #0:#neg:#pos:#s → :::nil
:: :: #0:#neg:#pos:#s → :::nil → :::nil
insert#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
nil :: :::nil
#false :: #false:#true
#true :: #false:#true
insertD :: #0:#neg:#pos:#s → :::nil → :::nil
insertD#1 :: :::nil → #0:#neg:#pos:#s → :::nil
insertD#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
insertionsort :: :::nil → :::nil
insertionsort#1 :: :::nil → :::nil
insertionsortD :: :::nil → :::nil
insertionsortD#1 :: :::nil → :::nil
testInsertionsort :: a → :::nil
testList :: #unit → :::nil
#unit :: #unit
testInsertionsortD :: b → :::nil
#EQ :: #EQ:#GT:#LT
#GT :: #EQ:#GT:#LT
#LT :: #EQ:#GT:#LT
hole_#0:#neg:#pos:#s1_3 :: #0:#neg:#pos:#s
hole_#false:#true2_3 :: #false:#true
hole_#EQ:#GT:#LT3_3 :: #EQ:#GT:#LT
hole_:::nil4_3 :: :::nil
hole_a5_3 :: a
hole_#unit6_3 :: #unit
hole_b7_3 :: b
gen_#0:#neg:#pos:#s8_3 :: Nat → #0:#neg:#pos:#s
gen_:::nil9_3 :: Nat → :::nil
Lemmas:
#compare(gen_#0:#neg:#pos:#s8_3(n11_3), gen_#0:#neg:#pos:#s8_3(n11_3)) → #EQ, rt ∈ Ω(0)
Generator Equations:
gen_#0:#neg:#pos:#s8_3(0) ⇔ #0
gen_#0:#neg:#pos:#s8_3(+(x, 1)) ⇔ #neg(gen_#0:#neg:#pos:#s8_3(x))
gen_:::nil9_3(0) ⇔ nil
gen_:::nil9_3(+(x, 1)) ⇔ ::(#0, gen_:::nil9_3(x))
The following defined symbols remain to be analysed:
insertionsortD#1, insert, insert#1, insertionsort, insertionsort#1, insertionsortD
They will be analysed ascendingly in the following order:
insert = insert#1
insert < insertionsort#1
insertionsort = insertionsort#1
insertionsortD = insertionsortD#1
(16) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol insertionsortD#1.
(17) Obligation:
Innermost TRS:
Rules:
#abs(
#0) →
#0#abs(
#neg(
@x)) →
#pos(
@x)
#abs(
#pos(
@x)) →
#pos(
@x)
#abs(
#s(
@x)) →
#pos(
#s(
@x))
#less(
@x,
@y) →
#cklt(
#compare(
@x,
@y))
insert(
@x,
@l) →
insert#1(
@l,
@x)
insert#1(
::(
@y,
@ys),
@x) →
insert#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insert#1(
nil,
@x) →
::(
@x,
nil)
insert#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insert#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insert(
@x,
@ys))
insertD(
@x,
@l) →
insertD#1(
@l,
@x)
insertD#1(
::(
@y,
@ys),
@x) →
insertD#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insertD#1(
nil,
@x) →
::(
@x,
nil)
insertD#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insertD#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insertD(
@x,
@ys))
insertionsort(
@l) →
insertionsort#1(
@l)
insertionsort#1(
::(
@x,
@xs)) →
insert(
@x,
insertionsort(
@xs))
insertionsort#1(
nil) →
nilinsertionsortD(
@l) →
insertionsortD#1(
@l)
insertionsortD#1(
::(
@x,
@xs)) →
insertD(
@x,
insertionsortD(
@xs))
insertionsortD#1(
nil) →
niltestInsertionsort(
@x) →
insertionsort(
testList(
#unit))
testInsertionsortD(
@x) →
insertionsortD(
testList(
#unit))
testList(
@_) →
::(
#abs(
#0),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#0)))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#0))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))),
::(
#abs(
#pos(
#s(
#0))),
::(
#abs(
#pos(
#s(
#s(
#0)))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#0))))),
nil))))))))))
#cklt(
#EQ) →
#false#cklt(
#GT) →
#false#cklt(
#LT) →
#true#compare(
#0,
#0) →
#EQ#compare(
#0,
#neg(
@y)) →
#GT#compare(
#0,
#pos(
@y)) →
#LT#compare(
#0,
#s(
@y)) →
#LT#compare(
#neg(
@x),
#0) →
#LT#compare(
#neg(
@x),
#neg(
@y)) →
#compare(
@y,
@x)
#compare(
#neg(
@x),
#pos(
@y)) →
#LT#compare(
#pos(
@x),
#0) →
#GT#compare(
#pos(
@x),
#neg(
@y)) →
#GT#compare(
#pos(
@x),
#pos(
@y)) →
#compare(
@x,
@y)
#compare(
#s(
@x),
#0) →
#GT#compare(
#s(
@x),
#s(
@y)) →
#compare(
@x,
@y)
Types:
#abs :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#0 :: #0:#neg:#pos:#s
#neg :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#pos :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#s :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#less :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #false:#true
#cklt :: #EQ:#GT:#LT → #false:#true
#compare :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #EQ:#GT:#LT
insert :: #0:#neg:#pos:#s → :::nil → :::nil
insert#1 :: :::nil → #0:#neg:#pos:#s → :::nil
:: :: #0:#neg:#pos:#s → :::nil → :::nil
insert#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
nil :: :::nil
#false :: #false:#true
#true :: #false:#true
insertD :: #0:#neg:#pos:#s → :::nil → :::nil
insertD#1 :: :::nil → #0:#neg:#pos:#s → :::nil
insertD#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
insertionsort :: :::nil → :::nil
insertionsort#1 :: :::nil → :::nil
insertionsortD :: :::nil → :::nil
insertionsortD#1 :: :::nil → :::nil
testInsertionsort :: a → :::nil
testList :: #unit → :::nil
#unit :: #unit
testInsertionsortD :: b → :::nil
#EQ :: #EQ:#GT:#LT
#GT :: #EQ:#GT:#LT
#LT :: #EQ:#GT:#LT
hole_#0:#neg:#pos:#s1_3 :: #0:#neg:#pos:#s
hole_#false:#true2_3 :: #false:#true
hole_#EQ:#GT:#LT3_3 :: #EQ:#GT:#LT
hole_:::nil4_3 :: :::nil
hole_a5_3 :: a
hole_#unit6_3 :: #unit
hole_b7_3 :: b
gen_#0:#neg:#pos:#s8_3 :: Nat → #0:#neg:#pos:#s
gen_:::nil9_3 :: Nat → :::nil
Lemmas:
#compare(gen_#0:#neg:#pos:#s8_3(n11_3), gen_#0:#neg:#pos:#s8_3(n11_3)) → #EQ, rt ∈ Ω(0)
Generator Equations:
gen_#0:#neg:#pos:#s8_3(0) ⇔ #0
gen_#0:#neg:#pos:#s8_3(+(x, 1)) ⇔ #neg(gen_#0:#neg:#pos:#s8_3(x))
gen_:::nil9_3(0) ⇔ nil
gen_:::nil9_3(+(x, 1)) ⇔ ::(#0, gen_:::nil9_3(x))
The following defined symbols remain to be analysed:
insertionsortD, insert, insert#1, insertionsort, insertionsort#1
They will be analysed ascendingly in the following order:
insert = insert#1
insert < insertionsort#1
insertionsort = insertionsort#1
insertionsortD = insertionsortD#1
(18) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol insertionsortD.
(19) Obligation:
Innermost TRS:
Rules:
#abs(
#0) →
#0#abs(
#neg(
@x)) →
#pos(
@x)
#abs(
#pos(
@x)) →
#pos(
@x)
#abs(
#s(
@x)) →
#pos(
#s(
@x))
#less(
@x,
@y) →
#cklt(
#compare(
@x,
@y))
insert(
@x,
@l) →
insert#1(
@l,
@x)
insert#1(
::(
@y,
@ys),
@x) →
insert#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insert#1(
nil,
@x) →
::(
@x,
nil)
insert#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insert#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insert(
@x,
@ys))
insertD(
@x,
@l) →
insertD#1(
@l,
@x)
insertD#1(
::(
@y,
@ys),
@x) →
insertD#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insertD#1(
nil,
@x) →
::(
@x,
nil)
insertD#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insertD#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insertD(
@x,
@ys))
insertionsort(
@l) →
insertionsort#1(
@l)
insertionsort#1(
::(
@x,
@xs)) →
insert(
@x,
insertionsort(
@xs))
insertionsort#1(
nil) →
nilinsertionsortD(
@l) →
insertionsortD#1(
@l)
insertionsortD#1(
::(
@x,
@xs)) →
insertD(
@x,
insertionsortD(
@xs))
insertionsortD#1(
nil) →
niltestInsertionsort(
@x) →
insertionsort(
testList(
#unit))
testInsertionsortD(
@x) →
insertionsortD(
testList(
#unit))
testList(
@_) →
::(
#abs(
#0),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#0)))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#0))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))),
::(
#abs(
#pos(
#s(
#0))),
::(
#abs(
#pos(
#s(
#s(
#0)))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#0))))),
nil))))))))))
#cklt(
#EQ) →
#false#cklt(
#GT) →
#false#cklt(
#LT) →
#true#compare(
#0,
#0) →
#EQ#compare(
#0,
#neg(
@y)) →
#GT#compare(
#0,
#pos(
@y)) →
#LT#compare(
#0,
#s(
@y)) →
#LT#compare(
#neg(
@x),
#0) →
#LT#compare(
#neg(
@x),
#neg(
@y)) →
#compare(
@y,
@x)
#compare(
#neg(
@x),
#pos(
@y)) →
#LT#compare(
#pos(
@x),
#0) →
#GT#compare(
#pos(
@x),
#neg(
@y)) →
#GT#compare(
#pos(
@x),
#pos(
@y)) →
#compare(
@x,
@y)
#compare(
#s(
@x),
#0) →
#GT#compare(
#s(
@x),
#s(
@y)) →
#compare(
@x,
@y)
Types:
#abs :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#0 :: #0:#neg:#pos:#s
#neg :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#pos :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#s :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#less :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #false:#true
#cklt :: #EQ:#GT:#LT → #false:#true
#compare :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #EQ:#GT:#LT
insert :: #0:#neg:#pos:#s → :::nil → :::nil
insert#1 :: :::nil → #0:#neg:#pos:#s → :::nil
:: :: #0:#neg:#pos:#s → :::nil → :::nil
insert#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
nil :: :::nil
#false :: #false:#true
#true :: #false:#true
insertD :: #0:#neg:#pos:#s → :::nil → :::nil
insertD#1 :: :::nil → #0:#neg:#pos:#s → :::nil
insertD#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
insertionsort :: :::nil → :::nil
insertionsort#1 :: :::nil → :::nil
insertionsortD :: :::nil → :::nil
insertionsortD#1 :: :::nil → :::nil
testInsertionsort :: a → :::nil
testList :: #unit → :::nil
#unit :: #unit
testInsertionsortD :: b → :::nil
#EQ :: #EQ:#GT:#LT
#GT :: #EQ:#GT:#LT
#LT :: #EQ:#GT:#LT
hole_#0:#neg:#pos:#s1_3 :: #0:#neg:#pos:#s
hole_#false:#true2_3 :: #false:#true
hole_#EQ:#GT:#LT3_3 :: #EQ:#GT:#LT
hole_:::nil4_3 :: :::nil
hole_a5_3 :: a
hole_#unit6_3 :: #unit
hole_b7_3 :: b
gen_#0:#neg:#pos:#s8_3 :: Nat → #0:#neg:#pos:#s
gen_:::nil9_3 :: Nat → :::nil
Lemmas:
#compare(gen_#0:#neg:#pos:#s8_3(n11_3), gen_#0:#neg:#pos:#s8_3(n11_3)) → #EQ, rt ∈ Ω(0)
Generator Equations:
gen_#0:#neg:#pos:#s8_3(0) ⇔ #0
gen_#0:#neg:#pos:#s8_3(+(x, 1)) ⇔ #neg(gen_#0:#neg:#pos:#s8_3(x))
gen_:::nil9_3(0) ⇔ nil
gen_:::nil9_3(+(x, 1)) ⇔ ::(#0, gen_:::nil9_3(x))
The following defined symbols remain to be analysed:
insert#1, insert, insertionsort, insertionsort#1
They will be analysed ascendingly in the following order:
insert = insert#1
insert < insertionsort#1
insertionsort = insertionsort#1
(20) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol insert#1.
(21) Obligation:
Innermost TRS:
Rules:
#abs(
#0) →
#0#abs(
#neg(
@x)) →
#pos(
@x)
#abs(
#pos(
@x)) →
#pos(
@x)
#abs(
#s(
@x)) →
#pos(
#s(
@x))
#less(
@x,
@y) →
#cklt(
#compare(
@x,
@y))
insert(
@x,
@l) →
insert#1(
@l,
@x)
insert#1(
::(
@y,
@ys),
@x) →
insert#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insert#1(
nil,
@x) →
::(
@x,
nil)
insert#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insert#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insert(
@x,
@ys))
insertD(
@x,
@l) →
insertD#1(
@l,
@x)
insertD#1(
::(
@y,
@ys),
@x) →
insertD#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insertD#1(
nil,
@x) →
::(
@x,
nil)
insertD#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insertD#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insertD(
@x,
@ys))
insertionsort(
@l) →
insertionsort#1(
@l)
insertionsort#1(
::(
@x,
@xs)) →
insert(
@x,
insertionsort(
@xs))
insertionsort#1(
nil) →
nilinsertionsortD(
@l) →
insertionsortD#1(
@l)
insertionsortD#1(
::(
@x,
@xs)) →
insertD(
@x,
insertionsortD(
@xs))
insertionsortD#1(
nil) →
niltestInsertionsort(
@x) →
insertionsort(
testList(
#unit))
testInsertionsortD(
@x) →
insertionsortD(
testList(
#unit))
testList(
@_) →
::(
#abs(
#0),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#0)))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#0))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))),
::(
#abs(
#pos(
#s(
#0))),
::(
#abs(
#pos(
#s(
#s(
#0)))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#0))))),
nil))))))))))
#cklt(
#EQ) →
#false#cklt(
#GT) →
#false#cklt(
#LT) →
#true#compare(
#0,
#0) →
#EQ#compare(
#0,
#neg(
@y)) →
#GT#compare(
#0,
#pos(
@y)) →
#LT#compare(
#0,
#s(
@y)) →
#LT#compare(
#neg(
@x),
#0) →
#LT#compare(
#neg(
@x),
#neg(
@y)) →
#compare(
@y,
@x)
#compare(
#neg(
@x),
#pos(
@y)) →
#LT#compare(
#pos(
@x),
#0) →
#GT#compare(
#pos(
@x),
#neg(
@y)) →
#GT#compare(
#pos(
@x),
#pos(
@y)) →
#compare(
@x,
@y)
#compare(
#s(
@x),
#0) →
#GT#compare(
#s(
@x),
#s(
@y)) →
#compare(
@x,
@y)
Types:
#abs :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#0 :: #0:#neg:#pos:#s
#neg :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#pos :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#s :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#less :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #false:#true
#cklt :: #EQ:#GT:#LT → #false:#true
#compare :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #EQ:#GT:#LT
insert :: #0:#neg:#pos:#s → :::nil → :::nil
insert#1 :: :::nil → #0:#neg:#pos:#s → :::nil
:: :: #0:#neg:#pos:#s → :::nil → :::nil
insert#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
nil :: :::nil
#false :: #false:#true
#true :: #false:#true
insertD :: #0:#neg:#pos:#s → :::nil → :::nil
insertD#1 :: :::nil → #0:#neg:#pos:#s → :::nil
insertD#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
insertionsort :: :::nil → :::nil
insertionsort#1 :: :::nil → :::nil
insertionsortD :: :::nil → :::nil
insertionsortD#1 :: :::nil → :::nil
testInsertionsort :: a → :::nil
testList :: #unit → :::nil
#unit :: #unit
testInsertionsortD :: b → :::nil
#EQ :: #EQ:#GT:#LT
#GT :: #EQ:#GT:#LT
#LT :: #EQ:#GT:#LT
hole_#0:#neg:#pos:#s1_3 :: #0:#neg:#pos:#s
hole_#false:#true2_3 :: #false:#true
hole_#EQ:#GT:#LT3_3 :: #EQ:#GT:#LT
hole_:::nil4_3 :: :::nil
hole_a5_3 :: a
hole_#unit6_3 :: #unit
hole_b7_3 :: b
gen_#0:#neg:#pos:#s8_3 :: Nat → #0:#neg:#pos:#s
gen_:::nil9_3 :: Nat → :::nil
Lemmas:
#compare(gen_#0:#neg:#pos:#s8_3(n11_3), gen_#0:#neg:#pos:#s8_3(n11_3)) → #EQ, rt ∈ Ω(0)
Generator Equations:
gen_#0:#neg:#pos:#s8_3(0) ⇔ #0
gen_#0:#neg:#pos:#s8_3(+(x, 1)) ⇔ #neg(gen_#0:#neg:#pos:#s8_3(x))
gen_:::nil9_3(0) ⇔ nil
gen_:::nil9_3(+(x, 1)) ⇔ ::(#0, gen_:::nil9_3(x))
The following defined symbols remain to be analysed:
insert, insertionsort, insertionsort#1
They will be analysed ascendingly in the following order:
insert = insert#1
insert < insertionsort#1
insertionsort = insertionsort#1
(22) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol insert.
(23) Obligation:
Innermost TRS:
Rules:
#abs(
#0) →
#0#abs(
#neg(
@x)) →
#pos(
@x)
#abs(
#pos(
@x)) →
#pos(
@x)
#abs(
#s(
@x)) →
#pos(
#s(
@x))
#less(
@x,
@y) →
#cklt(
#compare(
@x,
@y))
insert(
@x,
@l) →
insert#1(
@l,
@x)
insert#1(
::(
@y,
@ys),
@x) →
insert#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insert#1(
nil,
@x) →
::(
@x,
nil)
insert#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insert#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insert(
@x,
@ys))
insertD(
@x,
@l) →
insertD#1(
@l,
@x)
insertD#1(
::(
@y,
@ys),
@x) →
insertD#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insertD#1(
nil,
@x) →
::(
@x,
nil)
insertD#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insertD#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insertD(
@x,
@ys))
insertionsort(
@l) →
insertionsort#1(
@l)
insertionsort#1(
::(
@x,
@xs)) →
insert(
@x,
insertionsort(
@xs))
insertionsort#1(
nil) →
nilinsertionsortD(
@l) →
insertionsortD#1(
@l)
insertionsortD#1(
::(
@x,
@xs)) →
insertD(
@x,
insertionsortD(
@xs))
insertionsortD#1(
nil) →
niltestInsertionsort(
@x) →
insertionsort(
testList(
#unit))
testInsertionsortD(
@x) →
insertionsortD(
testList(
#unit))
testList(
@_) →
::(
#abs(
#0),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#0)))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#0))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))),
::(
#abs(
#pos(
#s(
#0))),
::(
#abs(
#pos(
#s(
#s(
#0)))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#0))))),
nil))))))))))
#cklt(
#EQ) →
#false#cklt(
#GT) →
#false#cklt(
#LT) →
#true#compare(
#0,
#0) →
#EQ#compare(
#0,
#neg(
@y)) →
#GT#compare(
#0,
#pos(
@y)) →
#LT#compare(
#0,
#s(
@y)) →
#LT#compare(
#neg(
@x),
#0) →
#LT#compare(
#neg(
@x),
#neg(
@y)) →
#compare(
@y,
@x)
#compare(
#neg(
@x),
#pos(
@y)) →
#LT#compare(
#pos(
@x),
#0) →
#GT#compare(
#pos(
@x),
#neg(
@y)) →
#GT#compare(
#pos(
@x),
#pos(
@y)) →
#compare(
@x,
@y)
#compare(
#s(
@x),
#0) →
#GT#compare(
#s(
@x),
#s(
@y)) →
#compare(
@x,
@y)
Types:
#abs :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#0 :: #0:#neg:#pos:#s
#neg :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#pos :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#s :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#less :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #false:#true
#cklt :: #EQ:#GT:#LT → #false:#true
#compare :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #EQ:#GT:#LT
insert :: #0:#neg:#pos:#s → :::nil → :::nil
insert#1 :: :::nil → #0:#neg:#pos:#s → :::nil
:: :: #0:#neg:#pos:#s → :::nil → :::nil
insert#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
nil :: :::nil
#false :: #false:#true
#true :: #false:#true
insertD :: #0:#neg:#pos:#s → :::nil → :::nil
insertD#1 :: :::nil → #0:#neg:#pos:#s → :::nil
insertD#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
insertionsort :: :::nil → :::nil
insertionsort#1 :: :::nil → :::nil
insertionsortD :: :::nil → :::nil
insertionsortD#1 :: :::nil → :::nil
testInsertionsort :: a → :::nil
testList :: #unit → :::nil
#unit :: #unit
testInsertionsortD :: b → :::nil
#EQ :: #EQ:#GT:#LT
#GT :: #EQ:#GT:#LT
#LT :: #EQ:#GT:#LT
hole_#0:#neg:#pos:#s1_3 :: #0:#neg:#pos:#s
hole_#false:#true2_3 :: #false:#true
hole_#EQ:#GT:#LT3_3 :: #EQ:#GT:#LT
hole_:::nil4_3 :: :::nil
hole_a5_3 :: a
hole_#unit6_3 :: #unit
hole_b7_3 :: b
gen_#0:#neg:#pos:#s8_3 :: Nat → #0:#neg:#pos:#s
gen_:::nil9_3 :: Nat → :::nil
Lemmas:
#compare(gen_#0:#neg:#pos:#s8_3(n11_3), gen_#0:#neg:#pos:#s8_3(n11_3)) → #EQ, rt ∈ Ω(0)
Generator Equations:
gen_#0:#neg:#pos:#s8_3(0) ⇔ #0
gen_#0:#neg:#pos:#s8_3(+(x, 1)) ⇔ #neg(gen_#0:#neg:#pos:#s8_3(x))
gen_:::nil9_3(0) ⇔ nil
gen_:::nil9_3(+(x, 1)) ⇔ ::(#0, gen_:::nil9_3(x))
The following defined symbols remain to be analysed:
insertionsort#1, insertionsort
They will be analysed ascendingly in the following order:
insertionsort = insertionsort#1
(24) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol insertionsort#1.
(25) Obligation:
Innermost TRS:
Rules:
#abs(
#0) →
#0#abs(
#neg(
@x)) →
#pos(
@x)
#abs(
#pos(
@x)) →
#pos(
@x)
#abs(
#s(
@x)) →
#pos(
#s(
@x))
#less(
@x,
@y) →
#cklt(
#compare(
@x,
@y))
insert(
@x,
@l) →
insert#1(
@l,
@x)
insert#1(
::(
@y,
@ys),
@x) →
insert#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insert#1(
nil,
@x) →
::(
@x,
nil)
insert#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insert#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insert(
@x,
@ys))
insertD(
@x,
@l) →
insertD#1(
@l,
@x)
insertD#1(
::(
@y,
@ys),
@x) →
insertD#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insertD#1(
nil,
@x) →
::(
@x,
nil)
insertD#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insertD#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insertD(
@x,
@ys))
insertionsort(
@l) →
insertionsort#1(
@l)
insertionsort#1(
::(
@x,
@xs)) →
insert(
@x,
insertionsort(
@xs))
insertionsort#1(
nil) →
nilinsertionsortD(
@l) →
insertionsortD#1(
@l)
insertionsortD#1(
::(
@x,
@xs)) →
insertD(
@x,
insertionsortD(
@xs))
insertionsortD#1(
nil) →
niltestInsertionsort(
@x) →
insertionsort(
testList(
#unit))
testInsertionsortD(
@x) →
insertionsortD(
testList(
#unit))
testList(
@_) →
::(
#abs(
#0),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#0)))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#0))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))),
::(
#abs(
#pos(
#s(
#0))),
::(
#abs(
#pos(
#s(
#s(
#0)))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#0))))),
nil))))))))))
#cklt(
#EQ) →
#false#cklt(
#GT) →
#false#cklt(
#LT) →
#true#compare(
#0,
#0) →
#EQ#compare(
#0,
#neg(
@y)) →
#GT#compare(
#0,
#pos(
@y)) →
#LT#compare(
#0,
#s(
@y)) →
#LT#compare(
#neg(
@x),
#0) →
#LT#compare(
#neg(
@x),
#neg(
@y)) →
#compare(
@y,
@x)
#compare(
#neg(
@x),
#pos(
@y)) →
#LT#compare(
#pos(
@x),
#0) →
#GT#compare(
#pos(
@x),
#neg(
@y)) →
#GT#compare(
#pos(
@x),
#pos(
@y)) →
#compare(
@x,
@y)
#compare(
#s(
@x),
#0) →
#GT#compare(
#s(
@x),
#s(
@y)) →
#compare(
@x,
@y)
Types:
#abs :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#0 :: #0:#neg:#pos:#s
#neg :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#pos :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#s :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#less :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #false:#true
#cklt :: #EQ:#GT:#LT → #false:#true
#compare :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #EQ:#GT:#LT
insert :: #0:#neg:#pos:#s → :::nil → :::nil
insert#1 :: :::nil → #0:#neg:#pos:#s → :::nil
:: :: #0:#neg:#pos:#s → :::nil → :::nil
insert#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
nil :: :::nil
#false :: #false:#true
#true :: #false:#true
insertD :: #0:#neg:#pos:#s → :::nil → :::nil
insertD#1 :: :::nil → #0:#neg:#pos:#s → :::nil
insertD#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
insertionsort :: :::nil → :::nil
insertionsort#1 :: :::nil → :::nil
insertionsortD :: :::nil → :::nil
insertionsortD#1 :: :::nil → :::nil
testInsertionsort :: a → :::nil
testList :: #unit → :::nil
#unit :: #unit
testInsertionsortD :: b → :::nil
#EQ :: #EQ:#GT:#LT
#GT :: #EQ:#GT:#LT
#LT :: #EQ:#GT:#LT
hole_#0:#neg:#pos:#s1_3 :: #0:#neg:#pos:#s
hole_#false:#true2_3 :: #false:#true
hole_#EQ:#GT:#LT3_3 :: #EQ:#GT:#LT
hole_:::nil4_3 :: :::nil
hole_a5_3 :: a
hole_#unit6_3 :: #unit
hole_b7_3 :: b
gen_#0:#neg:#pos:#s8_3 :: Nat → #0:#neg:#pos:#s
gen_:::nil9_3 :: Nat → :::nil
Lemmas:
#compare(gen_#0:#neg:#pos:#s8_3(n11_3), gen_#0:#neg:#pos:#s8_3(n11_3)) → #EQ, rt ∈ Ω(0)
Generator Equations:
gen_#0:#neg:#pos:#s8_3(0) ⇔ #0
gen_#0:#neg:#pos:#s8_3(+(x, 1)) ⇔ #neg(gen_#0:#neg:#pos:#s8_3(x))
gen_:::nil9_3(0) ⇔ nil
gen_:::nil9_3(+(x, 1)) ⇔ ::(#0, gen_:::nil9_3(x))
The following defined symbols remain to be analysed:
insertionsort
They will be analysed ascendingly in the following order:
insertionsort = insertionsort#1
(26) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol insertionsort.
(27) Obligation:
Innermost TRS:
Rules:
#abs(
#0) →
#0#abs(
#neg(
@x)) →
#pos(
@x)
#abs(
#pos(
@x)) →
#pos(
@x)
#abs(
#s(
@x)) →
#pos(
#s(
@x))
#less(
@x,
@y) →
#cklt(
#compare(
@x,
@y))
insert(
@x,
@l) →
insert#1(
@l,
@x)
insert#1(
::(
@y,
@ys),
@x) →
insert#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insert#1(
nil,
@x) →
::(
@x,
nil)
insert#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insert#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insert(
@x,
@ys))
insertD(
@x,
@l) →
insertD#1(
@l,
@x)
insertD#1(
::(
@y,
@ys),
@x) →
insertD#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insertD#1(
nil,
@x) →
::(
@x,
nil)
insertD#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insertD#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insertD(
@x,
@ys))
insertionsort(
@l) →
insertionsort#1(
@l)
insertionsort#1(
::(
@x,
@xs)) →
insert(
@x,
insertionsort(
@xs))
insertionsort#1(
nil) →
nilinsertionsortD(
@l) →
insertionsortD#1(
@l)
insertionsortD#1(
::(
@x,
@xs)) →
insertD(
@x,
insertionsortD(
@xs))
insertionsortD#1(
nil) →
niltestInsertionsort(
@x) →
insertionsort(
testList(
#unit))
testInsertionsortD(
@x) →
insertionsortD(
testList(
#unit))
testList(
@_) →
::(
#abs(
#0),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#0)))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#0))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))),
::(
#abs(
#pos(
#s(
#0))),
::(
#abs(
#pos(
#s(
#s(
#0)))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#0))))),
nil))))))))))
#cklt(
#EQ) →
#false#cklt(
#GT) →
#false#cklt(
#LT) →
#true#compare(
#0,
#0) →
#EQ#compare(
#0,
#neg(
@y)) →
#GT#compare(
#0,
#pos(
@y)) →
#LT#compare(
#0,
#s(
@y)) →
#LT#compare(
#neg(
@x),
#0) →
#LT#compare(
#neg(
@x),
#neg(
@y)) →
#compare(
@y,
@x)
#compare(
#neg(
@x),
#pos(
@y)) →
#LT#compare(
#pos(
@x),
#0) →
#GT#compare(
#pos(
@x),
#neg(
@y)) →
#GT#compare(
#pos(
@x),
#pos(
@y)) →
#compare(
@x,
@y)
#compare(
#s(
@x),
#0) →
#GT#compare(
#s(
@x),
#s(
@y)) →
#compare(
@x,
@y)
Types:
#abs :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#0 :: #0:#neg:#pos:#s
#neg :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#pos :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#s :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#less :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #false:#true
#cklt :: #EQ:#GT:#LT → #false:#true
#compare :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #EQ:#GT:#LT
insert :: #0:#neg:#pos:#s → :::nil → :::nil
insert#1 :: :::nil → #0:#neg:#pos:#s → :::nil
:: :: #0:#neg:#pos:#s → :::nil → :::nil
insert#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
nil :: :::nil
#false :: #false:#true
#true :: #false:#true
insertD :: #0:#neg:#pos:#s → :::nil → :::nil
insertD#1 :: :::nil → #0:#neg:#pos:#s → :::nil
insertD#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
insertionsort :: :::nil → :::nil
insertionsort#1 :: :::nil → :::nil
insertionsortD :: :::nil → :::nil
insertionsortD#1 :: :::nil → :::nil
testInsertionsort :: a → :::nil
testList :: #unit → :::nil
#unit :: #unit
testInsertionsortD :: b → :::nil
#EQ :: #EQ:#GT:#LT
#GT :: #EQ:#GT:#LT
#LT :: #EQ:#GT:#LT
hole_#0:#neg:#pos:#s1_3 :: #0:#neg:#pos:#s
hole_#false:#true2_3 :: #false:#true
hole_#EQ:#GT:#LT3_3 :: #EQ:#GT:#LT
hole_:::nil4_3 :: :::nil
hole_a5_3 :: a
hole_#unit6_3 :: #unit
hole_b7_3 :: b
gen_#0:#neg:#pos:#s8_3 :: Nat → #0:#neg:#pos:#s
gen_:::nil9_3 :: Nat → :::nil
Lemmas:
#compare(gen_#0:#neg:#pos:#s8_3(n11_3), gen_#0:#neg:#pos:#s8_3(n11_3)) → #EQ, rt ∈ Ω(0)
Generator Equations:
gen_#0:#neg:#pos:#s8_3(0) ⇔ #0
gen_#0:#neg:#pos:#s8_3(+(x, 1)) ⇔ #neg(gen_#0:#neg:#pos:#s8_3(x))
gen_:::nil9_3(0) ⇔ nil
gen_:::nil9_3(+(x, 1)) ⇔ ::(#0, gen_:::nil9_3(x))
No more defined symbols left to analyse.
(28) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(1) was proven with the following lemma:
#compare(gen_#0:#neg:#pos:#s8_3(n11_3), gen_#0:#neg:#pos:#s8_3(n11_3)) → #EQ, rt ∈ Ω(0)
(29) BOUNDS(1, INF)
(30) Obligation:
Innermost TRS:
Rules:
#abs(
#0) →
#0#abs(
#neg(
@x)) →
#pos(
@x)
#abs(
#pos(
@x)) →
#pos(
@x)
#abs(
#s(
@x)) →
#pos(
#s(
@x))
#less(
@x,
@y) →
#cklt(
#compare(
@x,
@y))
insert(
@x,
@l) →
insert#1(
@l,
@x)
insert#1(
::(
@y,
@ys),
@x) →
insert#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insert#1(
nil,
@x) →
::(
@x,
nil)
insert#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insert#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insert(
@x,
@ys))
insertD(
@x,
@l) →
insertD#1(
@l,
@x)
insertD#1(
::(
@y,
@ys),
@x) →
insertD#2(
#less(
@y,
@x),
@x,
@y,
@ys)
insertD#1(
nil,
@x) →
::(
@x,
nil)
insertD#2(
#false,
@x,
@y,
@ys) →
::(
@x,
::(
@y,
@ys))
insertD#2(
#true,
@x,
@y,
@ys) →
::(
@y,
insertD(
@x,
@ys))
insertionsort(
@l) →
insertionsort#1(
@l)
insertionsort#1(
::(
@x,
@xs)) →
insert(
@x,
insertionsort(
@xs))
insertionsort#1(
nil) →
nilinsertionsortD(
@l) →
insertionsortD#1(
@l)
insertionsortD#1(
::(
@x,
@xs)) →
insertD(
@x,
insertionsortD(
@xs))
insertionsortD#1(
nil) →
niltestInsertionsort(
@x) →
insertionsort(
testList(
#unit))
testInsertionsortD(
@x) →
insertionsortD(
testList(
#unit))
testList(
@_) →
::(
#abs(
#0),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#0)))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#0))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0))))))))),
::(
#abs(
#pos(
#s(
#0))),
::(
#abs(
#pos(
#s(
#s(
#0)))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#s(
#s(
#s(
#0)))))))),
::(
#abs(
#pos(
#s(
#s(
#s(
#0))))),
nil))))))))))
#cklt(
#EQ) →
#false#cklt(
#GT) →
#false#cklt(
#LT) →
#true#compare(
#0,
#0) →
#EQ#compare(
#0,
#neg(
@y)) →
#GT#compare(
#0,
#pos(
@y)) →
#LT#compare(
#0,
#s(
@y)) →
#LT#compare(
#neg(
@x),
#0) →
#LT#compare(
#neg(
@x),
#neg(
@y)) →
#compare(
@y,
@x)
#compare(
#neg(
@x),
#pos(
@y)) →
#LT#compare(
#pos(
@x),
#0) →
#GT#compare(
#pos(
@x),
#neg(
@y)) →
#GT#compare(
#pos(
@x),
#pos(
@y)) →
#compare(
@x,
@y)
#compare(
#s(
@x),
#0) →
#GT#compare(
#s(
@x),
#s(
@y)) →
#compare(
@x,
@y)
Types:
#abs :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#0 :: #0:#neg:#pos:#s
#neg :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#pos :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#s :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#less :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #false:#true
#cklt :: #EQ:#GT:#LT → #false:#true
#compare :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #EQ:#GT:#LT
insert :: #0:#neg:#pos:#s → :::nil → :::nil
insert#1 :: :::nil → #0:#neg:#pos:#s → :::nil
:: :: #0:#neg:#pos:#s → :::nil → :::nil
insert#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
nil :: :::nil
#false :: #false:#true
#true :: #false:#true
insertD :: #0:#neg:#pos:#s → :::nil → :::nil
insertD#1 :: :::nil → #0:#neg:#pos:#s → :::nil
insertD#2 :: #false:#true → #0:#neg:#pos:#s → #0:#neg:#pos:#s → :::nil → :::nil
insertionsort :: :::nil → :::nil
insertionsort#1 :: :::nil → :::nil
insertionsortD :: :::nil → :::nil
insertionsortD#1 :: :::nil → :::nil
testInsertionsort :: a → :::nil
testList :: #unit → :::nil
#unit :: #unit
testInsertionsortD :: b → :::nil
#EQ :: #EQ:#GT:#LT
#GT :: #EQ:#GT:#LT
#LT :: #EQ:#GT:#LT
hole_#0:#neg:#pos:#s1_3 :: #0:#neg:#pos:#s
hole_#false:#true2_3 :: #false:#true
hole_#EQ:#GT:#LT3_3 :: #EQ:#GT:#LT
hole_:::nil4_3 :: :::nil
hole_a5_3 :: a
hole_#unit6_3 :: #unit
hole_b7_3 :: b
gen_#0:#neg:#pos:#s8_3 :: Nat → #0:#neg:#pos:#s
gen_:::nil9_3 :: Nat → :::nil
Lemmas:
#compare(gen_#0:#neg:#pos:#s8_3(n11_3), gen_#0:#neg:#pos:#s8_3(n11_3)) → #EQ, rt ∈ Ω(0)
Generator Equations:
gen_#0:#neg:#pos:#s8_3(0) ⇔ #0
gen_#0:#neg:#pos:#s8_3(+(x, 1)) ⇔ #neg(gen_#0:#neg:#pos:#s8_3(x))
gen_:::nil9_3(0) ⇔ nil
gen_:::nil9_3(+(x, 1)) ⇔ ::(#0, gen_:::nil9_3(x))
No more defined symbols left to analyse.
(31) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(1) was proven with the following lemma:
#compare(gen_#0:#neg:#pos:#s8_3(n11_3), gen_#0:#neg:#pos:#s8_3(n11_3)) → #EQ, rt ∈ Ω(0)
(32) BOUNDS(1, INF)