YES
proof of /hpcwork/ff862203/termcomp26/benchmarks/C0r1b.pl
# AProVE Commit ID: 23a904c96b029b0a549cde0d0d17dbccf967db59 jckassing 20260626 unpublished dirty


Left Termination of the query pattern

goal()

w.r.t. the given Prolog program could successfully be proven:

(0) Prolog
(1) PrologToIRSwTTransformerProof [SOUND, 0 ms]
(2) IRSwT
(3) IRSwTSimpleDependencyGraphProof [EQUIVALENT, 0 ms]
(4) TRUE


----------------------------------------

(0)
Obligation:
Clauses:

even(s(s(X))) :- even(X).
even(0).
lte(s(X), s(Y)) :- lte(X, Y).
lte(0, Y).
goal :- ','(lte(X, s(s(s(s(0))))), even(X)).


Query: goal()
----------------------------------------

(1) PrologToIRSwTTransformerProof (SOUND)
Transformed Prolog program to IRSwT according to method in Master Thesis of A. Weinert

{
    "root": 2,
    "program": {
        "directives": [],
        "clauses": [
            [
                "(even (s (s X)))",
                "(even X)"
            ],
            [
                "(even (0))",
                null
            ],
            [
                "(lte (s X) (s Y))",
                "(lte X Y)"
            ],
            [
                "(lte (0) Y)",
                null
            ],
            [
                "(goal)",
                "(',' (lte X (s (s (s (s (0)))))) (even X))"
            ]
        ]
    },
    "graph": {
        "nodes": {
            "170": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(lte X56 (s (s (0))))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X56"],
                    "exprvars": []
                }
            },
            "171": {
                "goal": [
                    {
                        "clause": 2,
                        "scope": 4,
                        "term": "(lte X56 (s (s (0))))"
                    },
                    {
                        "clause": 3,
                        "scope": 4,
                        "term": "(lte X56 (s (s (0))))"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X56"],
                    "exprvars": []
                }
            },
            "type": "Nodes",
            "174": {
                "goal": [{
                    "clause": 2,
                    "scope": 4,
                    "term": "(lte X56 (s (s (0))))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X56"],
                    "exprvars": []
                }
            },
            "175": {
                "goal": [{
                    "clause": 3,
                    "scope": 4,
                    "term": "(lte X56 (s (s (0))))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X56"],
                    "exprvars": []
                }
            },
            "230": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "231": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "155": {
                "goal": [
                    {
                        "clause": 2,
                        "scope": 3,
                        "term": "(lte X32 (s (s (s (0)))))"
                    },
                    {
                        "clause": 3,
                        "scope": 3,
                        "term": "(lte X32 (s (s (s (0)))))"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X32"],
                    "exprvars": []
                }
            },
            "232": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "178": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(lte X80 (s (0)))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X80"],
                    "exprvars": []
                }
            },
            "179": {
                "goal": [
                    {
                        "clause": 2,
                        "scope": 5,
                        "term": "(lte X80 (s (0)))"
                    },
                    {
                        "clause": 3,
                        "scope": 5,
                        "term": "(lte X80 (s (0)))"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X80"],
                    "exprvars": []
                }
            },
            "215": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "216": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "217": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "218": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "219": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "56": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (lte X5 (s (s (s (s (0)))))) (even X5))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X5"],
                    "exprvars": []
                }
            },
            "59": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(lte X5 (s (s (s (s (0))))))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X5"],
                    "exprvars": []
                }
            },
            "182": {
                "goal": [{
                    "clause": 2,
                    "scope": 5,
                    "term": "(lte X80 (s (0)))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X80"],
                    "exprvars": []
                }
            },
            "183": {
                "goal": [{
                    "clause": 3,
                    "scope": 5,
                    "term": "(lte X80 (s (0)))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X80"],
                    "exprvars": []
                }
            },
            "164": {
                "goal": [{
                    "clause": 2,
                    "scope": 3,
                    "term": "(lte X32 (s (s (s (0)))))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X32"],
                    "exprvars": []
                }
            },
            "165": {
                "goal": [{
                    "clause": 3,
                    "scope": 3,
                    "term": "(lte X32 (s (s (s (0)))))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X32"],
                    "exprvars": []
                }
            },
            "220": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "144": {
                "goal": [{
                    "clause": 2,
                    "scope": 2,
                    "term": "(lte X5 (s (s (s (s (0))))))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X5"],
                    "exprvars": []
                }
            },
            "221": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "2": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(goal)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "145": {
                "goal": [{
                    "clause": 3,
                    "scope": 2,
                    "term": "(lte X5 (s (s (s (s (0))))))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X5"],
                    "exprvars": []
                }
            },
            "222": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "223": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "4": {
                "goal": [{
                    "clause": 4,
                    "scope": 1,
                    "term": "(goal)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "224": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "225": {
                "goal": [
                    {
                        "clause": 0,
                        "scope": 7,
                        "term": "(even T1)"
                    },
                    {
                        "clause": 1,
                        "scope": 7,
                        "term": "(even T1)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "149": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(lte X32 (s (s (s (0)))))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X32"],
                    "exprvars": []
                }
            },
            "226": {
                "goal": [{
                    "clause": 0,
                    "scope": 7,
                    "term": "(even T1)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "227": {
                "goal": [{
                    "clause": 1,
                    "scope": 7,
                    "term": "(even T1)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "228": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(even T7)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T7"],
                    "free": [],
                    "exprvars": []
                }
            },
            "207": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(lte X104 (0))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X104"],
                    "exprvars": []
                }
            },
            "229": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "60": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(even T1)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T1"],
                    "free": [],
                    "exprvars": []
                }
            },
            "208": {
                "goal": [
                    {
                        "clause": 2,
                        "scope": 6,
                        "term": "(lte X104 (0))"
                    },
                    {
                        "clause": 3,
                        "scope": 6,
                        "term": "(lte X104 (0))"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X104"],
                    "exprvars": []
                }
            },
            "209": {
                "goal": [{
                    "clause": 3,
                    "scope": 6,
                    "term": "(lte X104 (0))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X104"],
                    "exprvars": []
                }
            },
            "64": {
                "goal": [
                    {
                        "clause": 2,
                        "scope": 2,
                        "term": "(lte X5 (s (s (s (s (0))))))"
                    },
                    {
                        "clause": 3,
                        "scope": 2,
                        "term": "(lte X5 (s (s (s (s (0))))))"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": ["X5"],
                    "exprvars": []
                }
            }
        },
        "edges": [
            {
                "from": 2,
                "to": 4,
                "label": "CASE"
            },
            {
                "from": 4,
                "to": 56,
                "label": "ONLY EVAL with clause\ngoal :- ','(lte(X5, s(s(s(s(0))))), even(X5)).\nand substitution"
            },
            {
                "from": 56,
                "to": 59,
                "label": "SPLIT 1"
            },
            {
                "from": 56,
                "to": 60,
                "label": "SPLIT 2\nnew knowledge:\nT1 is ground\nreplacements:X5 -> T1"
            },
            {
                "from": 59,
                "to": 64,
                "label": "CASE"
            },
            {
                "from": 60,
                "to": 225,
                "label": "CASE"
            },
            {
                "from": 64,
                "to": 144,
                "label": "PARALLEL"
            },
            {
                "from": 64,
                "to": 145,
                "label": "PARALLEL"
            },
            {
                "from": 144,
                "to": 149,
                "label": "ONLY EVAL with clause\nlte(s(X30), s(X31)) :- lte(X30, X31).\nand substitutionX30 -> X32,\nX5 -> s(X32),\nX31 -> s(s(s(0)))"
            },
            {
                "from": 145,
                "to": 223,
                "label": "ONLY EVAL with clause\nlte(0, X125).\nand substitutionX5 -> 0,\nX125 -> s(s(s(s(0))))"
            },
            {
                "from": 149,
                "to": 155,
                "label": "CASE"
            },
            {
                "from": 155,
                "to": 164,
                "label": "PARALLEL"
            },
            {
                "from": 155,
                "to": 165,
                "label": "PARALLEL"
            },
            {
                "from": 164,
                "to": 170,
                "label": "ONLY EVAL with clause\nlte(s(X54), s(X55)) :- lte(X54, X55).\nand substitutionX54 -> X56,\nX32 -> s(X56),\nX55 -> s(s(0))"
            },
            {
                "from": 165,
                "to": 221,
                "label": "ONLY EVAL with clause\nlte(0, X122).\nand substitutionX32 -> 0,\nX122 -> s(s(s(0)))"
            },
            {
                "from": 170,
                "to": 171,
                "label": "CASE"
            },
            {
                "from": 171,
                "to": 174,
                "label": "PARALLEL"
            },
            {
                "from": 171,
                "to": 175,
                "label": "PARALLEL"
            },
            {
                "from": 174,
                "to": 178,
                "label": "ONLY EVAL with clause\nlte(s(X78), s(X79)) :- lte(X78, X79).\nand substitutionX78 -> X80,\nX56 -> s(X80),\nX79 -> s(0)"
            },
            {
                "from": 175,
                "to": 219,
                "label": "ONLY EVAL with clause\nlte(0, X119).\nand substitutionX56 -> 0,\nX119 -> s(s(0))"
            },
            {
                "from": 178,
                "to": 179,
                "label": "CASE"
            },
            {
                "from": 179,
                "to": 182,
                "label": "PARALLEL"
            },
            {
                "from": 179,
                "to": 183,
                "label": "PARALLEL"
            },
            {
                "from": 182,
                "to": 207,
                "label": "ONLY EVAL with clause\nlte(s(X102), s(X103)) :- lte(X102, X103).\nand substitutionX102 -> X104,\nX80 -> s(X104),\nX103 -> 0"
            },
            {
                "from": 183,
                "to": 217,
                "label": "ONLY EVAL with clause\nlte(0, X116).\nand substitutionX80 -> 0,\nX116 -> s(0)"
            },
            {
                "from": 207,
                "to": 208,
                "label": "CASE"
            },
            {
                "from": 208,
                "to": 209,
                "label": "BACKTRACK\nfor clause: lte(s(X), s(Y)) :- lte(X, Y)because of non-unification"
            },
            {
                "from": 209,
                "to": 215,
                "label": "ONLY EVAL with clause\nlte(0, X113).\nand substitutionX104 -> 0,\nX113 -> 0"
            },
            {
                "from": 215,
                "to": 216,
                "label": "SUCCESS"
            },
            {
                "from": 217,
                "to": 218,
                "label": "SUCCESS"
            },
            {
                "from": 219,
                "to": 220,
                "label": "SUCCESS"
            },
            {
                "from": 221,
                "to": 222,
                "label": "SUCCESS"
            },
            {
                "from": 223,
                "to": 224,
                "label": "SUCCESS"
            },
            {
                "from": 225,
                "to": 226,
                "label": "PARALLEL"
            },
            {
                "from": 225,
                "to": 227,
                "label": "PARALLEL"
            },
            {
                "from": 226,
                "to": 228,
                "label": "EVAL with clause\neven(s(s(X131))) :- even(X131).\nand substitutionX131 -> T7,\nT1 -> s(s(T7))"
            },
            {
                "from": 226,
                "to": 229,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 227,
                "to": 230,
                "label": "EVAL with clause\neven(0).\nand substitutionT1 -> 0"
            },
            {
                "from": 227,
                "to": 231,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 228,
                "to": 60,
                "label": "INSTANCE with matching:\nT1 -> T7"
            },
            {
                "from": 230,
                "to": 232,
                "label": "SUCCESS"
            }
        ],
        "type": "Graph"
    }
}

----------------------------------------

(2)
Obligation:
Rules:
f60_out(T7) -> f228_out(T7) :|: TRUE
f228_in(x) -> f60_in(x) :|: TRUE
f225_in(T1) -> f227_in(T1) :|: TRUE
f227_out(x1) -> f225_out(x1) :|: TRUE
f225_in(x2) -> f226_in(x2) :|: TRUE
f226_out(x3) -> f225_out(x3) :|: TRUE
f225_out(x4) -> f60_out(x4) :|: TRUE
f60_in(x5) -> f225_in(x5) :|: TRUE
f226_in(x6) -> f229_in :|: TRUE
f229_out -> f226_out(x7) :|: TRUE
f228_out(x8) -> f226_out(s(s(x8))) :|: TRUE
f226_in(s(s(x9))) -> f228_in(x9) :|: TRUE
f2_in -> f4_in :|: TRUE
f4_out -> f2_out :|: TRUE
f56_out -> f4_out :|: TRUE
f4_in -> f56_in :|: TRUE
f60_out(x10) -> f56_out :|: TRUE
f56_in -> f59_in :|: TRUE
f59_out -> f60_in(x11) :|: TRUE
Start term: f2_in

----------------------------------------

(3) IRSwTSimpleDependencyGraphProof (EQUIVALENT)
Constructed simple dependency graph.

Simplified to the following IRSwTs:


----------------------------------------

(4)
TRUE
