WORST_CASE(?,O(n^1)) Solution: --------- "0" :: [] -(0)-> "nat"(2) "0" :: [] -(0)-> "nat"(0) "S" :: ["nat"(2)] -(2)-> "nat"(2) "S" :: ["nat"(0)] -(0)-> "nat"(0) "compS_f" :: ["nat"(1)] -(1)-> "nat"(1) "compS_f#1" :: ["nat"(1) x "nat"(0)] -(1)-> "nat"(0) "id" :: [] -(0)-> "nat"(1) "iter#3" :: ["nat"(2)] -(1)-> "nat"(1) "main" :: ["nat"(2)] -(1)-> "nat"(0) Cost Free Signatures: --------------------- "0" :: [] -(0)-> "nat"_cf(0) "S" :: ["nat"_cf(0)] -(0)-> "nat"_cf(0) "compS_f" :: ["nat"_cf(0)] -(0)-> "nat"_cf(0) "compS_f#1" :: ["nat"_cf(0) x "nat"_cf(0)] -(0)-> "nat"_cf(0) "id" :: [] -(0)-> "nat"_cf(0) "iter#3" :: ["nat"_cf(0)] -(0)-> "nat"_cf(0) Used heuristics (no base constructurs) -------------------------------------- Parsed Typed Term Rewrite System: --------------------------------- (STRATEGY INNERMOST) (VAR "v2" "v1" "v3" "v6" "v9") (DATATYPES "nat" = µX.< "compS_f"(X), "S"(X), "id", "0" >) (SIGNATURES "compS_f#1" :: ["nat" x "nat"] --> "nat" "iter#3" :: ["nat"] --> "nat" "main" :: ["nat"] --> "nat") (RULES "compS_f#1"("compS_f"("v2"),"v1") -> "compS_f#1"("v2","S"("v1")) "compS_f#1"("id"(),"v3") -> "S"("v3") "iter#3"("0"()) -> "id"() "iter#3"("S"("v6")) -> "compS_f"("iter#3"("v6")) "main"("0"()) -> "0"() "main"("S"("v9")) -> "compS_f#1"("iter#3"("v9"),"0"())) WORST_CASE(?,O(n^1))