2.18/1.13 YES 2.18/1.14 We consider the system theBenchmark. 2.18/1.14 2.18/1.14 Alphabet: 2.18/1.14 2.18/1.14 0 : [] --> a 2.18/1.14 cons : [b * c] --> c 2.18/1.14 d : [a * a] --> c 2.18/1.14 false : [] --> c 2.18/1.14 filter : [b -> c * c] --> c 2.18/1.14 gtr : [a * a] --> c 2.18/1.14 if : [c * c * c] --> c 2.18/1.14 len : [c] --> a 2.18/1.14 nil : [] --> c 2.18/1.14 s : [a] --> a 2.18/1.14 sub : [a * a] --> a 2.18/1.14 true : [] --> c 2.18/1.14 2.18/1.14 Rules: 2.18/1.14 2.18/1.14 if(true, x, y) => x 2.18/1.14 if(false, x, y) => y 2.18/1.14 sub(x, 0) => x 2.18/1.14 sub(s(x), s(y)) => sub(x, y) 2.18/1.14 gtr(0, x) => false 2.18/1.14 gtr(s(x), 0) => true 2.18/1.14 gtr(s(x), s(y)) => gtr(x, y) 2.18/1.14 d(x, 0) => true 2.18/1.14 d(s(x), s(y)) => if(gtr(x, y), false, d(s(x), sub(y, x))) 2.18/1.14 len(nil) => 0 2.18/1.14 len(cons(x, y)) => s(len(y)) 2.18/1.14 filter(f, nil) => nil 2.18/1.14 filter(f, cons(x, y)) => if(f x, cons(x, filter(f, y)), filter(f, y)) 2.18/1.14 2.18/1.14 This AFS is converted to an AFSM simply by replacing all free variables by meta-variables (with arity 0). 2.18/1.14 2.18/1.14 We observe that the rules contain a first-order subset: 2.18/1.14 2.18/1.14 if(true, X, Y) => X 2.18/1.14 if(false, X, Y) => Y 2.18/1.14 sub(X, 0) => X 2.18/1.14 sub(s(X), s(Y)) => sub(X, Y) 2.18/1.14 gtr(0, X) => false 2.18/1.14 gtr(s(X), 0) => true 2.18/1.14 gtr(s(X), s(Y)) => gtr(X, Y) 2.18/1.14 d(X, 0) => true 2.18/1.14 d(s(X), s(Y)) => if(gtr(X, Y), false, d(s(X), sub(Y, X))) 2.18/1.14 len(nil) => 0 2.18/1.14 len(cons(X, Y)) => s(len(Y)) 2.18/1.14 2.18/1.14 Moreover, the system is orthogonal. Thus, by [Kop12, Thm. 7.55], we may omit all first-order dependency pairs from the dependency pair problem (DP(R), R) if this first-order part is terminating when seen as a many-sorted first-order TRS. 2.18/1.14 2.18/1.14 According to the external first-order termination prover, this system is indeed terminating: 2.18/1.14 2.18/1.14 || proof of resources/system.trs 2.18/1.14 || # AProVE Commit ID: d84c10301d352dfd14de2104819581f4682260f5 fuhs 20130616 2.18/1.14 || 2.18/1.14 || 2.18/1.14 || Termination w.r.t. Q of the given QTRS could be proven: 2.18/1.14 || 2.18/1.14 || (0) QTRS 2.18/1.14 || (1) Overlay + Local Confluence [EQUIVALENT] 2.18/1.14 || (2) QTRS 2.18/1.14 || (3) DependencyPairsProof [EQUIVALENT] 2.18/1.14 || (4) QDP 2.18/1.14 || (5) DependencyGraphProof [EQUIVALENT] 2.18/1.14 || (6) AND 2.18/1.14 || (7) QDP 2.18/1.14 || (8) UsableRulesProof [EQUIVALENT] 2.18/1.14 || (9) QDP 2.18/1.14 || (10) QReductionProof [EQUIVALENT] 2.18/1.14 || (11) QDP 2.18/1.14 || (12) QDPSizeChangeProof [EQUIVALENT] 2.18/1.14 || (13) YES 2.18/1.14 || (14) QDP 2.18/1.14 || (15) UsableRulesProof [EQUIVALENT] 2.18/1.14 || (16) QDP 2.18/1.14 || (17) QReductionProof [EQUIVALENT] 2.18/1.14 || (18) QDP 2.18/1.14 || (19) QDPSizeChangeProof [EQUIVALENT] 2.18/1.14 || (20) YES 2.18/1.14 || (21) QDP 2.18/1.14 || (22) UsableRulesProof [EQUIVALENT] 2.18/1.14 || (23) QDP 2.18/1.14 || (24) QReductionProof [EQUIVALENT] 2.18/1.14 || (25) QDP 2.18/1.14 || (26) QDPSizeChangeProof [EQUIVALENT] 2.18/1.14 || (27) YES 2.18/1.14 || (28) QDP 2.18/1.14 || (29) UsableRulesProof [EQUIVALENT] 2.18/1.14 || (30) QDP 2.18/1.14 || (31) QReductionProof [EQUIVALENT] 2.18/1.14 || (32) QDP 2.18/1.14 || (33) QDPOrderProof [EQUIVALENT] 2.18/1.14 || (34) QDP 2.18/1.14 || (35) PisEmptyProof [EQUIVALENT] 2.18/1.14 || (36) YES 2.18/1.14 || 2.18/1.14 || 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (0) 2.18/1.14 || Obligation: 2.18/1.14 || Q restricted rewrite system: 2.18/1.14 || The TRS R consists of the following rules: 2.18/1.14 || 2.18/1.14 || if(true, %X, %Y) -> %X 2.18/1.14 || if(false, %X, %Y) -> %Y 2.18/1.14 || sub(%X, 0) -> %X 2.18/1.14 || sub(s(%X), s(%Y)) -> sub(%X, %Y) 2.18/1.14 || gtr(0, %X) -> false 2.18/1.14 || gtr(s(%X), 0) -> true 2.18/1.14 || gtr(s(%X), s(%Y)) -> gtr(%X, %Y) 2.18/1.14 || d(%X, 0) -> true 2.18/1.14 || d(s(%X), s(%Y)) -> if(gtr(%X, %Y), false, d(s(%X), sub(%Y, %X))) 2.18/1.14 || len(nil) -> 0 2.18/1.14 || len(cons(%X, %Y)) -> s(len(%Y)) 2.18/1.14 || 2.18/1.14 || Q is empty. 2.18/1.14 || 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (1) Overlay + Local Confluence (EQUIVALENT) 2.18/1.14 || The TRS is overlay and locally confluent. By [NOC] we can switch to innermost. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (2) 2.18/1.14 || Obligation: 2.18/1.14 || Q restricted rewrite system: 2.18/1.14 || The TRS R consists of the following rules: 2.18/1.14 || 2.18/1.14 || if(true, %X, %Y) -> %X 2.18/1.14 || if(false, %X, %Y) -> %Y 2.18/1.14 || sub(%X, 0) -> %X 2.18/1.14 || sub(s(%X), s(%Y)) -> sub(%X, %Y) 2.18/1.14 || gtr(0, %X) -> false 2.18/1.14 || gtr(s(%X), 0) -> true 2.18/1.14 || gtr(s(%X), s(%Y)) -> gtr(%X, %Y) 2.18/1.14 || d(%X, 0) -> true 2.18/1.14 || d(s(%X), s(%Y)) -> if(gtr(%X, %Y), false, d(s(%X), sub(%Y, %X))) 2.18/1.14 || len(nil) -> 0 2.18/1.14 || len(cons(%X, %Y)) -> s(len(%Y)) 2.18/1.14 || 2.18/1.14 || The set Q consists of the following terms: 2.18/1.14 || 2.18/1.14 || if(true, x0, x1) 2.18/1.14 || if(false, x0, x1) 2.18/1.14 || sub(x0, 0) 2.18/1.14 || sub(s(x0), s(x1)) 2.18/1.14 || gtr(0, x0) 2.18/1.14 || gtr(s(x0), 0) 2.18/1.14 || gtr(s(x0), s(x1)) 2.18/1.14 || d(x0, 0) 2.18/1.14 || d(s(x0), s(x1)) 2.18/1.14 || len(nil) 2.18/1.14 || len(cons(x0, x1)) 2.18/1.14 || 2.18/1.14 || 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (3) DependencyPairsProof (EQUIVALENT) 2.18/1.14 || Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (4) 2.18/1.14 || Obligation: 2.18/1.14 || Q DP problem: 2.18/1.14 || The TRS P consists of the following rules: 2.18/1.14 || 2.18/1.14 || SUB(s(%X), s(%Y)) -> SUB(%X, %Y) 2.18/1.14 || GTR(s(%X), s(%Y)) -> GTR(%X, %Y) 2.18/1.14 || D(s(%X), s(%Y)) -> IF(gtr(%X, %Y), false, d(s(%X), sub(%Y, %X))) 2.18/1.14 || D(s(%X), s(%Y)) -> GTR(%X, %Y) 2.18/1.14 || D(s(%X), s(%Y)) -> D(s(%X), sub(%Y, %X)) 2.18/1.14 || D(s(%X), s(%Y)) -> SUB(%Y, %X) 2.18/1.14 || LEN(cons(%X, %Y)) -> LEN(%Y) 2.18/1.14 || 2.18/1.14 || The TRS R consists of the following rules: 2.18/1.14 || 2.18/1.14 || if(true, %X, %Y) -> %X 2.18/1.14 || if(false, %X, %Y) -> %Y 2.18/1.14 || sub(%X, 0) -> %X 2.18/1.14 || sub(s(%X), s(%Y)) -> sub(%X, %Y) 2.18/1.14 || gtr(0, %X) -> false 2.18/1.14 || gtr(s(%X), 0) -> true 2.18/1.14 || gtr(s(%X), s(%Y)) -> gtr(%X, %Y) 2.18/1.14 || d(%X, 0) -> true 2.18/1.14 || d(s(%X), s(%Y)) -> if(gtr(%X, %Y), false, d(s(%X), sub(%Y, %X))) 2.18/1.14 || len(nil) -> 0 2.18/1.14 || len(cons(%X, %Y)) -> s(len(%Y)) 2.18/1.14 || 2.18/1.14 || The set Q consists of the following terms: 2.18/1.14 || 2.18/1.14 || if(true, x0, x1) 2.18/1.14 || if(false, x0, x1) 2.18/1.14 || sub(x0, 0) 2.18/1.14 || sub(s(x0), s(x1)) 2.18/1.14 || gtr(0, x0) 2.18/1.14 || gtr(s(x0), 0) 2.18/1.14 || gtr(s(x0), s(x1)) 2.18/1.14 || d(x0, 0) 2.18/1.14 || d(s(x0), s(x1)) 2.18/1.14 || len(nil) 2.18/1.14 || len(cons(x0, x1)) 2.18/1.14 || 2.18/1.14 || We have to consider all minimal (P,Q,R)-chains. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (5) DependencyGraphProof (EQUIVALENT) 2.18/1.14 || The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 4 SCCs with 3 less nodes. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (6) 2.18/1.14 || Complex Obligation (AND) 2.18/1.14 || 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (7) 2.18/1.14 || Obligation: 2.18/1.14 || Q DP problem: 2.18/1.14 || The TRS P consists of the following rules: 2.18/1.14 || 2.18/1.14 || LEN(cons(%X, %Y)) -> LEN(%Y) 2.18/1.14 || 2.18/1.14 || The TRS R consists of the following rules: 2.18/1.14 || 2.18/1.14 || if(true, %X, %Y) -> %X 2.18/1.14 || if(false, %X, %Y) -> %Y 2.18/1.14 || sub(%X, 0) -> %X 2.18/1.14 || sub(s(%X), s(%Y)) -> sub(%X, %Y) 2.18/1.14 || gtr(0, %X) -> false 2.18/1.14 || gtr(s(%X), 0) -> true 2.18/1.14 || gtr(s(%X), s(%Y)) -> gtr(%X, %Y) 2.18/1.14 || d(%X, 0) -> true 2.18/1.14 || d(s(%X), s(%Y)) -> if(gtr(%X, %Y), false, d(s(%X), sub(%Y, %X))) 2.18/1.14 || len(nil) -> 0 2.18/1.14 || len(cons(%X, %Y)) -> s(len(%Y)) 2.18/1.14 || 2.18/1.14 || The set Q consists of the following terms: 2.18/1.14 || 2.18/1.14 || if(true, x0, x1) 2.18/1.14 || if(false, x0, x1) 2.18/1.14 || sub(x0, 0) 2.18/1.14 || sub(s(x0), s(x1)) 2.18/1.14 || gtr(0, x0) 2.18/1.14 || gtr(s(x0), 0) 2.18/1.14 || gtr(s(x0), s(x1)) 2.18/1.14 || d(x0, 0) 2.18/1.14 || d(s(x0), s(x1)) 2.18/1.14 || len(nil) 2.18/1.14 || len(cons(x0, x1)) 2.18/1.14 || 2.18/1.14 || We have to consider all minimal (P,Q,R)-chains. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (8) UsableRulesProof (EQUIVALENT) 2.18/1.14 || As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (9) 2.18/1.14 || Obligation: 2.18/1.14 || Q DP problem: 2.18/1.14 || The TRS P consists of the following rules: 2.18/1.14 || 2.18/1.14 || LEN(cons(%X, %Y)) -> LEN(%Y) 2.18/1.14 || 2.18/1.14 || R is empty. 2.18/1.14 || The set Q consists of the following terms: 2.18/1.14 || 2.18/1.14 || if(true, x0, x1) 2.18/1.14 || if(false, x0, x1) 2.18/1.14 || sub(x0, 0) 2.18/1.14 || sub(s(x0), s(x1)) 2.18/1.14 || gtr(0, x0) 2.18/1.14 || gtr(s(x0), 0) 2.18/1.14 || gtr(s(x0), s(x1)) 2.18/1.14 || d(x0, 0) 2.18/1.14 || d(s(x0), s(x1)) 2.18/1.14 || len(nil) 2.18/1.14 || len(cons(x0, x1)) 2.18/1.14 || 2.18/1.14 || We have to consider all minimal (P,Q,R)-chains. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (10) QReductionProof (EQUIVALENT) 2.18/1.14 || We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. 2.18/1.14 || 2.18/1.14 || if(true, x0, x1) 2.18/1.14 || if(false, x0, x1) 2.18/1.14 || sub(x0, 0) 2.18/1.14 || sub(s(x0), s(x1)) 2.18/1.14 || gtr(0, x0) 2.18/1.14 || gtr(s(x0), 0) 2.18/1.14 || gtr(s(x0), s(x1)) 2.18/1.14 || d(x0, 0) 2.18/1.14 || d(s(x0), s(x1)) 2.18/1.14 || len(nil) 2.18/1.14 || len(cons(x0, x1)) 2.18/1.14 || 2.18/1.14 || 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (11) 2.18/1.14 || Obligation: 2.18/1.14 || Q DP problem: 2.18/1.14 || The TRS P consists of the following rules: 2.18/1.14 || 2.18/1.14 || LEN(cons(%X, %Y)) -> LEN(%Y) 2.18/1.14 || 2.18/1.14 || R is empty. 2.18/1.14 || Q is empty. 2.18/1.14 || We have to consider all minimal (P,Q,R)-chains. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (12) QDPSizeChangeProof (EQUIVALENT) 2.18/1.14 || 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. 2.18/1.14 || 2.18/1.14 || From the DPs we obtained the following set of size-change graphs: 2.18/1.14 || *LEN(cons(%X, %Y)) -> LEN(%Y) 2.18/1.14 || The graph contains the following edges 1 > 1 2.18/1.14 || 2.18/1.14 || 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (13) 2.18/1.14 || YES 2.18/1.14 || 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (14) 2.18/1.14 || Obligation: 2.18/1.14 || Q DP problem: 2.18/1.14 || The TRS P consists of the following rules: 2.18/1.14 || 2.18/1.14 || GTR(s(%X), s(%Y)) -> GTR(%X, %Y) 2.18/1.14 || 2.18/1.14 || The TRS R consists of the following rules: 2.18/1.14 || 2.18/1.14 || if(true, %X, %Y) -> %X 2.18/1.14 || if(false, %X, %Y) -> %Y 2.18/1.14 || sub(%X, 0) -> %X 2.18/1.14 || sub(s(%X), s(%Y)) -> sub(%X, %Y) 2.18/1.14 || gtr(0, %X) -> false 2.18/1.14 || gtr(s(%X), 0) -> true 2.18/1.14 || gtr(s(%X), s(%Y)) -> gtr(%X, %Y) 2.18/1.14 || d(%X, 0) -> true 2.18/1.14 || d(s(%X), s(%Y)) -> if(gtr(%X, %Y), false, d(s(%X), sub(%Y, %X))) 2.18/1.14 || len(nil) -> 0 2.18/1.14 || len(cons(%X, %Y)) -> s(len(%Y)) 2.18/1.14 || 2.18/1.14 || The set Q consists of the following terms: 2.18/1.14 || 2.18/1.14 || if(true, x0, x1) 2.18/1.14 || if(false, x0, x1) 2.18/1.14 || sub(x0, 0) 2.18/1.14 || sub(s(x0), s(x1)) 2.18/1.14 || gtr(0, x0) 2.18/1.14 || gtr(s(x0), 0) 2.18/1.14 || gtr(s(x0), s(x1)) 2.18/1.14 || d(x0, 0) 2.18/1.14 || d(s(x0), s(x1)) 2.18/1.14 || len(nil) 2.18/1.14 || len(cons(x0, x1)) 2.18/1.14 || 2.18/1.14 || We have to consider all minimal (P,Q,R)-chains. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (15) UsableRulesProof (EQUIVALENT) 2.18/1.14 || As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (16) 2.18/1.14 || Obligation: 2.18/1.14 || Q DP problem: 2.18/1.14 || The TRS P consists of the following rules: 2.18/1.14 || 2.18/1.14 || GTR(s(%X), s(%Y)) -> GTR(%X, %Y) 2.18/1.14 || 2.18/1.14 || R is empty. 2.18/1.14 || The set Q consists of the following terms: 2.18/1.14 || 2.18/1.14 || if(true, x0, x1) 2.18/1.14 || if(false, x0, x1) 2.18/1.14 || sub(x0, 0) 2.18/1.14 || sub(s(x0), s(x1)) 2.18/1.14 || gtr(0, x0) 2.18/1.14 || gtr(s(x0), 0) 2.18/1.14 || gtr(s(x0), s(x1)) 2.18/1.14 || d(x0, 0) 2.18/1.14 || d(s(x0), s(x1)) 2.18/1.14 || len(nil) 2.18/1.14 || len(cons(x0, x1)) 2.18/1.14 || 2.18/1.14 || We have to consider all minimal (P,Q,R)-chains. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (17) QReductionProof (EQUIVALENT) 2.18/1.14 || We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. 2.18/1.14 || 2.18/1.14 || if(true, x0, x1) 2.18/1.14 || if(false, x0, x1) 2.18/1.14 || sub(x0, 0) 2.18/1.14 || sub(s(x0), s(x1)) 2.18/1.14 || gtr(0, x0) 2.18/1.14 || gtr(s(x0), 0) 2.18/1.14 || gtr(s(x0), s(x1)) 2.18/1.14 || d(x0, 0) 2.18/1.14 || d(s(x0), s(x1)) 2.18/1.14 || len(nil) 2.18/1.14 || len(cons(x0, x1)) 2.18/1.14 || 2.18/1.14 || 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (18) 2.18/1.14 || Obligation: 2.18/1.14 || Q DP problem: 2.18/1.14 || The TRS P consists of the following rules: 2.18/1.14 || 2.18/1.14 || GTR(s(%X), s(%Y)) -> GTR(%X, %Y) 2.18/1.14 || 2.18/1.14 || R is empty. 2.18/1.14 || Q is empty. 2.18/1.14 || We have to consider all minimal (P,Q,R)-chains. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (19) QDPSizeChangeProof (EQUIVALENT) 2.18/1.14 || 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. 2.18/1.14 || 2.18/1.14 || From the DPs we obtained the following set of size-change graphs: 2.18/1.14 || *GTR(s(%X), s(%Y)) -> GTR(%X, %Y) 2.18/1.14 || The graph contains the following edges 1 > 1, 2 > 2 2.18/1.14 || 2.18/1.14 || 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (20) 2.18/1.14 || YES 2.18/1.14 || 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (21) 2.18/1.14 || Obligation: 2.18/1.14 || Q DP problem: 2.18/1.14 || The TRS P consists of the following rules: 2.18/1.14 || 2.18/1.14 || SUB(s(%X), s(%Y)) -> SUB(%X, %Y) 2.18/1.14 || 2.18/1.14 || The TRS R consists of the following rules: 2.18/1.14 || 2.18/1.14 || if(true, %X, %Y) -> %X 2.18/1.14 || if(false, %X, %Y) -> %Y 2.18/1.14 || sub(%X, 0) -> %X 2.18/1.14 || sub(s(%X), s(%Y)) -> sub(%X, %Y) 2.18/1.14 || gtr(0, %X) -> false 2.18/1.14 || gtr(s(%X), 0) -> true 2.18/1.14 || gtr(s(%X), s(%Y)) -> gtr(%X, %Y) 2.18/1.14 || d(%X, 0) -> true 2.18/1.14 || d(s(%X), s(%Y)) -> if(gtr(%X, %Y), false, d(s(%X), sub(%Y, %X))) 2.18/1.14 || len(nil) -> 0 2.18/1.14 || len(cons(%X, %Y)) -> s(len(%Y)) 2.18/1.14 || 2.18/1.14 || The set Q consists of the following terms: 2.18/1.14 || 2.18/1.14 || if(true, x0, x1) 2.18/1.14 || if(false, x0, x1) 2.18/1.14 || sub(x0, 0) 2.18/1.14 || sub(s(x0), s(x1)) 2.18/1.14 || gtr(0, x0) 2.18/1.14 || gtr(s(x0), 0) 2.18/1.14 || gtr(s(x0), s(x1)) 2.18/1.14 || d(x0, 0) 2.18/1.14 || d(s(x0), s(x1)) 2.18/1.14 || len(nil) 2.18/1.14 || len(cons(x0, x1)) 2.18/1.14 || 2.18/1.14 || We have to consider all minimal (P,Q,R)-chains. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (22) UsableRulesProof (EQUIVALENT) 2.18/1.14 || As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (23) 2.18/1.14 || Obligation: 2.18/1.14 || Q DP problem: 2.18/1.14 || The TRS P consists of the following rules: 2.18/1.14 || 2.18/1.14 || SUB(s(%X), s(%Y)) -> SUB(%X, %Y) 2.18/1.14 || 2.18/1.14 || R is empty. 2.18/1.14 || The set Q consists of the following terms: 2.18/1.14 || 2.18/1.14 || if(true, x0, x1) 2.18/1.14 || if(false, x0, x1) 2.18/1.14 || sub(x0, 0) 2.18/1.14 || sub(s(x0), s(x1)) 2.18/1.14 || gtr(0, x0) 2.18/1.14 || gtr(s(x0), 0) 2.18/1.14 || gtr(s(x0), s(x1)) 2.18/1.14 || d(x0, 0) 2.18/1.14 || d(s(x0), s(x1)) 2.18/1.14 || len(nil) 2.18/1.14 || len(cons(x0, x1)) 2.18/1.14 || 2.18/1.14 || We have to consider all minimal (P,Q,R)-chains. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (24) QReductionProof (EQUIVALENT) 2.18/1.14 || We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. 2.18/1.14 || 2.18/1.14 || if(true, x0, x1) 2.18/1.14 || if(false, x0, x1) 2.18/1.14 || sub(x0, 0) 2.18/1.14 || sub(s(x0), s(x1)) 2.18/1.14 || gtr(0, x0) 2.18/1.14 || gtr(s(x0), 0) 2.18/1.14 || gtr(s(x0), s(x1)) 2.18/1.14 || d(x0, 0) 2.18/1.14 || d(s(x0), s(x1)) 2.18/1.14 || len(nil) 2.18/1.14 || len(cons(x0, x1)) 2.18/1.14 || 2.18/1.14 || 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (25) 2.18/1.14 || Obligation: 2.18/1.14 || Q DP problem: 2.18/1.14 || The TRS P consists of the following rules: 2.18/1.14 || 2.18/1.14 || SUB(s(%X), s(%Y)) -> SUB(%X, %Y) 2.18/1.14 || 2.18/1.14 || R is empty. 2.18/1.14 || Q is empty. 2.18/1.14 || We have to consider all minimal (P,Q,R)-chains. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (26) QDPSizeChangeProof (EQUIVALENT) 2.18/1.14 || 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. 2.18/1.14 || 2.18/1.14 || From the DPs we obtained the following set of size-change graphs: 2.18/1.14 || *SUB(s(%X), s(%Y)) -> SUB(%X, %Y) 2.18/1.14 || The graph contains the following edges 1 > 1, 2 > 2 2.18/1.14 || 2.18/1.14 || 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (27) 2.18/1.14 || YES 2.18/1.14 || 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (28) 2.18/1.14 || Obligation: 2.18/1.14 || Q DP problem: 2.18/1.14 || The TRS P consists of the following rules: 2.18/1.14 || 2.18/1.14 || D(s(%X), s(%Y)) -> D(s(%X), sub(%Y, %X)) 2.18/1.14 || 2.18/1.14 || The TRS R consists of the following rules: 2.18/1.14 || 2.18/1.14 || if(true, %X, %Y) -> %X 2.18/1.14 || if(false, %X, %Y) -> %Y 2.18/1.14 || sub(%X, 0) -> %X 2.18/1.14 || sub(s(%X), s(%Y)) -> sub(%X, %Y) 2.18/1.14 || gtr(0, %X) -> false 2.18/1.14 || gtr(s(%X), 0) -> true 2.18/1.14 || gtr(s(%X), s(%Y)) -> gtr(%X, %Y) 2.18/1.14 || d(%X, 0) -> true 2.18/1.14 || d(s(%X), s(%Y)) -> if(gtr(%X, %Y), false, d(s(%X), sub(%Y, %X))) 2.18/1.14 || len(nil) -> 0 2.18/1.14 || len(cons(%X, %Y)) -> s(len(%Y)) 2.18/1.14 || 2.18/1.14 || The set Q consists of the following terms: 2.18/1.14 || 2.18/1.14 || if(true, x0, x1) 2.18/1.14 || if(false, x0, x1) 2.18/1.14 || sub(x0, 0) 2.18/1.14 || sub(s(x0), s(x1)) 2.18/1.14 || gtr(0, x0) 2.18/1.14 || gtr(s(x0), 0) 2.18/1.14 || gtr(s(x0), s(x1)) 2.18/1.14 || d(x0, 0) 2.18/1.14 || d(s(x0), s(x1)) 2.18/1.14 || len(nil) 2.18/1.14 || len(cons(x0, x1)) 2.18/1.14 || 2.18/1.14 || We have to consider all minimal (P,Q,R)-chains. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (29) UsableRulesProof (EQUIVALENT) 2.18/1.14 || As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (30) 2.18/1.14 || Obligation: 2.18/1.14 || Q DP problem: 2.18/1.14 || The TRS P consists of the following rules: 2.18/1.14 || 2.18/1.14 || D(s(%X), s(%Y)) -> D(s(%X), sub(%Y, %X)) 2.18/1.14 || 2.18/1.14 || The TRS R consists of the following rules: 2.18/1.14 || 2.18/1.14 || sub(%X, 0) -> %X 2.18/1.14 || sub(s(%X), s(%Y)) -> sub(%X, %Y) 2.18/1.14 || 2.18/1.14 || The set Q consists of the following terms: 2.18/1.14 || 2.18/1.14 || if(true, x0, x1) 2.18/1.14 || if(false, x0, x1) 2.18/1.14 || sub(x0, 0) 2.18/1.14 || sub(s(x0), s(x1)) 2.18/1.14 || gtr(0, x0) 2.18/1.14 || gtr(s(x0), 0) 2.18/1.14 || gtr(s(x0), s(x1)) 2.18/1.14 || d(x0, 0) 2.18/1.14 || d(s(x0), s(x1)) 2.18/1.14 || len(nil) 2.18/1.14 || len(cons(x0, x1)) 2.18/1.14 || 2.18/1.14 || We have to consider all minimal (P,Q,R)-chains. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (31) QReductionProof (EQUIVALENT) 2.18/1.14 || We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. 2.18/1.14 || 2.18/1.14 || if(true, x0, x1) 2.18/1.14 || if(false, x0, x1) 2.18/1.14 || gtr(0, x0) 2.18/1.14 || gtr(s(x0), 0) 2.18/1.14 || gtr(s(x0), s(x1)) 2.18/1.14 || d(x0, 0) 2.18/1.14 || d(s(x0), s(x1)) 2.18/1.14 || len(nil) 2.18/1.14 || len(cons(x0, x1)) 2.18/1.14 || 2.18/1.14 || 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (32) 2.18/1.14 || Obligation: 2.18/1.14 || Q DP problem: 2.18/1.14 || The TRS P consists of the following rules: 2.18/1.14 || 2.18/1.14 || D(s(%X), s(%Y)) -> D(s(%X), sub(%Y, %X)) 2.18/1.14 || 2.18/1.14 || The TRS R consists of the following rules: 2.18/1.14 || 2.18/1.14 || sub(%X, 0) -> %X 2.18/1.14 || sub(s(%X), s(%Y)) -> sub(%X, %Y) 2.18/1.14 || 2.18/1.14 || The set Q consists of the following terms: 2.18/1.14 || 2.18/1.14 || sub(x0, 0) 2.18/1.14 || sub(s(x0), s(x1)) 2.18/1.14 || 2.18/1.14 || We have to consider all minimal (P,Q,R)-chains. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (33) QDPOrderProof (EQUIVALENT) 2.18/1.14 || We use the reduction pair processor [LPAR04,JAR06]. 2.18/1.14 || 2.18/1.14 || 2.18/1.14 || The following pairs can be oriented strictly and are deleted. 2.18/1.14 || 2.18/1.14 || D(s(%X), s(%Y)) -> D(s(%X), sub(%Y, %X)) 2.18/1.14 || The remaining pairs can at least be oriented weakly. 2.18/1.14 || Used ordering: Polynomial interpretation [POLO]: 2.18/1.14 || 2.18/1.14 || POL(0) = 0 2.18/1.14 || POL(D(x_1, x_2)) = x_2 2.18/1.14 || POL(s(x_1)) = 1 + x_1 2.18/1.14 || POL(sub(x_1, x_2)) = x_1 2.18/1.14 || 2.18/1.14 || The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented: 2.18/1.14 || 2.18/1.14 || sub(%X, 0) -> %X 2.18/1.14 || sub(s(%X), s(%Y)) -> sub(%X, %Y) 2.18/1.14 || 2.18/1.14 || 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (34) 2.18/1.14 || Obligation: 2.18/1.14 || Q DP problem: 2.18/1.14 || P is empty. 2.18/1.14 || The TRS R consists of the following rules: 2.18/1.14 || 2.18/1.14 || sub(%X, 0) -> %X 2.18/1.14 || sub(s(%X), s(%Y)) -> sub(%X, %Y) 2.18/1.14 || 2.18/1.14 || The set Q consists of the following terms: 2.18/1.14 || 2.18/1.14 || sub(x0, 0) 2.18/1.14 || sub(s(x0), s(x1)) 2.18/1.14 || 2.18/1.14 || We have to consider all minimal (P,Q,R)-chains. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (35) PisEmptyProof (EQUIVALENT) 2.18/1.14 || The TRS P is empty. Hence, there is no (P,Q,R) chain. 2.18/1.14 || ---------------------------------------- 2.18/1.14 || 2.18/1.14 || (36) 2.18/1.14 || YES 2.18/1.14 || 2.18/1.14 We use the dependency pair framework as described in [Kop12, Ch. 6/7], with static dependency pairs (see [KusIsoSakBla09] and the adaptation for AFSMs and accessible arguments in [Kop13]). 2.18/1.14 2.18/1.14 We thus obtain the following dependency pair problem (P_0, R_0, static, formative): 2.18/1.14 2.18/1.14 Dependency Pairs P_0: 2.18/1.14 2.18/1.14 0] filter#(F, cons(X, Y)) =#> if#(F X, cons(X, filter(F, Y)), filter(F, Y)) 2.18/1.14 1] filter#(F, cons(X, Y)) =#> filter#(F, Y) 2.18/1.14 2] filter#(F, cons(X, Y)) =#> filter#(F, Y) 2.18/1.14 2.18/1.14 Rules R_0: 2.18/1.14 2.18/1.14 if(true, X, Y) => X 2.18/1.14 if(false, X, Y) => Y 2.18/1.14 sub(X, 0) => X 2.18/1.14 sub(s(X), s(Y)) => sub(X, Y) 2.18/1.14 gtr(0, X) => false 2.18/1.14 gtr(s(X), 0) => true 2.18/1.14 gtr(s(X), s(Y)) => gtr(X, Y) 2.18/1.14 d(X, 0) => true 2.18/1.14 d(s(X), s(Y)) => if(gtr(X, Y), false, d(s(X), sub(Y, X))) 2.18/1.14 len(nil) => 0 2.18/1.14 len(cons(X, Y)) => s(len(Y)) 2.18/1.14 filter(F, nil) => nil 2.18/1.14 filter(F, cons(X, Y)) => if(F X, cons(X, filter(F, Y)), filter(F, Y)) 2.18/1.14 2.18/1.14 Thus, the original system is terminating if (P_0, R_0, static, formative) is finite. 2.18/1.14 2.18/1.14 We consider the dependency pair problem (P_0, R_0, static, formative). 2.18/1.14 2.18/1.14 We place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: 2.18/1.14 2.18/1.14 * 0 : 2.18/1.14 * 1 : 0, 1, 2 2.18/1.14 * 2 : 0, 1, 2 2.18/1.14 2.18/1.14 This graph has the following strongly connected components: 2.18/1.14 2.18/1.14 P_1: 2.18/1.14 2.18/1.14 filter#(F, cons(X, Y)) =#> filter#(F, Y) 2.18/1.14 filter#(F, cons(X, Y)) =#> filter#(F, Y) 2.18/1.14 2.18/1.14 By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_0, R_0, m, f) by (P_1, R_0, m, f). 2.18/1.14 2.18/1.14 Thus, the original system is terminating if (P_1, R_0, static, formative) is finite. 2.18/1.14 2.18/1.14 We consider the dependency pair problem (P_1, R_0, static, formative). 2.18/1.14 2.18/1.14 We apply the subterm criterion with the following projection function: 2.18/1.14 2.18/1.14 nu(filter#) = 2 2.18/1.14 2.18/1.14 Thus, we can orient the dependency pairs as follows: 2.18/1.14 2.18/1.14 nu(filter#(F, cons(X, Y))) = cons(X, Y) |> Y = nu(filter#(F, Y)) 2.18/1.14 nu(filter#(F, cons(X, Y))) = cons(X, Y) |> Y = nu(filter#(F, Y)) 2.18/1.14 2.18/1.14 By [Kop12, Thm. 7.35] and [Kop13, Thm. 5], we may replace a dependency pair problem (P_1, R_0, static, f) by ({}, R_0, static, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. 2.18/1.14 2.18/1.14 As all dependency pair problems were succesfully simplified with sound (and complete) processors until nothing remained, we conclude termination. 2.18/1.14 2.18/1.14 2.18/1.14 +++ Citations +++ 2.18/1.14 2.18/1.14 [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012. 2.18/1.14 [Kop13] C. Kop. Static Dependency Pairs with Accessibility. Unpublished manuscript, http://cl-informatik.uibk.ac.at/users/kop/static.pdf, 2013. 2.18/1.14 [KusIsoSakBla09] K. Kusakari, Y. Isogai, M. Sakai, and F. Blanqui. Static Dependency Pair Method Based On Strong Computability for Higher-Order Rewrite Systems. In volume 92(10) of IEICE Transactions on Information and Systems. 2007--2015, 2009. 2.18/1.14 EOF