MAYBE

Found an example we currently can't prove?
-> Consider contributing it to the benchmark set: https://mysolvertimesout.org/

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


Left Termination of the query pattern

p(a,a,a)

w.r.t. the given Prolog program could not be shown:

(0) Prolog
(1) PrologToDTProblemTransformerProof [SOUND, 0 ms]
(2) TRIPLES
    (3) TriplesToPiDPProof [SOUND, 0 ms]
    (4) PiDP
    (5) DependencyGraphProof [EQUIVALENT, 0 ms]
    (6) PiDP
    (7) PiDPToQDPProof [SOUND, 0 ms]
    (8) QDP
(9) PrologToTRSTransformerProof [SOUND, 0 ms]
(10) QTRS
    (11) QTRSRRRProof [EQUIVALENT, 25 ms]
    (12) QTRS
    (13) Overlay + Local Confluence [EQUIVALENT, 0 ms]
    (14) QTRS
    (15) DependencyPairsProof [EQUIVALENT, 0 ms]
    (16) QDP
    (17) UsableRulesProof [EQUIVALENT, 0 ms]
    (18) QDP
    (19) QReductionProof [EQUIVALENT, 0 ms]
    (20) QDP
(21) PrologToPiTRSProof [SOUND, 0 ms]
(22) PiTRS
    (23) DependencyPairsProof [EQUIVALENT, 0 ms]
    (24) PiDP
    (25) DependencyGraphProof [EQUIVALENT, 0 ms]
    (26) PiDP
    (27) UsableRulesProof [EQUIVALENT, 0 ms]
    (28) PiDP
    (29) PiDPToQDPProof [SOUND, 0 ms]
    (30) QDP
(31) PrologToPiTRSProof [SOUND, 0 ms]
(32) PiTRS
    (33) DependencyPairsProof [EQUIVALENT, 0 ms]
    (34) PiDP
    (35) DependencyGraphProof [EQUIVALENT, 0 ms]
    (36) PiDP
    (37) UsableRulesProof [EQUIVALENT, 0 ms]
    (38) PiDP
    (39) PiDPToQDPProof [SOUND, 0 ms]
    (40) QDP
(41) PrologToIRSwTTransformerProof [SOUND, 0 ms]
(42) IRSwT
    (43) IRSwTSimpleDependencyGraphProof [EQUIVALENT, 0 ms]
    (44) IRSwT
    (45) IntTRSCompressionProof [EQUIVALENT, 12 ms]
    (46) IRSwT
    (47) IRSFormatTransformerProof [EQUIVALENT, 0 ms]
    (48) IRSwT
    (49) IRSwTTerminationDigraphProof [EQUIVALENT, 0 ms]
    (50) IRSwT
    (51) FilterProof [EQUIVALENT, 0 ms]
    (52) IntTRS
    (53) IntTRSPeriodicNontermProof [COMPLETE, 3 ms]
    (54) NO


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

(0)
Obligation:
Clauses:

p(X, Y, Z) :- append(.(X, Y), Z, Y).
append([], Y, Y).
append(.(H, Xs), Ys, .(H, Zs)) :- append(Xs, Ys, Zs).


Query: p(a,a,a)
----------------------------------------

(1) PrologToDTProblemTransformerProof (SOUND)
Built DT problem from termination graph DT10.

{
    "root": 3,
    "program": {
        "directives": [],
        "clauses": [
            [
                "(p X Y Z)",
                "(append (. X Y) Z Y)"
            ],
            [
                "(append ([]) Y Y)",
                null
            ],
            [
                "(append (. H Xs) Ys (. H Zs))",
                "(append Xs Ys Zs)"
            ]
        ]
    },
    "graph": {
        "nodes": {
            "112": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(append (. T27 T26) T25 T26)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "3": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(p T1 T2 T3)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "113": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "106": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(append (. T12 T11) T10 T11)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "107": {
                "goal": [
                    {
                        "clause": 1,
                        "scope": 2,
                        "term": "(append (. T12 T11) T10 T11)"
                    },
                    {
                        "clause": 2,
                        "scope": 2,
                        "term": "(append (. T12 T11) T10 T11)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "108": {
                "goal": [{
                    "clause": 2,
                    "scope": 2,
                    "term": "(append (. T12 T11) T10 T11)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "type": "Nodes",
            "10": {
                "goal": [{
                    "clause": 0,
                    "scope": 1,
                    "term": "(p T1 T2 T3)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            }
        },
        "edges": [
            {
                "from": 3,
                "to": 10,
                "label": "CASE"
            },
            {
                "from": 10,
                "to": 106,
                "label": "ONLY EVAL with clause\np(X4, X5, X6) :- append(.(X4, X5), X6, X5).\nand substitutionT1 -> T12,\nX4 -> T12,\nT2 -> T11,\nX5 -> T11,\nT3 -> T10,\nX6 -> T10,\nT9 -> T10,\nT8 -> T11,\nT7 -> T12"
            },
            {
                "from": 106,
                "to": 107,
                "label": "CASE"
            },
            {
                "from": 107,
                "to": 108,
                "label": "BACKTRACK\nfor clause: append([], Y, Y)because of non-unification"
            },
            {
                "from": 108,
                "to": 112,
                "label": "EVAL with clause\nappend(.(X16, X17), X18, .(X16, X19)) :- append(X17, X18, X19).\nand substitutionT12 -> T27,\nX16 -> T27,\nT11 -> .(T27, T26),\nX17 -> .(T27, T26),\nT10 -> T25,\nX18 -> T25,\nX19 -> T26,\nT22 -> .(T27, T26),\nT23 -> T25,\nT24 -> T26,\nT21 -> T27"
            },
            {
                "from": 108,
                "to": 113,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 112,
                "to": 106,
                "label": "INSTANCE with matching:\nT12 -> T27\nT11 -> T26\nT10 -> T25"
            }
        ],
        "type": "Graph"
    }
}

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

(2)
Obligation:
Triples:

appendA(X1, .(X1, X2), X3) :- appendA(X1, X2, X3).
pB(X1, X2, X3) :- appendA(X1, X2, X3).

Clauses:

appendcA(X1, .(X1, X2), X3) :- appendcA(X1, X2, X3).

Afs:

pB(x1, x2, x3)  =  pB


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

(3) TriplesToPiDPProof (SOUND)
We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes:

pB_in_3: (f,f,f)

appendA_in_3: (f,f,f)

Transforming TRIPLES into the following Term Rewriting System:

Pi DP problem:
The TRS P consists of the following rules:

   PB_IN_AAA(X1, X2, X3) -> U2_AAA(X1, X2, X3, appendA_in_aaa(X1, X2, X3))
   PB_IN_AAA(X1, X2, X3) -> APPENDA_IN_AAA(X1, X2, X3)
   APPENDA_IN_AAA(X1, .(X1, X2), X3) -> U1_AAA(X1, X2, X3, appendA_in_aaa(X1, X2, X3))
   APPENDA_IN_AAA(X1, .(X1, X2), X3) -> APPENDA_IN_AAA(X1, X2, X3)

R is empty.
The argument filtering Pi contains the following mapping:
appendA_in_aaa(x1, x2, x3)  =  appendA_in_aaa

.(x1, x2)  =  .(x1, x2)

PB_IN_AAA(x1, x2, x3)  =  PB_IN_AAA

U2_AAA(x1, x2, x3, x4)  =  U2_AAA(x4)

APPENDA_IN_AAA(x1, x2, x3)  =  APPENDA_IN_AAA

U1_AAA(x1, x2, x3, x4)  =  U1_AAA(x4)


We have to consider all (P,R,Pi)-chains


Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES



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

(4)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   PB_IN_AAA(X1, X2, X3) -> U2_AAA(X1, X2, X3, appendA_in_aaa(X1, X2, X3))
   PB_IN_AAA(X1, X2, X3) -> APPENDA_IN_AAA(X1, X2, X3)
   APPENDA_IN_AAA(X1, .(X1, X2), X3) -> U1_AAA(X1, X2, X3, appendA_in_aaa(X1, X2, X3))
   APPENDA_IN_AAA(X1, .(X1, X2), X3) -> APPENDA_IN_AAA(X1, X2, X3)

R is empty.
The argument filtering Pi contains the following mapping:
appendA_in_aaa(x1, x2, x3)  =  appendA_in_aaa

.(x1, x2)  =  .(x1, x2)

PB_IN_AAA(x1, x2, x3)  =  PB_IN_AAA

U2_AAA(x1, x2, x3, x4)  =  U2_AAA(x4)

APPENDA_IN_AAA(x1, x2, x3)  =  APPENDA_IN_AAA

U1_AAA(x1, x2, x3, x4)  =  U1_AAA(x4)


We have to consider all (P,R,Pi)-chains
----------------------------------------

(5) DependencyGraphProof (EQUIVALENT)
The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 3 less nodes.
----------------------------------------

(6)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   APPENDA_IN_AAA(X1, .(X1, X2), X3) -> APPENDA_IN_AAA(X1, X2, X3)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)

APPENDA_IN_AAA(x1, x2, x3)  =  APPENDA_IN_AAA


We have to consider all (P,R,Pi)-chains
----------------------------------------

(7) PiDPToQDPProof (SOUND)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
----------------------------------------

(8)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   APPENDA_IN_AAA -> APPENDA_IN_AAA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
----------------------------------------

(9) PrologToTRSTransformerProof (SOUND)
Transformed Prolog program to TRS.

{
    "root": 1,
    "program": {
        "directives": [],
        "clauses": [
            [
                "(p X Y Z)",
                "(append (. X Y) Z Y)"
            ],
            [
                "(append ([]) Y Y)",
                null
            ],
            [
                "(append (. H Xs) Ys (. H Zs))",
                "(append Xs Ys Zs)"
            ]
        ]
    },
    "graph": {
        "nodes": {
            "110": {
                "goal": [
                    {
                        "clause": 1,
                        "scope": 2,
                        "term": "(append (. T18 T17) T16 T17)"
                    },
                    {
                        "clause": 2,
                        "scope": 2,
                        "term": "(append (. T18 T17) T16 T17)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "1": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(p T1 T2 T3)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "111": {
                "goal": [{
                    "clause": 2,
                    "scope": 2,
                    "term": "(append (. T18 T17) T16 T17)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "114": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(append (. T33 T32) T31 T32)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "5": {
                "goal": [{
                    "clause": 0,
                    "scope": 1,
                    "term": "(p T1 T2 T3)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "115": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "109": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(append (. T18 T17) T16 T17)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "type": "Nodes"
        },
        "edges": [
            {
                "from": 1,
                "to": 5,
                "label": "CASE"
            },
            {
                "from": 5,
                "to": 109,
                "label": "ONLY EVAL with clause\np(X9, X10, X11) :- append(.(X9, X10), X11, X10).\nand substitutionT1 -> T18,\nX9 -> T18,\nT2 -> T17,\nX10 -> T17,\nT3 -> T16,\nX11 -> T16,\nT15 -> T16,\nT14 -> T17,\nT13 -> T18"
            },
            {
                "from": 109,
                "to": 110,
                "label": "CASE"
            },
            {
                "from": 110,
                "to": 111,
                "label": "BACKTRACK\nfor clause: append([], Y, Y)because of non-unification"
            },
            {
                "from": 111,
                "to": 114,
                "label": "EVAL with clause\nappend(.(X23, X24), X25, .(X23, X26)) :- append(X24, X25, X26).\nand substitutionT18 -> T33,\nX23 -> T33,\nT17 -> .(T33, T32),\nX24 -> .(T33, T32),\nT16 -> T31,\nX25 -> T31,\nX26 -> T32,\nT28 -> .(T33, T32),\nT29 -> T31,\nT30 -> T32,\nT27 -> T33"
            },
            {
                "from": 111,
                "to": 115,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 114,
                "to": 109,
                "label": "INSTANCE with matching:\nT18 -> T33\nT17 -> T32\nT16 -> T31"
            }
        ],
        "type": "Graph"
    }
}

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

(10)
Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:

   f1_in -> U1(f109_in)
   U1(f109_out1) -> f1_out1
   f109_in -> U2(f109_in)
   U2(f109_out1) -> f109_out1

Q is empty.

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

(11) QTRSRRRProof (EQUIVALENT)
Used ordering:
Polynomial interpretation [POLO]:

   POL(U1(x_1)) = 2*x_1
   POL(U2(x_1)) = 2*x_1
   POL(f109_in) = 0
   POL(f109_out1) = 2
   POL(f1_in) = 1
   POL(f1_out1) = 0
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

   f1_in -> U1(f109_in)
   U1(f109_out1) -> f1_out1
   U2(f109_out1) -> f109_out1




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

(12)
Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:

   f109_in -> U2(f109_in)

Q is empty.

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

(13) Overlay + Local Confluence (EQUIVALENT)
The TRS is overlay and locally confluent. By [NOC] we can switch to innermost.
----------------------------------------

(14)
Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:

   f109_in -> U2(f109_in)

The set Q consists of the following terms:

   f109_in


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

(15) DependencyPairsProof (EQUIVALENT)
Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.
----------------------------------------

(16)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   F109_IN -> F109_IN

The TRS R consists of the following rules:

   f109_in -> U2(f109_in)

The set Q consists of the following terms:

   f109_in

We have to consider all minimal (P,Q,R)-chains.
----------------------------------------

(17) 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.
----------------------------------------

(18)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   F109_IN -> F109_IN

R is empty.
The set Q consists of the following terms:

   f109_in

We have to consider all minimal (P,Q,R)-chains.
----------------------------------------

(19) 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].

   f109_in


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

(20)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   F109_IN -> F109_IN

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
----------------------------------------

(21) PrologToPiTRSProof (SOUND)
We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:

p_in_3: (f,f,f)

append_in_3: (f,f,f)

Transforming Prolog into the following Term Rewriting System:

Pi-finite rewrite system:
The TRS R consists of the following rules:

   p_in_aaa(X, Y, Z) -> U1_aaa(X, Y, Z, append_in_aaa(.(X, Y), Z, Y))
   append_in_aaa([], Y, Y) -> append_out_aaa([], Y, Y)
   append_in_aaa(.(H, Xs), Ys, .(H, Zs)) -> U2_aaa(H, Xs, Ys, Zs, append_in_aaa(Xs, Ys, Zs))
   U2_aaa(H, Xs, Ys, Zs, append_out_aaa(Xs, Ys, Zs)) -> append_out_aaa(.(H, Xs), Ys, .(H, Zs))
   U1_aaa(X, Y, Z, append_out_aaa(.(X, Y), Z, Y)) -> p_out_aaa(X, Y, Z)

The argument filtering Pi contains the following mapping:
p_in_aaa(x1, x2, x3)  =  p_in_aaa

U1_aaa(x1, x2, x3, x4)  =  U1_aaa(x4)

append_in_aaa(x1, x2, x3)  =  append_in_aaa

.(x1, x2)  =  .(x2)

append_out_aaa(x1, x2, x3)  =  append_out_aaa(x1)

U2_aaa(x1, x2, x3, x4, x5)  =  U2_aaa(x5)

p_out_aaa(x1, x2, x3)  =  p_out_aaa(x2)





Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



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

(22)
Obligation:
Pi-finite rewrite system:
The TRS R consists of the following rules:

   p_in_aaa(X, Y, Z) -> U1_aaa(X, Y, Z, append_in_aaa(.(X, Y), Z, Y))
   append_in_aaa([], Y, Y) -> append_out_aaa([], Y, Y)
   append_in_aaa(.(H, Xs), Ys, .(H, Zs)) -> U2_aaa(H, Xs, Ys, Zs, append_in_aaa(Xs, Ys, Zs))
   U2_aaa(H, Xs, Ys, Zs, append_out_aaa(Xs, Ys, Zs)) -> append_out_aaa(.(H, Xs), Ys, .(H, Zs))
   U1_aaa(X, Y, Z, append_out_aaa(.(X, Y), Z, Y)) -> p_out_aaa(X, Y, Z)

The argument filtering Pi contains the following mapping:
p_in_aaa(x1, x2, x3)  =  p_in_aaa

U1_aaa(x1, x2, x3, x4)  =  U1_aaa(x4)

append_in_aaa(x1, x2, x3)  =  append_in_aaa

.(x1, x2)  =  .(x2)

append_out_aaa(x1, x2, x3)  =  append_out_aaa(x1)

U2_aaa(x1, x2, x3, x4, x5)  =  U2_aaa(x5)

p_out_aaa(x1, x2, x3)  =  p_out_aaa(x2)



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

(23) DependencyPairsProof (EQUIVALENT)
Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

   P_IN_AAA(X, Y, Z) -> U1_AAA(X, Y, Z, append_in_aaa(.(X, Y), Z, Y))
   P_IN_AAA(X, Y, Z) -> APPEND_IN_AAA(.(X, Y), Z, Y)
   APPEND_IN_AAA(.(H, Xs), Ys, .(H, Zs)) -> U2_AAA(H, Xs, Ys, Zs, append_in_aaa(Xs, Ys, Zs))
   APPEND_IN_AAA(.(H, Xs), Ys, .(H, Zs)) -> APPEND_IN_AAA(Xs, Ys, Zs)

The TRS R consists of the following rules:

   p_in_aaa(X, Y, Z) -> U1_aaa(X, Y, Z, append_in_aaa(.(X, Y), Z, Y))
   append_in_aaa([], Y, Y) -> append_out_aaa([], Y, Y)
   append_in_aaa(.(H, Xs), Ys, .(H, Zs)) -> U2_aaa(H, Xs, Ys, Zs, append_in_aaa(Xs, Ys, Zs))
   U2_aaa(H, Xs, Ys, Zs, append_out_aaa(Xs, Ys, Zs)) -> append_out_aaa(.(H, Xs), Ys, .(H, Zs))
   U1_aaa(X, Y, Z, append_out_aaa(.(X, Y), Z, Y)) -> p_out_aaa(X, Y, Z)

The argument filtering Pi contains the following mapping:
p_in_aaa(x1, x2, x3)  =  p_in_aaa

U1_aaa(x1, x2, x3, x4)  =  U1_aaa(x4)

append_in_aaa(x1, x2, x3)  =  append_in_aaa

.(x1, x2)  =  .(x2)

append_out_aaa(x1, x2, x3)  =  append_out_aaa(x1)

U2_aaa(x1, x2, x3, x4, x5)  =  U2_aaa(x5)

p_out_aaa(x1, x2, x3)  =  p_out_aaa(x2)

P_IN_AAA(x1, x2, x3)  =  P_IN_AAA

U1_AAA(x1, x2, x3, x4)  =  U1_AAA(x4)

APPEND_IN_AAA(x1, x2, x3)  =  APPEND_IN_AAA

U2_AAA(x1, x2, x3, x4, x5)  =  U2_AAA(x5)


We have to consider all (P,R,Pi)-chains
----------------------------------------

(24)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   P_IN_AAA(X, Y, Z) -> U1_AAA(X, Y, Z, append_in_aaa(.(X, Y), Z, Y))
   P_IN_AAA(X, Y, Z) -> APPEND_IN_AAA(.(X, Y), Z, Y)
   APPEND_IN_AAA(.(H, Xs), Ys, .(H, Zs)) -> U2_AAA(H, Xs, Ys, Zs, append_in_aaa(Xs, Ys, Zs))
   APPEND_IN_AAA(.(H, Xs), Ys, .(H, Zs)) -> APPEND_IN_AAA(Xs, Ys, Zs)

The TRS R consists of the following rules:

   p_in_aaa(X, Y, Z) -> U1_aaa(X, Y, Z, append_in_aaa(.(X, Y), Z, Y))
   append_in_aaa([], Y, Y) -> append_out_aaa([], Y, Y)
   append_in_aaa(.(H, Xs), Ys, .(H, Zs)) -> U2_aaa(H, Xs, Ys, Zs, append_in_aaa(Xs, Ys, Zs))
   U2_aaa(H, Xs, Ys, Zs, append_out_aaa(Xs, Ys, Zs)) -> append_out_aaa(.(H, Xs), Ys, .(H, Zs))
   U1_aaa(X, Y, Z, append_out_aaa(.(X, Y), Z, Y)) -> p_out_aaa(X, Y, Z)

The argument filtering Pi contains the following mapping:
p_in_aaa(x1, x2, x3)  =  p_in_aaa

U1_aaa(x1, x2, x3, x4)  =  U1_aaa(x4)

append_in_aaa(x1, x2, x3)  =  append_in_aaa

.(x1, x2)  =  .(x2)

append_out_aaa(x1, x2, x3)  =  append_out_aaa(x1)

U2_aaa(x1, x2, x3, x4, x5)  =  U2_aaa(x5)

p_out_aaa(x1, x2, x3)  =  p_out_aaa(x2)

P_IN_AAA(x1, x2, x3)  =  P_IN_AAA

U1_AAA(x1, x2, x3, x4)  =  U1_AAA(x4)

APPEND_IN_AAA(x1, x2, x3)  =  APPEND_IN_AAA

U2_AAA(x1, x2, x3, x4, x5)  =  U2_AAA(x5)


We have to consider all (P,R,Pi)-chains
----------------------------------------

(25) DependencyGraphProof (EQUIVALENT)
The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 3 less nodes.
----------------------------------------

(26)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   APPEND_IN_AAA(.(H, Xs), Ys, .(H, Zs)) -> APPEND_IN_AAA(Xs, Ys, Zs)

The TRS R consists of the following rules:

   p_in_aaa(X, Y, Z) -> U1_aaa(X, Y, Z, append_in_aaa(.(X, Y), Z, Y))
   append_in_aaa([], Y, Y) -> append_out_aaa([], Y, Y)
   append_in_aaa(.(H, Xs), Ys, .(H, Zs)) -> U2_aaa(H, Xs, Ys, Zs, append_in_aaa(Xs, Ys, Zs))
   U2_aaa(H, Xs, Ys, Zs, append_out_aaa(Xs, Ys, Zs)) -> append_out_aaa(.(H, Xs), Ys, .(H, Zs))
   U1_aaa(X, Y, Z, append_out_aaa(.(X, Y), Z, Y)) -> p_out_aaa(X, Y, Z)

The argument filtering Pi contains the following mapping:
p_in_aaa(x1, x2, x3)  =  p_in_aaa

U1_aaa(x1, x2, x3, x4)  =  U1_aaa(x4)

append_in_aaa(x1, x2, x3)  =  append_in_aaa

.(x1, x2)  =  .(x2)

append_out_aaa(x1, x2, x3)  =  append_out_aaa(x1)

U2_aaa(x1, x2, x3, x4, x5)  =  U2_aaa(x5)

p_out_aaa(x1, x2, x3)  =  p_out_aaa(x2)

APPEND_IN_AAA(x1, x2, x3)  =  APPEND_IN_AAA


We have to consider all (P,R,Pi)-chains
----------------------------------------

(27) UsableRulesProof (EQUIVALENT)
For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.
----------------------------------------

(28)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   APPEND_IN_AAA(.(H, Xs), Ys, .(H, Zs)) -> APPEND_IN_AAA(Xs, Ys, Zs)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)

APPEND_IN_AAA(x1, x2, x3)  =  APPEND_IN_AAA


We have to consider all (P,R,Pi)-chains
----------------------------------------

(29) PiDPToQDPProof (SOUND)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
----------------------------------------

(30)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   APPEND_IN_AAA -> APPEND_IN_AAA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
----------------------------------------

(31) PrologToPiTRSProof (SOUND)
We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:

p_in_3: (f,f,f)

append_in_3: (f,f,f)

Transforming Prolog into the following Term Rewriting System:

Pi-finite rewrite system:
The TRS R consists of the following rules:

   p_in_aaa(X, Y, Z) -> U1_aaa(X, Y, Z, append_in_aaa(.(X, Y), Z, Y))
   append_in_aaa([], Y, Y) -> append_out_aaa([], Y, Y)
   append_in_aaa(.(H, Xs), Ys, .(H, Zs)) -> U2_aaa(H, Xs, Ys, Zs, append_in_aaa(Xs, Ys, Zs))
   U2_aaa(H, Xs, Ys, Zs, append_out_aaa(Xs, Ys, Zs)) -> append_out_aaa(.(H, Xs), Ys, .(H, Zs))
   U1_aaa(X, Y, Z, append_out_aaa(.(X, Y), Z, Y)) -> p_out_aaa(X, Y, Z)

The argument filtering Pi contains the following mapping:
p_in_aaa(x1, x2, x3)  =  p_in_aaa

U1_aaa(x1, x2, x3, x4)  =  U1_aaa(x4)

append_in_aaa(x1, x2, x3)  =  append_in_aaa

.(x1, x2)  =  .(x2)

append_out_aaa(x1, x2, x3)  =  append_out_aaa(x1)

U2_aaa(x1, x2, x3, x4, x5)  =  U2_aaa(x5)

p_out_aaa(x1, x2, x3)  =  p_out_aaa(x2)





Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



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

(32)
Obligation:
Pi-finite rewrite system:
The TRS R consists of the following rules:

   p_in_aaa(X, Y, Z) -> U1_aaa(X, Y, Z, append_in_aaa(.(X, Y), Z, Y))
   append_in_aaa([], Y, Y) -> append_out_aaa([], Y, Y)
   append_in_aaa(.(H, Xs), Ys, .(H, Zs)) -> U2_aaa(H, Xs, Ys, Zs, append_in_aaa(Xs, Ys, Zs))
   U2_aaa(H, Xs, Ys, Zs, append_out_aaa(Xs, Ys, Zs)) -> append_out_aaa(.(H, Xs), Ys, .(H, Zs))
   U1_aaa(X, Y, Z, append_out_aaa(.(X, Y), Z, Y)) -> p_out_aaa(X, Y, Z)

The argument filtering Pi contains the following mapping:
p_in_aaa(x1, x2, x3)  =  p_in_aaa

U1_aaa(x1, x2, x3, x4)  =  U1_aaa(x4)

append_in_aaa(x1, x2, x3)  =  append_in_aaa

.(x1, x2)  =  .(x2)

append_out_aaa(x1, x2, x3)  =  append_out_aaa(x1)

U2_aaa(x1, x2, x3, x4, x5)  =  U2_aaa(x5)

p_out_aaa(x1, x2, x3)  =  p_out_aaa(x2)



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

(33) DependencyPairsProof (EQUIVALENT)
Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

   P_IN_AAA(X, Y, Z) -> U1_AAA(X, Y, Z, append_in_aaa(.(X, Y), Z, Y))
   P_IN_AAA(X, Y, Z) -> APPEND_IN_AAA(.(X, Y), Z, Y)
   APPEND_IN_AAA(.(H, Xs), Ys, .(H, Zs)) -> U2_AAA(H, Xs, Ys, Zs, append_in_aaa(Xs, Ys, Zs))
   APPEND_IN_AAA(.(H, Xs), Ys, .(H, Zs)) -> APPEND_IN_AAA(Xs, Ys, Zs)

The TRS R consists of the following rules:

   p_in_aaa(X, Y, Z) -> U1_aaa(X, Y, Z, append_in_aaa(.(X, Y), Z, Y))
   append_in_aaa([], Y, Y) -> append_out_aaa([], Y, Y)
   append_in_aaa(.(H, Xs), Ys, .(H, Zs)) -> U2_aaa(H, Xs, Ys, Zs, append_in_aaa(Xs, Ys, Zs))
   U2_aaa(H, Xs, Ys, Zs, append_out_aaa(Xs, Ys, Zs)) -> append_out_aaa(.(H, Xs), Ys, .(H, Zs))
   U1_aaa(X, Y, Z, append_out_aaa(.(X, Y), Z, Y)) -> p_out_aaa(X, Y, Z)

The argument filtering Pi contains the following mapping:
p_in_aaa(x1, x2, x3)  =  p_in_aaa

U1_aaa(x1, x2, x3, x4)  =  U1_aaa(x4)

append_in_aaa(x1, x2, x3)  =  append_in_aaa

.(x1, x2)  =  .(x2)

append_out_aaa(x1, x2, x3)  =  append_out_aaa(x1)

U2_aaa(x1, x2, x3, x4, x5)  =  U2_aaa(x5)

p_out_aaa(x1, x2, x3)  =  p_out_aaa(x2)

P_IN_AAA(x1, x2, x3)  =  P_IN_AAA

U1_AAA(x1, x2, x3, x4)  =  U1_AAA(x4)

APPEND_IN_AAA(x1, x2, x3)  =  APPEND_IN_AAA

U2_AAA(x1, x2, x3, x4, x5)  =  U2_AAA(x5)


We have to consider all (P,R,Pi)-chains
----------------------------------------

(34)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   P_IN_AAA(X, Y, Z) -> U1_AAA(X, Y, Z, append_in_aaa(.(X, Y), Z, Y))
   P_IN_AAA(X, Y, Z) -> APPEND_IN_AAA(.(X, Y), Z, Y)
   APPEND_IN_AAA(.(H, Xs), Ys, .(H, Zs)) -> U2_AAA(H, Xs, Ys, Zs, append_in_aaa(Xs, Ys, Zs))
   APPEND_IN_AAA(.(H, Xs), Ys, .(H, Zs)) -> APPEND_IN_AAA(Xs, Ys, Zs)

The TRS R consists of the following rules:

   p_in_aaa(X, Y, Z) -> U1_aaa(X, Y, Z, append_in_aaa(.(X, Y), Z, Y))
   append_in_aaa([], Y, Y) -> append_out_aaa([], Y, Y)
   append_in_aaa(.(H, Xs), Ys, .(H, Zs)) -> U2_aaa(H, Xs, Ys, Zs, append_in_aaa(Xs, Ys, Zs))
   U2_aaa(H, Xs, Ys, Zs, append_out_aaa(Xs, Ys, Zs)) -> append_out_aaa(.(H, Xs), Ys, .(H, Zs))
   U1_aaa(X, Y, Z, append_out_aaa(.(X, Y), Z, Y)) -> p_out_aaa(X, Y, Z)

The argument filtering Pi contains the following mapping:
p_in_aaa(x1, x2, x3)  =  p_in_aaa

U1_aaa(x1, x2, x3, x4)  =  U1_aaa(x4)

append_in_aaa(x1, x2, x3)  =  append_in_aaa

.(x1, x2)  =  .(x2)

append_out_aaa(x1, x2, x3)  =  append_out_aaa(x1)

U2_aaa(x1, x2, x3, x4, x5)  =  U2_aaa(x5)

p_out_aaa(x1, x2, x3)  =  p_out_aaa(x2)

P_IN_AAA(x1, x2, x3)  =  P_IN_AAA

U1_AAA(x1, x2, x3, x4)  =  U1_AAA(x4)

APPEND_IN_AAA(x1, x2, x3)  =  APPEND_IN_AAA

U2_AAA(x1, x2, x3, x4, x5)  =  U2_AAA(x5)


We have to consider all (P,R,Pi)-chains
----------------------------------------

(35) DependencyGraphProof (EQUIVALENT)
The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 3 less nodes.
----------------------------------------

(36)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   APPEND_IN_AAA(.(H, Xs), Ys, .(H, Zs)) -> APPEND_IN_AAA(Xs, Ys, Zs)

The TRS R consists of the following rules:

   p_in_aaa(X, Y, Z) -> U1_aaa(X, Y, Z, append_in_aaa(.(X, Y), Z, Y))
   append_in_aaa([], Y, Y) -> append_out_aaa([], Y, Y)
   append_in_aaa(.(H, Xs), Ys, .(H, Zs)) -> U2_aaa(H, Xs, Ys, Zs, append_in_aaa(Xs, Ys, Zs))
   U2_aaa(H, Xs, Ys, Zs, append_out_aaa(Xs, Ys, Zs)) -> append_out_aaa(.(H, Xs), Ys, .(H, Zs))
   U1_aaa(X, Y, Z, append_out_aaa(.(X, Y), Z, Y)) -> p_out_aaa(X, Y, Z)

The argument filtering Pi contains the following mapping:
p_in_aaa(x1, x2, x3)  =  p_in_aaa

U1_aaa(x1, x2, x3, x4)  =  U1_aaa(x4)

append_in_aaa(x1, x2, x3)  =  append_in_aaa

.(x1, x2)  =  .(x2)

append_out_aaa(x1, x2, x3)  =  append_out_aaa(x1)

U2_aaa(x1, x2, x3, x4, x5)  =  U2_aaa(x5)

p_out_aaa(x1, x2, x3)  =  p_out_aaa(x2)

APPEND_IN_AAA(x1, x2, x3)  =  APPEND_IN_AAA


We have to consider all (P,R,Pi)-chains
----------------------------------------

(37) UsableRulesProof (EQUIVALENT)
For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.
----------------------------------------

(38)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   APPEND_IN_AAA(.(H, Xs), Ys, .(H, Zs)) -> APPEND_IN_AAA(Xs, Ys, Zs)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)

APPEND_IN_AAA(x1, x2, x3)  =  APPEND_IN_AAA


We have to consider all (P,R,Pi)-chains
----------------------------------------

(39) PiDPToQDPProof (SOUND)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
----------------------------------------

(40)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   APPEND_IN_AAA -> APPEND_IN_AAA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
----------------------------------------

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

{
    "root": 2,
    "program": {
        "directives": [],
        "clauses": [
            [
                "(p X Y Z)",
                "(append (. X Y) Z Y)"
            ],
            [
                "(append ([]) Y Y)",
                null
            ],
            [
                "(append (. H Xs) Ys (. H Zs))",
                "(append Xs Ys Zs)"
            ]
        ]
    },
    "graph": {
        "nodes": {
            "11": {
                "goal": [{
                    "clause": 0,
                    "scope": 1,
                    "term": "(p T1 T2 T3)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "2": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(p T1 T2 T3)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "116": {
                "goal": [
                    {
                        "clause": 1,
                        "scope": 2,
                        "term": "(append (. T18 T17) T16 T17)"
                    },
                    {
                        "clause": 2,
                        "scope": 2,
                        "term": "(append (. T18 T17) T16 T17)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "117": {
                "goal": [{
                    "clause": 2,
                    "scope": 2,
                    "term": "(append (. T18 T17) T16 T17)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "118": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(append (. T33 T32) T31 T32)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "119": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "61": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(append (. T18 T17) T16 T17)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "type": "Nodes"
        },
        "edges": [
            {
                "from": 2,
                "to": 11,
                "label": "CASE"
            },
            {
                "from": 11,
                "to": 61,
                "label": "ONLY EVAL with clause\np(X9, X10, X11) :- append(.(X9, X10), X11, X10).\nand substitutionT1 -> T18,\nX9 -> T18,\nT2 -> T17,\nX10 -> T17,\nT3 -> T16,\nX11 -> T16,\nT15 -> T16,\nT14 -> T17,\nT13 -> T18"
            },
            {
                "from": 61,
                "to": 116,
                "label": "CASE"
            },
            {
                "from": 116,
                "to": 117,
                "label": "BACKTRACK\nfor clause: append([], Y, Y)because of non-unification"
            },
            {
                "from": 117,
                "to": 118,
                "label": "EVAL with clause\nappend(.(X23, X24), X25, .(X23, X26)) :- append(X24, X25, X26).\nand substitutionT18 -> T33,\nX23 -> T33,\nT17 -> .(T33, T32),\nX24 -> .(T33, T32),\nT16 -> T31,\nX25 -> T31,\nX26 -> T32,\nT28 -> .(T33, T32),\nT29 -> T31,\nT30 -> T32,\nT27 -> T33"
            },
            {
                "from": 117,
                "to": 119,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 118,
                "to": 61,
                "label": "INSTANCE with matching:\nT18 -> T33\nT17 -> T32\nT16 -> T31"
            }
        ],
        "type": "Graph"
    }
}

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

(42)
Obligation:
Rules:
f61_out -> f118_out :|: TRUE
f118_in -> f61_in :|: TRUE
f117_in -> f118_in :|: TRUE
f118_out -> f117_out :|: TRUE
f117_in -> f119_in :|: TRUE
f119_out -> f117_out :|: TRUE
f61_in -> f116_in :|: TRUE
f116_out -> f61_out :|: TRUE
f117_out -> f116_out :|: TRUE
f116_in -> f117_in :|: TRUE
f2_in -> f11_in :|: TRUE
f11_out -> f2_out :|: TRUE
f11_in -> f61_in :|: TRUE
f61_out -> f11_out :|: TRUE
Start term: f2_in

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

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

Simplified to the following IRSwTs:

intTRSProblem:
f118_in -> f61_in :|: TRUE
f117_in -> f118_in :|: TRUE
f61_in -> f116_in :|: TRUE
f116_in -> f117_in :|: TRUE


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

(44)
Obligation:
Rules:
f118_in -> f61_in :|: TRUE
f117_in -> f118_in :|: TRUE
f61_in -> f116_in :|: TRUE
f116_in -> f117_in :|: TRUE

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

(45) IntTRSCompressionProof (EQUIVALENT)
Compressed rules.
----------------------------------------

(46)
Obligation:
Rules:
f117_in -> f117_in :|: TRUE

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

(47) IRSFormatTransformerProof (EQUIVALENT)
Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %).
----------------------------------------

(48)
Obligation:
Rules:
f117_in -> f117_in :|: TRUE

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

(49) IRSwTTerminationDigraphProof (EQUIVALENT)
Constructed termination digraph!
Nodes:
(1) f117_in -> f117_in :|: TRUE

Arcs:
(1) -> (1)

This digraph is fully evaluated!
----------------------------------------

(50)
Obligation:

Termination digraph:
Nodes:
(1) f117_in -> f117_in :|: TRUE

Arcs:
(1) -> (1)

This digraph is fully evaluated!

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

(51) FilterProof (EQUIVALENT)
Used the following sort dictionary for filtering: 
f117_in()
Replaced non-predefined constructor symbols by 0.
----------------------------------------

(52)
Obligation:
Rules:
f117_in -> f117_in :|: TRUE

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

(53) IntTRSPeriodicNontermProof (COMPLETE)
Normalized system to the following form:
f(pc) -> f(1) :|: pc = 1 && TRUE
Witness term starting non-terminating reduction: f(1)
----------------------------------------

(54)
NO
