/export/starexec/sandbox/solver/bin/starexec_run_standard /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Termination w.r.t. Q of the given QTRS could be proven: (0) QTRS (1) Overlay + Local Confluence [EQUIVALENT, 10 ms] (2) QTRS (3) DependencyPairsProof [EQUIVALENT, 0 ms] (4) QDP (5) DependencyGraphProof [EQUIVALENT, 0 ms] (6) AND (7) QDP (8) UsableRulesProof [EQUIVALENT, 0 ms] (9) QDP (10) QReductionProof [EQUIVALENT, 0 ms] (11) QDP (12) QDPSizeChangeProof [EQUIVALENT, 0 ms] (13) YES (14) QDP (15) UsableRulesProof [EQUIVALENT, 0 ms] (16) QDP (17) QReductionProof [EQUIVALENT, 0 ms] (18) QDP (19) QDPSizeChangeProof [EQUIVALENT, 0 ms] (20) YES (21) QDP (22) UsableRulesProof [EQUIVALENT, 0 ms] (23) QDP (24) QReductionProof [EQUIVALENT, 0 ms] (25) QDP (26) QDPSizeChangeProof [EQUIVALENT, 0 ms] (27) YES (28) QDP (29) UsableRulesProof [EQUIVALENT, 0 ms] (30) QDP (31) QReductionProof [EQUIVALENT, 0 ms] (32) QDP (33) NonInfProof [EQUIVALENT, 46 ms] (34) QDP (35) TransformationProof [EQUIVALENT, 0 ms] (36) QDP (37) DependencyGraphProof [EQUIVALENT, 0 ms] (38) QDP (39) TransformationProof [EQUIVALENT, 0 ms] (40) QDP (41) DependencyGraphProof [EQUIVALENT, 0 ms] (42) QDP (43) TransformationProof [EQUIVALENT, 0 ms] (44) QDP (45) TransformationProof [EQUIVALENT, 0 ms] (46) QDP (47) TransformationProof [EQUIVALENT, 0 ms] (48) QDP (49) TransformationProof [EQUIVALENT, 0 ms] (50) QDP (51) Induction-Processor [SOUND, 46 ms] (52) AND (53) QDP (54) DependencyGraphProof [EQUIVALENT, 0 ms] (55) TRUE (56) QTRS (57) QTRSRRRProof [EQUIVALENT, 49 ms] (58) QTRS (59) RisEmptyProof [EQUIVALENT, 0 ms] (60) YES ---------------------------------------- (0) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: minus(s(x), y) -> if(gt(s(x), y), x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 gcd(x, y) -> if1(ge(x, y), x, y) if1(true, x, y) -> if2(gt(y, 0), x, y) if1(false, x, y) -> gcd(y, x) if2(true, x, y) -> gcd(minus(x, y), y) if2(false, x, y) -> x gt(0, y) -> false gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) Q is empty. ---------------------------------------- (1) Overlay + Local Confluence (EQUIVALENT) The TRS is overlay and locally confluent. By [NOC] we can switch to innermost. ---------------------------------------- (2) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: minus(s(x), y) -> if(gt(s(x), y), x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 gcd(x, y) -> if1(ge(x, y), x, y) if1(true, x, y) -> if2(gt(y, 0), x, y) if1(false, x, y) -> gcd(y, x) if2(true, x, y) -> gcd(minus(x, y), y) if2(false, x, y) -> x gt(0, y) -> false gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gcd(x0, x1) if1(true, x0, x1) if1(false, x0, x1) if2(true, x0, x1) if2(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) ---------------------------------------- (3) DependencyPairsProof (EQUIVALENT) Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem. ---------------------------------------- (4) Obligation: Q DP problem: The TRS P consists of the following rules: MINUS(s(x), y) -> IF(gt(s(x), y), x, y) MINUS(s(x), y) -> GT(s(x), y) IF(true, x, y) -> MINUS(x, y) GCD(x, y) -> IF1(ge(x, y), x, y) GCD(x, y) -> GE(x, y) IF1(true, x, y) -> IF2(gt(y, 0), x, y) IF1(true, x, y) -> GT(y, 0) IF1(false, x, y) -> GCD(y, x) IF2(true, x, y) -> GCD(minus(x, y), y) IF2(true, x, y) -> MINUS(x, y) GT(s(x), s(y)) -> GT(x, y) GE(s(x), s(y)) -> GE(x, y) The TRS R consists of the following rules: minus(s(x), y) -> if(gt(s(x), y), x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 gcd(x, y) -> if1(ge(x, y), x, y) if1(true, x, y) -> if2(gt(y, 0), x, y) if1(false, x, y) -> gcd(y, x) if2(true, x, y) -> gcd(minus(x, y), y) if2(false, x, y) -> x gt(0, y) -> false gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gcd(x0, x1) if1(true, x0, x1) if1(false, x0, x1) if2(true, x0, x1) if2(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (5) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 4 SCCs with 4 less nodes. ---------------------------------------- (6) Complex Obligation (AND) ---------------------------------------- (7) Obligation: Q DP problem: The TRS P consists of the following rules: GE(s(x), s(y)) -> GE(x, y) The TRS R consists of the following rules: minus(s(x), y) -> if(gt(s(x), y), x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 gcd(x, y) -> if1(ge(x, y), x, y) if1(true, x, y) -> if2(gt(y, 0), x, y) if1(false, x, y) -> gcd(y, x) if2(true, x, y) -> gcd(minus(x, y), y) if2(false, x, y) -> x gt(0, y) -> false gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gcd(x0, x1) if1(true, x0, x1) if1(false, x0, x1) if2(true, x0, x1) if2(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (8) UsableRulesProof (EQUIVALENT) 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. ---------------------------------------- (9) Obligation: Q DP problem: The TRS P consists of the following rules: GE(s(x), s(y)) -> GE(x, y) R is empty. The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gcd(x0, x1) if1(true, x0, x1) if1(false, x0, x1) if2(true, x0, x1) if2(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (10) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gcd(x0, x1) if1(true, x0, x1) if1(false, x0, x1) if2(true, x0, x1) if2(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) ---------------------------------------- (11) Obligation: Q DP problem: The TRS P consists of the following rules: GE(s(x), s(y)) -> GE(x, y) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (12) 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: *GE(s(x), s(y)) -> GE(x, y) The graph contains the following edges 1 > 1, 2 > 2 ---------------------------------------- (13) YES ---------------------------------------- (14) Obligation: Q DP problem: The TRS P consists of the following rules: GT(s(x), s(y)) -> GT(x, y) The TRS R consists of the following rules: minus(s(x), y) -> if(gt(s(x), y), x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 gcd(x, y) -> if1(ge(x, y), x, y) if1(true, x, y) -> if2(gt(y, 0), x, y) if1(false, x, y) -> gcd(y, x) if2(true, x, y) -> gcd(minus(x, y), y) if2(false, x, y) -> x gt(0, y) -> false gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gcd(x0, x1) if1(true, x0, x1) if1(false, x0, x1) if2(true, x0, x1) if2(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (15) UsableRulesProof (EQUIVALENT) 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. ---------------------------------------- (16) Obligation: Q DP problem: The TRS P consists of the following rules: GT(s(x), s(y)) -> GT(x, y) R is empty. The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gcd(x0, x1) if1(true, x0, x1) if1(false, x0, x1) if2(true, x0, x1) if2(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (17) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gcd(x0, x1) if1(true, x0, x1) if1(false, x0, x1) if2(true, x0, x1) if2(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) ---------------------------------------- (18) Obligation: Q DP problem: The TRS P consists of the following rules: GT(s(x), s(y)) -> GT(x, y) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (19) 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: *GT(s(x), s(y)) -> GT(x, y) The graph contains the following edges 1 > 1, 2 > 2 ---------------------------------------- (20) YES ---------------------------------------- (21) Obligation: Q DP problem: The TRS P consists of the following rules: IF(true, x, y) -> MINUS(x, y) MINUS(s(x), y) -> IF(gt(s(x), y), x, y) The TRS R consists of the following rules: minus(s(x), y) -> if(gt(s(x), y), x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 gcd(x, y) -> if1(ge(x, y), x, y) if1(true, x, y) -> if2(gt(y, 0), x, y) if1(false, x, y) -> gcd(y, x) if2(true, x, y) -> gcd(minus(x, y), y) if2(false, x, y) -> x gt(0, y) -> false gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gcd(x0, x1) if1(true, x0, x1) if1(false, x0, x1) if2(true, x0, x1) if2(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (22) UsableRulesProof (EQUIVALENT) 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. ---------------------------------------- (23) Obligation: Q DP problem: The TRS P consists of the following rules: IF(true, x, y) -> MINUS(x, y) MINUS(s(x), y) -> IF(gt(s(x), y), x, y) The TRS R consists of the following rules: gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) gt(0, y) -> false The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gcd(x0, x1) if1(true, x0, x1) if1(false, x0, x1) if2(true, x0, x1) if2(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (24) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gcd(x0, x1) if1(true, x0, x1) if1(false, x0, x1) if2(true, x0, x1) if2(false, x0, x1) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) ---------------------------------------- (25) Obligation: Q DP problem: The TRS P consists of the following rules: IF(true, x, y) -> MINUS(x, y) MINUS(s(x), y) -> IF(gt(s(x), y), x, y) The TRS R consists of the following rules: gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) gt(0, y) -> false The set Q consists of the following terms: gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (26) 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: *MINUS(s(x), y) -> IF(gt(s(x), y), x, y) The graph contains the following edges 1 > 2, 2 >= 3 *IF(true, x, y) -> MINUS(x, y) The graph contains the following edges 2 >= 1, 3 >= 2 ---------------------------------------- (27) YES ---------------------------------------- (28) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(true, x, y) -> GCD(minus(x, y), y) GCD(x, y) -> IF1(ge(x, y), x, y) IF1(true, x, y) -> IF2(gt(y, 0), x, y) IF1(false, x, y) -> GCD(y, x) The TRS R consists of the following rules: minus(s(x), y) -> if(gt(s(x), y), x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 gcd(x, y) -> if1(ge(x, y), x, y) if1(true, x, y) -> if2(gt(y, 0), x, y) if1(false, x, y) -> gcd(y, x) if2(true, x, y) -> gcd(minus(x, y), y) if2(false, x, y) -> x gt(0, y) -> false gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gcd(x0, x1) if1(true, x0, x1) if1(false, x0, x1) if2(true, x0, x1) if2(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (29) UsableRulesProof (EQUIVALENT) 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. ---------------------------------------- (30) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(true, x, y) -> GCD(minus(x, y), y) GCD(x, y) -> IF1(ge(x, y), x, y) IF1(true, x, y) -> IF2(gt(y, 0), x, y) IF1(false, x, y) -> GCD(y, x) The TRS R consists of the following rules: gt(0, y) -> false gt(s(x), 0) -> true ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) minus(s(x), y) -> if(gt(s(x), y), x, y) gt(s(x), s(y)) -> gt(x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gcd(x0, x1) if1(true, x0, x1) if1(false, x0, x1) if2(true, x0, x1) if2(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (31) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. gcd(x0, x1) if1(true, x0, x1) if1(false, x0, x1) if2(true, x0, x1) if2(false, x0, x1) ---------------------------------------- (32) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(true, x, y) -> GCD(minus(x, y), y) GCD(x, y) -> IF1(ge(x, y), x, y) IF1(true, x, y) -> IF2(gt(y, 0), x, y) IF1(false, x, y) -> GCD(y, x) The TRS R consists of the following rules: gt(0, y) -> false gt(s(x), 0) -> true ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) minus(s(x), y) -> if(gt(s(x), y), x, y) gt(s(x), s(y)) -> gt(x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (33) NonInfProof (EQUIVALENT) The DP Problem is simplified using the Induction Calculus [NONINF] with the following steps: Note that final constraints are written in bold face. For Pair IF2(true, x, y) -> GCD(minus(x, y), y) the following chains were created: *We consider the chain IF1(true, x4, x5) -> IF2(gt(x5, 0), x4, x5), IF2(true, x6, x7) -> GCD(minus(x6, x7), x7) which results in the following constraint: (1) (IF2(gt(x5, 0), x4, x5)=IF2(true, x6, x7) ==> IF2(true, x6, x7)_>=_GCD(minus(x6, x7), x7)) We simplified constraint (1) using rules (I), (II), (III), (VII) which results in the following new constraint: (2) (0=x42 & gt(x5, x42)=true ==> IF2(true, x4, x5)_>=_GCD(minus(x4, x5), x5)) We simplified constraint (2) using rule (V) (with possible (I) afterwards) using induction on gt(x5, x42)=true which results in the following new constraints: (3) (true=true & 0=0 ==> IF2(true, x4, s(x44))_>=_GCD(minus(x4, s(x44)), s(x44))) (4) (gt(x46, x45)=true & 0=s(x45) & (\/x47:gt(x46, x45)=true & 0=x45 ==> IF2(true, x47, x46)_>=_GCD(minus(x47, x46), x46)) ==> IF2(true, x4, s(x46))_>=_GCD(minus(x4, s(x46)), s(x46))) We simplified constraint (3) using rules (I), (II) which results in the following new constraint: (5) (IF2(true, x4, s(x44))_>=_GCD(minus(x4, s(x44)), s(x44))) We solved constraint (4) using rules (I), (II). For Pair GCD(x, y) -> IF1(ge(x, y), x, y) the following chains were created: *We consider the chain IF2(true, x10, x11) -> GCD(minus(x10, x11), x11), GCD(x12, x13) -> IF1(ge(x12, x13), x12, x13) which results in the following constraint: (1) (GCD(minus(x10, x11), x11)=GCD(x12, x13) ==> GCD(x12, x13)_>=_IF1(ge(x12, x13), x12, x13)) We simplified constraint (1) using rules (I), (II), (III), (IV) which results in the following new constraint: (2) (GCD(x12, x11)_>=_IF1(ge(x12, x11), x12, x11)) *We consider the chain IF1(false, x18, x19) -> GCD(x19, x18), GCD(x20, x21) -> IF1(ge(x20, x21), x20, x21) which results in the following constraint: (1) (GCD(x19, x18)=GCD(x20, x21) ==> GCD(x20, x21)_>=_IF1(ge(x20, x21), x20, x21)) We simplified constraint (1) using rules (I), (II), (III) which results in the following new constraint: (2) (GCD(x19, x18)_>=_IF1(ge(x19, x18), x19, x18)) For Pair IF1(true, x, y) -> IF2(gt(y, 0), x, y) the following chains were created: *We consider the chain GCD(x24, x25) -> IF1(ge(x24, x25), x24, x25), IF1(true, x26, x27) -> IF2(gt(x27, 0), x26, x27) which results in the following constraint: (1) (IF1(ge(x24, x25), x24, x25)=IF1(true, x26, x27) ==> IF1(true, x26, x27)_>=_IF2(gt(x27, 0), x26, x27)) We simplified constraint (1) using rules (I), (II), (III) which results in the following new constraint: (2) (ge(x24, x25)=true ==> IF1(true, x24, x25)_>=_IF2(gt(x25, 0), x24, x25)) We simplified constraint (2) using rule (V) (with possible (I) afterwards) using induction on ge(x24, x25)=true which results in the following new constraints: (3) (true=true ==> IF1(true, x48, 0)_>=_IF2(gt(0, 0), x48, 0)) (4) (ge(x51, x50)=true & (ge(x51, x50)=true ==> IF1(true, x51, x50)_>=_IF2(gt(x50, 0), x51, x50)) ==> IF1(true, s(x51), s(x50))_>=_IF2(gt(s(x50), 0), s(x51), s(x50))) We simplified constraint (3) using rules (I), (II) which results in the following new constraint: (5) (IF1(true, x48, 0)_>=_IF2(gt(0, 0), x48, 0)) We simplified constraint (4) using rule (VI) where we applied the induction hypothesis (ge(x51, x50)=true ==> IF1(true, x51, x50)_>=_IF2(gt(x50, 0), x51, x50)) with sigma = [ ] which results in the following new constraint: (6) (IF1(true, x51, x50)_>=_IF2(gt(x50, 0), x51, x50) ==> IF1(true, s(x51), s(x50))_>=_IF2(gt(s(x50), 0), s(x51), s(x50))) For Pair IF1(false, x, y) -> GCD(y, x) the following chains were created: *We consider the chain GCD(x34, x35) -> IF1(ge(x34, x35), x34, x35), IF1(false, x36, x37) -> GCD(x37, x36) which results in the following constraint: (1) (IF1(ge(x34, x35), x34, x35)=IF1(false, x36, x37) ==> IF1(false, x36, x37)_>=_GCD(x37, x36)) We simplified constraint (1) using rules (I), (II), (III) which results in the following new constraint: (2) (ge(x34, x35)=false ==> IF1(false, x34, x35)_>=_GCD(x35, x34)) We simplified constraint (2) using rule (V) (with possible (I) afterwards) using induction on ge(x34, x35)=false which results in the following new constraints: (3) (false=false ==> IF1(false, 0, s(x53))_>=_GCD(s(x53), 0)) (4) (ge(x55, x54)=false & (ge(x55, x54)=false ==> IF1(false, x55, x54)_>=_GCD(x54, x55)) ==> IF1(false, s(x55), s(x54))_>=_GCD(s(x54), s(x55))) We simplified constraint (3) using rules (I), (II) which results in the following new constraint: (5) (IF1(false, 0, s(x53))_>=_GCD(s(x53), 0)) We simplified constraint (4) using rule (VI) where we applied the induction hypothesis (ge(x55, x54)=false ==> IF1(false, x55, x54)_>=_GCD(x54, x55)) with sigma = [ ] which results in the following new constraint: (6) (IF1(false, x55, x54)_>=_GCD(x54, x55) ==> IF1(false, s(x55), s(x54))_>=_GCD(s(x54), s(x55))) To summarize, we get the following constraints P__>=_ for the following pairs. *IF2(true, x, y) -> GCD(minus(x, y), y) *(IF2(true, x4, s(x44))_>=_GCD(minus(x4, s(x44)), s(x44))) *GCD(x, y) -> IF1(ge(x, y), x, y) *(GCD(x12, x11)_>=_IF1(ge(x12, x11), x12, x11)) *(GCD(x19, x18)_>=_IF1(ge(x19, x18), x19, x18)) *IF1(true, x, y) -> IF2(gt(y, 0), x, y) *(IF1(true, x48, 0)_>=_IF2(gt(0, 0), x48, 0)) *(IF1(true, x51, x50)_>=_IF2(gt(x50, 0), x51, x50) ==> IF1(true, s(x51), s(x50))_>=_IF2(gt(s(x50), 0), s(x51), s(x50))) *IF1(false, x, y) -> GCD(y, x) *(IF1(false, 0, s(x53))_>=_GCD(s(x53), 0)) *(IF1(false, x55, x54)_>=_GCD(x54, x55) ==> IF1(false, s(x55), s(x54))_>=_GCD(s(x54), s(x55))) The constraints for P_> respective P_bound are constructed from P__>=_ where we just replace every occurence of "t _>=_ s" in P__>=_ by "t > s" respective "t _>=_ c". Here c stands for the fresh constant used for P_bound. Using the following integer polynomial ordering the resulting constraints can be solved Polynomial interpretation [NONINF]: POL(0) = 0 POL(GCD(x_1, x_2)) = -1 + x_2 POL(IF1(x_1, x_2, x_3)) = -1 - x_1 + x_3 POL(IF2(x_1, x_2, x_3)) = -1 - x_1 + x_3 POL(c) = -1 POL(false) = 0 POL(ge(x_1, x_2)) = 0 POL(gt(x_1, x_2)) = 0 POL(if(x_1, x_2, x_3)) = 0 POL(minus(x_1, x_2)) = 0 POL(s(x_1)) = 1 + x_1 POL(true) = 0 The following pairs are in P_>: IF1(false, x, y) -> GCD(y, x) The following pairs are in P_bound: IF2(true, x, y) -> GCD(minus(x, y), y) GCD(x, y) -> IF1(ge(x, y), x, y) IF1(true, x, y) -> IF2(gt(y, 0), x, y) IF1(false, x, y) -> GCD(y, x) The following rules are usable: true -> ge(x, 0) false -> ge(0, s(x)) ge(x, y) -> ge(s(x), s(y)) false -> gt(0, y) true -> gt(s(x), 0) ---------------------------------------- (34) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(true, x, y) -> GCD(minus(x, y), y) GCD(x, y) -> IF1(ge(x, y), x, y) IF1(true, x, y) -> IF2(gt(y, 0), x, y) The TRS R consists of the following rules: gt(0, y) -> false gt(s(x), 0) -> true ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) minus(s(x), y) -> if(gt(s(x), y), x, y) gt(s(x), s(y)) -> gt(x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (35) TransformationProof (EQUIVALENT) By narrowing [LPAR04] the rule GCD(x, y) -> IF1(ge(x, y), x, y) at position [0] we obtained the following new rules [LPAR04]: (GCD(x0, 0) -> IF1(true, x0, 0),GCD(x0, 0) -> IF1(true, x0, 0)) (GCD(0, s(x0)) -> IF1(false, 0, s(x0)),GCD(0, s(x0)) -> IF1(false, 0, s(x0))) (GCD(s(x0), s(x1)) -> IF1(ge(x0, x1), s(x0), s(x1)),GCD(s(x0), s(x1)) -> IF1(ge(x0, x1), s(x0), s(x1))) ---------------------------------------- (36) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(true, x, y) -> GCD(minus(x, y), y) IF1(true, x, y) -> IF2(gt(y, 0), x, y) GCD(x0, 0) -> IF1(true, x0, 0) GCD(0, s(x0)) -> IF1(false, 0, s(x0)) GCD(s(x0), s(x1)) -> IF1(ge(x0, x1), s(x0), s(x1)) The TRS R consists of the following rules: gt(0, y) -> false gt(s(x), 0) -> true ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) minus(s(x), y) -> if(gt(s(x), y), x, y) gt(s(x), s(y)) -> gt(x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (37) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node. ---------------------------------------- (38) Obligation: Q DP problem: The TRS P consists of the following rules: GCD(x0, 0) -> IF1(true, x0, 0) IF1(true, x, y) -> IF2(gt(y, 0), x, y) IF2(true, x, y) -> GCD(minus(x, y), y) GCD(s(x0), s(x1)) -> IF1(ge(x0, x1), s(x0), s(x1)) The TRS R consists of the following rules: gt(0, y) -> false gt(s(x), 0) -> true ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) minus(s(x), y) -> if(gt(s(x), y), x, y) gt(s(x), s(y)) -> gt(x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (39) TransformationProof (EQUIVALENT) By narrowing [LPAR04] the rule IF1(true, x, y) -> IF2(gt(y, 0), x, y) at position [0] we obtained the following new rules [LPAR04]: (IF1(true, y0, 0) -> IF2(false, y0, 0),IF1(true, y0, 0) -> IF2(false, y0, 0)) (IF1(true, y0, s(x0)) -> IF2(true, y0, s(x0)),IF1(true, y0, s(x0)) -> IF2(true, y0, s(x0))) ---------------------------------------- (40) Obligation: Q DP problem: The TRS P consists of the following rules: GCD(x0, 0) -> IF1(true, x0, 0) IF2(true, x, y) -> GCD(minus(x, y), y) GCD(s(x0), s(x1)) -> IF1(ge(x0, x1), s(x0), s(x1)) IF1(true, y0, 0) -> IF2(false, y0, 0) IF1(true, y0, s(x0)) -> IF2(true, y0, s(x0)) The TRS R consists of the following rules: gt(0, y) -> false gt(s(x), 0) -> true ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) minus(s(x), y) -> if(gt(s(x), y), x, y) gt(s(x), s(y)) -> gt(x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (41) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes. ---------------------------------------- (42) Obligation: Q DP problem: The TRS P consists of the following rules: GCD(s(x0), s(x1)) -> IF1(ge(x0, x1), s(x0), s(x1)) IF1(true, y0, s(x0)) -> IF2(true, y0, s(x0)) IF2(true, x, y) -> GCD(minus(x, y), y) The TRS R consists of the following rules: gt(0, y) -> false gt(s(x), 0) -> true ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) minus(s(x), y) -> if(gt(s(x), y), x, y) gt(s(x), s(y)) -> gt(x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (43) TransformationProof (EQUIVALENT) By narrowing [LPAR04] the rule IF2(true, x, y) -> GCD(minus(x, y), y) at position [0] we obtained the following new rules [LPAR04]: (IF2(true, s(x0), x1) -> GCD(if(gt(s(x0), x1), x0, x1), x1),IF2(true, s(x0), x1) -> GCD(if(gt(s(x0), x1), x0, x1), x1)) ---------------------------------------- (44) Obligation: Q DP problem: The TRS P consists of the following rules: GCD(s(x0), s(x1)) -> IF1(ge(x0, x1), s(x0), s(x1)) IF1(true, y0, s(x0)) -> IF2(true, y0, s(x0)) IF2(true, s(x0), x1) -> GCD(if(gt(s(x0), x1), x0, x1), x1) The TRS R consists of the following rules: gt(0, y) -> false gt(s(x), 0) -> true ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) minus(s(x), y) -> if(gt(s(x), y), x, y) gt(s(x), s(y)) -> gt(x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (45) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule IF1(true, y0, s(x0)) -> IF2(true, y0, s(x0)) we obtained the following new rules [LPAR04]: (IF1(true, s(z0), s(z1)) -> IF2(true, s(z0), s(z1)),IF1(true, s(z0), s(z1)) -> IF2(true, s(z0), s(z1))) ---------------------------------------- (46) Obligation: Q DP problem: The TRS P consists of the following rules: GCD(s(x0), s(x1)) -> IF1(ge(x0, x1), s(x0), s(x1)) IF2(true, s(x0), x1) -> GCD(if(gt(s(x0), x1), x0, x1), x1) IF1(true, s(z0), s(z1)) -> IF2(true, s(z0), s(z1)) The TRS R consists of the following rules: gt(0, y) -> false gt(s(x), 0) -> true ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) minus(s(x), y) -> if(gt(s(x), y), x, y) gt(s(x), s(y)) -> gt(x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (47) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule IF2(true, s(x0), x1) -> GCD(if(gt(s(x0), x1), x0, x1), x1) we obtained the following new rules [LPAR04]: (IF2(true, s(z0), s(z1)) -> GCD(if(gt(s(z0), s(z1)), z0, s(z1)), s(z1)),IF2(true, s(z0), s(z1)) -> GCD(if(gt(s(z0), s(z1)), z0, s(z1)), s(z1))) ---------------------------------------- (48) Obligation: Q DP problem: The TRS P consists of the following rules: GCD(s(x0), s(x1)) -> IF1(ge(x0, x1), s(x0), s(x1)) IF1(true, s(z0), s(z1)) -> IF2(true, s(z0), s(z1)) IF2(true, s(z0), s(z1)) -> GCD(if(gt(s(z0), s(z1)), z0, s(z1)), s(z1)) The TRS R consists of the following rules: gt(0, y) -> false gt(s(x), 0) -> true ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) minus(s(x), y) -> if(gt(s(x), y), x, y) gt(s(x), s(y)) -> gt(x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (49) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule IF2(true, s(z0), s(z1)) -> GCD(if(gt(s(z0), s(z1)), z0, s(z1)), s(z1)) at position [0,0] we obtained the following new rules [LPAR04]: (IF2(true, s(z0), s(z1)) -> GCD(if(gt(z0, z1), z0, s(z1)), s(z1)),IF2(true, s(z0), s(z1)) -> GCD(if(gt(z0, z1), z0, s(z1)), s(z1))) ---------------------------------------- (50) Obligation: Q DP problem: The TRS P consists of the following rules: GCD(s(x0), s(x1)) -> IF1(ge(x0, x1), s(x0), s(x1)) IF1(true, s(z0), s(z1)) -> IF2(true, s(z0), s(z1)) IF2(true, s(z0), s(z1)) -> GCD(if(gt(z0, z1), z0, s(z1)), s(z1)) The TRS R consists of the following rules: gt(0, y) -> false gt(s(x), 0) -> true ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) minus(s(x), y) -> if(gt(s(x), y), x, y) gt(s(x), s(y)) -> gt(x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (51) Induction-Processor (SOUND) This DP could be deleted by the Induction-Processor: IF2(true_renamed, s(z0'), s(z1')) -> GCD(if(gt(z0', z1'), z0', s(z1')), s(z1')) This order was computed: Polynomial interpretation [POLO]: POL(0) = 0 POL(GCD(x_1, x_2)) = x_1 POL(IF1(x_1, x_2, x_3)) = x_2 POL(IF2(x_1, x_2, x_3)) = x_1 + x_2 POL(false_renamed) = 0 POL(ge(x_1, x_2)) = x_1 POL(gt(x_1, x_2)) = 0 POL(if(x_1, x_2, x_3)) = 1 + x_2 POL(minus(x_1, x_2)) = x_1 POL(s(x_1)) = 1 + x_1 POL(true_renamed) = 0 At least one of these decreasing rules is always used after the deleted DP: if(false_renamed, x5, y2) -> 0 The following formula is valid: z0':sort[a23],z1':sort[a23].if'(gt(z0', z1'), z0', s(z1'))=true The transformed set: if'(true_renamed, x4, y1) -> minus'(x4, y1) if'(false_renamed, x5, y2) -> true minus'(s(x6), y3) -> if'(gt(s(x6), y3), x6, y3) minus'(0, v43) -> false gt(0, y) -> false_renamed gt(s(x), 0) -> true_renamed ge(x', 0) -> true_renamed ge(0, s(x'')) -> false_renamed ge(s(x2), s(y')) -> ge(x2, y') gt(s(x3), s(y'')) -> gt(x3, y'') if(true_renamed, x4, y1) -> s(minus(x4, y1)) if(false_renamed, x5, y2) -> 0 minus(s(x6), y3) -> if(gt(s(x6), y3), x6, y3) minus(0, v43) -> 0 equal_bool(true, false) -> false equal_bool(false, true) -> false equal_bool(true, true) -> true equal_bool(false, false) -> true and(true, x) -> x and(false, x) -> false or(true, x) -> true or(false, x) -> x not(false) -> true not(true) -> false isa_true(true) -> true isa_true(false) -> false isa_false(true) -> false isa_false(false) -> true equal_sort[a23](0, 0) -> true equal_sort[a23](0, s(v45)) -> false equal_sort[a23](s(v46), 0) -> false equal_sort[a23](s(v46), s(v47)) -> equal_sort[a23](v46, v47) equal_sort[a22](false_renamed, false_renamed) -> true equal_sort[a22](false_renamed, true_renamed) -> false equal_sort[a22](true_renamed, false_renamed) -> false equal_sort[a22](true_renamed, true_renamed) -> true equal_sort[a40](witness_sort[a40], witness_sort[a40]) -> true The proof given by the theorem prover: The following output was given by the internal theorem prover:proof of internal # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Partial correctness of the following Program [x, v45, v46, v47, x5, y2, x6, y1, v43, y3, y, x3, y'', x', x'', x2, y'] equal_bool(true, false) -> false equal_bool(false, true) -> false equal_bool(true, true) -> true equal_bool(false, false) -> true true and x -> x false and x -> false true or x -> true false or x -> x not(false) -> true not(true) -> false isa_true(true) -> true isa_true(false) -> false isa_false(true) -> false isa_false(false) -> true equal_sort[a23](0, 0) -> true equal_sort[a23](0, s(v45)) -> false equal_sort[a23](s(v46), 0) -> false equal_sort[a23](s(v46), s(v47)) -> equal_sort[a23](v46, v47) equal_sort[a22](false_renamed, false_renamed) -> true equal_sort[a22](false_renamed, true_renamed) -> false equal_sort[a22](true_renamed, false_renamed) -> false equal_sort[a22](true_renamed, true_renamed) -> true equal_sort[a40](witness_sort[a40], witness_sort[a40]) -> true if'(false_renamed, x5, y2) -> true if'(true_renamed, s(x6), y1) -> if'(gt(s(x6), y1), x6, y1) if'(true_renamed, 0, y1) -> false minus'(0, v43) -> false equal_sort[a22](gt(s(x6), y3), true_renamed) -> true | minus'(s(x6), y3) -> minus'(x6, y3) equal_sort[a22](gt(s(x6), y3), true_renamed) -> false | minus'(s(x6), y3) -> true gt(0, y) -> false_renamed gt(s(x), 0) -> true_renamed gt(s(x3), s(y'')) -> gt(x3, y'') ge(x', 0) -> true_renamed ge(0, s(x'')) -> false_renamed ge(s(x2), s(y')) -> ge(x2, y') if(false_renamed, x5, y2) -> 0 if(true_renamed, s(x6), y1) -> s(if(gt(s(x6), y1), x6, y1)) if(true_renamed, 0, y1) -> s(0) minus(0, v43) -> 0 equal_sort[a22](gt(s(x6), y3), true_renamed) -> true | minus(s(x6), y3) -> s(minus(x6, y3)) equal_sort[a22](gt(s(x6), y3), true_renamed) -> false | minus(s(x6), y3) -> 0 using the following formula: z0':sort[a23],z1':sort[a23].if'(gt(z0', z1'), z0', s(z1'))=true could be successfully shown: (0) Formula (1) Induction by algorithm [EQUIVALENT, 0 ms] (2) AND (3) Formula (4) Symbolic evaluation [EQUIVALENT, 0 ms] (5) YES (6) Formula (7) Symbolic evaluation [EQUIVALENT, 0 ms] (8) Formula (9) Induction by data structure [EQUIVALENT, 0 ms] (10) AND (11) Formula (12) Symbolic evaluation [EQUIVALENT, 0 ms] (13) YES (14) Formula (15) Symbolic evaluation under hypothesis [EQUIVALENT, 0 ms] (16) YES (17) Formula (18) Symbolic evaluation [EQUIVALENT, 0 ms] (19) Formula (20) Hypothesis Lifting [EQUIVALENT, 0 ms] (21) Formula (22) Inverse Substitution [SOUND, 0 ms] (23) Formula (24) Inverse Substitution [SOUND, 0 ms] (25) Formula (26) Induction by algorithm [EQUIVALENT, 0 ms] (27) AND (28) Formula (29) Symbolic evaluation [EQUIVALENT, 0 ms] (30) YES (31) Formula (32) Symbolic evaluation [EQUIVALENT, 0 ms] (33) YES (34) Formula (35) Symbolic evaluation under hypothesis [EQUIVALENT, 0 ms] (36) YES ---------------------------------------- (0) Obligation: Formula: z0':sort[a23],z1':sort[a23].if'(gt(z0', z1'), z0', s(z1'))=true There are no hypotheses. ---------------------------------------- (1) Induction by algorithm (EQUIVALENT) Induction by algorithm gt(z0', z1') generates the following cases: 1. Base Case: Formula: y:sort[a23].if'(gt(0, y), 0, s(y))=true There are no hypotheses. 2. Base Case: Formula: x:sort[a23].if'(gt(s(x), 0), s(x), s(0))=true There are no hypotheses. 1. Step Case: Formula: x3:sort[a23],y'':sort[a23].if'(gt(s(x3), s(y'')), s(x3), s(s(y'')))=true Hypotheses: x3:sort[a23],y'':sort[a23].if'(gt(x3, y''), x3, s(y''))=true ---------------------------------------- (2) Complex Obligation (AND) ---------------------------------------- (3) Obligation: Formula: y:sort[a23].if'(gt(0, y), 0, s(y))=true There are no hypotheses. ---------------------------------------- (4) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (5) YES ---------------------------------------- (6) Obligation: Formula: x:sort[a23].if'(gt(s(x), 0), s(x), s(0))=true There are no hypotheses. ---------------------------------------- (7) Symbolic evaluation (EQUIVALENT) Could be shown by simple symbolic evaluation. ---------------------------------------- (8) Obligation: Formula: x:sort[a23].if'(gt(x, 0), x, s(0))=true There are no hypotheses. ---------------------------------------- (9) Induction by data structure (EQUIVALENT) Induction by data structure sort[a23] generates the following cases: 1. Base Case: Formula: if'(gt(0, 0), 0, s(0))=true There are no hypotheses. 1. Step Case: Formula: n:sort[a23].if'(gt(s(n), 0), s(n), s(0))=true Hypotheses: n:sort[a23].if'(gt(n, 0), n, s(0))=true ---------------------------------------- (10) Complex Obligation (AND) ---------------------------------------- (11) Obligation: Formula: if'(gt(0, 0), 0, s(0))=true There are no hypotheses. ---------------------------------------- (12) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (13) YES ---------------------------------------- (14) Obligation: Formula: n:sort[a23].if'(gt(s(n), 0), s(n), s(0))=true Hypotheses: n:sort[a23].if'(gt(n, 0), n, s(0))=true ---------------------------------------- (15) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: n:sort[a23].if'(gt(n, 0), n, s(0))=true ---------------------------------------- (16) YES ---------------------------------------- (17) Obligation: Formula: x3:sort[a23],y'':sort[a23].if'(gt(s(x3), s(y'')), s(x3), s(s(y'')))=true Hypotheses: x3:sort[a23],y'':sort[a23].if'(gt(x3, y''), x3, s(y''))=true ---------------------------------------- (18) Symbolic evaluation (EQUIVALENT) Could be shown by simple symbolic evaluation. ---------------------------------------- (19) Obligation: Formula: x3:sort[a23],y'':sort[a23].if'(gt(x3, y''), s(x3), s(s(y'')))=true Hypotheses: x3:sort[a23],y'':sort[a23].if'(gt(x3, y''), x3, s(y''))=true ---------------------------------------- (20) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: x3:sort[a23],y'':sort[a23].(if'(gt(x3, y''), x3, s(y''))=true->if'(gt(x3, y''), s(x3), s(s(y'')))=true) There are no hypotheses. ---------------------------------------- (21) Obligation: Formula: x3:sort[a23],y'':sort[a23].(if'(gt(x3, y''), x3, s(y''))=true->if'(gt(x3, y''), s(x3), s(s(y'')))=true) There are no hypotheses. ---------------------------------------- (22) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n:sort[a22],x3:sort[a23],y'':sort[a23].(if'(n, x3, s(y''))=true->if'(n, s(x3), s(s(y'')))=true) Inverse substitution used: [gt(x3, y'')/n] ---------------------------------------- (23) Obligation: Formula: n:sort[a22],x3:sort[a23],y'':sort[a23].(if'(n, x3, s(y''))=true->if'(n, s(x3), s(s(y'')))=true) There are no hypotheses. ---------------------------------------- (24) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n:sort[a22],x3:sort[a23],n':sort[a23].(if'(n, x3, n')=true->if'(n, s(x3), s(n'))=true) Inverse substitution used: [s(y'')/n'] ---------------------------------------- (25) Obligation: Formula: n:sort[a22],x3:sort[a23],n':sort[a23].(if'(n, x3, n')=true->if'(n, s(x3), s(n'))=true) There are no hypotheses. ---------------------------------------- (26) Induction by algorithm (EQUIVALENT) Induction by algorithm if'(n, x3, n') generates the following cases: 1. Base Case: Formula: x5:sort[a23],y2:sort[a23].(if'(false_renamed, x5, y2)=true->if'(false_renamed, s(x5), s(y2))=true) There are no hypotheses. 2. Base Case: Formula: y1:sort[a23].(if'(true_renamed, 0, y1)=true->if'(true_renamed, s(0), s(y1))=true) There are no hypotheses. 1. Step Case: Formula: x6:sort[a23],y1:sort[a23].(if'(true_renamed, s(x6), y1)=true->if'(true_renamed, s(s(x6)), s(y1))=true) Hypotheses: x6:sort[a23],y1:sort[a23].(if'(gt(s(x6), y1), x6, y1)=true->if'(gt(s(x6), y1), s(x6), s(y1))=true) ---------------------------------------- (27) Complex Obligation (AND) ---------------------------------------- (28) Obligation: Formula: x5:sort[a23],y2:sort[a23].(if'(false_renamed, x5, y2)=true->if'(false_renamed, s(x5), s(y2))=true) There are no hypotheses. ---------------------------------------- (29) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (30) YES ---------------------------------------- (31) Obligation: Formula: y1:sort[a23].(if'(true_renamed, 0, y1)=true->if'(true_renamed, s(0), s(y1))=true) There are no hypotheses. ---------------------------------------- (32) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (33) YES ---------------------------------------- (34) Obligation: Formula: x6:sort[a23],y1:sort[a23].(if'(true_renamed, s(x6), y1)=true->if'(true_renamed, s(s(x6)), s(y1))=true) Hypotheses: x6:sort[a23],y1:sort[a23].(if'(gt(s(x6), y1), x6, y1)=true->if'(gt(s(x6), y1), s(x6), s(y1))=true) ---------------------------------------- (35) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: x6:sort[a23],y1:sort[a23].(if'(gt(s(x6), y1), x6, y1)=true->if'(gt(s(x6), y1), s(x6), s(y1))=true) ---------------------------------------- (36) YES ---------------------------------------- (52) Complex Obligation (AND) ---------------------------------------- (53) Obligation: Q DP problem: The TRS P consists of the following rules: GCD(s(x0), s(x1)) -> IF1(ge(x0, x1), s(x0), s(x1)) IF1(true, s(z0), s(z1)) -> IF2(true, s(z0), s(z1)) The TRS R consists of the following rules: gt(0, y) -> false gt(s(x), 0) -> true ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) minus(s(x), y) -> if(gt(s(x), y), x, y) gt(s(x), s(y)) -> gt(x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 The set Q consists of the following terms: minus(s(x0), x1) if(true, x0, x1) if(false, x0, x1) gt(0, x0) gt(s(x0), 0) gt(s(x0), s(x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (54) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 2 less nodes. ---------------------------------------- (55) TRUE ---------------------------------------- (56) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: if'(true_renamed, x4, y1) -> minus'(x4, y1) if'(false_renamed, x5, y2) -> true minus'(s(x6), y3) -> if'(gt(s(x6), y3), x6, y3) minus'(0, v43) -> false gt(0, y) -> false_renamed gt(s(x), 0) -> true_renamed ge(x', 0) -> true_renamed ge(0, s(x'')) -> false_renamed ge(s(x2), s(y')) -> ge(x2, y') gt(s(x3), s(y'')) -> gt(x3, y'') if(true_renamed, x4, y1) -> s(minus(x4, y1)) if(false_renamed, x5, y2) -> 0 minus(s(x6), y3) -> if(gt(s(x6), y3), x6, y3) minus(0, v43) -> 0 equal_bool(true, false) -> false equal_bool(false, true) -> false equal_bool(true, true) -> true equal_bool(false, false) -> true and(true, x) -> x and(false, x) -> false or(true, x) -> true or(false, x) -> x not(false) -> true not(true) -> false isa_true(true) -> true isa_true(false) -> false isa_false(true) -> false isa_false(false) -> true equal_sort[a23](0, 0) -> true equal_sort[a23](0, s(v45)) -> false equal_sort[a23](s(v46), 0) -> false equal_sort[a23](s(v46), s(v47)) -> equal_sort[a23](v46, v47) equal_sort[a22](false_renamed, false_renamed) -> true equal_sort[a22](false_renamed, true_renamed) -> false equal_sort[a22](true_renamed, false_renamed) -> false equal_sort[a22](true_renamed, true_renamed) -> true equal_sort[a40](witness_sort[a40], witness_sort[a40]) -> true Q is empty. ---------------------------------------- (57) QTRSRRRProof (EQUIVALENT) Used ordering: Quasi precedence: ge_2 > true_renamed ge_2 > false_renamed [if_3, minus_2] > [s_1, false] > true_renamed [if_3, minus_2] > [s_1, false] > false_renamed [if_3, minus_2] > [s_1, false] > gt_2 [if_3, minus_2] > 0 > false_renamed and_2 > [s_1, false] > true_renamed and_2 > [s_1, false] > false_renamed and_2 > [s_1, false] > gt_2 not_1 > [if'_3, minus'_2, true, equal_bool_2] > [s_1, false] > true_renamed not_1 > [if'_3, minus'_2, true, equal_bool_2] > [s_1, false] > false_renamed not_1 > [if'_3, minus'_2, true, equal_bool_2] > [s_1, false] > gt_2 isa_false_1 > [if'_3, minus'_2, true, equal_bool_2] > [s_1, false] > true_renamed isa_false_1 > [if'_3, minus'_2, true, equal_bool_2] > [s_1, false] > false_renamed isa_false_1 > [if'_3, minus'_2, true, equal_bool_2] > [s_1, false] > gt_2 equal_sort[a23]_2 > [if'_3, minus'_2, true, equal_bool_2] > [s_1, false] > true_renamed equal_sort[a23]_2 > [if'_3, minus'_2, true, equal_bool_2] > [s_1, false] > false_renamed equal_sort[a23]_2 > [if'_3, minus'_2, true, equal_bool_2] > [s_1, false] > gt_2 equal_sort[a22]_2 > [if'_3, minus'_2, true, equal_bool_2] > [s_1, false] > true_renamed equal_sort[a22]_2 > [if'_3, minus'_2, true, equal_bool_2] > [s_1, false] > false_renamed equal_sort[a22]_2 > [if'_3, minus'_2, true, equal_bool_2] > [s_1, false] > gt_2 witness_sort[a40] > [if'_3, minus'_2, true, equal_bool_2] > [s_1, false] > true_renamed witness_sort[a40] > [if'_3, minus'_2, true, equal_bool_2] > [s_1, false] > false_renamed witness_sort[a40] > [if'_3, minus'_2, true, equal_bool_2] > [s_1, false] > gt_2 Status: if'_3: [3,2,1] true_renamed: multiset status minus'_2: [2,1] false_renamed: multiset status true: multiset status s_1: multiset status gt_2: multiset status 0: multiset status false: multiset status ge_2: [2,1] if_3: [3,2,1] minus_2: [2,1] equal_bool_2: [2,1] and_2: [2,1] or_2: [2,1] not_1: [1] isa_true_1: multiset status isa_false_1: [1] equal_sort[a23]_2: [2,1] equal_sort[a22]_2: [2,1] equal_sort[a40]_2: [2,1] witness_sort[a40]: multiset status With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: if'(true_renamed, x4, y1) -> minus'(x4, y1) if'(false_renamed, x5, y2) -> true minus'(s(x6), y3) -> if'(gt(s(x6), y3), x6, y3) minus'(0, v43) -> false gt(0, y) -> false_renamed gt(s(x), 0) -> true_renamed ge(x', 0) -> true_renamed ge(0, s(x'')) -> false_renamed ge(s(x2), s(y')) -> ge(x2, y') gt(s(x3), s(y'')) -> gt(x3, y'') if(true_renamed, x4, y1) -> s(minus(x4, y1)) if(false_renamed, x5, y2) -> 0 minus(s(x6), y3) -> if(gt(s(x6), y3), x6, y3) minus(0, v43) -> 0 equal_bool(true, false) -> false equal_bool(false, true) -> false equal_bool(true, true) -> true equal_bool(false, false) -> true and(true, x) -> x and(false, x) -> false or(true, x) -> true or(false, x) -> x not(false) -> true not(true) -> false isa_true(true) -> true isa_true(false) -> false isa_false(true) -> false isa_false(false) -> true equal_sort[a23](0, 0) -> true equal_sort[a23](0, s(v45)) -> false equal_sort[a23](s(v46), 0) -> false equal_sort[a23](s(v46), s(v47)) -> equal_sort[a23](v46, v47) equal_sort[a22](false_renamed, false_renamed) -> true equal_sort[a22](false_renamed, true_renamed) -> false equal_sort[a22](true_renamed, false_renamed) -> false equal_sort[a22](true_renamed, true_renamed) -> true equal_sort[a40](witness_sort[a40], witness_sort[a40]) -> true ---------------------------------------- (58) Obligation: Q restricted rewrite system: R is empty. Q is empty. ---------------------------------------- (59) RisEmptyProof (EQUIVALENT) The TRS R is empty. Hence, termination is trivially proven. ---------------------------------------- (60) YES