WORST_CASE(Omega(n^1),O(n^2)) proof of input_lRSWybyAJj.trs # AProVE Commit ID: 5b976082cb74a395683ed8cc7acf94bd611ab29f fuhs 20230524 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). (0) CpxTRS (1) RelTrsToWeightedTrsProof [UPPER BOUND(ID), 0 ms] (2) CpxWeightedTrs (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTypedWeightedTrs (5) CompletionProof [UPPER BOUND(ID), 0 ms] (6) CpxTypedWeightedCompleteTrs (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 12 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 1244 ms] (10) BOUNDS(1, n^2) (11) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CdtProblem (13) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxRelTRS (15) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CpxRelTRS (17) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (18) typed CpxTrs (19) OrderProof [LOWER BOUND(ID), 0 ms] (20) typed CpxTrs (21) RewriteLemmaProof [LOWER BOUND(ID), 358 ms] (22) BEST (23) proven lower bound (24) LowerBoundPropagationProof [FINISHED, 0 ms] (25) BOUNDS(n^1, INF) (26) typed CpxTrs (27) RewriteLemmaProof [LOWER BOUND(ID), 101 ms] (28) typed CpxTrs (29) RewriteLemmaProof [LOWER BOUND(ID), 94 ms] (30) typed CpxTrs (31) RewriteLemmaProof [LOWER BOUND(ID), 0 ms] (32) typed CpxTrs (33) RewriteLemmaProof [LOWER BOUND(ID), 77 ms] (34) typed CpxTrs (35) RewriteLemmaProof [LOWER BOUND(ID), 0 ms] (36) typed CpxTrs (37) RewriteLemmaProof [LOWER BOUND(ID), 15 ms] (38) typed CpxTrs (39) RewriteLemmaProof [LOWER BOUND(ID), 28 ms] (40) typed CpxTrs (41) RewriteLemmaProof [LOWER BOUND(ID), 11 ms] (42) typed CpxTrs (43) RewriteLemmaProof [LOWER BOUND(ID), 5968 ms] (44) typed CpxTrs (45) RewriteLemmaProof [LOWER BOUND(ID), 1518 ms] (46) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: fstsplit(0, x) -> nil fstsplit(s(n), nil) -> nil fstsplit(s(n), cons(h, t)) -> cons(h, fstsplit(n, t)) sndsplit(0, x) -> x sndsplit(s(n), nil) -> nil sndsplit(s(n), cons(h, t)) -> sndsplit(n, t) empty(nil) -> true empty(cons(h, t)) -> false leq(0, m) -> true leq(s(n), 0) -> false leq(s(n), s(m)) -> leq(n, m) length(nil) -> 0 length(cons(h, t)) -> s(length(t)) app(nil, x) -> x app(cons(h, t), x) -> cons(h, app(t, x)) map_f(pid, nil) -> nil map_f(pid, cons(h, t)) -> app(f(pid, h), map_f(pid, t)) process(store, m) -> if1(store, m, leq(m, length(store))) if1(store, m, true) -> if2(store, m, empty(fstsplit(m, store))) if1(store, m, false) -> if3(store, m, empty(fstsplit(m, app(map_f(self, nil), store)))) if2(store, m, false) -> process(app(map_f(self, nil), sndsplit(m, store)), m) if3(store, m, false) -> process(sndsplit(m, app(map_f(self, nil), store)), m) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (UPPER BOUND(ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: fstsplit(0, x) -> nil [1] fstsplit(s(n), nil) -> nil [1] fstsplit(s(n), cons(h, t)) -> cons(h, fstsplit(n, t)) [1] sndsplit(0, x) -> x [1] sndsplit(s(n), nil) -> nil [1] sndsplit(s(n), cons(h, t)) -> sndsplit(n, t) [1] empty(nil) -> true [1] empty(cons(h, t)) -> false [1] leq(0, m) -> true [1] leq(s(n), 0) -> false [1] leq(s(n), s(m)) -> leq(n, m) [1] length(nil) -> 0 [1] length(cons(h, t)) -> s(length(t)) [1] app(nil, x) -> x [1] app(cons(h, t), x) -> cons(h, app(t, x)) [1] map_f(pid, nil) -> nil [1] map_f(pid, cons(h, t)) -> app(f(pid, h), map_f(pid, t)) [1] process(store, m) -> if1(store, m, leq(m, length(store))) [1] if1(store, m, true) -> if2(store, m, empty(fstsplit(m, store))) [1] if1(store, m, false) -> if3(store, m, empty(fstsplit(m, app(map_f(self, nil), store)))) [1] if2(store, m, false) -> process(app(map_f(self, nil), sndsplit(m, store)), m) [1] if3(store, m, false) -> process(sndsplit(m, app(map_f(self, nil), store)), m) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (4) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: fstsplit(0, x) -> nil [1] fstsplit(s(n), nil) -> nil [1] fstsplit(s(n), cons(h, t)) -> cons(h, fstsplit(n, t)) [1] sndsplit(0, x) -> x [1] sndsplit(s(n), nil) -> nil [1] sndsplit(s(n), cons(h, t)) -> sndsplit(n, t) [1] empty(nil) -> true [1] empty(cons(h, t)) -> false [1] leq(0, m) -> true [1] leq(s(n), 0) -> false [1] leq(s(n), s(m)) -> leq(n, m) [1] length(nil) -> 0 [1] length(cons(h, t)) -> s(length(t)) [1] app(nil, x) -> x [1] app(cons(h, t), x) -> cons(h, app(t, x)) [1] map_f(pid, nil) -> nil [1] map_f(pid, cons(h, t)) -> app(f(pid, h), map_f(pid, t)) [1] process(store, m) -> if1(store, m, leq(m, length(store))) [1] if1(store, m, true) -> if2(store, m, empty(fstsplit(m, store))) [1] if1(store, m, false) -> if3(store, m, empty(fstsplit(m, app(map_f(self, nil), store)))) [1] if2(store, m, false) -> process(app(map_f(self, nil), sndsplit(m, store)), m) [1] if3(store, m, false) -> process(sndsplit(m, app(map_f(self, nil), store)), m) [1] The TRS has the following type information: fstsplit :: 0:s -> nil:cons:f -> nil:cons:f 0 :: 0:s nil :: nil:cons:f s :: 0:s -> 0:s cons :: a -> nil:cons:f -> nil:cons:f sndsplit :: 0:s -> nil:cons:f -> nil:cons:f empty :: nil:cons:f -> true:false true :: true:false false :: true:false leq :: 0:s -> 0:s -> true:false length :: nil:cons:f -> 0:s app :: nil:cons:f -> nil:cons:f -> nil:cons:f map_f :: self -> nil:cons:f -> nil:cons:f f :: self -> a -> nil:cons:f process :: nil:cons:f -> 0:s -> process:if1:if2:if3 if1 :: nil:cons:f -> 0:s -> true:false -> process:if1:if2:if3 if2 :: nil:cons:f -> 0:s -> true:false -> process:if1:if2:if3 if3 :: nil:cons:f -> 0:s -> true:false -> process:if1:if2:if3 self :: self Rewrite Strategy: INNERMOST ---------------------------------------- (5) CompletionProof (UPPER BOUND(ID)) The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: fstsplit(v0, v1) -> null_fstsplit [0] sndsplit(v0, v1) -> null_sndsplit [0] empty(v0) -> null_empty [0] length(v0) -> null_length [0] app(v0, v1) -> null_app [0] map_f(v0, v1) -> null_map_f [0] if2(v0, v1, v2) -> null_if2 [0] if3(v0, v1, v2) -> null_if3 [0] leq(v0, v1) -> null_leq [0] if1(v0, v1, v2) -> null_if1 [0] And the following fresh constants: null_fstsplit, null_sndsplit, null_empty, null_length, null_app, null_map_f, null_if2, null_if3, null_leq, null_if1, const ---------------------------------------- (6) Obligation: Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: fstsplit(0, x) -> nil [1] fstsplit(s(n), nil) -> nil [1] fstsplit(s(n), cons(h, t)) -> cons(h, fstsplit(n, t)) [1] sndsplit(0, x) -> x [1] sndsplit(s(n), nil) -> nil [1] sndsplit(s(n), cons(h, t)) -> sndsplit(n, t) [1] empty(nil) -> true [1] empty(cons(h, t)) -> false [1] leq(0, m) -> true [1] leq(s(n), 0) -> false [1] leq(s(n), s(m)) -> leq(n, m) [1] length(nil) -> 0 [1] length(cons(h, t)) -> s(length(t)) [1] app(nil, x) -> x [1] app(cons(h, t), x) -> cons(h, app(t, x)) [1] map_f(pid, nil) -> nil [1] map_f(pid, cons(h, t)) -> app(f(pid, h), map_f(pid, t)) [1] process(store, m) -> if1(store, m, leq(m, length(store))) [1] if1(store, m, true) -> if2(store, m, empty(fstsplit(m, store))) [1] if1(store, m, false) -> if3(store, m, empty(fstsplit(m, app(map_f(self, nil), store)))) [1] if2(store, m, false) -> process(app(map_f(self, nil), sndsplit(m, store)), m) [1] if3(store, m, false) -> process(sndsplit(m, app(map_f(self, nil), store)), m) [1] fstsplit(v0, v1) -> null_fstsplit [0] sndsplit(v0, v1) -> null_sndsplit [0] empty(v0) -> null_empty [0] length(v0) -> null_length [0] app(v0, v1) -> null_app [0] map_f(v0, v1) -> null_map_f [0] if2(v0, v1, v2) -> null_if2 [0] if3(v0, v1, v2) -> null_if3 [0] leq(v0, v1) -> null_leq [0] if1(v0, v1, v2) -> null_if1 [0] The TRS has the following type information: fstsplit :: 0:s:null_length -> nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f -> nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f 0 :: 0:s:null_length nil :: nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f s :: 0:s:null_length -> 0:s:null_length cons :: a -> nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f -> nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f sndsplit :: 0:s:null_length -> nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f -> nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f empty :: nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f -> true:false:null_empty:null_leq true :: true:false:null_empty:null_leq false :: true:false:null_empty:null_leq leq :: 0:s:null_length -> 0:s:null_length -> true:false:null_empty:null_leq length :: nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f -> 0:s:null_length app :: nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f -> nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f -> nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f map_f :: self -> nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f -> nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f f :: self -> a -> nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f process :: nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f -> 0:s:null_length -> null_if2:null_if3:null_if1 if1 :: nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f -> 0:s:null_length -> true:false:null_empty:null_leq -> null_if2:null_if3:null_if1 if2 :: nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f -> 0:s:null_length -> true:false:null_empty:null_leq -> null_if2:null_if3:null_if1 if3 :: nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f -> 0:s:null_length -> true:false:null_empty:null_leq -> null_if2:null_if3:null_if1 self :: self null_fstsplit :: nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f null_sndsplit :: nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f null_empty :: true:false:null_empty:null_leq null_length :: 0:s:null_length null_app :: nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f null_map_f :: nil:cons:f:null_fstsplit:null_sndsplit:null_app:null_map_f null_if2 :: null_if2:null_if3:null_if1 null_if3 :: null_if2:null_if3:null_if1 null_leq :: true:false:null_empty:null_leq null_if1 :: null_if2:null_if3:null_if1 const :: a Rewrite Strategy: INNERMOST ---------------------------------------- (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: 0 => 0 nil => 0 true => 2 false => 1 self => 0 null_fstsplit => 0 null_sndsplit => 0 null_empty => 0 null_length => 0 null_app => 0 null_map_f => 0 null_if2 => 0 null_if3 => 0 null_leq => 0 null_if1 => 0 const => 0 ---------------------------------------- (8) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> x :|: z' = x, x >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 app(z, z') -{ 1 }-> 1 + h + app(t, x) :|: z = 1 + h + t, z' = x, x >= 0, h >= 0, t >= 0 empty(z) -{ 1 }-> 2 :|: z = 0 empty(z) -{ 1 }-> 1 :|: z = 1 + h + t, h >= 0, t >= 0 empty(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 fstsplit(z, z') -{ 1 }-> 0 :|: z' = x, x >= 0, z = 0 fstsplit(z, z') -{ 1 }-> 0 :|: n >= 0, z = 1 + n, z' = 0 fstsplit(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 fstsplit(z, z') -{ 1 }-> 1 + h + fstsplit(n, t) :|: z' = 1 + h + t, n >= 0, h >= 0, t >= 0, z = 1 + n if1(z, z', z'') -{ 1 }-> if3(store, m, empty(fstsplit(m, app(map_f(0, 0), store)))) :|: z = store, z' = m, store >= 0, z'' = 1, m >= 0 if1(z, z', z'') -{ 1 }-> if2(store, m, empty(fstsplit(m, store))) :|: z = store, z' = m, z'' = 2, store >= 0, m >= 0 if1(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 if2(z, z', z'') -{ 1 }-> process(app(map_f(0, 0), sndsplit(m, store)), m) :|: z = store, z' = m, store >= 0, z'' = 1, m >= 0 if2(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 if3(z, z', z'') -{ 1 }-> process(sndsplit(m, app(map_f(0, 0), store)), m) :|: z = store, z' = m, store >= 0, z'' = 1, m >= 0 if3(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 length(z) -{ 1 }-> 0 :|: z = 0 length(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 length(z) -{ 1 }-> 1 + length(t) :|: z = 1 + h + t, h >= 0, t >= 0 leq(z, z') -{ 1 }-> leq(n, m) :|: n >= 0, z' = 1 + m, z = 1 + n, m >= 0 leq(z, z') -{ 1 }-> 2 :|: z' = m, z = 0, m >= 0 leq(z, z') -{ 1 }-> 1 :|: n >= 0, z = 1 + n, z' = 0 leq(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 map_f(z, z') -{ 1 }-> app(1 + pid + h, map_f(pid, t)) :|: z' = 1 + h + t, z = pid, h >= 0, t >= 0, pid >= 0 map_f(z, z') -{ 1 }-> 0 :|: z = pid, pid >= 0, z' = 0 map_f(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 process(z, z') -{ 1 }-> if1(store, m, leq(m, length(store))) :|: z = store, z' = m, store >= 0, m >= 0 sndsplit(z, z') -{ 1 }-> x :|: z' = x, x >= 0, z = 0 sndsplit(z, z') -{ 1 }-> sndsplit(n, t) :|: z' = 1 + h + t, n >= 0, h >= 0, t >= 0, z = 1 + n sndsplit(z, z') -{ 1 }-> 0 :|: n >= 0, z = 1 + n, z' = 0 sndsplit(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (9) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V1, V, V31),0,[fstsplit(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V31),0,[sndsplit(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V31),0,[empty(V1, Out)],[V1 >= 0]). eq(start(V1, V, V31),0,[leq(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V31),0,[length(V1, Out)],[V1 >= 0]). eq(start(V1, V, V31),0,[app(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V31),0,[fun(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V31),0,[process(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V31),0,[if1(V1, V, V31, Out)],[V1 >= 0,V >= 0,V31 >= 0]). eq(start(V1, V, V31),0,[if2(V1, V, V31, Out)],[V1 >= 0,V >= 0,V31 >= 0]). eq(start(V1, V, V31),0,[if3(V1, V, V31, Out)],[V1 >= 0,V >= 0,V31 >= 0]). eq(fstsplit(V1, V, Out),1,[],[Out = 0,V = V2,V2 >= 0,V1 = 0]). eq(fstsplit(V1, V, Out),1,[],[Out = 0,V3 >= 0,V1 = 1 + V3,V = 0]). eq(fstsplit(V1, V, Out),1,[fstsplit(V5, V4, Ret1)],[Out = 1 + Ret1 + V6,V = 1 + V4 + V6,V5 >= 0,V6 >= 0,V4 >= 0,V1 = 1 + V5]). eq(sndsplit(V1, V, Out),1,[],[Out = V7,V = V7,V7 >= 0,V1 = 0]). eq(sndsplit(V1, V, Out),1,[],[Out = 0,V8 >= 0,V1 = 1 + V8,V = 0]). eq(sndsplit(V1, V, Out),1,[sndsplit(V11, V10, Ret)],[Out = Ret,V = 1 + V10 + V9,V11 >= 0,V9 >= 0,V10 >= 0,V1 = 1 + V11]). eq(empty(V1, Out),1,[],[Out = 2,V1 = 0]). eq(empty(V1, Out),1,[],[Out = 1,V1 = 1 + V12 + V13,V12 >= 0,V13 >= 0]). eq(leq(V1, V, Out),1,[],[Out = 2,V = V14,V1 = 0,V14 >= 0]). eq(leq(V1, V, Out),1,[],[Out = 1,V15 >= 0,V1 = 1 + V15,V = 0]). eq(leq(V1, V, Out),1,[leq(V17, V16, Ret2)],[Out = Ret2,V17 >= 0,V = 1 + V16,V1 = 1 + V17,V16 >= 0]). eq(length(V1, Out),1,[],[Out = 0,V1 = 0]). eq(length(V1, Out),1,[length(V19, Ret11)],[Out = 1 + Ret11,V1 = 1 + V18 + V19,V18 >= 0,V19 >= 0]). eq(app(V1, V, Out),1,[],[Out = V20,V = V20,V20 >= 0,V1 = 0]). eq(app(V1, V, Out),1,[app(V23, V21, Ret12)],[Out = 1 + Ret12 + V22,V1 = 1 + V22 + V23,V = V21,V21 >= 0,V22 >= 0,V23 >= 0]). eq(fun(V1, V, Out),1,[],[Out = 0,V1 = V24,V24 >= 0,V = 0]). eq(fun(V1, V, Out),1,[fun(V27, V26, Ret13),app(1 + V27 + V25, Ret13, Ret3)],[Out = Ret3,V = 1 + V25 + V26,V1 = V27,V25 >= 0,V26 >= 0,V27 >= 0]). eq(process(V1, V, Out),1,[length(V28, Ret21),leq(V29, Ret21, Ret22),if1(V28, V29, Ret22, Ret4)],[Out = Ret4,V1 = V28,V = V29,V28 >= 0,V29 >= 0]). eq(if1(V1, V, V31, Out),1,[fstsplit(V32, V30, Ret20),empty(Ret20, Ret23),if2(V30, V32, Ret23, Ret5)],[Out = Ret5,V1 = V30,V = V32,V31 = 2,V30 >= 0,V32 >= 0]). eq(if1(V1, V, V31, Out),1,[fun(0, 0, Ret2010),app(Ret2010, V34, Ret201),fstsplit(V33, Ret201, Ret202),empty(Ret202, Ret24),if3(V34, V33, Ret24, Ret6)],[Out = Ret6,V1 = V34,V = V33,V34 >= 0,V31 = 1,V33 >= 0]). eq(if2(V1, V, V31, Out),1,[fun(0, 0, Ret00),sndsplit(V35, V36, Ret01),app(Ret00, Ret01, Ret0),process(Ret0, V35, Ret7)],[Out = Ret7,V1 = V36,V = V35,V36 >= 0,V31 = 1,V35 >= 0]). eq(if3(V1, V, V31, Out),1,[fun(0, 0, Ret010),app(Ret010, V38, Ret011),sndsplit(V37, Ret011, Ret02),process(Ret02, V37, Ret8)],[Out = Ret8,V1 = V38,V = V37,V38 >= 0,V31 = 1,V37 >= 0]). eq(fstsplit(V1, V, Out),0,[],[Out = 0,V40 >= 0,V39 >= 0,V1 = V40,V = V39]). eq(sndsplit(V1, V, Out),0,[],[Out = 0,V42 >= 0,V41 >= 0,V1 = V42,V = V41]). eq(empty(V1, Out),0,[],[Out = 0,V43 >= 0,V1 = V43]). eq(length(V1, Out),0,[],[Out = 0,V44 >= 0,V1 = V44]). eq(app(V1, V, Out),0,[],[Out = 0,V45 >= 0,V46 >= 0,V1 = V45,V = V46]). eq(fun(V1, V, Out),0,[],[Out = 0,V47 >= 0,V48 >= 0,V1 = V47,V = V48]). eq(if2(V1, V, V31, Out),0,[],[Out = 0,V50 >= 0,V31 = V51,V49 >= 0,V1 = V50,V = V49,V51 >= 0]). eq(if3(V1, V, V31, Out),0,[],[Out = 0,V52 >= 0,V31 = V54,V53 >= 0,V1 = V52,V = V53,V54 >= 0]). eq(leq(V1, V, Out),0,[],[Out = 0,V55 >= 0,V56 >= 0,V1 = V55,V = V56]). eq(if1(V1, V, V31, Out),0,[],[Out = 0,V57 >= 0,V31 = V59,V58 >= 0,V1 = V57,V = V58,V59 >= 0]). input_output_vars(fstsplit(V1,V,Out),[V1,V],[Out]). input_output_vars(sndsplit(V1,V,Out),[V1,V],[Out]). input_output_vars(empty(V1,Out),[V1],[Out]). input_output_vars(leq(V1,V,Out),[V1,V],[Out]). input_output_vars(length(V1,Out),[V1],[Out]). input_output_vars(app(V1,V,Out),[V1,V],[Out]). input_output_vars(fun(V1,V,Out),[V1,V],[Out]). input_output_vars(process(V1,V,Out),[V1,V],[Out]). input_output_vars(if1(V1,V,V31,Out),[V1,V,V31],[Out]). input_output_vars(if2(V1,V,V31,Out),[V1,V,V31],[Out]). input_output_vars(if3(V1,V,V31,Out),[V1,V,V31],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [app/3] 1. non_recursive : [empty/2] 2. recursive : [fstsplit/3] 3. recursive [non_tail] : [fun/3] 4. recursive : [length/2] 5. recursive : [leq/3] 6. recursive : [sndsplit/3] 7. recursive : [if1/4,if2/4,if3/4,process/3] 8. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into app/3 1. SCC is partially evaluated into empty/2 2. SCC is partially evaluated into fstsplit/3 3. SCC is partially evaluated into fun/3 4. SCC is partially evaluated into length/2 5. SCC is partially evaluated into leq/3 6. SCC is partially evaluated into sndsplit/3 7. SCC is partially evaluated into process/3 8. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations app/3 * CE 21 is refined into CE [45] * CE 19 is refined into CE [46] * CE 20 is refined into CE [47] ### Cost equations --> "Loop" of app/3 * CEs [47] --> Loop 25 * CEs [45] --> Loop 26 * CEs [46] --> Loop 27 ### Ranking functions of CR app(V1,V,Out) * RF of phase [25]: [V1] #### Partial ranking functions of CR app(V1,V,Out) * Partial RF of phase [25]: - RF of loop [25:1]: V1 ### Specialization of cost equations empty/2 * CE 27 is refined into CE [48] * CE 28 is refined into CE [49] * CE 26 is refined into CE [50] ### Cost equations --> "Loop" of empty/2 * CEs [48] --> Loop 28 * CEs [49] --> Loop 29 * CEs [50] --> Loop 30 ### Ranking functions of CR empty(V1,Out) #### Partial ranking functions of CR empty(V1,Out) ### Specialization of cost equations fstsplit/3 * CE 23 is refined into CE [51] * CE 22 is refined into CE [52] * CE 25 is refined into CE [53] * CE 24 is refined into CE [54] ### Cost equations --> "Loop" of fstsplit/3 * CEs [54] --> Loop 31 * CEs [51] --> Loop 32 * CEs [52,53] --> Loop 33 ### Ranking functions of CR fstsplit(V1,V,Out) * RF of phase [31]: [V,V1] #### Partial ranking functions of CR fstsplit(V1,V,Out) * Partial RF of phase [31]: - RF of loop [31:1]: V V1 ### Specialization of cost equations fun/3 * CE 16 is refined into CE [55] * CE 18 is refined into CE [56] * CE 17 is refined into CE [57,58,59] ### Cost equations --> "Loop" of fun/3 * CEs [58] --> Loop 34 * CEs [59] --> Loop 35 * CEs [57] --> Loop 36 * CEs [55,56] --> Loop 37 ### Ranking functions of CR fun(V1,V,Out) * RF of phase [34,35,36]: [V] #### Partial ranking functions of CR fun(V1,V,Out) * Partial RF of phase [34,35,36]: - RF of loop [34:1,35:1,36:1]: V ### Specialization of cost equations length/2 * CE 42 is refined into CE [60] * CE 44 is refined into CE [61] * CE 43 is refined into CE [62] ### Cost equations --> "Loop" of length/2 * CEs [62] --> Loop 38 * CEs [60,61] --> Loop 39 ### Ranking functions of CR length(V1,Out) * RF of phase [38]: [V1] #### Partial ranking functions of CR length(V1,Out) * Partial RF of phase [38]: - RF of loop [38:1]: V1 ### Specialization of cost equations leq/3 * CE 41 is refined into CE [63] * CE 39 is refined into CE [64] * CE 38 is refined into CE [65] * CE 40 is refined into CE [66] ### Cost equations --> "Loop" of leq/3 * CEs [66] --> Loop 40 * CEs [63] --> Loop 41 * CEs [64] --> Loop 42 * CEs [65] --> Loop 43 ### Ranking functions of CR leq(V1,V,Out) * RF of phase [40]: [V,V1] #### Partial ranking functions of CR leq(V1,V,Out) * Partial RF of phase [40]: - RF of loop [40:1]: V V1 ### Specialization of cost equations sndsplit/3 * CE 30 is refined into CE [67] * CE 32 is refined into CE [68] * CE 29 is refined into CE [69] * CE 31 is refined into CE [70] ### Cost equations --> "Loop" of sndsplit/3 * CEs [70] --> Loop 44 * CEs [67,68] --> Loop 45 * CEs [69] --> Loop 46 ### Ranking functions of CR sndsplit(V1,V,Out) * RF of phase [44]: [V,V1] #### Partial ranking functions of CR sndsplit(V1,V,Out) * Partial RF of phase [44]: - RF of loop [44:1]: V V1 ### Specialization of cost equations process/3 * CE 33 is refined into CE [71,72,73,74,75,76,77] * CE 35 is refined into CE [78,79,80,81,82,83,84,85,86,87,88,89] * CE 37 is refined into CE [90,91,92,93,94,95,96,97] * CE 34 is refined into CE [98,99,100,101,102,103] * CE 36 is refined into CE [104,105,106,107] ### Cost equations --> "Loop" of process/3 * CEs [99,102,106] --> Loop 47 * CEs [98,100,101,103,104,105,107] --> Loop 48 * CEs [71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97] --> Loop 49 ### Ranking functions of CR process(V1,V,Out) * RF of phase [47]: [V1,V1-V+1] #### Partial ranking functions of CR process(V1,V,Out) * Partial RF of phase [47]: - RF of loop [47:1]: V1 V1-V+1 ### Specialization of cost equations start/3 * CE 4 is refined into CE [108,109,110,111] * CE 5 is refined into CE [112,113,114,115] * CE 1 is refined into CE [116] * CE 2 is refined into CE [117,118,119] * CE 3 is refined into CE [120,121,122,123,124,125] * CE 6 is refined into CE [126,127,128,129,130,131] * CE 7 is refined into CE [132,133,134,135,136] * CE 8 is refined into CE [137,138] * CE 9 is refined into CE [139,140,141] * CE 10 is refined into CE [142,143,144] * CE 11 is refined into CE [145,146,147,148,149] * CE 12 is refined into CE [150,151] * CE 13 is refined into CE [152,153,154,155] * CE 14 is refined into CE [156,157] * CE 15 is refined into CE [158] ### Cost equations --> "Loop" of start/3 * CEs [108,109,110,111,112,113,114,115] --> Loop 50 * CEs [146] --> Loop 51 * CEs [117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136] --> Loop 52 * CEs [116,137,138,139,140,141,142,143,144,145,147,148,149,150,151,152,153,154,155,156,157,158] --> Loop 53 ### Ranking functions of CR start(V1,V,V31) #### Partial ranking functions of CR start(V1,V,V31) Computing Bounds ===================================== #### Cost of chains of app(V1,V,Out): * Chain [[25],27]: 1*it(25)+1 Such that:it(25) =< -V+Out with precondition: [V+V1=Out,V1>=1,V>=0] * Chain [[25],26]: 1*it(25)+0 Such that:it(25) =< Out with precondition: [V>=0,Out>=1,V1>=Out] * Chain [27]: 1 with precondition: [V1=0,V=Out,V>=0] * Chain [26]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of empty(V1,Out): * Chain [30]: 1 with precondition: [V1=0,Out=2] * Chain [29]: 0 with precondition: [Out=0,V1>=0] * Chain [28]: 1 with precondition: [Out=1,V1>=1] #### Cost of chains of fstsplit(V1,V,Out): * Chain [[31],33]: 1*it(31)+1 Such that:it(31) =< V1 with precondition: [V1>=1,Out>=1,V>=Out] * Chain [[31],32]: 1*it(31)+1 Such that:it(31) =< V1 with precondition: [V=Out,V1>=2,V>=1] * Chain [33]: 1 with precondition: [Out=0,V1>=0,V>=0] * Chain [32]: 1 with precondition: [V=0,Out=0,V1>=1] #### Cost of chains of fun(V1,V,Out): * Chain [[34,35,36],37]: 4*it(34)+1*s(7)+1*s(8)+1 Such that:aux(2) =< V1+V aux(6) =< V it(34) =< aux(6) aux(3) =< aux(2) s(7) =< it(34)*aux(2) s(8) =< it(34)*aux(3) with precondition: [V1>=0,V>=1,Out>=0] * Chain [37]: 1 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of length(V1,Out): * Chain [[38],39]: 1*it(38)+1 Such that:it(38) =< V1 with precondition: [Out>=1,V1>=Out] * Chain [39]: 1 with precondition: [Out=0,V1>=0] #### Cost of chains of leq(V1,V,Out): * Chain [[40],43]: 1*it(40)+1 Such that:it(40) =< V1 with precondition: [Out=2,V1>=1,V>=V1] * Chain [[40],42]: 1*it(40)+1 Such that:it(40) =< V with precondition: [Out=1,V>=1,V1>=V+1] * Chain [[40],41]: 1*it(40)+0 Such that:it(40) =< V with precondition: [Out=0,V1>=1,V>=1] * Chain [43]: 1 with precondition: [V1=0,Out=2,V>=0] * Chain [42]: 1 with precondition: [V=0,Out=1,V1>=1] * Chain [41]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of sndsplit(V1,V,Out): * Chain [[44],46]: 1*it(44)+1 Such that:it(44) =< V1 with precondition: [V1>=1,Out>=0,V>=Out+V1] * Chain [[44],45]: 1*it(44)+1 Such that:it(44) =< V with precondition: [Out=0,V1>=1,V>=1] * Chain [46]: 1 with precondition: [V1=0,V=Out,V>=0] * Chain [45]: 1 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of process(V1,V,Out): * Chain [[47],49]: 45*it(47)+19*s(18)+2*s(71)+8 Such that:aux(18) =< V aux(27) =< V1 it(47) =< aux(27) s(18) =< aux(18) s(73) =< it(47)*aux(27) s(71) =< s(73) with precondition: [Out=0,V>=1,V1>=V] * Chain [[47],48,49]: 34*it(47)+37*s(18)+2*s(71)+20 Such that:aux(37) =< V aux(38) =< V1 it(47) =< aux(38) s(18) =< aux(37) s(73) =< it(47)*aux(38) s(71) =< s(73) with precondition: [Out=0,V>=1,V1>=V+1] * Chain [49]: 22*s(12)+19*s(18)+8 Such that:aux(17) =< V1 aux(18) =< V s(12) =< aux(17) s(18) =< aux(18) with precondition: [Out=0,V1>=0,V>=0] * Chain [48,49]: 37*s(18)+11*s(76)+20 Such that:aux(35) =< V1 aux(37) =< V s(18) =< aux(37) s(76) =< aux(35) with precondition: [Out=0,V1>=1,V>=1] #### Cost of chains of start(V1,V,V31): * Chain [53]: 119*s(126)+119*s(127)+1*s(139)+1*s(140)+4*s(146)+20 Such that:s(135) =< V1+V aux(41) =< V1 aux(42) =< V s(126) =< aux(41) s(127) =< aux(42) s(145) =< s(126)*aux(41) s(146) =< s(145) s(138) =< s(135) s(139) =< s(127)*s(135) s(140) =< s(127)*s(138) with precondition: [V1>=0] * Chain [52]: 1134*s(148)+228*s(149)+336*s(162)+12*s(164)+8*s(183)+29 Such that:aux(53) =< V1 aux(54) =< V1-V aux(55) =< V s(149) =< aux(53) s(148) =< aux(55) s(182) =< s(149)*aux(53) s(183) =< s(182) s(162) =< aux(54) s(163) =< s(162)*aux(54) s(164) =< s(163) with precondition: [V31=1,V1>=0,V>=0] * Chain [51]: 1 with precondition: [V=0,V1>=1] * Chain [50]: 462*s(252)+2*s(253)+112*s(275)+4*s(277)+27 Such that:s(272) =< V1-V aux(60) =< V1 aux(61) =< V s(253) =< aux(60) s(252) =< aux(61) s(275) =< s(272) s(276) =< s(275)*s(272) s(277) =< s(276) with precondition: [V31=2,V1>=0,V>=0] Closed-form bounds of start(V1,V,V31): ------------------------------------- * Chain [53] with precondition: [V1>=0] - Upper bound: 119*V1+20+4*V1*V1+nat(V)*119+nat(V)*2*nat(V1+V) - Complexity: n^2 * Chain [52] with precondition: [V31=1,V1>=0,V>=0] - Upper bound: 228*V1+29+8*V1*V1+1134*V+nat(V1-V)*336+nat(V1-V)*12*nat(V1-V) - Complexity: n^2 * Chain [51] with precondition: [V=0,V1>=1] - Upper bound: 1 - Complexity: constant * Chain [50] with precondition: [V31=2,V1>=0,V>=0] - Upper bound: 2*V1+462*V+27+nat(V1-V)*112+nat(V1-V)*4*nat(V1-V) - Complexity: n^2 ### Maximum cost of start(V1,V,V31): 2*V1+19+nat(V)*119+max([4*V1*V1+117*V1+max([nat(V)*2*nat(V1+V),109*V1+9+4*V1*V1+nat(V)*1015+nat(V1-V)*336+nat(V1-V)*12*nat(V1-V)]),nat(V)*343+7+nat(V1-V)*112+nat(V1-V)*4*nat(V1-V)])+1 Asymptotic class: n^2 * Total analysis performed in 1111 ms. ---------------------------------------- (10) BOUNDS(1, n^2) ---------------------------------------- (11) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules: fstsplit(0, z0) -> nil fstsplit(s(z0), nil) -> nil fstsplit(s(z0), cons(z1, z2)) -> cons(z1, fstsplit(z0, z2)) sndsplit(0, z0) -> z0 sndsplit(s(z0), nil) -> nil sndsplit(s(z0), cons(z1, z2)) -> sndsplit(z0, z2) empty(nil) -> true empty(cons(z0, z1)) -> false leq(0, z0) -> true leq(s(z0), 0) -> false leq(s(z0), s(z1)) -> leq(z0, z1) length(nil) -> 0 length(cons(z0, z1)) -> s(length(z1)) app(nil, z0) -> z0 app(cons(z0, z1), z2) -> cons(z0, app(z1, z2)) map_f(z0, nil) -> nil map_f(z0, cons(z1, z2)) -> app(f(z0, z1), map_f(z0, z2)) process(z0, z1) -> if1(z0, z1, leq(z1, length(z0))) if1(z0, z1, true) -> if2(z0, z1, empty(fstsplit(z1, z0))) if1(z0, z1, false) -> if3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))) if2(z0, z1, false) -> process(app(map_f(self, nil), sndsplit(z1, z0)), z1) if3(z0, z1, false) -> process(sndsplit(z1, app(map_f(self, nil), z0)), z1) Tuples: FSTSPLIT(0, z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0, z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0, z0) -> c8 LEQ(s(z0), 0) -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) S tuples: FSTSPLIT(0, z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0, z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0, z0) -> c8 LEQ(s(z0), 0) -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) K tuples:none Defined Rule Symbols: fstsplit_2, sndsplit_2, empty_1, leq_2, length_1, app_2, map_f_2, process_2, if1_3, if2_3, if3_3 Defined Pair Symbols: FSTSPLIT_2, SNDSPLIT_2, EMPTY_1, LEQ_2, LENGTH_1, APP_2, MAP_F_2, PROCESS_2, IF1_3, IF2_3, IF3_3 Compound Symbols: c, c1, c2_1, c3, c4, c5_1, c6, c7, c8, c9, c10_1, c11, c12_1, c13, c14_1, c15, c16_2, c17_3, c18_3, c19_5, c20_3, c21_3, c22_4 ---------------------------------------- (13) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (14) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: FSTSPLIT(0, z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0, z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0, z0) -> c8 LEQ(s(z0), 0) -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) The (relative) TRS S consists of the following rules: fstsplit(0, z0) -> nil fstsplit(s(z0), nil) -> nil fstsplit(s(z0), cons(z1, z2)) -> cons(z1, fstsplit(z0, z2)) sndsplit(0, z0) -> z0 sndsplit(s(z0), nil) -> nil sndsplit(s(z0), cons(z1, z2)) -> sndsplit(z0, z2) empty(nil) -> true empty(cons(z0, z1)) -> false leq(0, z0) -> true leq(s(z0), 0) -> false leq(s(z0), s(z1)) -> leq(z0, z1) length(nil) -> 0 length(cons(z0, z1)) -> s(length(z1)) app(nil, z0) -> z0 app(cons(z0, z1), z2) -> cons(z0, app(z1, z2)) map_f(z0, nil) -> nil map_f(z0, cons(z1, z2)) -> app(f(z0, z1), map_f(z0, z2)) process(z0, z1) -> if1(z0, z1, leq(z1, length(z0))) if1(z0, z1, true) -> if2(z0, z1, empty(fstsplit(z1, z0))) if1(z0, z1, false) -> if3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))) if2(z0, z1, false) -> process(app(map_f(self, nil), sndsplit(z1, z0)), z1) if3(z0, z1, false) -> process(sndsplit(z1, app(map_f(self, nil), z0)), z1) Rewrite Strategy: INNERMOST ---------------------------------------- (15) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (16) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: FSTSPLIT(0', z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0', z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0', z0) -> c8 LEQ(s(z0), 0') -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) The (relative) TRS S consists of the following rules: fstsplit(0', z0) -> nil fstsplit(s(z0), nil) -> nil fstsplit(s(z0), cons(z1, z2)) -> cons(z1, fstsplit(z0, z2)) sndsplit(0', z0) -> z0 sndsplit(s(z0), nil) -> nil sndsplit(s(z0), cons(z1, z2)) -> sndsplit(z0, z2) empty(nil) -> true empty(cons(z0, z1)) -> false leq(0', z0) -> true leq(s(z0), 0') -> false leq(s(z0), s(z1)) -> leq(z0, z1) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) app(nil, z0) -> z0 app(cons(z0, z1), z2) -> cons(z0, app(z1, z2)) map_f(z0, nil) -> nil map_f(z0, cons(z1, z2)) -> app(f(z0, z1), map_f(z0, z2)) process(z0, z1) -> if1(z0, z1, leq(z1, length(z0))) if1(z0, z1, true) -> if2(z0, z1, empty(fstsplit(z1, z0))) if1(z0, z1, false) -> if3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))) if2(z0, z1, false) -> process(app(map_f(self, nil), sndsplit(z1, z0)), z1) if3(z0, z1, false) -> process(sndsplit(z1, app(map_f(self, nil), z0)), z1) Rewrite Strategy: INNERMOST ---------------------------------------- (17) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (18) Obligation: Innermost TRS: Rules: FSTSPLIT(0', z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0', z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0', z0) -> c8 LEQ(s(z0), 0') -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) fstsplit(0', z0) -> nil fstsplit(s(z0), nil) -> nil fstsplit(s(z0), cons(z1, z2)) -> cons(z1, fstsplit(z0, z2)) sndsplit(0', z0) -> z0 sndsplit(s(z0), nil) -> nil sndsplit(s(z0), cons(z1, z2)) -> sndsplit(z0, z2) empty(nil) -> true empty(cons(z0, z1)) -> false leq(0', z0) -> true leq(s(z0), 0') -> false leq(s(z0), s(z1)) -> leq(z0, z1) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) app(nil, z0) -> z0 app(cons(z0, z1), z2) -> cons(z0, app(z1, z2)) map_f(z0, nil) -> nil map_f(z0, cons(z1, z2)) -> app(f(z0, z1), map_f(z0, z2)) process(z0, z1) -> if1(z0, z1, leq(z1, length(z0))) if1(z0, z1, true) -> if2(z0, z1, empty(fstsplit(z1, z0))) if1(z0, z1, false) -> if3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))) if2(z0, z1, false) -> process(app(map_f(self, nil), sndsplit(z1, z0)), z1) if3(z0, z1, false) -> process(sndsplit(z1, app(map_f(self, nil), z0)), z1) Types: FSTSPLIT :: 0':s -> nil:cons:f -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s nil :: nil:cons:f c1 :: c:c1:c2 cons :: a -> nil:cons:f -> nil:cons:f c2 :: c:c1:c2 -> c:c1:c2 SNDSPLIT :: 0':s -> nil:cons:f -> c3:c4:c5 c3 :: c3:c4:c5 c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 EMPTY :: nil:cons:f -> c6:c7 c6 :: c6:c7 c7 :: c6:c7 LEQ :: 0':s -> 0':s -> c8:c9:c10 c8 :: c8:c9:c10 c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 LENGTH :: nil:cons:f -> c11:c12 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 APP :: nil:cons:f -> nil:cons:f -> c13:c14 c13 :: c13:c14 c14 :: c13:c14 -> c13:c14 MAP_F :: self -> nil:cons:f -> c15:c16 c15 :: c15:c16 c16 :: c13:c14 -> c15:c16 -> c15:c16 f :: self -> a -> nil:cons:f map_f :: self -> nil:cons:f -> nil:cons:f PROCESS :: nil:cons:f -> 0':s -> c17 c17 :: c18:c19 -> c8:c9:c10 -> c11:c12 -> c17 IF1 :: nil:cons:f -> 0':s -> true:false -> c18:c19 leq :: 0':s -> 0':s -> true:false length :: nil:cons:f -> 0':s true :: true:false c18 :: c20:c21 -> c6:c7 -> c:c1:c2 -> c18:c19 IF2 :: nil:cons:f -> 0':s -> true:false -> c20:c21 empty :: nil:cons:f -> true:false fstsplit :: 0':s -> nil:cons:f -> nil:cons:f false :: true:false c19 :: c22 -> c6:c7 -> c:c1:c2 -> c13:c14 -> c15:c16 -> c18:c19 IF3 :: nil:cons:f -> 0':s -> true:false -> c22 app :: nil:cons:f -> nil:cons:f -> nil:cons:f self :: self c20 :: c17 -> c13:c14 -> c15:c16 -> c20:c21 sndsplit :: 0':s -> nil:cons:f -> nil:cons:f c21 :: c17 -> c13:c14 -> c3:c4:c5 -> c20:c21 c22 :: c17 -> c3:c4:c5 -> c13:c14 -> c15:c16 -> c22 process :: nil:cons:f -> 0':s -> process:if1:if2:if3 if1 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if2 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if3 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 hole_c:c1:c21_23 :: c:c1:c2 hole_0':s2_23 :: 0':s hole_nil:cons:f3_23 :: nil:cons:f hole_a4_23 :: a hole_c3:c4:c55_23 :: c3:c4:c5 hole_c6:c76_23 :: c6:c7 hole_c8:c9:c107_23 :: c8:c9:c10 hole_c11:c128_23 :: c11:c12 hole_c13:c149_23 :: c13:c14 hole_c15:c1610_23 :: c15:c16 hole_self11_23 :: self hole_c1712_23 :: c17 hole_c18:c1913_23 :: c18:c19 hole_true:false14_23 :: true:false hole_c20:c2115_23 :: c20:c21 hole_c2216_23 :: c22 hole_process:if1:if2:if317_23 :: process:if1:if2:if3 gen_c:c1:c218_23 :: Nat -> c:c1:c2 gen_0':s19_23 :: Nat -> 0':s gen_nil:cons:f20_23 :: Nat -> nil:cons:f gen_c3:c4:c521_23 :: Nat -> c3:c4:c5 gen_c8:c9:c1022_23 :: Nat -> c8:c9:c10 gen_c11:c1223_23 :: Nat -> c11:c12 gen_c13:c1424_23 :: Nat -> c13:c14 gen_c15:c1625_23 :: Nat -> c15:c16 ---------------------------------------- (19) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: FSTSPLIT, SNDSPLIT, LEQ, LENGTH, APP, MAP_F, map_f, PROCESS, leq, length, fstsplit, app, sndsplit, process They will be analysed ascendingly in the following order: FSTSPLIT < PROCESS SNDSPLIT < PROCESS LEQ < PROCESS LENGTH < PROCESS APP < MAP_F APP < PROCESS map_f < MAP_F MAP_F < PROCESS map_f < PROCESS app < map_f map_f < process leq < PROCESS length < PROCESS fstsplit < PROCESS app < PROCESS sndsplit < PROCESS leq < process length < process fstsplit < process app < process sndsplit < process ---------------------------------------- (20) Obligation: Innermost TRS: Rules: FSTSPLIT(0', z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0', z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0', z0) -> c8 LEQ(s(z0), 0') -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) fstsplit(0', z0) -> nil fstsplit(s(z0), nil) -> nil fstsplit(s(z0), cons(z1, z2)) -> cons(z1, fstsplit(z0, z2)) sndsplit(0', z0) -> z0 sndsplit(s(z0), nil) -> nil sndsplit(s(z0), cons(z1, z2)) -> sndsplit(z0, z2) empty(nil) -> true empty(cons(z0, z1)) -> false leq(0', z0) -> true leq(s(z0), 0') -> false leq(s(z0), s(z1)) -> leq(z0, z1) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) app(nil, z0) -> z0 app(cons(z0, z1), z2) -> cons(z0, app(z1, z2)) map_f(z0, nil) -> nil map_f(z0, cons(z1, z2)) -> app(f(z0, z1), map_f(z0, z2)) process(z0, z1) -> if1(z0, z1, leq(z1, length(z0))) if1(z0, z1, true) -> if2(z0, z1, empty(fstsplit(z1, z0))) if1(z0, z1, false) -> if3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))) if2(z0, z1, false) -> process(app(map_f(self, nil), sndsplit(z1, z0)), z1) if3(z0, z1, false) -> process(sndsplit(z1, app(map_f(self, nil), z0)), z1) Types: FSTSPLIT :: 0':s -> nil:cons:f -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s nil :: nil:cons:f c1 :: c:c1:c2 cons :: a -> nil:cons:f -> nil:cons:f c2 :: c:c1:c2 -> c:c1:c2 SNDSPLIT :: 0':s -> nil:cons:f -> c3:c4:c5 c3 :: c3:c4:c5 c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 EMPTY :: nil:cons:f -> c6:c7 c6 :: c6:c7 c7 :: c6:c7 LEQ :: 0':s -> 0':s -> c8:c9:c10 c8 :: c8:c9:c10 c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 LENGTH :: nil:cons:f -> c11:c12 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 APP :: nil:cons:f -> nil:cons:f -> c13:c14 c13 :: c13:c14 c14 :: c13:c14 -> c13:c14 MAP_F :: self -> nil:cons:f -> c15:c16 c15 :: c15:c16 c16 :: c13:c14 -> c15:c16 -> c15:c16 f :: self -> a -> nil:cons:f map_f :: self -> nil:cons:f -> nil:cons:f PROCESS :: nil:cons:f -> 0':s -> c17 c17 :: c18:c19 -> c8:c9:c10 -> c11:c12 -> c17 IF1 :: nil:cons:f -> 0':s -> true:false -> c18:c19 leq :: 0':s -> 0':s -> true:false length :: nil:cons:f -> 0':s true :: true:false c18 :: c20:c21 -> c6:c7 -> c:c1:c2 -> c18:c19 IF2 :: nil:cons:f -> 0':s -> true:false -> c20:c21 empty :: nil:cons:f -> true:false fstsplit :: 0':s -> nil:cons:f -> nil:cons:f false :: true:false c19 :: c22 -> c6:c7 -> c:c1:c2 -> c13:c14 -> c15:c16 -> c18:c19 IF3 :: nil:cons:f -> 0':s -> true:false -> c22 app :: nil:cons:f -> nil:cons:f -> nil:cons:f self :: self c20 :: c17 -> c13:c14 -> c15:c16 -> c20:c21 sndsplit :: 0':s -> nil:cons:f -> nil:cons:f c21 :: c17 -> c13:c14 -> c3:c4:c5 -> c20:c21 c22 :: c17 -> c3:c4:c5 -> c13:c14 -> c15:c16 -> c22 process :: nil:cons:f -> 0':s -> process:if1:if2:if3 if1 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if2 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if3 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 hole_c:c1:c21_23 :: c:c1:c2 hole_0':s2_23 :: 0':s hole_nil:cons:f3_23 :: nil:cons:f hole_a4_23 :: a hole_c3:c4:c55_23 :: c3:c4:c5 hole_c6:c76_23 :: c6:c7 hole_c8:c9:c107_23 :: c8:c9:c10 hole_c11:c128_23 :: c11:c12 hole_c13:c149_23 :: c13:c14 hole_c15:c1610_23 :: c15:c16 hole_self11_23 :: self hole_c1712_23 :: c17 hole_c18:c1913_23 :: c18:c19 hole_true:false14_23 :: true:false hole_c20:c2115_23 :: c20:c21 hole_c2216_23 :: c22 hole_process:if1:if2:if317_23 :: process:if1:if2:if3 gen_c:c1:c218_23 :: Nat -> c:c1:c2 gen_0':s19_23 :: Nat -> 0':s gen_nil:cons:f20_23 :: Nat -> nil:cons:f gen_c3:c4:c521_23 :: Nat -> c3:c4:c5 gen_c8:c9:c1022_23 :: Nat -> c8:c9:c10 gen_c11:c1223_23 :: Nat -> c11:c12 gen_c13:c1424_23 :: Nat -> c13:c14 gen_c15:c1625_23 :: Nat -> c15:c16 Generator Equations: gen_c:c1:c218_23(0) <=> c gen_c:c1:c218_23(+(x, 1)) <=> c2(gen_c:c1:c218_23(x)) gen_0':s19_23(0) <=> 0' gen_0':s19_23(+(x, 1)) <=> s(gen_0':s19_23(x)) gen_nil:cons:f20_23(0) <=> nil gen_nil:cons:f20_23(+(x, 1)) <=> cons(hole_a4_23, gen_nil:cons:f20_23(x)) gen_c3:c4:c521_23(0) <=> c3 gen_c3:c4:c521_23(+(x, 1)) <=> c5(gen_c3:c4:c521_23(x)) gen_c8:c9:c1022_23(0) <=> c8 gen_c8:c9:c1022_23(+(x, 1)) <=> c10(gen_c8:c9:c1022_23(x)) gen_c11:c1223_23(0) <=> c11 gen_c11:c1223_23(+(x, 1)) <=> c12(gen_c11:c1223_23(x)) gen_c13:c1424_23(0) <=> c13 gen_c13:c1424_23(+(x, 1)) <=> c14(gen_c13:c1424_23(x)) gen_c15:c1625_23(0) <=> c15 gen_c15:c1625_23(+(x, 1)) <=> c16(c13, gen_c15:c1625_23(x)) The following defined symbols remain to be analysed: FSTSPLIT, SNDSPLIT, LEQ, LENGTH, APP, MAP_F, map_f, PROCESS, leq, length, fstsplit, app, sndsplit, process They will be analysed ascendingly in the following order: FSTSPLIT < PROCESS SNDSPLIT < PROCESS LEQ < PROCESS LENGTH < PROCESS APP < MAP_F APP < PROCESS map_f < MAP_F MAP_F < PROCESS map_f < PROCESS app < map_f map_f < process leq < PROCESS length < PROCESS fstsplit < PROCESS app < PROCESS sndsplit < PROCESS leq < process length < process fstsplit < process app < process sndsplit < process ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: FSTSPLIT(gen_0':s19_23(n27_23), gen_nil:cons:f20_23(n27_23)) -> gen_c:c1:c218_23(n27_23), rt in Omega(1 + n27_23) Induction Base: FSTSPLIT(gen_0':s19_23(0), gen_nil:cons:f20_23(0)) ->_R^Omega(1) c Induction Step: FSTSPLIT(gen_0':s19_23(+(n27_23, 1)), gen_nil:cons:f20_23(+(n27_23, 1))) ->_R^Omega(1) c2(FSTSPLIT(gen_0':s19_23(n27_23), gen_nil:cons:f20_23(n27_23))) ->_IH c2(gen_c:c1:c218_23(c28_23)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (22) Complex Obligation (BEST) ---------------------------------------- (23) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: FSTSPLIT(0', z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0', z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0', z0) -> c8 LEQ(s(z0), 0') -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) fstsplit(0', z0) -> nil fstsplit(s(z0), nil) -> nil fstsplit(s(z0), cons(z1, z2)) -> cons(z1, fstsplit(z0, z2)) sndsplit(0', z0) -> z0 sndsplit(s(z0), nil) -> nil sndsplit(s(z0), cons(z1, z2)) -> sndsplit(z0, z2) empty(nil) -> true empty(cons(z0, z1)) -> false leq(0', z0) -> true leq(s(z0), 0') -> false leq(s(z0), s(z1)) -> leq(z0, z1) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) app(nil, z0) -> z0 app(cons(z0, z1), z2) -> cons(z0, app(z1, z2)) map_f(z0, nil) -> nil map_f(z0, cons(z1, z2)) -> app(f(z0, z1), map_f(z0, z2)) process(z0, z1) -> if1(z0, z1, leq(z1, length(z0))) if1(z0, z1, true) -> if2(z0, z1, empty(fstsplit(z1, z0))) if1(z0, z1, false) -> if3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))) if2(z0, z1, false) -> process(app(map_f(self, nil), sndsplit(z1, z0)), z1) if3(z0, z1, false) -> process(sndsplit(z1, app(map_f(self, nil), z0)), z1) Types: FSTSPLIT :: 0':s -> nil:cons:f -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s nil :: nil:cons:f c1 :: c:c1:c2 cons :: a -> nil:cons:f -> nil:cons:f c2 :: c:c1:c2 -> c:c1:c2 SNDSPLIT :: 0':s -> nil:cons:f -> c3:c4:c5 c3 :: c3:c4:c5 c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 EMPTY :: nil:cons:f -> c6:c7 c6 :: c6:c7 c7 :: c6:c7 LEQ :: 0':s -> 0':s -> c8:c9:c10 c8 :: c8:c9:c10 c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 LENGTH :: nil:cons:f -> c11:c12 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 APP :: nil:cons:f -> nil:cons:f -> c13:c14 c13 :: c13:c14 c14 :: c13:c14 -> c13:c14 MAP_F :: self -> nil:cons:f -> c15:c16 c15 :: c15:c16 c16 :: c13:c14 -> c15:c16 -> c15:c16 f :: self -> a -> nil:cons:f map_f :: self -> nil:cons:f -> nil:cons:f PROCESS :: nil:cons:f -> 0':s -> c17 c17 :: c18:c19 -> c8:c9:c10 -> c11:c12 -> c17 IF1 :: nil:cons:f -> 0':s -> true:false -> c18:c19 leq :: 0':s -> 0':s -> true:false length :: nil:cons:f -> 0':s true :: true:false c18 :: c20:c21 -> c6:c7 -> c:c1:c2 -> c18:c19 IF2 :: nil:cons:f -> 0':s -> true:false -> c20:c21 empty :: nil:cons:f -> true:false fstsplit :: 0':s -> nil:cons:f -> nil:cons:f false :: true:false c19 :: c22 -> c6:c7 -> c:c1:c2 -> c13:c14 -> c15:c16 -> c18:c19 IF3 :: nil:cons:f -> 0':s -> true:false -> c22 app :: nil:cons:f -> nil:cons:f -> nil:cons:f self :: self c20 :: c17 -> c13:c14 -> c15:c16 -> c20:c21 sndsplit :: 0':s -> nil:cons:f -> nil:cons:f c21 :: c17 -> c13:c14 -> c3:c4:c5 -> c20:c21 c22 :: c17 -> c3:c4:c5 -> c13:c14 -> c15:c16 -> c22 process :: nil:cons:f -> 0':s -> process:if1:if2:if3 if1 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if2 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if3 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 hole_c:c1:c21_23 :: c:c1:c2 hole_0':s2_23 :: 0':s hole_nil:cons:f3_23 :: nil:cons:f hole_a4_23 :: a hole_c3:c4:c55_23 :: c3:c4:c5 hole_c6:c76_23 :: c6:c7 hole_c8:c9:c107_23 :: c8:c9:c10 hole_c11:c128_23 :: c11:c12 hole_c13:c149_23 :: c13:c14 hole_c15:c1610_23 :: c15:c16 hole_self11_23 :: self hole_c1712_23 :: c17 hole_c18:c1913_23 :: c18:c19 hole_true:false14_23 :: true:false hole_c20:c2115_23 :: c20:c21 hole_c2216_23 :: c22 hole_process:if1:if2:if317_23 :: process:if1:if2:if3 gen_c:c1:c218_23 :: Nat -> c:c1:c2 gen_0':s19_23 :: Nat -> 0':s gen_nil:cons:f20_23 :: Nat -> nil:cons:f gen_c3:c4:c521_23 :: Nat -> c3:c4:c5 gen_c8:c9:c1022_23 :: Nat -> c8:c9:c10 gen_c11:c1223_23 :: Nat -> c11:c12 gen_c13:c1424_23 :: Nat -> c13:c14 gen_c15:c1625_23 :: Nat -> c15:c16 Generator Equations: gen_c:c1:c218_23(0) <=> c gen_c:c1:c218_23(+(x, 1)) <=> c2(gen_c:c1:c218_23(x)) gen_0':s19_23(0) <=> 0' gen_0':s19_23(+(x, 1)) <=> s(gen_0':s19_23(x)) gen_nil:cons:f20_23(0) <=> nil gen_nil:cons:f20_23(+(x, 1)) <=> cons(hole_a4_23, gen_nil:cons:f20_23(x)) gen_c3:c4:c521_23(0) <=> c3 gen_c3:c4:c521_23(+(x, 1)) <=> c5(gen_c3:c4:c521_23(x)) gen_c8:c9:c1022_23(0) <=> c8 gen_c8:c9:c1022_23(+(x, 1)) <=> c10(gen_c8:c9:c1022_23(x)) gen_c11:c1223_23(0) <=> c11 gen_c11:c1223_23(+(x, 1)) <=> c12(gen_c11:c1223_23(x)) gen_c13:c1424_23(0) <=> c13 gen_c13:c1424_23(+(x, 1)) <=> c14(gen_c13:c1424_23(x)) gen_c15:c1625_23(0) <=> c15 gen_c15:c1625_23(+(x, 1)) <=> c16(c13, gen_c15:c1625_23(x)) The following defined symbols remain to be analysed: FSTSPLIT, SNDSPLIT, LEQ, LENGTH, APP, MAP_F, map_f, PROCESS, leq, length, fstsplit, app, sndsplit, process They will be analysed ascendingly in the following order: FSTSPLIT < PROCESS SNDSPLIT < PROCESS LEQ < PROCESS LENGTH < PROCESS APP < MAP_F APP < PROCESS map_f < MAP_F MAP_F < PROCESS map_f < PROCESS app < map_f map_f < process leq < PROCESS length < PROCESS fstsplit < PROCESS app < PROCESS sndsplit < PROCESS leq < process length < process fstsplit < process app < process sndsplit < process ---------------------------------------- (24) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (25) BOUNDS(n^1, INF) ---------------------------------------- (26) Obligation: Innermost TRS: Rules: FSTSPLIT(0', z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0', z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0', z0) -> c8 LEQ(s(z0), 0') -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) fstsplit(0', z0) -> nil fstsplit(s(z0), nil) -> nil fstsplit(s(z0), cons(z1, z2)) -> cons(z1, fstsplit(z0, z2)) sndsplit(0', z0) -> z0 sndsplit(s(z0), nil) -> nil sndsplit(s(z0), cons(z1, z2)) -> sndsplit(z0, z2) empty(nil) -> true empty(cons(z0, z1)) -> false leq(0', z0) -> true leq(s(z0), 0') -> false leq(s(z0), s(z1)) -> leq(z0, z1) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) app(nil, z0) -> z0 app(cons(z0, z1), z2) -> cons(z0, app(z1, z2)) map_f(z0, nil) -> nil map_f(z0, cons(z1, z2)) -> app(f(z0, z1), map_f(z0, z2)) process(z0, z1) -> if1(z0, z1, leq(z1, length(z0))) if1(z0, z1, true) -> if2(z0, z1, empty(fstsplit(z1, z0))) if1(z0, z1, false) -> if3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))) if2(z0, z1, false) -> process(app(map_f(self, nil), sndsplit(z1, z0)), z1) if3(z0, z1, false) -> process(sndsplit(z1, app(map_f(self, nil), z0)), z1) Types: FSTSPLIT :: 0':s -> nil:cons:f -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s nil :: nil:cons:f c1 :: c:c1:c2 cons :: a -> nil:cons:f -> nil:cons:f c2 :: c:c1:c2 -> c:c1:c2 SNDSPLIT :: 0':s -> nil:cons:f -> c3:c4:c5 c3 :: c3:c4:c5 c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 EMPTY :: nil:cons:f -> c6:c7 c6 :: c6:c7 c7 :: c6:c7 LEQ :: 0':s -> 0':s -> c8:c9:c10 c8 :: c8:c9:c10 c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 LENGTH :: nil:cons:f -> c11:c12 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 APP :: nil:cons:f -> nil:cons:f -> c13:c14 c13 :: c13:c14 c14 :: c13:c14 -> c13:c14 MAP_F :: self -> nil:cons:f -> c15:c16 c15 :: c15:c16 c16 :: c13:c14 -> c15:c16 -> c15:c16 f :: self -> a -> nil:cons:f map_f :: self -> nil:cons:f -> nil:cons:f PROCESS :: nil:cons:f -> 0':s -> c17 c17 :: c18:c19 -> c8:c9:c10 -> c11:c12 -> c17 IF1 :: nil:cons:f -> 0':s -> true:false -> c18:c19 leq :: 0':s -> 0':s -> true:false length :: nil:cons:f -> 0':s true :: true:false c18 :: c20:c21 -> c6:c7 -> c:c1:c2 -> c18:c19 IF2 :: nil:cons:f -> 0':s -> true:false -> c20:c21 empty :: nil:cons:f -> true:false fstsplit :: 0':s -> nil:cons:f -> nil:cons:f false :: true:false c19 :: c22 -> c6:c7 -> c:c1:c2 -> c13:c14 -> c15:c16 -> c18:c19 IF3 :: nil:cons:f -> 0':s -> true:false -> c22 app :: nil:cons:f -> nil:cons:f -> nil:cons:f self :: self c20 :: c17 -> c13:c14 -> c15:c16 -> c20:c21 sndsplit :: 0':s -> nil:cons:f -> nil:cons:f c21 :: c17 -> c13:c14 -> c3:c4:c5 -> c20:c21 c22 :: c17 -> c3:c4:c5 -> c13:c14 -> c15:c16 -> c22 process :: nil:cons:f -> 0':s -> process:if1:if2:if3 if1 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if2 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if3 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 hole_c:c1:c21_23 :: c:c1:c2 hole_0':s2_23 :: 0':s hole_nil:cons:f3_23 :: nil:cons:f hole_a4_23 :: a hole_c3:c4:c55_23 :: c3:c4:c5 hole_c6:c76_23 :: c6:c7 hole_c8:c9:c107_23 :: c8:c9:c10 hole_c11:c128_23 :: c11:c12 hole_c13:c149_23 :: c13:c14 hole_c15:c1610_23 :: c15:c16 hole_self11_23 :: self hole_c1712_23 :: c17 hole_c18:c1913_23 :: c18:c19 hole_true:false14_23 :: true:false hole_c20:c2115_23 :: c20:c21 hole_c2216_23 :: c22 hole_process:if1:if2:if317_23 :: process:if1:if2:if3 gen_c:c1:c218_23 :: Nat -> c:c1:c2 gen_0':s19_23 :: Nat -> 0':s gen_nil:cons:f20_23 :: Nat -> nil:cons:f gen_c3:c4:c521_23 :: Nat -> c3:c4:c5 gen_c8:c9:c1022_23 :: Nat -> c8:c9:c10 gen_c11:c1223_23 :: Nat -> c11:c12 gen_c13:c1424_23 :: Nat -> c13:c14 gen_c15:c1625_23 :: Nat -> c15:c16 Lemmas: FSTSPLIT(gen_0':s19_23(n27_23), gen_nil:cons:f20_23(n27_23)) -> gen_c:c1:c218_23(n27_23), rt in Omega(1 + n27_23) Generator Equations: gen_c:c1:c218_23(0) <=> c gen_c:c1:c218_23(+(x, 1)) <=> c2(gen_c:c1:c218_23(x)) gen_0':s19_23(0) <=> 0' gen_0':s19_23(+(x, 1)) <=> s(gen_0':s19_23(x)) gen_nil:cons:f20_23(0) <=> nil gen_nil:cons:f20_23(+(x, 1)) <=> cons(hole_a4_23, gen_nil:cons:f20_23(x)) gen_c3:c4:c521_23(0) <=> c3 gen_c3:c4:c521_23(+(x, 1)) <=> c5(gen_c3:c4:c521_23(x)) gen_c8:c9:c1022_23(0) <=> c8 gen_c8:c9:c1022_23(+(x, 1)) <=> c10(gen_c8:c9:c1022_23(x)) gen_c11:c1223_23(0) <=> c11 gen_c11:c1223_23(+(x, 1)) <=> c12(gen_c11:c1223_23(x)) gen_c13:c1424_23(0) <=> c13 gen_c13:c1424_23(+(x, 1)) <=> c14(gen_c13:c1424_23(x)) gen_c15:c1625_23(0) <=> c15 gen_c15:c1625_23(+(x, 1)) <=> c16(c13, gen_c15:c1625_23(x)) The following defined symbols remain to be analysed: SNDSPLIT, LEQ, LENGTH, APP, MAP_F, map_f, PROCESS, leq, length, fstsplit, app, sndsplit, process They will be analysed ascendingly in the following order: SNDSPLIT < PROCESS LEQ < PROCESS LENGTH < PROCESS APP < MAP_F APP < PROCESS map_f < MAP_F MAP_F < PROCESS map_f < PROCESS app < map_f map_f < process leq < PROCESS length < PROCESS fstsplit < PROCESS app < PROCESS sndsplit < PROCESS leq < process length < process fstsplit < process app < process sndsplit < process ---------------------------------------- (27) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: SNDSPLIT(gen_0':s19_23(n869_23), gen_nil:cons:f20_23(n869_23)) -> gen_c3:c4:c521_23(n869_23), rt in Omega(1 + n869_23) Induction Base: SNDSPLIT(gen_0':s19_23(0), gen_nil:cons:f20_23(0)) ->_R^Omega(1) c3 Induction Step: SNDSPLIT(gen_0':s19_23(+(n869_23, 1)), gen_nil:cons:f20_23(+(n869_23, 1))) ->_R^Omega(1) c5(SNDSPLIT(gen_0':s19_23(n869_23), gen_nil:cons:f20_23(n869_23))) ->_IH c5(gen_c3:c4:c521_23(c870_23)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (28) Obligation: Innermost TRS: Rules: FSTSPLIT(0', z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0', z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0', z0) -> c8 LEQ(s(z0), 0') -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) fstsplit(0', z0) -> nil fstsplit(s(z0), nil) -> nil fstsplit(s(z0), cons(z1, z2)) -> cons(z1, fstsplit(z0, z2)) sndsplit(0', z0) -> z0 sndsplit(s(z0), nil) -> nil sndsplit(s(z0), cons(z1, z2)) -> sndsplit(z0, z2) empty(nil) -> true empty(cons(z0, z1)) -> false leq(0', z0) -> true leq(s(z0), 0') -> false leq(s(z0), s(z1)) -> leq(z0, z1) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) app(nil, z0) -> z0 app(cons(z0, z1), z2) -> cons(z0, app(z1, z2)) map_f(z0, nil) -> nil map_f(z0, cons(z1, z2)) -> app(f(z0, z1), map_f(z0, z2)) process(z0, z1) -> if1(z0, z1, leq(z1, length(z0))) if1(z0, z1, true) -> if2(z0, z1, empty(fstsplit(z1, z0))) if1(z0, z1, false) -> if3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))) if2(z0, z1, false) -> process(app(map_f(self, nil), sndsplit(z1, z0)), z1) if3(z0, z1, false) -> process(sndsplit(z1, app(map_f(self, nil), z0)), z1) Types: FSTSPLIT :: 0':s -> nil:cons:f -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s nil :: nil:cons:f c1 :: c:c1:c2 cons :: a -> nil:cons:f -> nil:cons:f c2 :: c:c1:c2 -> c:c1:c2 SNDSPLIT :: 0':s -> nil:cons:f -> c3:c4:c5 c3 :: c3:c4:c5 c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 EMPTY :: nil:cons:f -> c6:c7 c6 :: c6:c7 c7 :: c6:c7 LEQ :: 0':s -> 0':s -> c8:c9:c10 c8 :: c8:c9:c10 c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 LENGTH :: nil:cons:f -> c11:c12 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 APP :: nil:cons:f -> nil:cons:f -> c13:c14 c13 :: c13:c14 c14 :: c13:c14 -> c13:c14 MAP_F :: self -> nil:cons:f -> c15:c16 c15 :: c15:c16 c16 :: c13:c14 -> c15:c16 -> c15:c16 f :: self -> a -> nil:cons:f map_f :: self -> nil:cons:f -> nil:cons:f PROCESS :: nil:cons:f -> 0':s -> c17 c17 :: c18:c19 -> c8:c9:c10 -> c11:c12 -> c17 IF1 :: nil:cons:f -> 0':s -> true:false -> c18:c19 leq :: 0':s -> 0':s -> true:false length :: nil:cons:f -> 0':s true :: true:false c18 :: c20:c21 -> c6:c7 -> c:c1:c2 -> c18:c19 IF2 :: nil:cons:f -> 0':s -> true:false -> c20:c21 empty :: nil:cons:f -> true:false fstsplit :: 0':s -> nil:cons:f -> nil:cons:f false :: true:false c19 :: c22 -> c6:c7 -> c:c1:c2 -> c13:c14 -> c15:c16 -> c18:c19 IF3 :: nil:cons:f -> 0':s -> true:false -> c22 app :: nil:cons:f -> nil:cons:f -> nil:cons:f self :: self c20 :: c17 -> c13:c14 -> c15:c16 -> c20:c21 sndsplit :: 0':s -> nil:cons:f -> nil:cons:f c21 :: c17 -> c13:c14 -> c3:c4:c5 -> c20:c21 c22 :: c17 -> c3:c4:c5 -> c13:c14 -> c15:c16 -> c22 process :: nil:cons:f -> 0':s -> process:if1:if2:if3 if1 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if2 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if3 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 hole_c:c1:c21_23 :: c:c1:c2 hole_0':s2_23 :: 0':s hole_nil:cons:f3_23 :: nil:cons:f hole_a4_23 :: a hole_c3:c4:c55_23 :: c3:c4:c5 hole_c6:c76_23 :: c6:c7 hole_c8:c9:c107_23 :: c8:c9:c10 hole_c11:c128_23 :: c11:c12 hole_c13:c149_23 :: c13:c14 hole_c15:c1610_23 :: c15:c16 hole_self11_23 :: self hole_c1712_23 :: c17 hole_c18:c1913_23 :: c18:c19 hole_true:false14_23 :: true:false hole_c20:c2115_23 :: c20:c21 hole_c2216_23 :: c22 hole_process:if1:if2:if317_23 :: process:if1:if2:if3 gen_c:c1:c218_23 :: Nat -> c:c1:c2 gen_0':s19_23 :: Nat -> 0':s gen_nil:cons:f20_23 :: Nat -> nil:cons:f gen_c3:c4:c521_23 :: Nat -> c3:c4:c5 gen_c8:c9:c1022_23 :: Nat -> c8:c9:c10 gen_c11:c1223_23 :: Nat -> c11:c12 gen_c13:c1424_23 :: Nat -> c13:c14 gen_c15:c1625_23 :: Nat -> c15:c16 Lemmas: FSTSPLIT(gen_0':s19_23(n27_23), gen_nil:cons:f20_23(n27_23)) -> gen_c:c1:c218_23(n27_23), rt in Omega(1 + n27_23) SNDSPLIT(gen_0':s19_23(n869_23), gen_nil:cons:f20_23(n869_23)) -> gen_c3:c4:c521_23(n869_23), rt in Omega(1 + n869_23) Generator Equations: gen_c:c1:c218_23(0) <=> c gen_c:c1:c218_23(+(x, 1)) <=> c2(gen_c:c1:c218_23(x)) gen_0':s19_23(0) <=> 0' gen_0':s19_23(+(x, 1)) <=> s(gen_0':s19_23(x)) gen_nil:cons:f20_23(0) <=> nil gen_nil:cons:f20_23(+(x, 1)) <=> cons(hole_a4_23, gen_nil:cons:f20_23(x)) gen_c3:c4:c521_23(0) <=> c3 gen_c3:c4:c521_23(+(x, 1)) <=> c5(gen_c3:c4:c521_23(x)) gen_c8:c9:c1022_23(0) <=> c8 gen_c8:c9:c1022_23(+(x, 1)) <=> c10(gen_c8:c9:c1022_23(x)) gen_c11:c1223_23(0) <=> c11 gen_c11:c1223_23(+(x, 1)) <=> c12(gen_c11:c1223_23(x)) gen_c13:c1424_23(0) <=> c13 gen_c13:c1424_23(+(x, 1)) <=> c14(gen_c13:c1424_23(x)) gen_c15:c1625_23(0) <=> c15 gen_c15:c1625_23(+(x, 1)) <=> c16(c13, gen_c15:c1625_23(x)) The following defined symbols remain to be analysed: LEQ, LENGTH, APP, MAP_F, map_f, PROCESS, leq, length, fstsplit, app, sndsplit, process They will be analysed ascendingly in the following order: LEQ < PROCESS LENGTH < PROCESS APP < MAP_F APP < PROCESS map_f < MAP_F MAP_F < PROCESS map_f < PROCESS app < map_f map_f < process leq < PROCESS length < PROCESS fstsplit < PROCESS app < PROCESS sndsplit < PROCESS leq < process length < process fstsplit < process app < process sndsplit < process ---------------------------------------- (29) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: LEQ(gen_0':s19_23(n1820_23), gen_0':s19_23(n1820_23)) -> gen_c8:c9:c1022_23(n1820_23), rt in Omega(1 + n1820_23) Induction Base: LEQ(gen_0':s19_23(0), gen_0':s19_23(0)) ->_R^Omega(1) c8 Induction Step: LEQ(gen_0':s19_23(+(n1820_23, 1)), gen_0':s19_23(+(n1820_23, 1))) ->_R^Omega(1) c10(LEQ(gen_0':s19_23(n1820_23), gen_0':s19_23(n1820_23))) ->_IH c10(gen_c8:c9:c1022_23(c1821_23)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (30) Obligation: Innermost TRS: Rules: FSTSPLIT(0', z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0', z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0', z0) -> c8 LEQ(s(z0), 0') -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) fstsplit(0', z0) -> nil fstsplit(s(z0), nil) -> nil fstsplit(s(z0), cons(z1, z2)) -> cons(z1, fstsplit(z0, z2)) sndsplit(0', z0) -> z0 sndsplit(s(z0), nil) -> nil sndsplit(s(z0), cons(z1, z2)) -> sndsplit(z0, z2) empty(nil) -> true empty(cons(z0, z1)) -> false leq(0', z0) -> true leq(s(z0), 0') -> false leq(s(z0), s(z1)) -> leq(z0, z1) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) app(nil, z0) -> z0 app(cons(z0, z1), z2) -> cons(z0, app(z1, z2)) map_f(z0, nil) -> nil map_f(z0, cons(z1, z2)) -> app(f(z0, z1), map_f(z0, z2)) process(z0, z1) -> if1(z0, z1, leq(z1, length(z0))) if1(z0, z1, true) -> if2(z0, z1, empty(fstsplit(z1, z0))) if1(z0, z1, false) -> if3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))) if2(z0, z1, false) -> process(app(map_f(self, nil), sndsplit(z1, z0)), z1) if3(z0, z1, false) -> process(sndsplit(z1, app(map_f(self, nil), z0)), z1) Types: FSTSPLIT :: 0':s -> nil:cons:f -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s nil :: nil:cons:f c1 :: c:c1:c2 cons :: a -> nil:cons:f -> nil:cons:f c2 :: c:c1:c2 -> c:c1:c2 SNDSPLIT :: 0':s -> nil:cons:f -> c3:c4:c5 c3 :: c3:c4:c5 c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 EMPTY :: nil:cons:f -> c6:c7 c6 :: c6:c7 c7 :: c6:c7 LEQ :: 0':s -> 0':s -> c8:c9:c10 c8 :: c8:c9:c10 c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 LENGTH :: nil:cons:f -> c11:c12 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 APP :: nil:cons:f -> nil:cons:f -> c13:c14 c13 :: c13:c14 c14 :: c13:c14 -> c13:c14 MAP_F :: self -> nil:cons:f -> c15:c16 c15 :: c15:c16 c16 :: c13:c14 -> c15:c16 -> c15:c16 f :: self -> a -> nil:cons:f map_f :: self -> nil:cons:f -> nil:cons:f PROCESS :: nil:cons:f -> 0':s -> c17 c17 :: c18:c19 -> c8:c9:c10 -> c11:c12 -> c17 IF1 :: nil:cons:f -> 0':s -> true:false -> c18:c19 leq :: 0':s -> 0':s -> true:false length :: nil:cons:f -> 0':s true :: true:false c18 :: c20:c21 -> c6:c7 -> c:c1:c2 -> c18:c19 IF2 :: nil:cons:f -> 0':s -> true:false -> c20:c21 empty :: nil:cons:f -> true:false fstsplit :: 0':s -> nil:cons:f -> nil:cons:f false :: true:false c19 :: c22 -> c6:c7 -> c:c1:c2 -> c13:c14 -> c15:c16 -> c18:c19 IF3 :: nil:cons:f -> 0':s -> true:false -> c22 app :: nil:cons:f -> nil:cons:f -> nil:cons:f self :: self c20 :: c17 -> c13:c14 -> c15:c16 -> c20:c21 sndsplit :: 0':s -> nil:cons:f -> nil:cons:f c21 :: c17 -> c13:c14 -> c3:c4:c5 -> c20:c21 c22 :: c17 -> c3:c4:c5 -> c13:c14 -> c15:c16 -> c22 process :: nil:cons:f -> 0':s -> process:if1:if2:if3 if1 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if2 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if3 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 hole_c:c1:c21_23 :: c:c1:c2 hole_0':s2_23 :: 0':s hole_nil:cons:f3_23 :: nil:cons:f hole_a4_23 :: a hole_c3:c4:c55_23 :: c3:c4:c5 hole_c6:c76_23 :: c6:c7 hole_c8:c9:c107_23 :: c8:c9:c10 hole_c11:c128_23 :: c11:c12 hole_c13:c149_23 :: c13:c14 hole_c15:c1610_23 :: c15:c16 hole_self11_23 :: self hole_c1712_23 :: c17 hole_c18:c1913_23 :: c18:c19 hole_true:false14_23 :: true:false hole_c20:c2115_23 :: c20:c21 hole_c2216_23 :: c22 hole_process:if1:if2:if317_23 :: process:if1:if2:if3 gen_c:c1:c218_23 :: Nat -> c:c1:c2 gen_0':s19_23 :: Nat -> 0':s gen_nil:cons:f20_23 :: Nat -> nil:cons:f gen_c3:c4:c521_23 :: Nat -> c3:c4:c5 gen_c8:c9:c1022_23 :: Nat -> c8:c9:c10 gen_c11:c1223_23 :: Nat -> c11:c12 gen_c13:c1424_23 :: Nat -> c13:c14 gen_c15:c1625_23 :: Nat -> c15:c16 Lemmas: FSTSPLIT(gen_0':s19_23(n27_23), gen_nil:cons:f20_23(n27_23)) -> gen_c:c1:c218_23(n27_23), rt in Omega(1 + n27_23) SNDSPLIT(gen_0':s19_23(n869_23), gen_nil:cons:f20_23(n869_23)) -> gen_c3:c4:c521_23(n869_23), rt in Omega(1 + n869_23) LEQ(gen_0':s19_23(n1820_23), gen_0':s19_23(n1820_23)) -> gen_c8:c9:c1022_23(n1820_23), rt in Omega(1 + n1820_23) Generator Equations: gen_c:c1:c218_23(0) <=> c gen_c:c1:c218_23(+(x, 1)) <=> c2(gen_c:c1:c218_23(x)) gen_0':s19_23(0) <=> 0' gen_0':s19_23(+(x, 1)) <=> s(gen_0':s19_23(x)) gen_nil:cons:f20_23(0) <=> nil gen_nil:cons:f20_23(+(x, 1)) <=> cons(hole_a4_23, gen_nil:cons:f20_23(x)) gen_c3:c4:c521_23(0) <=> c3 gen_c3:c4:c521_23(+(x, 1)) <=> c5(gen_c3:c4:c521_23(x)) gen_c8:c9:c1022_23(0) <=> c8 gen_c8:c9:c1022_23(+(x, 1)) <=> c10(gen_c8:c9:c1022_23(x)) gen_c11:c1223_23(0) <=> c11 gen_c11:c1223_23(+(x, 1)) <=> c12(gen_c11:c1223_23(x)) gen_c13:c1424_23(0) <=> c13 gen_c13:c1424_23(+(x, 1)) <=> c14(gen_c13:c1424_23(x)) gen_c15:c1625_23(0) <=> c15 gen_c15:c1625_23(+(x, 1)) <=> c16(c13, gen_c15:c1625_23(x)) The following defined symbols remain to be analysed: LENGTH, APP, MAP_F, map_f, PROCESS, leq, length, fstsplit, app, sndsplit, process They will be analysed ascendingly in the following order: LENGTH < PROCESS APP < MAP_F APP < PROCESS map_f < MAP_F MAP_F < PROCESS map_f < PROCESS app < map_f map_f < process leq < PROCESS length < PROCESS fstsplit < PROCESS app < PROCESS sndsplit < PROCESS leq < process length < process fstsplit < process app < process sndsplit < process ---------------------------------------- (31) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: LENGTH(gen_nil:cons:f20_23(n2743_23)) -> gen_c11:c1223_23(n2743_23), rt in Omega(1 + n2743_23) Induction Base: LENGTH(gen_nil:cons:f20_23(0)) ->_R^Omega(1) c11 Induction Step: LENGTH(gen_nil:cons:f20_23(+(n2743_23, 1))) ->_R^Omega(1) c12(LENGTH(gen_nil:cons:f20_23(n2743_23))) ->_IH c12(gen_c11:c1223_23(c2744_23)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (32) Obligation: Innermost TRS: Rules: FSTSPLIT(0', z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0', z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0', z0) -> c8 LEQ(s(z0), 0') -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) fstsplit(0', z0) -> nil fstsplit(s(z0), nil) -> nil fstsplit(s(z0), cons(z1, z2)) -> cons(z1, fstsplit(z0, z2)) sndsplit(0', z0) -> z0 sndsplit(s(z0), nil) -> nil sndsplit(s(z0), cons(z1, z2)) -> sndsplit(z0, z2) empty(nil) -> true empty(cons(z0, z1)) -> false leq(0', z0) -> true leq(s(z0), 0') -> false leq(s(z0), s(z1)) -> leq(z0, z1) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) app(nil, z0) -> z0 app(cons(z0, z1), z2) -> cons(z0, app(z1, z2)) map_f(z0, nil) -> nil map_f(z0, cons(z1, z2)) -> app(f(z0, z1), map_f(z0, z2)) process(z0, z1) -> if1(z0, z1, leq(z1, length(z0))) if1(z0, z1, true) -> if2(z0, z1, empty(fstsplit(z1, z0))) if1(z0, z1, false) -> if3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))) if2(z0, z1, false) -> process(app(map_f(self, nil), sndsplit(z1, z0)), z1) if3(z0, z1, false) -> process(sndsplit(z1, app(map_f(self, nil), z0)), z1) Types: FSTSPLIT :: 0':s -> nil:cons:f -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s nil :: nil:cons:f c1 :: c:c1:c2 cons :: a -> nil:cons:f -> nil:cons:f c2 :: c:c1:c2 -> c:c1:c2 SNDSPLIT :: 0':s -> nil:cons:f -> c3:c4:c5 c3 :: c3:c4:c5 c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 EMPTY :: nil:cons:f -> c6:c7 c6 :: c6:c7 c7 :: c6:c7 LEQ :: 0':s -> 0':s -> c8:c9:c10 c8 :: c8:c9:c10 c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 LENGTH :: nil:cons:f -> c11:c12 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 APP :: nil:cons:f -> nil:cons:f -> c13:c14 c13 :: c13:c14 c14 :: c13:c14 -> c13:c14 MAP_F :: self -> nil:cons:f -> c15:c16 c15 :: c15:c16 c16 :: c13:c14 -> c15:c16 -> c15:c16 f :: self -> a -> nil:cons:f map_f :: self -> nil:cons:f -> nil:cons:f PROCESS :: nil:cons:f -> 0':s -> c17 c17 :: c18:c19 -> c8:c9:c10 -> c11:c12 -> c17 IF1 :: nil:cons:f -> 0':s -> true:false -> c18:c19 leq :: 0':s -> 0':s -> true:false length :: nil:cons:f -> 0':s true :: true:false c18 :: c20:c21 -> c6:c7 -> c:c1:c2 -> c18:c19 IF2 :: nil:cons:f -> 0':s -> true:false -> c20:c21 empty :: nil:cons:f -> true:false fstsplit :: 0':s -> nil:cons:f -> nil:cons:f false :: true:false c19 :: c22 -> c6:c7 -> c:c1:c2 -> c13:c14 -> c15:c16 -> c18:c19 IF3 :: nil:cons:f -> 0':s -> true:false -> c22 app :: nil:cons:f -> nil:cons:f -> nil:cons:f self :: self c20 :: c17 -> c13:c14 -> c15:c16 -> c20:c21 sndsplit :: 0':s -> nil:cons:f -> nil:cons:f c21 :: c17 -> c13:c14 -> c3:c4:c5 -> c20:c21 c22 :: c17 -> c3:c4:c5 -> c13:c14 -> c15:c16 -> c22 process :: nil:cons:f -> 0':s -> process:if1:if2:if3 if1 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if2 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if3 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 hole_c:c1:c21_23 :: c:c1:c2 hole_0':s2_23 :: 0':s hole_nil:cons:f3_23 :: nil:cons:f hole_a4_23 :: a hole_c3:c4:c55_23 :: c3:c4:c5 hole_c6:c76_23 :: c6:c7 hole_c8:c9:c107_23 :: c8:c9:c10 hole_c11:c128_23 :: c11:c12 hole_c13:c149_23 :: c13:c14 hole_c15:c1610_23 :: c15:c16 hole_self11_23 :: self hole_c1712_23 :: c17 hole_c18:c1913_23 :: c18:c19 hole_true:false14_23 :: true:false hole_c20:c2115_23 :: c20:c21 hole_c2216_23 :: c22 hole_process:if1:if2:if317_23 :: process:if1:if2:if3 gen_c:c1:c218_23 :: Nat -> c:c1:c2 gen_0':s19_23 :: Nat -> 0':s gen_nil:cons:f20_23 :: Nat -> nil:cons:f gen_c3:c4:c521_23 :: Nat -> c3:c4:c5 gen_c8:c9:c1022_23 :: Nat -> c8:c9:c10 gen_c11:c1223_23 :: Nat -> c11:c12 gen_c13:c1424_23 :: Nat -> c13:c14 gen_c15:c1625_23 :: Nat -> c15:c16 Lemmas: FSTSPLIT(gen_0':s19_23(n27_23), gen_nil:cons:f20_23(n27_23)) -> gen_c:c1:c218_23(n27_23), rt in Omega(1 + n27_23) SNDSPLIT(gen_0':s19_23(n869_23), gen_nil:cons:f20_23(n869_23)) -> gen_c3:c4:c521_23(n869_23), rt in Omega(1 + n869_23) LEQ(gen_0':s19_23(n1820_23), gen_0':s19_23(n1820_23)) -> gen_c8:c9:c1022_23(n1820_23), rt in Omega(1 + n1820_23) LENGTH(gen_nil:cons:f20_23(n2743_23)) -> gen_c11:c1223_23(n2743_23), rt in Omega(1 + n2743_23) Generator Equations: gen_c:c1:c218_23(0) <=> c gen_c:c1:c218_23(+(x, 1)) <=> c2(gen_c:c1:c218_23(x)) gen_0':s19_23(0) <=> 0' gen_0':s19_23(+(x, 1)) <=> s(gen_0':s19_23(x)) gen_nil:cons:f20_23(0) <=> nil gen_nil:cons:f20_23(+(x, 1)) <=> cons(hole_a4_23, gen_nil:cons:f20_23(x)) gen_c3:c4:c521_23(0) <=> c3 gen_c3:c4:c521_23(+(x, 1)) <=> c5(gen_c3:c4:c521_23(x)) gen_c8:c9:c1022_23(0) <=> c8 gen_c8:c9:c1022_23(+(x, 1)) <=> c10(gen_c8:c9:c1022_23(x)) gen_c11:c1223_23(0) <=> c11 gen_c11:c1223_23(+(x, 1)) <=> c12(gen_c11:c1223_23(x)) gen_c13:c1424_23(0) <=> c13 gen_c13:c1424_23(+(x, 1)) <=> c14(gen_c13:c1424_23(x)) gen_c15:c1625_23(0) <=> c15 gen_c15:c1625_23(+(x, 1)) <=> c16(c13, gen_c15:c1625_23(x)) The following defined symbols remain to be analysed: APP, MAP_F, map_f, PROCESS, leq, length, fstsplit, app, sndsplit, process They will be analysed ascendingly in the following order: APP < MAP_F APP < PROCESS map_f < MAP_F MAP_F < PROCESS map_f < PROCESS app < map_f map_f < process leq < PROCESS length < PROCESS fstsplit < PROCESS app < PROCESS sndsplit < PROCESS leq < process length < process fstsplit < process app < process sndsplit < process ---------------------------------------- (33) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: APP(gen_nil:cons:f20_23(n3357_23), gen_nil:cons:f20_23(b)) -> gen_c13:c1424_23(n3357_23), rt in Omega(1 + n3357_23) Induction Base: APP(gen_nil:cons:f20_23(0), gen_nil:cons:f20_23(b)) ->_R^Omega(1) c13 Induction Step: APP(gen_nil:cons:f20_23(+(n3357_23, 1)), gen_nil:cons:f20_23(b)) ->_R^Omega(1) c14(APP(gen_nil:cons:f20_23(n3357_23), gen_nil:cons:f20_23(b))) ->_IH c14(gen_c13:c1424_23(c3358_23)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (34) Obligation: Innermost TRS: Rules: FSTSPLIT(0', z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0', z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0', z0) -> c8 LEQ(s(z0), 0') -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) fstsplit(0', z0) -> nil fstsplit(s(z0), nil) -> nil fstsplit(s(z0), cons(z1, z2)) -> cons(z1, fstsplit(z0, z2)) sndsplit(0', z0) -> z0 sndsplit(s(z0), nil) -> nil sndsplit(s(z0), cons(z1, z2)) -> sndsplit(z0, z2) empty(nil) -> true empty(cons(z0, z1)) -> false leq(0', z0) -> true leq(s(z0), 0') -> false leq(s(z0), s(z1)) -> leq(z0, z1) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) app(nil, z0) -> z0 app(cons(z0, z1), z2) -> cons(z0, app(z1, z2)) map_f(z0, nil) -> nil map_f(z0, cons(z1, z2)) -> app(f(z0, z1), map_f(z0, z2)) process(z0, z1) -> if1(z0, z1, leq(z1, length(z0))) if1(z0, z1, true) -> if2(z0, z1, empty(fstsplit(z1, z0))) if1(z0, z1, false) -> if3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))) if2(z0, z1, false) -> process(app(map_f(self, nil), sndsplit(z1, z0)), z1) if3(z0, z1, false) -> process(sndsplit(z1, app(map_f(self, nil), z0)), z1) Types: FSTSPLIT :: 0':s -> nil:cons:f -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s nil :: nil:cons:f c1 :: c:c1:c2 cons :: a -> nil:cons:f -> nil:cons:f c2 :: c:c1:c2 -> c:c1:c2 SNDSPLIT :: 0':s -> nil:cons:f -> c3:c4:c5 c3 :: c3:c4:c5 c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 EMPTY :: nil:cons:f -> c6:c7 c6 :: c6:c7 c7 :: c6:c7 LEQ :: 0':s -> 0':s -> c8:c9:c10 c8 :: c8:c9:c10 c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 LENGTH :: nil:cons:f -> c11:c12 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 APP :: nil:cons:f -> nil:cons:f -> c13:c14 c13 :: c13:c14 c14 :: c13:c14 -> c13:c14 MAP_F :: self -> nil:cons:f -> c15:c16 c15 :: c15:c16 c16 :: c13:c14 -> c15:c16 -> c15:c16 f :: self -> a -> nil:cons:f map_f :: self -> nil:cons:f -> nil:cons:f PROCESS :: nil:cons:f -> 0':s -> c17 c17 :: c18:c19 -> c8:c9:c10 -> c11:c12 -> c17 IF1 :: nil:cons:f -> 0':s -> true:false -> c18:c19 leq :: 0':s -> 0':s -> true:false length :: nil:cons:f -> 0':s true :: true:false c18 :: c20:c21 -> c6:c7 -> c:c1:c2 -> c18:c19 IF2 :: nil:cons:f -> 0':s -> true:false -> c20:c21 empty :: nil:cons:f -> true:false fstsplit :: 0':s -> nil:cons:f -> nil:cons:f false :: true:false c19 :: c22 -> c6:c7 -> c:c1:c2 -> c13:c14 -> c15:c16 -> c18:c19 IF3 :: nil:cons:f -> 0':s -> true:false -> c22 app :: nil:cons:f -> nil:cons:f -> nil:cons:f self :: self c20 :: c17 -> c13:c14 -> c15:c16 -> c20:c21 sndsplit :: 0':s -> nil:cons:f -> nil:cons:f c21 :: c17 -> c13:c14 -> c3:c4:c5 -> c20:c21 c22 :: c17 -> c3:c4:c5 -> c13:c14 -> c15:c16 -> c22 process :: nil:cons:f -> 0':s -> process:if1:if2:if3 if1 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if2 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if3 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 hole_c:c1:c21_23 :: c:c1:c2 hole_0':s2_23 :: 0':s hole_nil:cons:f3_23 :: nil:cons:f hole_a4_23 :: a hole_c3:c4:c55_23 :: c3:c4:c5 hole_c6:c76_23 :: c6:c7 hole_c8:c9:c107_23 :: c8:c9:c10 hole_c11:c128_23 :: c11:c12 hole_c13:c149_23 :: c13:c14 hole_c15:c1610_23 :: c15:c16 hole_self11_23 :: self hole_c1712_23 :: c17 hole_c18:c1913_23 :: c18:c19 hole_true:false14_23 :: true:false hole_c20:c2115_23 :: c20:c21 hole_c2216_23 :: c22 hole_process:if1:if2:if317_23 :: process:if1:if2:if3 gen_c:c1:c218_23 :: Nat -> c:c1:c2 gen_0':s19_23 :: Nat -> 0':s gen_nil:cons:f20_23 :: Nat -> nil:cons:f gen_c3:c4:c521_23 :: Nat -> c3:c4:c5 gen_c8:c9:c1022_23 :: Nat -> c8:c9:c10 gen_c11:c1223_23 :: Nat -> c11:c12 gen_c13:c1424_23 :: Nat -> c13:c14 gen_c15:c1625_23 :: Nat -> c15:c16 Lemmas: FSTSPLIT(gen_0':s19_23(n27_23), gen_nil:cons:f20_23(n27_23)) -> gen_c:c1:c218_23(n27_23), rt in Omega(1 + n27_23) SNDSPLIT(gen_0':s19_23(n869_23), gen_nil:cons:f20_23(n869_23)) -> gen_c3:c4:c521_23(n869_23), rt in Omega(1 + n869_23) LEQ(gen_0':s19_23(n1820_23), gen_0':s19_23(n1820_23)) -> gen_c8:c9:c1022_23(n1820_23), rt in Omega(1 + n1820_23) LENGTH(gen_nil:cons:f20_23(n2743_23)) -> gen_c11:c1223_23(n2743_23), rt in Omega(1 + n2743_23) APP(gen_nil:cons:f20_23(n3357_23), gen_nil:cons:f20_23(b)) -> gen_c13:c1424_23(n3357_23), rt in Omega(1 + n3357_23) Generator Equations: gen_c:c1:c218_23(0) <=> c gen_c:c1:c218_23(+(x, 1)) <=> c2(gen_c:c1:c218_23(x)) gen_0':s19_23(0) <=> 0' gen_0':s19_23(+(x, 1)) <=> s(gen_0':s19_23(x)) gen_nil:cons:f20_23(0) <=> nil gen_nil:cons:f20_23(+(x, 1)) <=> cons(hole_a4_23, gen_nil:cons:f20_23(x)) gen_c3:c4:c521_23(0) <=> c3 gen_c3:c4:c521_23(+(x, 1)) <=> c5(gen_c3:c4:c521_23(x)) gen_c8:c9:c1022_23(0) <=> c8 gen_c8:c9:c1022_23(+(x, 1)) <=> c10(gen_c8:c9:c1022_23(x)) gen_c11:c1223_23(0) <=> c11 gen_c11:c1223_23(+(x, 1)) <=> c12(gen_c11:c1223_23(x)) gen_c13:c1424_23(0) <=> c13 gen_c13:c1424_23(+(x, 1)) <=> c14(gen_c13:c1424_23(x)) gen_c15:c1625_23(0) <=> c15 gen_c15:c1625_23(+(x, 1)) <=> c16(c13, gen_c15:c1625_23(x)) The following defined symbols remain to be analysed: leq, MAP_F, map_f, PROCESS, length, fstsplit, app, sndsplit, process They will be analysed ascendingly in the following order: map_f < MAP_F MAP_F < PROCESS map_f < PROCESS app < map_f map_f < process leq < PROCESS length < PROCESS fstsplit < PROCESS app < PROCESS sndsplit < PROCESS leq < process length < process fstsplit < process app < process sndsplit < process ---------------------------------------- (35) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: leq(gen_0':s19_23(n4577_23), gen_0':s19_23(n4577_23)) -> true, rt in Omega(0) Induction Base: leq(gen_0':s19_23(0), gen_0':s19_23(0)) ->_R^Omega(0) true Induction Step: leq(gen_0':s19_23(+(n4577_23, 1)), gen_0':s19_23(+(n4577_23, 1))) ->_R^Omega(0) leq(gen_0':s19_23(n4577_23), gen_0':s19_23(n4577_23)) ->_IH true We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (36) Obligation: Innermost TRS: Rules: FSTSPLIT(0', z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0', z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0', z0) -> c8 LEQ(s(z0), 0') -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) fstsplit(0', z0) -> nil fstsplit(s(z0), nil) -> nil fstsplit(s(z0), cons(z1, z2)) -> cons(z1, fstsplit(z0, z2)) sndsplit(0', z0) -> z0 sndsplit(s(z0), nil) -> nil sndsplit(s(z0), cons(z1, z2)) -> sndsplit(z0, z2) empty(nil) -> true empty(cons(z0, z1)) -> false leq(0', z0) -> true leq(s(z0), 0') -> false leq(s(z0), s(z1)) -> leq(z0, z1) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) app(nil, z0) -> z0 app(cons(z0, z1), z2) -> cons(z0, app(z1, z2)) map_f(z0, nil) -> nil map_f(z0, cons(z1, z2)) -> app(f(z0, z1), map_f(z0, z2)) process(z0, z1) -> if1(z0, z1, leq(z1, length(z0))) if1(z0, z1, true) -> if2(z0, z1, empty(fstsplit(z1, z0))) if1(z0, z1, false) -> if3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))) if2(z0, z1, false) -> process(app(map_f(self, nil), sndsplit(z1, z0)), z1) if3(z0, z1, false) -> process(sndsplit(z1, app(map_f(self, nil), z0)), z1) Types: FSTSPLIT :: 0':s -> nil:cons:f -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s nil :: nil:cons:f c1 :: c:c1:c2 cons :: a -> nil:cons:f -> nil:cons:f c2 :: c:c1:c2 -> c:c1:c2 SNDSPLIT :: 0':s -> nil:cons:f -> c3:c4:c5 c3 :: c3:c4:c5 c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 EMPTY :: nil:cons:f -> c6:c7 c6 :: c6:c7 c7 :: c6:c7 LEQ :: 0':s -> 0':s -> c8:c9:c10 c8 :: c8:c9:c10 c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 LENGTH :: nil:cons:f -> c11:c12 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 APP :: nil:cons:f -> nil:cons:f -> c13:c14 c13 :: c13:c14 c14 :: c13:c14 -> c13:c14 MAP_F :: self -> nil:cons:f -> c15:c16 c15 :: c15:c16 c16 :: c13:c14 -> c15:c16 -> c15:c16 f :: self -> a -> nil:cons:f map_f :: self -> nil:cons:f -> nil:cons:f PROCESS :: nil:cons:f -> 0':s -> c17 c17 :: c18:c19 -> c8:c9:c10 -> c11:c12 -> c17 IF1 :: nil:cons:f -> 0':s -> true:false -> c18:c19 leq :: 0':s -> 0':s -> true:false length :: nil:cons:f -> 0':s true :: true:false c18 :: c20:c21 -> c6:c7 -> c:c1:c2 -> c18:c19 IF2 :: nil:cons:f -> 0':s -> true:false -> c20:c21 empty :: nil:cons:f -> true:false fstsplit :: 0':s -> nil:cons:f -> nil:cons:f false :: true:false c19 :: c22 -> c6:c7 -> c:c1:c2 -> c13:c14 -> c15:c16 -> c18:c19 IF3 :: nil:cons:f -> 0':s -> true:false -> c22 app :: nil:cons:f -> nil:cons:f -> nil:cons:f self :: self c20 :: c17 -> c13:c14 -> c15:c16 -> c20:c21 sndsplit :: 0':s -> nil:cons:f -> nil:cons:f c21 :: c17 -> c13:c14 -> c3:c4:c5 -> c20:c21 c22 :: c17 -> c3:c4:c5 -> c13:c14 -> c15:c16 -> c22 process :: nil:cons:f -> 0':s -> process:if1:if2:if3 if1 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if2 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if3 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 hole_c:c1:c21_23 :: c:c1:c2 hole_0':s2_23 :: 0':s hole_nil:cons:f3_23 :: nil:cons:f hole_a4_23 :: a hole_c3:c4:c55_23 :: c3:c4:c5 hole_c6:c76_23 :: c6:c7 hole_c8:c9:c107_23 :: c8:c9:c10 hole_c11:c128_23 :: c11:c12 hole_c13:c149_23 :: c13:c14 hole_c15:c1610_23 :: c15:c16 hole_self11_23 :: self hole_c1712_23 :: c17 hole_c18:c1913_23 :: c18:c19 hole_true:false14_23 :: true:false hole_c20:c2115_23 :: c20:c21 hole_c2216_23 :: c22 hole_process:if1:if2:if317_23 :: process:if1:if2:if3 gen_c:c1:c218_23 :: Nat -> c:c1:c2 gen_0':s19_23 :: Nat -> 0':s gen_nil:cons:f20_23 :: Nat -> nil:cons:f gen_c3:c4:c521_23 :: Nat -> c3:c4:c5 gen_c8:c9:c1022_23 :: Nat -> c8:c9:c10 gen_c11:c1223_23 :: Nat -> c11:c12 gen_c13:c1424_23 :: Nat -> c13:c14 gen_c15:c1625_23 :: Nat -> c15:c16 Lemmas: FSTSPLIT(gen_0':s19_23(n27_23), gen_nil:cons:f20_23(n27_23)) -> gen_c:c1:c218_23(n27_23), rt in Omega(1 + n27_23) SNDSPLIT(gen_0':s19_23(n869_23), gen_nil:cons:f20_23(n869_23)) -> gen_c3:c4:c521_23(n869_23), rt in Omega(1 + n869_23) LEQ(gen_0':s19_23(n1820_23), gen_0':s19_23(n1820_23)) -> gen_c8:c9:c1022_23(n1820_23), rt in Omega(1 + n1820_23) LENGTH(gen_nil:cons:f20_23(n2743_23)) -> gen_c11:c1223_23(n2743_23), rt in Omega(1 + n2743_23) APP(gen_nil:cons:f20_23(n3357_23), gen_nil:cons:f20_23(b)) -> gen_c13:c1424_23(n3357_23), rt in Omega(1 + n3357_23) leq(gen_0':s19_23(n4577_23), gen_0':s19_23(n4577_23)) -> true, rt in Omega(0) Generator Equations: gen_c:c1:c218_23(0) <=> c gen_c:c1:c218_23(+(x, 1)) <=> c2(gen_c:c1:c218_23(x)) gen_0':s19_23(0) <=> 0' gen_0':s19_23(+(x, 1)) <=> s(gen_0':s19_23(x)) gen_nil:cons:f20_23(0) <=> nil gen_nil:cons:f20_23(+(x, 1)) <=> cons(hole_a4_23, gen_nil:cons:f20_23(x)) gen_c3:c4:c521_23(0) <=> c3 gen_c3:c4:c521_23(+(x, 1)) <=> c5(gen_c3:c4:c521_23(x)) gen_c8:c9:c1022_23(0) <=> c8 gen_c8:c9:c1022_23(+(x, 1)) <=> c10(gen_c8:c9:c1022_23(x)) gen_c11:c1223_23(0) <=> c11 gen_c11:c1223_23(+(x, 1)) <=> c12(gen_c11:c1223_23(x)) gen_c13:c1424_23(0) <=> c13 gen_c13:c1424_23(+(x, 1)) <=> c14(gen_c13:c1424_23(x)) gen_c15:c1625_23(0) <=> c15 gen_c15:c1625_23(+(x, 1)) <=> c16(c13, gen_c15:c1625_23(x)) The following defined symbols remain to be analysed: length, MAP_F, map_f, PROCESS, fstsplit, app, sndsplit, process They will be analysed ascendingly in the following order: map_f < MAP_F MAP_F < PROCESS map_f < PROCESS app < map_f map_f < process length < PROCESS fstsplit < PROCESS app < PROCESS sndsplit < PROCESS length < process fstsplit < process app < process sndsplit < process ---------------------------------------- (37) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: length(gen_nil:cons:f20_23(n5104_23)) -> gen_0':s19_23(n5104_23), rt in Omega(0) Induction Base: length(gen_nil:cons:f20_23(0)) ->_R^Omega(0) 0' Induction Step: length(gen_nil:cons:f20_23(+(n5104_23, 1))) ->_R^Omega(0) s(length(gen_nil:cons:f20_23(n5104_23))) ->_IH s(gen_0':s19_23(c5105_23)) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (38) Obligation: Innermost TRS: Rules: FSTSPLIT(0', z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0', z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0', z0) -> c8 LEQ(s(z0), 0') -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) fstsplit(0', z0) -> nil fstsplit(s(z0), nil) -> nil fstsplit(s(z0), cons(z1, z2)) -> cons(z1, fstsplit(z0, z2)) sndsplit(0', z0) -> z0 sndsplit(s(z0), nil) -> nil sndsplit(s(z0), cons(z1, z2)) -> sndsplit(z0, z2) empty(nil) -> true empty(cons(z0, z1)) -> false leq(0', z0) -> true leq(s(z0), 0') -> false leq(s(z0), s(z1)) -> leq(z0, z1) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) app(nil, z0) -> z0 app(cons(z0, z1), z2) -> cons(z0, app(z1, z2)) map_f(z0, nil) -> nil map_f(z0, cons(z1, z2)) -> app(f(z0, z1), map_f(z0, z2)) process(z0, z1) -> if1(z0, z1, leq(z1, length(z0))) if1(z0, z1, true) -> if2(z0, z1, empty(fstsplit(z1, z0))) if1(z0, z1, false) -> if3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))) if2(z0, z1, false) -> process(app(map_f(self, nil), sndsplit(z1, z0)), z1) if3(z0, z1, false) -> process(sndsplit(z1, app(map_f(self, nil), z0)), z1) Types: FSTSPLIT :: 0':s -> nil:cons:f -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s nil :: nil:cons:f c1 :: c:c1:c2 cons :: a -> nil:cons:f -> nil:cons:f c2 :: c:c1:c2 -> c:c1:c2 SNDSPLIT :: 0':s -> nil:cons:f -> c3:c4:c5 c3 :: c3:c4:c5 c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 EMPTY :: nil:cons:f -> c6:c7 c6 :: c6:c7 c7 :: c6:c7 LEQ :: 0':s -> 0':s -> c8:c9:c10 c8 :: c8:c9:c10 c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 LENGTH :: nil:cons:f -> c11:c12 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 APP :: nil:cons:f -> nil:cons:f -> c13:c14 c13 :: c13:c14 c14 :: c13:c14 -> c13:c14 MAP_F :: self -> nil:cons:f -> c15:c16 c15 :: c15:c16 c16 :: c13:c14 -> c15:c16 -> c15:c16 f :: self -> a -> nil:cons:f map_f :: self -> nil:cons:f -> nil:cons:f PROCESS :: nil:cons:f -> 0':s -> c17 c17 :: c18:c19 -> c8:c9:c10 -> c11:c12 -> c17 IF1 :: nil:cons:f -> 0':s -> true:false -> c18:c19 leq :: 0':s -> 0':s -> true:false length :: nil:cons:f -> 0':s true :: true:false c18 :: c20:c21 -> c6:c7 -> c:c1:c2 -> c18:c19 IF2 :: nil:cons:f -> 0':s -> true:false -> c20:c21 empty :: nil:cons:f -> true:false fstsplit :: 0':s -> nil:cons:f -> nil:cons:f false :: true:false c19 :: c22 -> c6:c7 -> c:c1:c2 -> c13:c14 -> c15:c16 -> c18:c19 IF3 :: nil:cons:f -> 0':s -> true:false -> c22 app :: nil:cons:f -> nil:cons:f -> nil:cons:f self :: self c20 :: c17 -> c13:c14 -> c15:c16 -> c20:c21 sndsplit :: 0':s -> nil:cons:f -> nil:cons:f c21 :: c17 -> c13:c14 -> c3:c4:c5 -> c20:c21 c22 :: c17 -> c3:c4:c5 -> c13:c14 -> c15:c16 -> c22 process :: nil:cons:f -> 0':s -> process:if1:if2:if3 if1 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if2 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if3 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 hole_c:c1:c21_23 :: c:c1:c2 hole_0':s2_23 :: 0':s hole_nil:cons:f3_23 :: nil:cons:f hole_a4_23 :: a hole_c3:c4:c55_23 :: c3:c4:c5 hole_c6:c76_23 :: c6:c7 hole_c8:c9:c107_23 :: c8:c9:c10 hole_c11:c128_23 :: c11:c12 hole_c13:c149_23 :: c13:c14 hole_c15:c1610_23 :: c15:c16 hole_self11_23 :: self hole_c1712_23 :: c17 hole_c18:c1913_23 :: c18:c19 hole_true:false14_23 :: true:false hole_c20:c2115_23 :: c20:c21 hole_c2216_23 :: c22 hole_process:if1:if2:if317_23 :: process:if1:if2:if3 gen_c:c1:c218_23 :: Nat -> c:c1:c2 gen_0':s19_23 :: Nat -> 0':s gen_nil:cons:f20_23 :: Nat -> nil:cons:f gen_c3:c4:c521_23 :: Nat -> c3:c4:c5 gen_c8:c9:c1022_23 :: Nat -> c8:c9:c10 gen_c11:c1223_23 :: Nat -> c11:c12 gen_c13:c1424_23 :: Nat -> c13:c14 gen_c15:c1625_23 :: Nat -> c15:c16 Lemmas: FSTSPLIT(gen_0':s19_23(n27_23), gen_nil:cons:f20_23(n27_23)) -> gen_c:c1:c218_23(n27_23), rt in Omega(1 + n27_23) SNDSPLIT(gen_0':s19_23(n869_23), gen_nil:cons:f20_23(n869_23)) -> gen_c3:c4:c521_23(n869_23), rt in Omega(1 + n869_23) LEQ(gen_0':s19_23(n1820_23), gen_0':s19_23(n1820_23)) -> gen_c8:c9:c1022_23(n1820_23), rt in Omega(1 + n1820_23) LENGTH(gen_nil:cons:f20_23(n2743_23)) -> gen_c11:c1223_23(n2743_23), rt in Omega(1 + n2743_23) APP(gen_nil:cons:f20_23(n3357_23), gen_nil:cons:f20_23(b)) -> gen_c13:c1424_23(n3357_23), rt in Omega(1 + n3357_23) leq(gen_0':s19_23(n4577_23), gen_0':s19_23(n4577_23)) -> true, rt in Omega(0) length(gen_nil:cons:f20_23(n5104_23)) -> gen_0':s19_23(n5104_23), rt in Omega(0) Generator Equations: gen_c:c1:c218_23(0) <=> c gen_c:c1:c218_23(+(x, 1)) <=> c2(gen_c:c1:c218_23(x)) gen_0':s19_23(0) <=> 0' gen_0':s19_23(+(x, 1)) <=> s(gen_0':s19_23(x)) gen_nil:cons:f20_23(0) <=> nil gen_nil:cons:f20_23(+(x, 1)) <=> cons(hole_a4_23, gen_nil:cons:f20_23(x)) gen_c3:c4:c521_23(0) <=> c3 gen_c3:c4:c521_23(+(x, 1)) <=> c5(gen_c3:c4:c521_23(x)) gen_c8:c9:c1022_23(0) <=> c8 gen_c8:c9:c1022_23(+(x, 1)) <=> c10(gen_c8:c9:c1022_23(x)) gen_c11:c1223_23(0) <=> c11 gen_c11:c1223_23(+(x, 1)) <=> c12(gen_c11:c1223_23(x)) gen_c13:c1424_23(0) <=> c13 gen_c13:c1424_23(+(x, 1)) <=> c14(gen_c13:c1424_23(x)) gen_c15:c1625_23(0) <=> c15 gen_c15:c1625_23(+(x, 1)) <=> c16(c13, gen_c15:c1625_23(x)) The following defined symbols remain to be analysed: fstsplit, MAP_F, map_f, PROCESS, app, sndsplit, process They will be analysed ascendingly in the following order: map_f < MAP_F MAP_F < PROCESS map_f < PROCESS app < map_f map_f < process fstsplit < PROCESS app < PROCESS sndsplit < PROCESS fstsplit < process app < process sndsplit < process ---------------------------------------- (39) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: fstsplit(gen_0':s19_23(n5594_23), gen_nil:cons:f20_23(n5594_23)) -> gen_nil:cons:f20_23(n5594_23), rt in Omega(0) Induction Base: fstsplit(gen_0':s19_23(0), gen_nil:cons:f20_23(0)) ->_R^Omega(0) nil Induction Step: fstsplit(gen_0':s19_23(+(n5594_23, 1)), gen_nil:cons:f20_23(+(n5594_23, 1))) ->_R^Omega(0) cons(hole_a4_23, fstsplit(gen_0':s19_23(n5594_23), gen_nil:cons:f20_23(n5594_23))) ->_IH cons(hole_a4_23, gen_nil:cons:f20_23(c5595_23)) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (40) Obligation: Innermost TRS: Rules: FSTSPLIT(0', z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0', z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0', z0) -> c8 LEQ(s(z0), 0') -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) fstsplit(0', z0) -> nil fstsplit(s(z0), nil) -> nil fstsplit(s(z0), cons(z1, z2)) -> cons(z1, fstsplit(z0, z2)) sndsplit(0', z0) -> z0 sndsplit(s(z0), nil) -> nil sndsplit(s(z0), cons(z1, z2)) -> sndsplit(z0, z2) empty(nil) -> true empty(cons(z0, z1)) -> false leq(0', z0) -> true leq(s(z0), 0') -> false leq(s(z0), s(z1)) -> leq(z0, z1) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) app(nil, z0) -> z0 app(cons(z0, z1), z2) -> cons(z0, app(z1, z2)) map_f(z0, nil) -> nil map_f(z0, cons(z1, z2)) -> app(f(z0, z1), map_f(z0, z2)) process(z0, z1) -> if1(z0, z1, leq(z1, length(z0))) if1(z0, z1, true) -> if2(z0, z1, empty(fstsplit(z1, z0))) if1(z0, z1, false) -> if3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))) if2(z0, z1, false) -> process(app(map_f(self, nil), sndsplit(z1, z0)), z1) if3(z0, z1, false) -> process(sndsplit(z1, app(map_f(self, nil), z0)), z1) Types: FSTSPLIT :: 0':s -> nil:cons:f -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s nil :: nil:cons:f c1 :: c:c1:c2 cons :: a -> nil:cons:f -> nil:cons:f c2 :: c:c1:c2 -> c:c1:c2 SNDSPLIT :: 0':s -> nil:cons:f -> c3:c4:c5 c3 :: c3:c4:c5 c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 EMPTY :: nil:cons:f -> c6:c7 c6 :: c6:c7 c7 :: c6:c7 LEQ :: 0':s -> 0':s -> c8:c9:c10 c8 :: c8:c9:c10 c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 LENGTH :: nil:cons:f -> c11:c12 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 APP :: nil:cons:f -> nil:cons:f -> c13:c14 c13 :: c13:c14 c14 :: c13:c14 -> c13:c14 MAP_F :: self -> nil:cons:f -> c15:c16 c15 :: c15:c16 c16 :: c13:c14 -> c15:c16 -> c15:c16 f :: self -> a -> nil:cons:f map_f :: self -> nil:cons:f -> nil:cons:f PROCESS :: nil:cons:f -> 0':s -> c17 c17 :: c18:c19 -> c8:c9:c10 -> c11:c12 -> c17 IF1 :: nil:cons:f -> 0':s -> true:false -> c18:c19 leq :: 0':s -> 0':s -> true:false length :: nil:cons:f -> 0':s true :: true:false c18 :: c20:c21 -> c6:c7 -> c:c1:c2 -> c18:c19 IF2 :: nil:cons:f -> 0':s -> true:false -> c20:c21 empty :: nil:cons:f -> true:false fstsplit :: 0':s -> nil:cons:f -> nil:cons:f false :: true:false c19 :: c22 -> c6:c7 -> c:c1:c2 -> c13:c14 -> c15:c16 -> c18:c19 IF3 :: nil:cons:f -> 0':s -> true:false -> c22 app :: nil:cons:f -> nil:cons:f -> nil:cons:f self :: self c20 :: c17 -> c13:c14 -> c15:c16 -> c20:c21 sndsplit :: 0':s -> nil:cons:f -> nil:cons:f c21 :: c17 -> c13:c14 -> c3:c4:c5 -> c20:c21 c22 :: c17 -> c3:c4:c5 -> c13:c14 -> c15:c16 -> c22 process :: nil:cons:f -> 0':s -> process:if1:if2:if3 if1 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if2 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if3 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 hole_c:c1:c21_23 :: c:c1:c2 hole_0':s2_23 :: 0':s hole_nil:cons:f3_23 :: nil:cons:f hole_a4_23 :: a hole_c3:c4:c55_23 :: c3:c4:c5 hole_c6:c76_23 :: c6:c7 hole_c8:c9:c107_23 :: c8:c9:c10 hole_c11:c128_23 :: c11:c12 hole_c13:c149_23 :: c13:c14 hole_c15:c1610_23 :: c15:c16 hole_self11_23 :: self hole_c1712_23 :: c17 hole_c18:c1913_23 :: c18:c19 hole_true:false14_23 :: true:false hole_c20:c2115_23 :: c20:c21 hole_c2216_23 :: c22 hole_process:if1:if2:if317_23 :: process:if1:if2:if3 gen_c:c1:c218_23 :: Nat -> c:c1:c2 gen_0':s19_23 :: Nat -> 0':s gen_nil:cons:f20_23 :: Nat -> nil:cons:f gen_c3:c4:c521_23 :: Nat -> c3:c4:c5 gen_c8:c9:c1022_23 :: Nat -> c8:c9:c10 gen_c11:c1223_23 :: Nat -> c11:c12 gen_c13:c1424_23 :: Nat -> c13:c14 gen_c15:c1625_23 :: Nat -> c15:c16 Lemmas: FSTSPLIT(gen_0':s19_23(n27_23), gen_nil:cons:f20_23(n27_23)) -> gen_c:c1:c218_23(n27_23), rt in Omega(1 + n27_23) SNDSPLIT(gen_0':s19_23(n869_23), gen_nil:cons:f20_23(n869_23)) -> gen_c3:c4:c521_23(n869_23), rt in Omega(1 + n869_23) LEQ(gen_0':s19_23(n1820_23), gen_0':s19_23(n1820_23)) -> gen_c8:c9:c1022_23(n1820_23), rt in Omega(1 + n1820_23) LENGTH(gen_nil:cons:f20_23(n2743_23)) -> gen_c11:c1223_23(n2743_23), rt in Omega(1 + n2743_23) APP(gen_nil:cons:f20_23(n3357_23), gen_nil:cons:f20_23(b)) -> gen_c13:c1424_23(n3357_23), rt in Omega(1 + n3357_23) leq(gen_0':s19_23(n4577_23), gen_0':s19_23(n4577_23)) -> true, rt in Omega(0) length(gen_nil:cons:f20_23(n5104_23)) -> gen_0':s19_23(n5104_23), rt in Omega(0) fstsplit(gen_0':s19_23(n5594_23), gen_nil:cons:f20_23(n5594_23)) -> gen_nil:cons:f20_23(n5594_23), rt in Omega(0) Generator Equations: gen_c:c1:c218_23(0) <=> c gen_c:c1:c218_23(+(x, 1)) <=> c2(gen_c:c1:c218_23(x)) gen_0':s19_23(0) <=> 0' gen_0':s19_23(+(x, 1)) <=> s(gen_0':s19_23(x)) gen_nil:cons:f20_23(0) <=> nil gen_nil:cons:f20_23(+(x, 1)) <=> cons(hole_a4_23, gen_nil:cons:f20_23(x)) gen_c3:c4:c521_23(0) <=> c3 gen_c3:c4:c521_23(+(x, 1)) <=> c5(gen_c3:c4:c521_23(x)) gen_c8:c9:c1022_23(0) <=> c8 gen_c8:c9:c1022_23(+(x, 1)) <=> c10(gen_c8:c9:c1022_23(x)) gen_c11:c1223_23(0) <=> c11 gen_c11:c1223_23(+(x, 1)) <=> c12(gen_c11:c1223_23(x)) gen_c13:c1424_23(0) <=> c13 gen_c13:c1424_23(+(x, 1)) <=> c14(gen_c13:c1424_23(x)) gen_c15:c1625_23(0) <=> c15 gen_c15:c1625_23(+(x, 1)) <=> c16(c13, gen_c15:c1625_23(x)) The following defined symbols remain to be analysed: app, MAP_F, map_f, PROCESS, sndsplit, process They will be analysed ascendingly in the following order: map_f < MAP_F MAP_F < PROCESS map_f < PROCESS app < map_f map_f < process app < PROCESS sndsplit < PROCESS app < process sndsplit < process ---------------------------------------- (41) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: app(gen_nil:cons:f20_23(n6549_23), gen_nil:cons:f20_23(b)) -> gen_nil:cons:f20_23(+(n6549_23, b)), rt in Omega(0) Induction Base: app(gen_nil:cons:f20_23(0), gen_nil:cons:f20_23(b)) ->_R^Omega(0) gen_nil:cons:f20_23(b) Induction Step: app(gen_nil:cons:f20_23(+(n6549_23, 1)), gen_nil:cons:f20_23(b)) ->_R^Omega(0) cons(hole_a4_23, app(gen_nil:cons:f20_23(n6549_23), gen_nil:cons:f20_23(b))) ->_IH cons(hole_a4_23, gen_nil:cons:f20_23(+(b, c6550_23))) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (42) Obligation: Innermost TRS: Rules: FSTSPLIT(0', z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0', z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0', z0) -> c8 LEQ(s(z0), 0') -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) fstsplit(0', z0) -> nil fstsplit(s(z0), nil) -> nil fstsplit(s(z0), cons(z1, z2)) -> cons(z1, fstsplit(z0, z2)) sndsplit(0', z0) -> z0 sndsplit(s(z0), nil) -> nil sndsplit(s(z0), cons(z1, z2)) -> sndsplit(z0, z2) empty(nil) -> true empty(cons(z0, z1)) -> false leq(0', z0) -> true leq(s(z0), 0') -> false leq(s(z0), s(z1)) -> leq(z0, z1) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) app(nil, z0) -> z0 app(cons(z0, z1), z2) -> cons(z0, app(z1, z2)) map_f(z0, nil) -> nil map_f(z0, cons(z1, z2)) -> app(f(z0, z1), map_f(z0, z2)) process(z0, z1) -> if1(z0, z1, leq(z1, length(z0))) if1(z0, z1, true) -> if2(z0, z1, empty(fstsplit(z1, z0))) if1(z0, z1, false) -> if3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))) if2(z0, z1, false) -> process(app(map_f(self, nil), sndsplit(z1, z0)), z1) if3(z0, z1, false) -> process(sndsplit(z1, app(map_f(self, nil), z0)), z1) Types: FSTSPLIT :: 0':s -> nil:cons:f -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s nil :: nil:cons:f c1 :: c:c1:c2 cons :: a -> nil:cons:f -> nil:cons:f c2 :: c:c1:c2 -> c:c1:c2 SNDSPLIT :: 0':s -> nil:cons:f -> c3:c4:c5 c3 :: c3:c4:c5 c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 EMPTY :: nil:cons:f -> c6:c7 c6 :: c6:c7 c7 :: c6:c7 LEQ :: 0':s -> 0':s -> c8:c9:c10 c8 :: c8:c9:c10 c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 LENGTH :: nil:cons:f -> c11:c12 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 APP :: nil:cons:f -> nil:cons:f -> c13:c14 c13 :: c13:c14 c14 :: c13:c14 -> c13:c14 MAP_F :: self -> nil:cons:f -> c15:c16 c15 :: c15:c16 c16 :: c13:c14 -> c15:c16 -> c15:c16 f :: self -> a -> nil:cons:f map_f :: self -> nil:cons:f -> nil:cons:f PROCESS :: nil:cons:f -> 0':s -> c17 c17 :: c18:c19 -> c8:c9:c10 -> c11:c12 -> c17 IF1 :: nil:cons:f -> 0':s -> true:false -> c18:c19 leq :: 0':s -> 0':s -> true:false length :: nil:cons:f -> 0':s true :: true:false c18 :: c20:c21 -> c6:c7 -> c:c1:c2 -> c18:c19 IF2 :: nil:cons:f -> 0':s -> true:false -> c20:c21 empty :: nil:cons:f -> true:false fstsplit :: 0':s -> nil:cons:f -> nil:cons:f false :: true:false c19 :: c22 -> c6:c7 -> c:c1:c2 -> c13:c14 -> c15:c16 -> c18:c19 IF3 :: nil:cons:f -> 0':s -> true:false -> c22 app :: nil:cons:f -> nil:cons:f -> nil:cons:f self :: self c20 :: c17 -> c13:c14 -> c15:c16 -> c20:c21 sndsplit :: 0':s -> nil:cons:f -> nil:cons:f c21 :: c17 -> c13:c14 -> c3:c4:c5 -> c20:c21 c22 :: c17 -> c3:c4:c5 -> c13:c14 -> c15:c16 -> c22 process :: nil:cons:f -> 0':s -> process:if1:if2:if3 if1 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if2 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if3 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 hole_c:c1:c21_23 :: c:c1:c2 hole_0':s2_23 :: 0':s hole_nil:cons:f3_23 :: nil:cons:f hole_a4_23 :: a hole_c3:c4:c55_23 :: c3:c4:c5 hole_c6:c76_23 :: c6:c7 hole_c8:c9:c107_23 :: c8:c9:c10 hole_c11:c128_23 :: c11:c12 hole_c13:c149_23 :: c13:c14 hole_c15:c1610_23 :: c15:c16 hole_self11_23 :: self hole_c1712_23 :: c17 hole_c18:c1913_23 :: c18:c19 hole_true:false14_23 :: true:false hole_c20:c2115_23 :: c20:c21 hole_c2216_23 :: c22 hole_process:if1:if2:if317_23 :: process:if1:if2:if3 gen_c:c1:c218_23 :: Nat -> c:c1:c2 gen_0':s19_23 :: Nat -> 0':s gen_nil:cons:f20_23 :: Nat -> nil:cons:f gen_c3:c4:c521_23 :: Nat -> c3:c4:c5 gen_c8:c9:c1022_23 :: Nat -> c8:c9:c10 gen_c11:c1223_23 :: Nat -> c11:c12 gen_c13:c1424_23 :: Nat -> c13:c14 gen_c15:c1625_23 :: Nat -> c15:c16 Lemmas: FSTSPLIT(gen_0':s19_23(n27_23), gen_nil:cons:f20_23(n27_23)) -> gen_c:c1:c218_23(n27_23), rt in Omega(1 + n27_23) SNDSPLIT(gen_0':s19_23(n869_23), gen_nil:cons:f20_23(n869_23)) -> gen_c3:c4:c521_23(n869_23), rt in Omega(1 + n869_23) LEQ(gen_0':s19_23(n1820_23), gen_0':s19_23(n1820_23)) -> gen_c8:c9:c1022_23(n1820_23), rt in Omega(1 + n1820_23) LENGTH(gen_nil:cons:f20_23(n2743_23)) -> gen_c11:c1223_23(n2743_23), rt in Omega(1 + n2743_23) APP(gen_nil:cons:f20_23(n3357_23), gen_nil:cons:f20_23(b)) -> gen_c13:c1424_23(n3357_23), rt in Omega(1 + n3357_23) leq(gen_0':s19_23(n4577_23), gen_0':s19_23(n4577_23)) -> true, rt in Omega(0) length(gen_nil:cons:f20_23(n5104_23)) -> gen_0':s19_23(n5104_23), rt in Omega(0) fstsplit(gen_0':s19_23(n5594_23), gen_nil:cons:f20_23(n5594_23)) -> gen_nil:cons:f20_23(n5594_23), rt in Omega(0) app(gen_nil:cons:f20_23(n6549_23), gen_nil:cons:f20_23(b)) -> gen_nil:cons:f20_23(+(n6549_23, b)), rt in Omega(0) Generator Equations: gen_c:c1:c218_23(0) <=> c gen_c:c1:c218_23(+(x, 1)) <=> c2(gen_c:c1:c218_23(x)) gen_0':s19_23(0) <=> 0' gen_0':s19_23(+(x, 1)) <=> s(gen_0':s19_23(x)) gen_nil:cons:f20_23(0) <=> nil gen_nil:cons:f20_23(+(x, 1)) <=> cons(hole_a4_23, gen_nil:cons:f20_23(x)) gen_c3:c4:c521_23(0) <=> c3 gen_c3:c4:c521_23(+(x, 1)) <=> c5(gen_c3:c4:c521_23(x)) gen_c8:c9:c1022_23(0) <=> c8 gen_c8:c9:c1022_23(+(x, 1)) <=> c10(gen_c8:c9:c1022_23(x)) gen_c11:c1223_23(0) <=> c11 gen_c11:c1223_23(+(x, 1)) <=> c12(gen_c11:c1223_23(x)) gen_c13:c1424_23(0) <=> c13 gen_c13:c1424_23(+(x, 1)) <=> c14(gen_c13:c1424_23(x)) gen_c15:c1625_23(0) <=> c15 gen_c15:c1625_23(+(x, 1)) <=> c16(c13, gen_c15:c1625_23(x)) The following defined symbols remain to be analysed: map_f, MAP_F, PROCESS, sndsplit, process They will be analysed ascendingly in the following order: map_f < MAP_F MAP_F < PROCESS map_f < PROCESS map_f < process sndsplit < PROCESS sndsplit < process ---------------------------------------- (43) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: map_f(self, gen_nil:cons:f20_23(+(1, n8842_23))) -> *26_23, rt in Omega(0) Induction Base: map_f(self, gen_nil:cons:f20_23(+(1, 0))) Induction Step: map_f(self, gen_nil:cons:f20_23(+(1, +(n8842_23, 1)))) ->_R^Omega(0) app(f(self, hole_a4_23), map_f(self, gen_nil:cons:f20_23(+(1, n8842_23)))) ->_IH app(f(self, hole_a4_23), *26_23) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (44) Obligation: Innermost TRS: Rules: FSTSPLIT(0', z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0', z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0', z0) -> c8 LEQ(s(z0), 0') -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) fstsplit(0', z0) -> nil fstsplit(s(z0), nil) -> nil fstsplit(s(z0), cons(z1, z2)) -> cons(z1, fstsplit(z0, z2)) sndsplit(0', z0) -> z0 sndsplit(s(z0), nil) -> nil sndsplit(s(z0), cons(z1, z2)) -> sndsplit(z0, z2) empty(nil) -> true empty(cons(z0, z1)) -> false leq(0', z0) -> true leq(s(z0), 0') -> false leq(s(z0), s(z1)) -> leq(z0, z1) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) app(nil, z0) -> z0 app(cons(z0, z1), z2) -> cons(z0, app(z1, z2)) map_f(z0, nil) -> nil map_f(z0, cons(z1, z2)) -> app(f(z0, z1), map_f(z0, z2)) process(z0, z1) -> if1(z0, z1, leq(z1, length(z0))) if1(z0, z1, true) -> if2(z0, z1, empty(fstsplit(z1, z0))) if1(z0, z1, false) -> if3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))) if2(z0, z1, false) -> process(app(map_f(self, nil), sndsplit(z1, z0)), z1) if3(z0, z1, false) -> process(sndsplit(z1, app(map_f(self, nil), z0)), z1) Types: FSTSPLIT :: 0':s -> nil:cons:f -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s nil :: nil:cons:f c1 :: c:c1:c2 cons :: a -> nil:cons:f -> nil:cons:f c2 :: c:c1:c2 -> c:c1:c2 SNDSPLIT :: 0':s -> nil:cons:f -> c3:c4:c5 c3 :: c3:c4:c5 c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 EMPTY :: nil:cons:f -> c6:c7 c6 :: c6:c7 c7 :: c6:c7 LEQ :: 0':s -> 0':s -> c8:c9:c10 c8 :: c8:c9:c10 c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 LENGTH :: nil:cons:f -> c11:c12 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 APP :: nil:cons:f -> nil:cons:f -> c13:c14 c13 :: c13:c14 c14 :: c13:c14 -> c13:c14 MAP_F :: self -> nil:cons:f -> c15:c16 c15 :: c15:c16 c16 :: c13:c14 -> c15:c16 -> c15:c16 f :: self -> a -> nil:cons:f map_f :: self -> nil:cons:f -> nil:cons:f PROCESS :: nil:cons:f -> 0':s -> c17 c17 :: c18:c19 -> c8:c9:c10 -> c11:c12 -> c17 IF1 :: nil:cons:f -> 0':s -> true:false -> c18:c19 leq :: 0':s -> 0':s -> true:false length :: nil:cons:f -> 0':s true :: true:false c18 :: c20:c21 -> c6:c7 -> c:c1:c2 -> c18:c19 IF2 :: nil:cons:f -> 0':s -> true:false -> c20:c21 empty :: nil:cons:f -> true:false fstsplit :: 0':s -> nil:cons:f -> nil:cons:f false :: true:false c19 :: c22 -> c6:c7 -> c:c1:c2 -> c13:c14 -> c15:c16 -> c18:c19 IF3 :: nil:cons:f -> 0':s -> true:false -> c22 app :: nil:cons:f -> nil:cons:f -> nil:cons:f self :: self c20 :: c17 -> c13:c14 -> c15:c16 -> c20:c21 sndsplit :: 0':s -> nil:cons:f -> nil:cons:f c21 :: c17 -> c13:c14 -> c3:c4:c5 -> c20:c21 c22 :: c17 -> c3:c4:c5 -> c13:c14 -> c15:c16 -> c22 process :: nil:cons:f -> 0':s -> process:if1:if2:if3 if1 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if2 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if3 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 hole_c:c1:c21_23 :: c:c1:c2 hole_0':s2_23 :: 0':s hole_nil:cons:f3_23 :: nil:cons:f hole_a4_23 :: a hole_c3:c4:c55_23 :: c3:c4:c5 hole_c6:c76_23 :: c6:c7 hole_c8:c9:c107_23 :: c8:c9:c10 hole_c11:c128_23 :: c11:c12 hole_c13:c149_23 :: c13:c14 hole_c15:c1610_23 :: c15:c16 hole_self11_23 :: self hole_c1712_23 :: c17 hole_c18:c1913_23 :: c18:c19 hole_true:false14_23 :: true:false hole_c20:c2115_23 :: c20:c21 hole_c2216_23 :: c22 hole_process:if1:if2:if317_23 :: process:if1:if2:if3 gen_c:c1:c218_23 :: Nat -> c:c1:c2 gen_0':s19_23 :: Nat -> 0':s gen_nil:cons:f20_23 :: Nat -> nil:cons:f gen_c3:c4:c521_23 :: Nat -> c3:c4:c5 gen_c8:c9:c1022_23 :: Nat -> c8:c9:c10 gen_c11:c1223_23 :: Nat -> c11:c12 gen_c13:c1424_23 :: Nat -> c13:c14 gen_c15:c1625_23 :: Nat -> c15:c16 Lemmas: FSTSPLIT(gen_0':s19_23(n27_23), gen_nil:cons:f20_23(n27_23)) -> gen_c:c1:c218_23(n27_23), rt in Omega(1 + n27_23) SNDSPLIT(gen_0':s19_23(n869_23), gen_nil:cons:f20_23(n869_23)) -> gen_c3:c4:c521_23(n869_23), rt in Omega(1 + n869_23) LEQ(gen_0':s19_23(n1820_23), gen_0':s19_23(n1820_23)) -> gen_c8:c9:c1022_23(n1820_23), rt in Omega(1 + n1820_23) LENGTH(gen_nil:cons:f20_23(n2743_23)) -> gen_c11:c1223_23(n2743_23), rt in Omega(1 + n2743_23) APP(gen_nil:cons:f20_23(n3357_23), gen_nil:cons:f20_23(b)) -> gen_c13:c1424_23(n3357_23), rt in Omega(1 + n3357_23) leq(gen_0':s19_23(n4577_23), gen_0':s19_23(n4577_23)) -> true, rt in Omega(0) length(gen_nil:cons:f20_23(n5104_23)) -> gen_0':s19_23(n5104_23), rt in Omega(0) fstsplit(gen_0':s19_23(n5594_23), gen_nil:cons:f20_23(n5594_23)) -> gen_nil:cons:f20_23(n5594_23), rt in Omega(0) app(gen_nil:cons:f20_23(n6549_23), gen_nil:cons:f20_23(b)) -> gen_nil:cons:f20_23(+(n6549_23, b)), rt in Omega(0) map_f(self, gen_nil:cons:f20_23(+(1, n8842_23))) -> *26_23, rt in Omega(0) Generator Equations: gen_c:c1:c218_23(0) <=> c gen_c:c1:c218_23(+(x, 1)) <=> c2(gen_c:c1:c218_23(x)) gen_0':s19_23(0) <=> 0' gen_0':s19_23(+(x, 1)) <=> s(gen_0':s19_23(x)) gen_nil:cons:f20_23(0) <=> nil gen_nil:cons:f20_23(+(x, 1)) <=> cons(hole_a4_23, gen_nil:cons:f20_23(x)) gen_c3:c4:c521_23(0) <=> c3 gen_c3:c4:c521_23(+(x, 1)) <=> c5(gen_c3:c4:c521_23(x)) gen_c8:c9:c1022_23(0) <=> c8 gen_c8:c9:c1022_23(+(x, 1)) <=> c10(gen_c8:c9:c1022_23(x)) gen_c11:c1223_23(0) <=> c11 gen_c11:c1223_23(+(x, 1)) <=> c12(gen_c11:c1223_23(x)) gen_c13:c1424_23(0) <=> c13 gen_c13:c1424_23(+(x, 1)) <=> c14(gen_c13:c1424_23(x)) gen_c15:c1625_23(0) <=> c15 gen_c15:c1625_23(+(x, 1)) <=> c16(c13, gen_c15:c1625_23(x)) The following defined symbols remain to be analysed: MAP_F, PROCESS, sndsplit, process They will be analysed ascendingly in the following order: MAP_F < PROCESS sndsplit < PROCESS sndsplit < process ---------------------------------------- (45) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: sndsplit(gen_0':s19_23(n64485_23), gen_nil:cons:f20_23(n64485_23)) -> gen_nil:cons:f20_23(0), rt in Omega(0) Induction Base: sndsplit(gen_0':s19_23(0), gen_nil:cons:f20_23(0)) ->_R^Omega(0) gen_nil:cons:f20_23(0) Induction Step: sndsplit(gen_0':s19_23(+(n64485_23, 1)), gen_nil:cons:f20_23(+(n64485_23, 1))) ->_R^Omega(0) sndsplit(gen_0':s19_23(n64485_23), gen_nil:cons:f20_23(n64485_23)) ->_IH gen_nil:cons:f20_23(0) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (46) Obligation: Innermost TRS: Rules: FSTSPLIT(0', z0) -> c FSTSPLIT(s(z0), nil) -> c1 FSTSPLIT(s(z0), cons(z1, z2)) -> c2(FSTSPLIT(z0, z2)) SNDSPLIT(0', z0) -> c3 SNDSPLIT(s(z0), nil) -> c4 SNDSPLIT(s(z0), cons(z1, z2)) -> c5(SNDSPLIT(z0, z2)) EMPTY(nil) -> c6 EMPTY(cons(z0, z1)) -> c7 LEQ(0', z0) -> c8 LEQ(s(z0), 0') -> c9 LEQ(s(z0), s(z1)) -> c10(LEQ(z0, z1)) LENGTH(nil) -> c11 LENGTH(cons(z0, z1)) -> c12(LENGTH(z1)) APP(nil, z0) -> c13 APP(cons(z0, z1), z2) -> c14(APP(z1, z2)) MAP_F(z0, nil) -> c15 MAP_F(z0, cons(z1, z2)) -> c16(APP(f(z0, z1), map_f(z0, z2)), MAP_F(z0, z2)) PROCESS(z0, z1) -> c17(IF1(z0, z1, leq(z1, length(z0))), LEQ(z1, length(z0)), LENGTH(z0)) IF1(z0, z1, true) -> c18(IF2(z0, z1, empty(fstsplit(z1, z0))), EMPTY(fstsplit(z1, z0)), FSTSPLIT(z1, z0)) IF1(z0, z1, false) -> c19(IF3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))), EMPTY(fstsplit(z1, app(map_f(self, nil), z0))), FSTSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) IF2(z0, z1, false) -> c20(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), MAP_F(self, nil)) IF2(z0, z1, false) -> c21(PROCESS(app(map_f(self, nil), sndsplit(z1, z0)), z1), APP(map_f(self, nil), sndsplit(z1, z0)), SNDSPLIT(z1, z0)) IF3(z0, z1, false) -> c22(PROCESS(sndsplit(z1, app(map_f(self, nil), z0)), z1), SNDSPLIT(z1, app(map_f(self, nil), z0)), APP(map_f(self, nil), z0), MAP_F(self, nil)) fstsplit(0', z0) -> nil fstsplit(s(z0), nil) -> nil fstsplit(s(z0), cons(z1, z2)) -> cons(z1, fstsplit(z0, z2)) sndsplit(0', z0) -> z0 sndsplit(s(z0), nil) -> nil sndsplit(s(z0), cons(z1, z2)) -> sndsplit(z0, z2) empty(nil) -> true empty(cons(z0, z1)) -> false leq(0', z0) -> true leq(s(z0), 0') -> false leq(s(z0), s(z1)) -> leq(z0, z1) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) app(nil, z0) -> z0 app(cons(z0, z1), z2) -> cons(z0, app(z1, z2)) map_f(z0, nil) -> nil map_f(z0, cons(z1, z2)) -> app(f(z0, z1), map_f(z0, z2)) process(z0, z1) -> if1(z0, z1, leq(z1, length(z0))) if1(z0, z1, true) -> if2(z0, z1, empty(fstsplit(z1, z0))) if1(z0, z1, false) -> if3(z0, z1, empty(fstsplit(z1, app(map_f(self, nil), z0)))) if2(z0, z1, false) -> process(app(map_f(self, nil), sndsplit(z1, z0)), z1) if3(z0, z1, false) -> process(sndsplit(z1, app(map_f(self, nil), z0)), z1) Types: FSTSPLIT :: 0':s -> nil:cons:f -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s nil :: nil:cons:f c1 :: c:c1:c2 cons :: a -> nil:cons:f -> nil:cons:f c2 :: c:c1:c2 -> c:c1:c2 SNDSPLIT :: 0':s -> nil:cons:f -> c3:c4:c5 c3 :: c3:c4:c5 c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 EMPTY :: nil:cons:f -> c6:c7 c6 :: c6:c7 c7 :: c6:c7 LEQ :: 0':s -> 0':s -> c8:c9:c10 c8 :: c8:c9:c10 c9 :: c8:c9:c10 c10 :: c8:c9:c10 -> c8:c9:c10 LENGTH :: nil:cons:f -> c11:c12 c11 :: c11:c12 c12 :: c11:c12 -> c11:c12 APP :: nil:cons:f -> nil:cons:f -> c13:c14 c13 :: c13:c14 c14 :: c13:c14 -> c13:c14 MAP_F :: self -> nil:cons:f -> c15:c16 c15 :: c15:c16 c16 :: c13:c14 -> c15:c16 -> c15:c16 f :: self -> a -> nil:cons:f map_f :: self -> nil:cons:f -> nil:cons:f PROCESS :: nil:cons:f -> 0':s -> c17 c17 :: c18:c19 -> c8:c9:c10 -> c11:c12 -> c17 IF1 :: nil:cons:f -> 0':s -> true:false -> c18:c19 leq :: 0':s -> 0':s -> true:false length :: nil:cons:f -> 0':s true :: true:false c18 :: c20:c21 -> c6:c7 -> c:c1:c2 -> c18:c19 IF2 :: nil:cons:f -> 0':s -> true:false -> c20:c21 empty :: nil:cons:f -> true:false fstsplit :: 0':s -> nil:cons:f -> nil:cons:f false :: true:false c19 :: c22 -> c6:c7 -> c:c1:c2 -> c13:c14 -> c15:c16 -> c18:c19 IF3 :: nil:cons:f -> 0':s -> true:false -> c22 app :: nil:cons:f -> nil:cons:f -> nil:cons:f self :: self c20 :: c17 -> c13:c14 -> c15:c16 -> c20:c21 sndsplit :: 0':s -> nil:cons:f -> nil:cons:f c21 :: c17 -> c13:c14 -> c3:c4:c5 -> c20:c21 c22 :: c17 -> c3:c4:c5 -> c13:c14 -> c15:c16 -> c22 process :: nil:cons:f -> 0':s -> process:if1:if2:if3 if1 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if2 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 if3 :: nil:cons:f -> 0':s -> true:false -> process:if1:if2:if3 hole_c:c1:c21_23 :: c:c1:c2 hole_0':s2_23 :: 0':s hole_nil:cons:f3_23 :: nil:cons:f hole_a4_23 :: a hole_c3:c4:c55_23 :: c3:c4:c5 hole_c6:c76_23 :: c6:c7 hole_c8:c9:c107_23 :: c8:c9:c10 hole_c11:c128_23 :: c11:c12 hole_c13:c149_23 :: c13:c14 hole_c15:c1610_23 :: c15:c16 hole_self11_23 :: self hole_c1712_23 :: c17 hole_c18:c1913_23 :: c18:c19 hole_true:false14_23 :: true:false hole_c20:c2115_23 :: c20:c21 hole_c2216_23 :: c22 hole_process:if1:if2:if317_23 :: process:if1:if2:if3 gen_c:c1:c218_23 :: Nat -> c:c1:c2 gen_0':s19_23 :: Nat -> 0':s gen_nil:cons:f20_23 :: Nat -> nil:cons:f gen_c3:c4:c521_23 :: Nat -> c3:c4:c5 gen_c8:c9:c1022_23 :: Nat -> c8:c9:c10 gen_c11:c1223_23 :: Nat -> c11:c12 gen_c13:c1424_23 :: Nat -> c13:c14 gen_c15:c1625_23 :: Nat -> c15:c16 Lemmas: FSTSPLIT(gen_0':s19_23(n27_23), gen_nil:cons:f20_23(n27_23)) -> gen_c:c1:c218_23(n27_23), rt in Omega(1 + n27_23) SNDSPLIT(gen_0':s19_23(n869_23), gen_nil:cons:f20_23(n869_23)) -> gen_c3:c4:c521_23(n869_23), rt in Omega(1 + n869_23) LEQ(gen_0':s19_23(n1820_23), gen_0':s19_23(n1820_23)) -> gen_c8:c9:c1022_23(n1820_23), rt in Omega(1 + n1820_23) LENGTH(gen_nil:cons:f20_23(n2743_23)) -> gen_c11:c1223_23(n2743_23), rt in Omega(1 + n2743_23) APP(gen_nil:cons:f20_23(n3357_23), gen_nil:cons:f20_23(b)) -> gen_c13:c1424_23(n3357_23), rt in Omega(1 + n3357_23) leq(gen_0':s19_23(n4577_23), gen_0':s19_23(n4577_23)) -> true, rt in Omega(0) length(gen_nil:cons:f20_23(n5104_23)) -> gen_0':s19_23(n5104_23), rt in Omega(0) fstsplit(gen_0':s19_23(n5594_23), gen_nil:cons:f20_23(n5594_23)) -> gen_nil:cons:f20_23(n5594_23), rt in Omega(0) app(gen_nil:cons:f20_23(n6549_23), gen_nil:cons:f20_23(b)) -> gen_nil:cons:f20_23(+(n6549_23, b)), rt in Omega(0) map_f(self, gen_nil:cons:f20_23(+(1, n8842_23))) -> *26_23, rt in Omega(0) sndsplit(gen_0':s19_23(n64485_23), gen_nil:cons:f20_23(n64485_23)) -> gen_nil:cons:f20_23(0), rt in Omega(0) Generator Equations: gen_c:c1:c218_23(0) <=> c gen_c:c1:c218_23(+(x, 1)) <=> c2(gen_c:c1:c218_23(x)) gen_0':s19_23(0) <=> 0' gen_0':s19_23(+(x, 1)) <=> s(gen_0':s19_23(x)) gen_nil:cons:f20_23(0) <=> nil gen_nil:cons:f20_23(+(x, 1)) <=> cons(hole_a4_23, gen_nil:cons:f20_23(x)) gen_c3:c4:c521_23(0) <=> c3 gen_c3:c4:c521_23(+(x, 1)) <=> c5(gen_c3:c4:c521_23(x)) gen_c8:c9:c1022_23(0) <=> c8 gen_c8:c9:c1022_23(+(x, 1)) <=> c10(gen_c8:c9:c1022_23(x)) gen_c11:c1223_23(0) <=> c11 gen_c11:c1223_23(+(x, 1)) <=> c12(gen_c11:c1223_23(x)) gen_c13:c1424_23(0) <=> c13 gen_c13:c1424_23(+(x, 1)) <=> c14(gen_c13:c1424_23(x)) gen_c15:c1625_23(0) <=> c15 gen_c15:c1625_23(+(x, 1)) <=> c16(c13, gen_c15:c1625_23(x)) The following defined symbols remain to be analysed: PROCESS, process