YES proof of Transformed_CSR_04_Ex2_Luc02a_Z.trs # AProVE Commit ID: c69e44bd14796315568835c1ffa2502984884775 jera 20211004 unpublished Termination w.r.t. Q of the given QTRS could be proven: (0) QTRS (1) QTRSRRRProof [EQUIVALENT, 65 ms] (2) QTRS (3) QTRSRRRProof [EQUIVALENT, 0 ms] (4) QTRS (5) RisEmptyProof [EQUIVALENT, 0 ms] (6) YES ---------------------------------------- (0) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: terms(N) -> cons(recip(sqr(N)), n__terms(s(N))) sqr(0) -> 0 sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0) -> 0 dbl(s(X)) -> s(s(dbl(X))) add(0, X) -> X add(s(X), Y) -> s(add(X, Y)) first(0, X) -> nil first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) terms(X) -> n__terms(X) first(X1, X2) -> n__first(X1, X2) activate(n__terms(X)) -> terms(X) activate(n__first(X1, X2)) -> first(X1, X2) activate(X) -> X Q is empty. ---------------------------------------- (1) QTRSRRRProof (EQUIVALENT) Used ordering: terms/1(YES) cons/2(YES,YES) recip/1)YES( sqr/1(YES) n__terms/1)YES( s/1(YES) 0/0) add/2(YES,YES) dbl/1(YES) first/2(YES,YES) nil/0) n__first/2(YES,YES) activate/1(YES) Quasi precedence: 0 > nil > s_1 [first_2, n__first_2] > activate_1 > terms_1 > cons_2 > s_1 [first_2, n__first_2] > activate_1 > terms_1 > sqr_1 > add_2 > s_1 [first_2, n__first_2] > activate_1 > terms_1 > sqr_1 > dbl_1 > s_1 Status: terms_1: [1] cons_2: [2,1] sqr_1: multiset status s_1: multiset status 0: multiset status add_2: [1,2] dbl_1: multiset status first_2: [1,2] nil: multiset status n__first_2: [1,2] activate_1: [1] With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: terms(N) -> cons(recip(sqr(N)), n__terms(s(N))) sqr(0) -> 0 sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0) -> 0 dbl(s(X)) -> s(s(dbl(X))) add(0, X) -> X add(s(X), Y) -> s(add(X, Y)) first(0, X) -> nil first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) terms(X) -> n__terms(X) activate(n__terms(X)) -> terms(X) activate(n__first(X1, X2)) -> first(X1, X2) activate(X) -> X ---------------------------------------- (2) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: first(X1, X2) -> n__first(X1, X2) Q is empty. ---------------------------------------- (3) QTRSRRRProof (EQUIVALENT) Used ordering: Knuth-Bendix order [KBO] with precedence:first_2 > n__first_2 and weight map: first_2=0 n__first_2=0 The variable weight is 1With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: first(X1, X2) -> n__first(X1, X2) ---------------------------------------- (4) Obligation: Q restricted rewrite system: R is empty. Q is empty. ---------------------------------------- (5) RisEmptyProof (EQUIVALENT) The TRS R is empty. Hence, termination is trivially proven. ---------------------------------------- (6) YES