$ cora aoto.mstrs -s yices -e MSTRS with no additional rule schemes: Signature: app :: list → list → list cons :: nat → list → list len :: list → nat max :: nat → nat → nat minus :: nat → nat → nat nil :: list plus :: nat → nat → nat qrev :: list → list → list s :: nat → nat sum :: list → nat times :: nat → nat → nat zero :: nat Rules: max(zero, y) → y max(x, zero) → x max(s(x), s(y)) → s(max(x, y)) minus(zero, y) → zero minus(s(x), zero) → s(x) minus(s(x), s(y)) → minus(x, y) plus(zero, y) → y plus(s(x), y) → s(plus(x, y)) times(zero, y) → zero times(s(x), y) → plus(y, times(x, y)) len(nil) → zero len(cons(x, y)) → s(len(y)) sum(nil) → zero sum(cons(x, y)) → plus(x, sum(y)) app(nil, z) → z app(cons(x, y), z) → cons(x, app(y, z)) qrev(nil, ys) → ys qrev(cons(x, xs), ys) → qrev(xs, cons(x, ys)) Please input one or more equations, or a file: minus(minus(x, y), z) = minus(minus(x, z), y) Goal: minus(minus(x, y), z) ≈ minus(minus(x, z), y) > induct Goal: minus(minus(x, y), z) ⦾ ≈ minus(minus(x, z), y) ⦾ > case x Goal: minus(minus(zero, y), z) ⦾ ≈ minus(minus(zero, z), y) ⦾ > auto simplify R4 l1 with [y := y] simplify R4 l with [y := z] simplify R4 r1 with [y := z] simplify R4 r with [y := y] delete Goal: minus(minus(s(x1), y), z) ⦾ ≈ minus(minus(s(x1), z), y) ⦾ > case y Goal: minus(minus(s(x1), zero), z) ⦾ ≈ minus(minus(s(x1), z), zero) ⦾ > auto simplify R5 l1 with [x := x1] Goal: minus(s(x1), z) ≈ minus(minus(s(x1), z), zero) ⦾ > case z Goal: minus(s(x1), zero) ≈ minus(minus(s(x1), zero), zero) ⦾ > auto simplify R5 l with [x := x1] simplify R5 r1 with [x := x1] simplify R5 r with [x := x1] delete Goal: minus(s(x1), s(z1)) ≈ minus(minus(s(x1), s(z1)), zero) ⦾ > auto simplify R6 l with [x := x1, y := z1] simplify R6 r1 with [x := x1, y := z1] Goal: minus(x1, z1) ≈ minus(minus(x1, z1), zero) > induct Goal: minus(x1, z1) ⦾ ≈ minus(minus(x1, z1), zero) ⦾ > case x1 Goal: minus(zero, z1) ⦾ ≈ minus(minus(zero, z1), zero) ⦾ > auto simplify R4 l with [y := z1] simplify R4 r1 with [y := z1] simplify R4 r with [y := zero] delete Goal: minus(s(x2), z1) ⦾ ≈ minus(minus(s(x2), z1), zero) ⦾ > auto There is nothing obvious to be done. Goal: minus(s(x2), z1) ⦾ ≈ minus(minus(s(x2), z1), zero) ⦾ > case z1 Goal: minus(s(x2), zero) ⦾ ≈ minus(minus(s(x2), zero), zero) ⦾ > auto simplify R5 l with [x := x2] simplify R5 r1 with [x := x2] simplify R5 r with [x := x2] delete Goal: minus(s(x2), s(z2)) ⦾ ≈ minus(minus(s(x2), s(z2)), zero) ⦾ > auto simplify R6 l with [x := x2, y := z2] simplify R6 r1 with [x := x2, y := z2] hdelete H18 l with [x1 := x2, z1 := z2] Goal: minus(minus(s(x1), s(y1)), z) ⦾ ≈ minus(minus(s(x1), z), s(y1)) ⦾ > auto simplify R6 l1 with [x := x1, y := y1] Goal: minus(minus(x1, y1), z) ≈ minus(minus(s(x1), z), s(y1)) ⦾ > case z Goal: minus(minus(x1, y1), zero) ≈ minus(minus(s(x1), zero), s(y1)) ⦾ > auto simplify R5 r1 with [x := x1] simplify R6 r with [x := x1, y := y1] hdelete H18^{-1} l with [x1 := x1, z1 := y1] Goal: minus(minus(x1, y1), s(z1)) ≈ minus(minus(s(x1), s(z1)), s(y1)) ⦾ > auto simplify R6 r1 with [x := x1, y := z1] Goal: minus(minus(x1, y1), s(z1)) ≈ minus(minus(x1, z1), s(y1)) > :hypotheses You currently have the following induction hypotheses available: H1: minus(minus(x, y), z) ≈ minus(minus(x, z), y) H18: minus(x1, z1) ≈ minus(minus(x1, z1), zero) Goal: minus(minus(x1, y1), s(z1)) ≈ minus(minus(x1, z1), s(y1)) > hypothesis H1 l Goal: minus(minus(x1, s(z1)), y1) ≈ minus(minus(x1, z1), s(y1)) > hypothesis H1 r Goal: minus(minus(x1, s(z1)), y1) ≈ minus(minus(x1, s(y1)), z1) > case x1 Goal: minus(minus(zero, s(z1)), y1) ≈ minus(minus(zero, s(y1)), z1) > auto simplify R4 l1 with [y := s(z1)] simplify R4 l with [y := y1] simplify R4 r1 with [y := s(y1)] simplify R4 r with [y := z1] delete Goal: minus(minus(s(x2), s(z1)), y1) ≈ minus(minus(s(x2), s(y1)), z1) > auto simplify R6 l1 with [x := x2, y := z1] simplify R6 r1 with [x := x2, y := y1] hdelete H1 l with [x := x2, y := z1, z := y1] All goals have been successfully removed! To complete the proof, you still need to verify that a suitable ordering exists. You can do this using the :check command. Other useful commands include: undo -- to go back to the previous proof state :quit -- to end the proof process without termination check :ordering -- to see the current ordering requirements :rules -- to see the current rules (these must also be oriented) :check verbose -- to run the termination check and see an elaborate explanation of the outcome (particularly useful if the result is a failure) > :save minus.proof Original equations and command history have been written to minus.proof. All goals have been successfully removed! To complete the proof, you still need to verify that a suitable ordering exists. You can do this using the :check command. Other useful commands include: undo -- to go back to the previous proof state :quit -- to end the proof process without termination check :ordering -- to see the current ordering requirements :rules -- to see the current rules (these must also be oriented) :check verbose -- to run the termination check and see an elaborate explanation of the outcome (particularly useful if the result is a failure) > :ordering So far the following ordering requirements have been imposed: minus(minus(s(x1), s(y1)), s(z1)) ≻ minus(minus(x1, s(z1)), y1) minus(minus(s(x1), s(z1)), s(y1)) ≻ minus(minus(x1, s(y1)), z1) All goals have been successfully removed! To complete the proof, you still need to verify that a suitable ordering exists. You can do this using the :check command. Other useful commands include: undo -- to go back to the previous proof state :quit -- to end the proof process without termination check :ordering -- to see the current ordering requirements :rules -- to see the current rules (these must also be oriented) :check verbose -- to run the termination check and see an elaborate explanation of the outcome (particularly useful if the result is a failure) > :check Sending proof request to termination checker... The current set of ordering requirements is indeed orientable. YES We start the process with the following equations: E1: (• , minus(minus(x, y), z) ≈ minus(minus(x, z), y) , •) We apply INDUCT to E1, which causes minus(minus(x, y), z) ≈ minus(minus(x, z), y) to be added to the set H of induction hypotheses. This yields E2: (minus(minus(x, y), z) , minus(minus(x, y), z) ≈ minus(minus(x, z), y) , minus(minus(x, z), y)) We apply CASE on the instance of x. This yields the following new equations: E3: (minus(minus(s(x1), y), z) , minus(minus(s(x1), y), z) ≈ minus(minus(s(x1), z), y) , minus(minus(s(x1), z), y)) E4: (minus(minus(zero, y), z) , minus(minus(zero, y), z) ≈ minus(minus(zero, z), y) , minus(minus(zero, z), y)) We apply SIMPLIFICATION to E4 with rule R4 and substitution [y := y]. This yields E5: (minus(minus(zero, y), z) , minus(zero, z) ≈ minus(minus(zero, z), y) , minus(minus(zero, z), y)) We apply SIMPLIFICATION to E5 with rule R4 and substitution [y := z]. This yields E6: (minus(minus(zero, y), z) , zero ≈ minus(minus(zero, z), y) , minus(minus(zero, z), y)) We apply SIMPLIFICATION to E6 with rule R4 and substitution [y := z]. This yields E7: (minus(minus(zero, y), z) , zero ≈ minus(zero, y) , minus(minus(zero, z), y)) We apply SIMPLIFICATION to E7 with rule R4 and substitution [y := y]. This yields E8: (minus(minus(zero, y), z) , zero ≈ zero , minus(minus(zero, z), y)) We apply DELETION to E8 because both sides are equal. Thus, we may remove this equation from the proof state. We apply CASE on the instance of y. This yields the following new equations: E9: (minus(minus(s(x1), s(y1)), z) , minus(minus(s(x1), s(y1)), z) ≈ minus(minus(s(x1), z), s(y1)) , minus(minus(s(x1), z), s(y1))) E10: (minus(minus(s(x1), zero), z) , minus(minus(s(x1), zero), z) ≈ minus(minus(s(x1), z), zero) , minus(minus(s(x1), z), zero)) We apply SIMPLIFICATION to E10 with rule R5 and substitution [x := x1]. This yields E11: (minus(minus(s(x1), zero), z) , minus(s(x1), z) ≈ minus(minus(s(x1), z), zero) , minus(minus(s(x1), z), zero)) We apply CASE on the instance of z. This yields the following new equations: E12: (minus(minus(s(x1), zero), s(z1)) , minus(s(x1), s(z1)) ≈ minus(minus(s(x1), s(z1)), zero) , minus(minus(s(x1), s(z1)), zero)) E13: (minus(minus(s(x1), zero), zero) , minus(s(x1), zero) ≈ minus(minus(s(x1), zero), zero) , minus(minus(s(x1), zero), zero)) We apply SIMPLIFICATION to E13 with rule R5 and substitution [x := x1]. This yields E14: (minus(minus(s(x1), zero), zero) , s(x1) ≈ minus(minus(s(x1), zero), zero) , minus(minus(s(x1), zero), zero)) We apply SIMPLIFICATION to E14 with rule R5 and substitution [x := x1]. This yields E15: (minus(minus(s(x1), zero), zero) , s(x1) ≈ minus(s(x1), zero) , minus(minus(s(x1), zero), zero)) We apply SIMPLIFICATION to E15 with rule R5 and substitution [x := x1]. This yields E16: (minus(minus(s(x1), zero), zero) , s(x1) ≈ s(x1) , minus(minus(s(x1), zero), zero)) We apply DELETION to E16 because both sides are equal. Thus, we may remove this equation from the proof state. We apply SIMPLIFICATION to E12 with rule R6 and substitution [x := x1, y := z1]. This yields E17: (minus(minus(s(x1), zero), s(z1)) , minus(x1, z1) ≈ minus(minus(s(x1), s(z1)), zero) , minus(minus(s(x1), s(z1)), zero)) We apply SIMPLIFICATION to E17 with rule R6 and substitution [x := x1, y := z1]. This yields E18: (minus(minus(s(x1), zero), s(z1)) , minus(x1, z1) ≈ minus(minus(x1, z1), zero) , minus(minus(s(x1), s(z1)), zero)) We apply INDUCT to E18, which causes minus(x1, z1) ≈ minus(minus(x1, z1), zero) to be added to the set H of induction hypotheses. This yields E19: (minus(x1, z1) , minus(x1, z1) ≈ minus(minus(x1, z1), zero) , minus(minus(x1, z1), zero)) We apply CASE on the instance of x1. This yields the following new equations: E20: (minus(s(x2), z1) , minus(s(x2), z1) ≈ minus(minus(s(x2), z1), zero) , minus(minus(s(x2), z1), zero)) E21: (minus(zero, z1) , minus(zero, z1) ≈ minus(minus(zero, z1), zero) , minus(minus(zero, z1), zero)) We apply SIMPLIFICATION to E21 with rule R4 and substitution [y := z1]. This yields E22: (minus(zero, z1) , zero ≈ minus(minus(zero, z1), zero) , minus(minus(zero, z1), zero)) We apply SIMPLIFICATION to E22 with rule R4 and substitution [y := z1]. This yields E23: (minus(zero, z1) , zero ≈ minus(zero, zero) , minus(minus(zero, z1), zero)) We apply SIMPLIFICATION to E23 with rule R4 and substitution [y := zero]. This yields E24: (minus(zero, z1) , zero ≈ zero , minus(minus(zero, z1), zero)) We apply DELETION to E24 because both sides are equal. Thus, we may remove this equation from the proof state. We apply CASE on the instance of z1. This yields the following new equations: E25: (minus(s(x2), s(z2)) , minus(s(x2), s(z2)) ≈ minus(minus(s(x2), s(z2)), zero) , minus(minus(s(x2), s(z2)), zero)) E26: (minus(s(x2), zero) , minus(s(x2), zero) ≈ minus(minus(s(x2), zero), zero) , minus(minus(s(x2), zero), zero)) We apply SIMPLIFICATION to E26 with rule R5 and substitution [x := x2]. This yields E27: (minus(s(x2), zero) , s(x2) ≈ minus(minus(s(x2), zero), zero) , minus(minus(s(x2), zero), zero)) We apply SIMPLIFICATION to E27 with rule R5 and substitution [x := x2]. This yields E28: (minus(s(x2), zero) , s(x2) ≈ minus(s(x2), zero) , minus(minus(s(x2), zero), zero)) We apply SIMPLIFICATION to E28 with rule R5 and substitution [x := x2]. This yields E29: (minus(s(x2), zero) , s(x2) ≈ s(x2) , minus(minus(s(x2), zero), zero)) We apply DELETION to E29 because both sides are equal. Thus, we may remove this equation from the proof state. We apply SIMPLIFICATION to E25 with rule R6 and substitution [x := x2, y := z2]. This yields E30: (minus(s(x2), s(z2)) , minus(x2, z2) ≈ minus(minus(s(x2), s(z2)), zero) , minus(minus(s(x2), s(z2)), zero)) We apply SIMPLIFICATION to E30 with rule R6 and substitution [x := x2, y := z2]. This yields E31: (minus(s(x2), s(z2)) , minus(x2, z2) ≈ minus(minus(x2, z2), zero) , minus(minus(s(x2), s(z2)), zero)) We apply HDELETE to E31 with induction hypothesis H18 and substitution [x1 := x2, z1 := z2]. We apply SIMPLIFICATION to E9 with rule R6 and substitution [x := x1, y := y1]. This yields E32: (minus(minus(s(x1), s(y1)), z) , minus(minus(x1, y1), z) ≈ minus(minus(s(x1), z), s(y1)) , minus(minus(s(x1), z), s(y1))) We apply CASE on the instance of z. This yields the following new equations: E33: (minus(minus(s(x1), s(y1)), s(z1)) , minus(minus(x1, y1), s(z1)) ≈ minus(minus(s(x1), s(z1)), s(y1)) , minus(minus(s(x1), s(z1)), s(y1))) E34: (minus(minus(s(x1), s(y1)), zero) , minus(minus(x1, y1), zero) ≈ minus(minus(s(x1), zero), s(y1)) , minus(minus(s(x1), zero), s(y1))) We apply SIMPLIFICATION to E34 with rule R5 and substitution [x := x1]. This yields E35: (minus(minus(s(x1), s(y1)), zero) , minus(minus(x1, y1), zero) ≈ minus(s(x1), s(y1)) , minus(minus(s(x1), zero), s(y1))) We apply SIMPLIFICATION to E35 with rule R6 and substitution [x := x1, y := y1]. This yields E36: (minus(minus(s(x1), s(y1)), zero) , minus(minus(x1, y1), zero) ≈ minus(x1, y1) , minus(minus(s(x1), zero), s(y1))) We apply HDELETE to E36 with induction hypothesis H18^{-1} and substitution [x1 := x1, z1 := y1]. We apply SIMPLIFICATION to E33 with rule R6 and substitution [x := x1, y := z1]. This yields E37: (minus(minus(s(x1), s(y1)), s(z1)) , minus(minus(x1, y1), s(z1)) ≈ minus(minus(x1, z1), s(y1)) , minus(minus(s(x1), s(z1)), s(y1))) We apply HYPOTHESIS to E37 with induction hypothesis H1 and substitution [x := x1, y := y1, z := s(z1)]. To this end, we impose the requirement that minus(minus(s(x1), s(y1)), s(z1)) ≻ minus(minus(x1, s(z1)), y1). This yields E38: (minus(minus(s(x1), s(y1)), s(z1)) , minus(minus(x1, s(z1)), y1) ≈ minus(minus(x1, z1), s(y1)) , minus(minus(s(x1), s(z1)), s(y1))) We apply HYPOTHESIS to E38 with induction hypothesis H1 and substitution [x := x1, y := z1, z := s(y1)]. To this end, we impose the requirement that minus(minus(s(x1), s(z1)), s(y1)) ≻ minus(minus(x1, s(y1)), z1). This yields E39: (minus(minus(s(x1), s(y1)), s(z1)) , minus(minus(x1, s(z1)), y1) ≈ minus(minus(x1, s(y1)), z1) , minus(minus(s(x1), s(z1)), s(y1))) We apply CASE on the instance of x1. This yields the following new equations: E40: (minus(minus(s(s(x2)), s(y1)), s(z1)) , minus(minus(s(x2), s(z1)), y1) ≈ minus(minus(s(x2), s(y1)), z1) , minus(minus(s(s(x2)), s(z1)), s(y1))) E41: (minus(minus(s(zero), s(y1)), s(z1)) , minus(minus(zero, s(z1)), y1) ≈ minus(minus(zero, s(y1)), z1) , minus(minus(s(zero), s(z1)), s(y1))) We apply SIMPLIFICATION to E41 with rule R4 and substitution [y := s(z1)]. This yields E42: (minus(minus(s(zero), s(y1)), s(z1)) , minus(zero, y1) ≈ minus(minus(zero, s(y1)), z1) , minus(minus(s(zero), s(z1)), s(y1))) We apply SIMPLIFICATION to E42 with rule R4 and substitution [y := y1]. This yields E43: (minus(minus(s(zero), s(y1)), s(z1)) , zero ≈ minus(minus(zero, s(y1)), z1) , minus(minus(s(zero), s(z1)), s(y1))) We apply SIMPLIFICATION to E43 with rule R4 and substitution [y := s(y1)]. This yields E44: (minus(minus(s(zero), s(y1)), s(z1)) , zero ≈ minus(zero, z1) , minus(minus(s(zero), s(z1)), s(y1))) We apply SIMPLIFICATION to E44 with rule R4 and substitution [y := z1]. This yields E45: (minus(minus(s(zero), s(y1)), s(z1)) , zero ≈ zero , minus(minus(s(zero), s(z1)), s(y1))) We apply DELETION to E45 because both sides are equal. Thus, we may remove this equation from the proof state. We apply SIMPLIFICATION to E40 with rule R6 and substitution [x := x2, y := z1]. This yields E46: (minus(minus(s(s(x2)), s(y1)), s(z1)) , minus(minus(x2, z1), y1) ≈ minus(minus(s(x2), s(y1)), z1) , minus(minus(s(s(x2)), s(z1)), s(y1))) We apply SIMPLIFICATION to E46 with rule R6 and substitution [x := x2, y := y1]. This yields E47: (minus(minus(s(s(x2)), s(y1)), s(z1)) , minus(minus(x2, z1), y1) ≈ minus(minus(x2, y1), z1) , minus(minus(s(s(x2)), s(z1)), s(y1))) We apply HDELETE to E47 with induction hypothesis H1 and substitution [x := x2, y := z1, z := y1]. All equations have been removed, so the proof is complete: the original equations are inductive theorems. The existence of a suitable bounding pair is guaranteed by the termination of the corresponding term rewriting systems, as is demonstrated below. We consider termination of the MSTRS with no additional rule schemes: Signature: app :: list → list → list cons :: nat → list → list len :: list → nat max :: nat → nat → nat minus :: nat → nat → nat nil :: list plus :: nat → nat → nat qrev :: list → list → list s :: nat → nat sum :: list → nat times :: nat → nat → nat zero :: nat Rules: max(zero, y) → y max(x, zero) → x max(s(x), s(y)) → s(max(x, y)) minus(zero, y) → zero minus(s(x), zero) → s(x) minus(s(x), s(y)) → minus(x, y) plus(zero, y) → y plus(s(x), y) → s(plus(x, y)) times(zero, y) → zero times(s(x), y) → plus(y, times(x, y)) len(nil) → zero len(cons(x, y)) → s(len(y)) sum(nil) → zero sum(cons(x, y)) → plus(x, sum(y)) app(nil, z) → z app(cons(x, y), z) → cons(x, app(y, z)) qrev(nil, ys) → ys qrev(cons(x, xs), ys) → qrev(xs, cons(x, ys)) minus(minus(s(x), s(y)), s(z)) → minus(minus(x, s(z)), y) minus(minus(s(x), s(z)), s(y)) → minus(minus(x, s(y)), z) The system is accessible function passing by a sort ordering that equates all sorts. We start by computing the initial DP problem D1 = (P1, R, f, c), where: P1. (1) max#(s(x), s(y)) ➡ max#(x, y) (2) minus#(s(x), s(y)) ➡ minus#(x, y) (3) plus#(s(x), y) ➡ plus#(x, y) (4) times#(s(x), y) ➡ times#(x, y) (5) times#(s(x), y) ➡ plus#(y, times(x, y)) (6) len#(cons(x, y)) ➡ len#(y) (7) sum#(cons(x, y)) ➡ sum#(y) (8) sum#(cons(x, y)) ➡ plus#(x, sum(y)) (9) app#(cons(x, y), z) ➡ app#(y, z) (10) qrev#(cons(x, xs), ys) ➡ qrev#(xs, cons(x, ys)) (11) minus#(minus(s(x), s(y)), s(z)) ➡ minus#(x, s(z)) (12) minus#(minus(s(x), s(y)), s(z)) ➡ minus#(minus(x, s(z)), y) (13) minus#(minus(s(x), s(z)), s(y)) ➡ minus#(x, s(y)) (14) minus#(minus(s(x), s(z)), s(y)) ➡ minus#(minus(x, s(y)), z) ***** We apply the Graph Processor on D1 = (P1, R, f, c). We compute a graph approximation with the following edges: 1: 1 2: 2 11 12 13 14 3: 3 4: 4 5 5: 3 6: 6 7: 7 8 8: 3 9: 9 10: 10 11: 2 11 12 13 14 12: 2 11 12 13 14 13: 2 11 12 13 14 14: 2 11 12 13 14 There are 8 SCCs. Processor output: { D2 = (P2, R, f, c) ; D3 = (P3, R, f, c) ; D4 = (P4, R, f, c) ; D5 = (P5, R, f, c) ; D6 = (P6, R, f, c) ; D7 = (P7, R, f, c) ; D8 = (P8, R, f, c) ; D9 = (P9, R, f, c) }, where: P2. (1) max#(s(x), s(y)) ➡ max#(x, y) P3. (1) minus#(s(x), s(y)) ➡ minus#(x, y) (2) minus#(minus(s(x), s(y)), s(z)) ➡ minus#(x, s(z)) (3) minus#(minus(s(x), s(y)), s(z)) ➡ minus#(minus(x, s(z)), y) (4) minus#(minus(s(x), s(z)), s(y)) ➡ minus#(x, s(y)) (5) minus#(minus(s(x), s(z)), s(y)) ➡ minus#(minus(x, s(y)), z) P4. (1) plus#(s(x), y) ➡ plus#(x, y) P5. (1) times#(s(x), y) ➡ times#(x, y) P6. (1) len#(cons(x, y)) ➡ len#(y) P7. (1) sum#(cons(x, y)) ➡ sum#(y) P8. (1) app#(cons(x, y), z) ➡ app#(y, z) P9. (1) qrev#(cons(x, xs), ys) ➡ qrev#(xs, cons(x, ys)) ***** We apply the Subterm Criterion Processor on D2 = (P2, R, f, c). We use the following projection function: ν(max#) = 1 We thus have: (1) s(x) ⊳ x All DPs are strictly oriented, and may be removed. Hence, this DP problem is finite. Processor output: { }. ***** We apply the Reduction Pair [with HORPO] Processor on D3 = (P3, R, f, c). Constrained HORPO yields: minus#(s(x), s(y)) ≻ minus#(x, y) minus#(minus(s(x), s(y)), s(z)) ≻ minus#(x, s(z)) minus#(minus(s(x), s(y)), s(z)) ≻ minus#(minus(x, s(z)), y) minus#(minus(s(x), s(z)), s(y)) ≻ minus#(x, s(y)) minus#(minus(s(x), s(z)), s(y)) ≻ minus#(minus(x, s(y)), z) max(zero, y) ≽ y max(x, zero) ≽ x max(s(x), s(y)) ≽ s(max(x, y)) minus(zero, y) ≽ zero minus(s(x), zero) ≽ s(x) minus(s(x), s(y)) ≽ minus(x, y) plus(zero, y) ≽ y plus(s(x), y) ≽ s(plus(x, y)) times(zero, y) ≽ zero times(s(x), y) ≽ plus(y, times(x, y)) len(nil) ≽ zero len(cons(x, y)) ≽ s(len(y)) sum(nil) ≽ zero sum(cons(x, y)) ≽ plus(x, sum(y)) app(nil, z) ≽ z app(cons(x, y), z) ≽ cons(x, app(y, z)) qrev(nil, ys) ≽ ys qrev(cons(x, xs), ys) ≽ qrev(xs, cons(x, ys)) minus(minus(s(x), s(y)), s(z)) ≽ minus(minus(x, s(z)), y) minus(minus(s(x), s(z)), s(y)) ≽ minus(minus(x, s(y)), z) We do this using the following settings: * Disregarded arguments: minus 2 minus# 2 * Precedence and permutation: sum { 1 } = times { 1 2 } > app { 1 2 } = max { 1 2 } = plus { 1 } 2 = qrev { 1 } 2 > cons { 1 2 } = len { 1 } = minus { 1 } = nil { } = s { 1 } = zero { } > minus# { } 1 * Well-founded theory orderings: ⊐_{Bool} = {(true,false)} ⊐_{Int} = {(x,y) | x < 1000 ∧ x < y } All dependency pairs were removed. Processor output: { }. ***** We apply the Subterm Criterion Processor on D4 = (P4, R, f, c). We use the following projection function: ν(plus#) = 1 We thus have: (1) s(x) ⊳ x All DPs are strictly oriented, and may be removed. Hence, this DP problem is finite. Processor output: { }. ***** We apply the Subterm Criterion Processor on D5 = (P5, R, f, c). We use the following projection function: ν(times#) = 1 We thus have: (1) s(x) ⊳ x All DPs are strictly oriented, and may be removed. Hence, this DP problem is finite. Processor output: { }. ***** We apply the Subterm Criterion Processor on D6 = (P6, R, f, c). We use the following projection function: ν(len#) = 1 We thus have: (1) cons(x, y) ⊳ y All DPs are strictly oriented, and may be removed. Hence, this DP problem is finite. Processor output: { }. ***** We apply the Subterm Criterion Processor on D7 = (P7, R, f, c). We use the following projection function: ν(sum#) = 1 We thus have: (1) cons(x, y) ⊳ y All DPs are strictly oriented, and may be removed. Hence, this DP problem is finite. Processor output: { }. ***** We apply the Subterm Criterion Processor on D8 = (P8, R, f, c). We use the following projection function: ν(app#) = 1 We thus have: (1) cons(x, y) ⊳ y All DPs are strictly oriented, and may be removed. Hence, this DP problem is finite. Processor output: { }. ***** We apply the Subterm Criterion Processor on D9 = (P9, R, f, c). We use the following projection function: ν(qrev#) = 1 We thus have: (1) cons(x, xs) ⊳ xs All DPs are strictly oriented, and may be removed. Hence, this DP problem is finite. Processor output: { }. Steps: induct case x simplify R4 l1 with [y := y] simplify R4 l with [y := z] simplify R4 r1 with [y := z] simplify R4 r with [y := y] delete case y simplify R5 l1 with [x := x1] case z simplify R5 l with [x := x1] simplify R5 r1 with [x := x1] simplify R5 r with [x := x1] delete simplify R6 l with [x := x1, y := z1] simplify R6 r1 with [x := x1, y := z1] induct case x1 simplify R4 l with [y := z1] simplify R4 r1 with [y := z1] simplify R4 r with [y := zero] delete case z1 simplify R5 l with [x := x2] simplify R5 r1 with [x := x2] simplify R5 r with [x := x2] delete simplify R6 l with [x := x2, y := z2] simplify R6 r1 with [x := x2, y := z2] hdelete H18 l with [x1 := x2, z1 := z2] simplify R6 l1 with [x := x1, y := y1] case z simplify R5 r1 with [x := x1] simplify R6 r with [x := x1, y := y1] hdelete H18^{-1} l with [x1 := x1, z1 := y1] simplify R6 r1 with [x := x1, y := z1] hypothesis H1 l with [x := x1, y := y1, z := s(z1)] hypothesis H1 r with [x := x1, y := z1, z := s(y1)] case x1 simplify R4 l1 with [y := s(z1)] simplify R4 l with [y := y1] simplify R4 r1 with [y := s(y1)] simplify R4 r with [y := z1] delete simplify R6 l1 with [x := x2, y := z1] simplify R6 r1 with [x := x2, y := y1] hdelete H1 l with [x := x2, y := z1, z := y1]