3.58/1.76 YES 3.58/1.77 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 3.58/1.77 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 3.58/1.77 3.58/1.77 3.58/1.77 Termination w.r.t. Q of the given QTRS could be proven: 3.58/1.77 3.58/1.77 (0) QTRS 3.58/1.77 (1) QTRSToCSRProof [SOUND, 0 ms] 3.58/1.77 (2) CSR 3.58/1.77 (3) CSRRRRProof [EQUIVALENT, 41 ms] 3.58/1.77 (4) CSR 3.58/1.77 (5) CSRRRRProof [EQUIVALENT, 0 ms] 3.58/1.77 (6) CSR 3.58/1.77 (7) RisEmptyProof [EQUIVALENT, 0 ms] 3.58/1.77 (8) YES 3.58/1.77 3.58/1.77 3.58/1.77 ---------------------------------------- 3.58/1.77 3.58/1.77 (0) 3.58/1.77 Obligation: 3.58/1.77 Q restricted rewrite system: 3.58/1.77 The TRS R consists of the following rules: 3.58/1.77 3.58/1.77 active(and(true, X)) -> mark(X) 3.58/1.77 active(and(false, Y)) -> mark(false) 3.58/1.77 active(if(true, X, Y)) -> mark(X) 3.58/1.77 active(if(false, X, Y)) -> mark(Y) 3.58/1.77 active(add(0, X)) -> mark(X) 3.58/1.77 active(add(s(X), Y)) -> mark(s(add(X, Y))) 3.58/1.77 active(first(0, X)) -> mark(nil) 3.58/1.77 active(first(s(X), cons(Y, Z))) -> mark(cons(Y, first(X, Z))) 3.58/1.77 active(from(X)) -> mark(cons(X, from(s(X)))) 3.58/1.77 active(and(X1, X2)) -> and(active(X1), X2) 3.58/1.77 active(if(X1, X2, X3)) -> if(active(X1), X2, X3) 3.58/1.77 active(add(X1, X2)) -> add(active(X1), X2) 3.58/1.77 active(first(X1, X2)) -> first(active(X1), X2) 3.58/1.77 active(first(X1, X2)) -> first(X1, active(X2)) 3.58/1.77 and(mark(X1), X2) -> mark(and(X1, X2)) 3.58/1.77 if(mark(X1), X2, X3) -> mark(if(X1, X2, X3)) 3.58/1.77 add(mark(X1), X2) -> mark(add(X1, X2)) 3.58/1.77 first(mark(X1), X2) -> mark(first(X1, X2)) 3.58/1.77 first(X1, mark(X2)) -> mark(first(X1, X2)) 3.58/1.77 proper(and(X1, X2)) -> and(proper(X1), proper(X2)) 3.58/1.77 proper(true) -> ok(true) 3.58/1.77 proper(false) -> ok(false) 3.58/1.77 proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3)) 3.58/1.77 proper(add(X1, X2)) -> add(proper(X1), proper(X2)) 3.58/1.77 proper(0) -> ok(0) 3.58/1.77 proper(s(X)) -> s(proper(X)) 3.58/1.77 proper(first(X1, X2)) -> first(proper(X1), proper(X2)) 3.58/1.77 proper(nil) -> ok(nil) 3.58/1.77 proper(cons(X1, X2)) -> cons(proper(X1), proper(X2)) 3.58/1.77 proper(from(X)) -> from(proper(X)) 3.58/1.77 and(ok(X1), ok(X2)) -> ok(and(X1, X2)) 3.58/1.77 if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3)) 3.58/1.77 add(ok(X1), ok(X2)) -> ok(add(X1, X2)) 3.58/1.77 s(ok(X)) -> ok(s(X)) 3.58/1.77 first(ok(X1), ok(X2)) -> ok(first(X1, X2)) 3.58/1.77 cons(ok(X1), ok(X2)) -> ok(cons(X1, X2)) 3.58/1.77 from(ok(X)) -> ok(from(X)) 3.58/1.77 top(mark(X)) -> top(proper(X)) 3.58/1.77 top(ok(X)) -> top(active(X)) 3.58/1.77 3.58/1.77 The set Q consists of the following terms: 3.58/1.77 3.58/1.77 active(from(x0)) 3.58/1.77 active(and(x0, x1)) 3.58/1.77 active(if(x0, x1, x2)) 3.58/1.77 active(add(x0, x1)) 3.58/1.77 active(first(x0, x1)) 3.58/1.77 and(mark(x0), x1) 3.58/1.77 if(mark(x0), x1, x2) 3.58/1.77 add(mark(x0), x1) 3.58/1.77 first(mark(x0), x1) 3.58/1.77 first(x0, mark(x1)) 3.58/1.77 proper(and(x0, x1)) 3.58/1.77 proper(true) 3.58/1.77 proper(false) 3.58/1.77 proper(if(x0, x1, x2)) 3.58/1.77 proper(add(x0, x1)) 3.58/1.77 proper(0) 3.58/1.77 proper(s(x0)) 3.58/1.77 proper(first(x0, x1)) 3.58/1.77 proper(nil) 3.58/1.77 proper(cons(x0, x1)) 3.58/1.77 proper(from(x0)) 3.58/1.77 and(ok(x0), ok(x1)) 3.58/1.77 if(ok(x0), ok(x1), ok(x2)) 3.58/1.77 add(ok(x0), ok(x1)) 3.58/1.77 s(ok(x0)) 3.58/1.77 first(ok(x0), ok(x1)) 3.58/1.77 cons(ok(x0), ok(x1)) 3.58/1.77 from(ok(x0)) 3.58/1.77 top(mark(x0)) 3.58/1.77 top(ok(x0)) 3.58/1.77 3.58/1.77 3.58/1.77 ---------------------------------------- 3.58/1.77 3.58/1.77 (1) QTRSToCSRProof (SOUND) 3.58/1.77 The following Q TRS is given: Q restricted rewrite system: 3.58/1.77 The TRS R consists of the following rules: 3.58/1.77 3.58/1.77 active(and(true, X)) -> mark(X) 3.58/1.77 active(and(false, Y)) -> mark(false) 3.58/1.77 active(if(true, X, Y)) -> mark(X) 3.58/1.77 active(if(false, X, Y)) -> mark(Y) 3.58/1.77 active(add(0, X)) -> mark(X) 3.58/1.77 active(add(s(X), Y)) -> mark(s(add(X, Y))) 3.58/1.77 active(first(0, X)) -> mark(nil) 3.58/1.77 active(first(s(X), cons(Y, Z))) -> mark(cons(Y, first(X, Z))) 3.58/1.77 active(from(X)) -> mark(cons(X, from(s(X)))) 3.58/1.77 active(and(X1, X2)) -> and(active(X1), X2) 3.58/1.77 active(if(X1, X2, X3)) -> if(active(X1), X2, X3) 3.58/1.77 active(add(X1, X2)) -> add(active(X1), X2) 3.58/1.77 active(first(X1, X2)) -> first(active(X1), X2) 3.58/1.77 active(first(X1, X2)) -> first(X1, active(X2)) 3.58/1.77 and(mark(X1), X2) -> mark(and(X1, X2)) 3.58/1.77 if(mark(X1), X2, X3) -> mark(if(X1, X2, X3)) 3.58/1.77 add(mark(X1), X2) -> mark(add(X1, X2)) 3.58/1.77 first(mark(X1), X2) -> mark(first(X1, X2)) 3.58/1.77 first(X1, mark(X2)) -> mark(first(X1, X2)) 3.58/1.77 proper(and(X1, X2)) -> and(proper(X1), proper(X2)) 3.58/1.77 proper(true) -> ok(true) 3.58/1.77 proper(false) -> ok(false) 3.58/1.77 proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3)) 3.58/1.77 proper(add(X1, X2)) -> add(proper(X1), proper(X2)) 3.58/1.77 proper(0) -> ok(0) 3.58/1.77 proper(s(X)) -> s(proper(X)) 3.58/1.77 proper(first(X1, X2)) -> first(proper(X1), proper(X2)) 3.58/1.77 proper(nil) -> ok(nil) 3.58/1.77 proper(cons(X1, X2)) -> cons(proper(X1), proper(X2)) 3.58/1.77 proper(from(X)) -> from(proper(X)) 3.58/1.77 and(ok(X1), ok(X2)) -> ok(and(X1, X2)) 3.58/1.77 if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3)) 3.58/1.77 add(ok(X1), ok(X2)) -> ok(add(X1, X2)) 3.58/1.77 s(ok(X)) -> ok(s(X)) 3.58/1.77 first(ok(X1), ok(X2)) -> ok(first(X1, X2)) 3.58/1.77 cons(ok(X1), ok(X2)) -> ok(cons(X1, X2)) 3.58/1.77 from(ok(X)) -> ok(from(X)) 3.58/1.77 top(mark(X)) -> top(proper(X)) 3.58/1.77 top(ok(X)) -> top(active(X)) 3.58/1.77 3.58/1.77 The set Q consists of the following terms: 3.58/1.77 3.58/1.77 active(from(x0)) 3.58/1.77 active(and(x0, x1)) 3.58/1.77 active(if(x0, x1, x2)) 3.58/1.77 active(add(x0, x1)) 3.58/1.77 active(first(x0, x1)) 3.58/1.77 and(mark(x0), x1) 3.58/1.77 if(mark(x0), x1, x2) 3.58/1.77 add(mark(x0), x1) 3.58/1.77 first(mark(x0), x1) 3.58/1.77 first(x0, mark(x1)) 3.58/1.77 proper(and(x0, x1)) 3.58/1.77 proper(true) 3.58/1.77 proper(false) 3.58/1.77 proper(if(x0, x1, x2)) 3.58/1.77 proper(add(x0, x1)) 3.58/1.77 proper(0) 3.58/1.77 proper(s(x0)) 3.58/1.77 proper(first(x0, x1)) 3.58/1.77 proper(nil) 3.58/1.77 proper(cons(x0, x1)) 3.58/1.77 proper(from(x0)) 3.58/1.77 and(ok(x0), ok(x1)) 3.58/1.77 if(ok(x0), ok(x1), ok(x2)) 3.58/1.77 add(ok(x0), ok(x1)) 3.58/1.77 s(ok(x0)) 3.58/1.77 first(ok(x0), ok(x1)) 3.58/1.77 cons(ok(x0), ok(x1)) 3.58/1.77 from(ok(x0)) 3.58/1.77 top(mark(x0)) 3.58/1.77 top(ok(x0)) 3.58/1.77 3.58/1.77 Special symbols used for the transformation (see [GM04]): 3.58/1.77 top: top_1, active: active_1, mark: mark_1, ok: ok_1, proper: proper_1 3.58/1.77 The replacement map contains the following entries: 3.58/1.77 3.58/1.77 and: {1} 3.58/1.77 true: empty set 3.58/1.77 false: empty set 3.58/1.77 if: {1} 3.58/1.77 add: {1} 3.58/1.77 0: empty set 3.58/1.77 s: empty set 3.58/1.77 first: {1, 2} 3.58/1.77 nil: empty set 3.58/1.77 cons: empty set 3.58/1.77 from: empty set 3.58/1.77 The QTRS contained just a subset of rules created by the complete Giesl-Middeldorp transformation. Therefore, the inverse transformation is sound, but not necessarily complete. 3.58/1.77 ---------------------------------------- 3.58/1.77 3.58/1.77 (2) 3.58/1.77 Obligation: 3.58/1.77 Context-sensitive rewrite system: 3.58/1.77 The TRS R consists of the following rules: 3.58/1.77 3.58/1.77 and(true, X) -> X 3.58/1.77 and(false, Y) -> false 3.58/1.77 if(true, X, Y) -> X 3.58/1.77 if(false, X, Y) -> Y 3.58/1.77 add(0, X) -> X 3.58/1.77 add(s(X), Y) -> s(add(X, Y)) 3.58/1.77 first(0, X) -> nil 3.58/1.77 first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z)) 3.58/1.77 from(X) -> cons(X, from(s(X))) 3.58/1.77 3.58/1.77 The replacement map contains the following entries: 3.58/1.77 3.58/1.77 and: {1} 3.58/1.77 true: empty set 3.58/1.77 false: empty set 3.58/1.77 if: {1} 3.58/1.77 add: {1} 3.58/1.77 0: empty set 3.58/1.77 s: empty set 3.58/1.77 first: {1, 2} 3.58/1.77 nil: empty set 3.58/1.77 cons: empty set 3.58/1.77 from: empty set 3.58/1.77 3.58/1.77 ---------------------------------------- 3.58/1.77 3.58/1.77 (3) CSRRRRProof (EQUIVALENT) 3.58/1.77 The following CSR is given: Context-sensitive rewrite system: 3.58/1.77 The TRS R consists of the following rules: 3.58/1.77 3.58/1.77 and(true, X) -> X 3.58/1.77 and(false, Y) -> false 3.58/1.77 if(true, X, Y) -> X 3.58/1.77 if(false, X, Y) -> Y 3.58/1.77 add(0, X) -> X 3.58/1.77 add(s(X), Y) -> s(add(X, Y)) 3.58/1.77 first(0, X) -> nil 3.58/1.77 first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z)) 3.58/1.77 from(X) -> cons(X, from(s(X))) 3.58/1.77 3.58/1.77 The replacement map contains the following entries: 3.58/1.77 3.58/1.77 and: {1} 3.58/1.77 true: empty set 3.58/1.77 false: empty set 3.58/1.77 if: {1} 3.58/1.77 add: {1} 3.58/1.77 0: empty set 3.58/1.77 s: empty set 3.58/1.77 first: {1, 2} 3.58/1.77 nil: empty set 3.58/1.77 cons: empty set 3.58/1.77 from: empty set 3.58/1.77 Used ordering: 3.58/1.77 Polynomial interpretation [POLO]: 3.58/1.77 3.58/1.77 POL(0) = 2 3.58/1.77 POL(add(x_1, x_2)) = 2*x_1 + 2*x_2 3.58/1.77 POL(and(x_1, x_2)) = 2 + x_1 + x_2 3.58/1.77 POL(cons(x_1, x_2)) = 0 3.58/1.77 POL(false) = 2 3.58/1.77 POL(first(x_1, x_2)) = 2 + 2*x_1 + x_2 3.58/1.77 POL(from(x_1)) = 0 3.58/1.77 POL(if(x_1, x_2, x_3)) = x_1 + x_2 + x_3 3.58/1.77 POL(nil) = 2 3.58/1.77 POL(s(x_1)) = 2 3.58/1.77 POL(true) = 2 3.58/1.77 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: 3.58/1.77 3.58/1.77 and(true, X) -> X 3.58/1.77 and(false, Y) -> false 3.58/1.77 if(true, X, Y) -> X 3.58/1.77 if(false, X, Y) -> Y 3.58/1.77 add(0, X) -> X 3.58/1.77 add(s(X), Y) -> s(add(X, Y)) 3.58/1.77 first(0, X) -> nil 3.58/1.77 first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z)) 3.58/1.77 3.58/1.77 3.58/1.77 3.58/1.77 3.58/1.77 ---------------------------------------- 3.58/1.77 3.58/1.77 (4) 3.58/1.77 Obligation: 3.58/1.77 Context-sensitive rewrite system: 3.58/1.77 The TRS R consists of the following rules: 3.58/1.77 3.58/1.77 from(X) -> cons(X, from(s(X))) 3.58/1.77 3.58/1.77 The replacement map contains the following entries: 3.58/1.77 3.58/1.77 s: empty set 3.58/1.77 cons: empty set 3.58/1.77 from: empty set 3.58/1.77 3.58/1.77 ---------------------------------------- 3.58/1.77 3.58/1.77 (5) CSRRRRProof (EQUIVALENT) 3.58/1.77 The following CSR is given: Context-sensitive rewrite system: 3.58/1.77 The TRS R consists of the following rules: 3.58/1.77 3.58/1.77 from(X) -> cons(X, from(s(X))) 3.58/1.77 3.58/1.77 The replacement map contains the following entries: 3.58/1.77 3.58/1.77 s: empty set 3.58/1.77 cons: empty set 3.58/1.77 from: empty set 3.58/1.77 Used ordering: 3.58/1.77 Polynomial interpretation [POLO]: 3.58/1.77 3.58/1.77 POL(cons(x_1, x_2)) = 2*x_1 3.58/1.77 POL(from(x_1)) = 1 + 2*x_1 3.58/1.77 POL(s(x_1)) = 0 3.58/1.77 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: 3.58/1.77 3.58/1.77 from(X) -> cons(X, from(s(X))) 3.58/1.77 3.58/1.77 3.58/1.77 3.58/1.77 3.58/1.77 ---------------------------------------- 3.58/1.77 3.58/1.77 (6) 3.58/1.77 Obligation: 3.58/1.77 Context-sensitive rewrite system: 3.58/1.77 R is empty. 3.58/1.77 3.58/1.77 ---------------------------------------- 3.58/1.77 3.58/1.77 (7) RisEmptyProof (EQUIVALENT) 3.58/1.77 The CSR R is empty. Hence, termination is trivially proven. 3.58/1.77 ---------------------------------------- 3.58/1.77 3.58/1.77 (8) 3.58/1.77 YES 3.68/1.80 EOF