YES proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty Termination w.r.t. Q of the given QTRS could be proven: (0) QTRS (1) DependencyPairsProof [EQUIVALENT, 0 ms] (2) QDP (3) DependencyGraphProof [EQUIVALENT, 4 ms] (4) AND (5) QDP (6) UsableRulesProof [EQUIVALENT, 0 ms] (7) QDP (8) QDPSizeChangeProof [EQUIVALENT, 0 ms] (9) YES (10) QDP (11) QDPOrderProof [EQUIVALENT, 32 ms] (12) QDP (13) DependencyGraphProof [EQUIVALENT, 0 ms] (14) TRUE ---------------------------------------- (0) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: U11(tt, N, X, XS) -> U12(splitAt(activate(N), activate(XS)), activate(X)) U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) afterNth(N, XS) -> snd(splitAt(N, XS)) and(tt, X) -> activate(X) fst(pair(X, Y)) -> X head(cons(N, XS)) -> N natsFrom(N) -> cons(N, n__natsFrom(n__s(N))) sel(N, XS) -> head(afterNth(N, XS)) snd(pair(X, Y)) -> Y splitAt(0, XS) -> pair(nil, XS) splitAt(s(N), cons(X, XS)) -> U11(tt, N, X, activate(XS)) tail(cons(N, XS)) -> activate(XS) take(N, XS) -> fst(splitAt(N, XS)) natsFrom(X) -> n__natsFrom(X) s(X) -> n__s(X) activate(n__natsFrom(X)) -> natsFrom(activate(X)) activate(n__s(X)) -> s(activate(X)) activate(X) -> X Q is empty. ---------------------------------------- (1) DependencyPairsProof (EQUIVALENT) Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem. ---------------------------------------- (2) Obligation: Q DP problem: The TRS P consists of the following rules: U11^1(tt, N, X, XS) -> U12^1(splitAt(activate(N), activate(XS)), activate(X)) U11^1(tt, N, X, XS) -> SPLITAT(activate(N), activate(XS)) U11^1(tt, N, X, XS) -> ACTIVATE(N) U11^1(tt, N, X, XS) -> ACTIVATE(XS) U11^1(tt, N, X, XS) -> ACTIVATE(X) U12^1(pair(YS, ZS), X) -> ACTIVATE(X) AFTERNTH(N, XS) -> SND(splitAt(N, XS)) AFTERNTH(N, XS) -> SPLITAT(N, XS) AND(tt, X) -> ACTIVATE(X) SEL(N, XS) -> HEAD(afterNth(N, XS)) SEL(N, XS) -> AFTERNTH(N, XS) SPLITAT(s(N), cons(X, XS)) -> U11^1(tt, N, X, activate(XS)) SPLITAT(s(N), cons(X, XS)) -> ACTIVATE(XS) TAIL(cons(N, XS)) -> ACTIVATE(XS) TAKE(N, XS) -> FST(splitAt(N, XS)) TAKE(N, XS) -> SPLITAT(N, XS) ACTIVATE(n__natsFrom(X)) -> NATSFROM(activate(X)) ACTIVATE(n__natsFrom(X)) -> ACTIVATE(X) ACTIVATE(n__s(X)) -> S(activate(X)) ACTIVATE(n__s(X)) -> ACTIVATE(X) The TRS R consists of the following rules: U11(tt, N, X, XS) -> U12(splitAt(activate(N), activate(XS)), activate(X)) U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) afterNth(N, XS) -> snd(splitAt(N, XS)) and(tt, X) -> activate(X) fst(pair(X, Y)) -> X head(cons(N, XS)) -> N natsFrom(N) -> cons(N, n__natsFrom(n__s(N))) sel(N, XS) -> head(afterNth(N, XS)) snd(pair(X, Y)) -> Y splitAt(0, XS) -> pair(nil, XS) splitAt(s(N), cons(X, XS)) -> U11(tt, N, X, activate(XS)) tail(cons(N, XS)) -> activate(XS) take(N, XS) -> fst(splitAt(N, XS)) natsFrom(X) -> n__natsFrom(X) s(X) -> n__s(X) activate(n__natsFrom(X)) -> natsFrom(activate(X)) activate(n__s(X)) -> s(activate(X)) activate(X) -> X Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (3) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs with 16 less nodes. ---------------------------------------- (4) Complex Obligation (AND) ---------------------------------------- (5) Obligation: Q DP problem: The TRS P consists of the following rules: ACTIVATE(n__s(X)) -> ACTIVATE(X) ACTIVATE(n__natsFrom(X)) -> ACTIVATE(X) The TRS R consists of the following rules: U11(tt, N, X, XS) -> U12(splitAt(activate(N), activate(XS)), activate(X)) U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) afterNth(N, XS) -> snd(splitAt(N, XS)) and(tt, X) -> activate(X) fst(pair(X, Y)) -> X head(cons(N, XS)) -> N natsFrom(N) -> cons(N, n__natsFrom(n__s(N))) sel(N, XS) -> head(afterNth(N, XS)) snd(pair(X, Y)) -> Y splitAt(0, XS) -> pair(nil, XS) splitAt(s(N), cons(X, XS)) -> U11(tt, N, X, activate(XS)) tail(cons(N, XS)) -> activate(XS) take(N, XS) -> fst(splitAt(N, XS)) natsFrom(X) -> n__natsFrom(X) s(X) -> n__s(X) activate(n__natsFrom(X)) -> natsFrom(activate(X)) activate(n__s(X)) -> s(activate(X)) activate(X) -> X Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (6) UsableRulesProof (EQUIVALENT) We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (7) Obligation: Q DP problem: The TRS P consists of the following rules: ACTIVATE(n__s(X)) -> ACTIVATE(X) ACTIVATE(n__natsFrom(X)) -> ACTIVATE(X) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (8) QDPSizeChangeProof (EQUIVALENT) By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs: *ACTIVATE(n__s(X)) -> ACTIVATE(X) The graph contains the following edges 1 > 1 *ACTIVATE(n__natsFrom(X)) -> ACTIVATE(X) The graph contains the following edges 1 > 1 ---------------------------------------- (9) YES ---------------------------------------- (10) Obligation: Q DP problem: The TRS P consists of the following rules: U11^1(tt, N, X, XS) -> SPLITAT(activate(N), activate(XS)) SPLITAT(s(N), cons(X, XS)) -> U11^1(tt, N, X, activate(XS)) The TRS R consists of the following rules: U11(tt, N, X, XS) -> U12(splitAt(activate(N), activate(XS)), activate(X)) U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) afterNth(N, XS) -> snd(splitAt(N, XS)) and(tt, X) -> activate(X) fst(pair(X, Y)) -> X head(cons(N, XS)) -> N natsFrom(N) -> cons(N, n__natsFrom(n__s(N))) sel(N, XS) -> head(afterNth(N, XS)) snd(pair(X, Y)) -> Y splitAt(0, XS) -> pair(nil, XS) splitAt(s(N), cons(X, XS)) -> U11(tt, N, X, activate(XS)) tail(cons(N, XS)) -> activate(XS) take(N, XS) -> fst(splitAt(N, XS)) natsFrom(X) -> n__natsFrom(X) s(X) -> n__s(X) activate(n__natsFrom(X)) -> natsFrom(activate(X)) activate(n__s(X)) -> s(activate(X)) activate(X) -> X Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (11) QDPOrderProof (EQUIVALENT) We use the reduction pair processor [LPAR04,JAR06]. The following pairs can be oriented strictly and are deleted. SPLITAT(s(N), cons(X, XS)) -> U11^1(tt, N, X, activate(XS)) The remaining pairs can at least be oriented weakly. Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation: POL( SPLITAT_2(x_1, x_2) ) = max{0, x_1 - 1} POL( U11^1_4(x_1, ..., x_4) ) = max{0, x_1 + x_2 - 2} POL( activate_1(x_1) ) = x_1 POL( n__natsFrom_1(x_1) ) = max{0, -2} POL( natsFrom_1(x_1) ) = max{0, -2} POL( n__s_1(x_1) ) = x_1 + 2 POL( s_1(x_1) ) = x_1 + 2 POL( cons_2(x_1, x_2) ) = 0 POL( tt ) = 2 The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented: activate(n__natsFrom(X)) -> natsFrom(activate(X)) activate(n__s(X)) -> s(activate(X)) activate(X) -> X s(X) -> n__s(X) natsFrom(N) -> cons(N, n__natsFrom(n__s(N))) natsFrom(X) -> n__natsFrom(X) ---------------------------------------- (12) Obligation: Q DP problem: The TRS P consists of the following rules: U11^1(tt, N, X, XS) -> SPLITAT(activate(N), activate(XS)) The TRS R consists of the following rules: U11(tt, N, X, XS) -> U12(splitAt(activate(N), activate(XS)), activate(X)) U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) afterNth(N, XS) -> snd(splitAt(N, XS)) and(tt, X) -> activate(X) fst(pair(X, Y)) -> X head(cons(N, XS)) -> N natsFrom(N) -> cons(N, n__natsFrom(n__s(N))) sel(N, XS) -> head(afterNth(N, XS)) snd(pair(X, Y)) -> Y splitAt(0, XS) -> pair(nil, XS) splitAt(s(N), cons(X, XS)) -> U11(tt, N, X, activate(XS)) tail(cons(N, XS)) -> activate(XS) take(N, XS) -> fst(splitAt(N, XS)) natsFrom(X) -> n__natsFrom(X) s(X) -> n__s(X) activate(n__natsFrom(X)) -> natsFrom(activate(X)) activate(n__s(X)) -> s(activate(X)) activate(X) -> X Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (13) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node. ---------------------------------------- (14) TRUE