(0) Obligation:

Clauses:

hidden_flatten([], L, L).
hidden_flatten(.(.(H, T), L), S, F) :- ','(!, ','(hidden_flatten(L, S, Lf), hidden_flatten(.(H, T), Lf, F))).
hidden_flatten(.(H, T), S, .(H, L)) :- hidden_flatten(T, S, L).

Queries:

hidden_flatten(g,a,a).

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph.

(2) Obligation:

Clauses:

hidden_flatten1([], T4, T4).
hidden_flatten1(.(.(T5, T6), T7), T10, T11) :- hidden_flatten11(T7, T10, X14).
hidden_flatten1(.(.(T5, T6), T7), T10, T13) :- ','(hidden_flatten11(T7, T10, T12), hidden_flatten1(.(T5, T6), T12, T13)).
hidden_flatten1(.(T25, T26), T29, .(T25, T30)) :- hidden_flatten1(T26, T29, T30).
hidden_flatten11([], T14, T14).
hidden_flatten11(.(.(T15, T16), T17), T19, X29) :- hidden_flatten11(T17, T19, X28).
hidden_flatten11(.(.(T15, T16), T17), T19, X29) :- ','(hidden_flatten11(T17, T19, T20), hidden_flatten1(.(T15, T16), T20, X29)).
hidden_flatten11(.(T21, T22), T24, .(T21, X38)) :- hidden_flatten11(T22, T24, X38).

Queries:

hidden_flatten1(g,a,a).

(3) PrologToPiTRSProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
hidden_flatten1_in: (b,f,f)
hidden_flatten11_in: (b,f,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

hidden_flatten1_in_gaa([], T4, T4) → hidden_flatten1_out_gaa([], T4, T4)
hidden_flatten1_in_gaa(.(.(T5, T6), T7), T10, T11) → U1_gaa(T5, T6, T7, T10, T11, hidden_flatten11_in_gaa(T7, T10, X14))
hidden_flatten11_in_gaa([], T14, T14) → hidden_flatten11_out_gaa([], T14, T14)
hidden_flatten11_in_gaa(.(.(T15, T16), T17), T19, X29) → U5_gaa(T15, T16, T17, T19, X29, hidden_flatten11_in_gaa(T17, T19, X28))
hidden_flatten11_in_gaa(.(.(T15, T16), T17), T19, X29) → U6_gaa(T15, T16, T17, T19, X29, hidden_flatten11_in_gaa(T17, T19, T20))
hidden_flatten11_in_gaa(.(T21, T22), T24, .(T21, X38)) → U8_gaa(T21, T22, T24, X38, hidden_flatten11_in_gaa(T22, T24, X38))
U8_gaa(T21, T22, T24, X38, hidden_flatten11_out_gaa(T22, T24, X38)) → hidden_flatten11_out_gaa(.(T21, T22), T24, .(T21, X38))
U6_gaa(T15, T16, T17, T19, X29, hidden_flatten11_out_gaa(T17, T19, T20)) → U7_gaa(T15, T16, T17, T19, X29, hidden_flatten1_in_gaa(.(T15, T16), T20, X29))
hidden_flatten1_in_gaa(.(.(T5, T6), T7), T10, T13) → U2_gaa(T5, T6, T7, T10, T13, hidden_flatten11_in_gaa(T7, T10, T12))
U2_gaa(T5, T6, T7, T10, T13, hidden_flatten11_out_gaa(T7, T10, T12)) → U3_gaa(T5, T6, T7, T10, T13, hidden_flatten1_in_gaa(.(T5, T6), T12, T13))
hidden_flatten1_in_gaa(.(T25, T26), T29, .(T25, T30)) → U4_gaa(T25, T26, T29, T30, hidden_flatten1_in_gaa(T26, T29, T30))
U4_gaa(T25, T26, T29, T30, hidden_flatten1_out_gaa(T26, T29, T30)) → hidden_flatten1_out_gaa(.(T25, T26), T29, .(T25, T30))
U3_gaa(T5, T6, T7, T10, T13, hidden_flatten1_out_gaa(.(T5, T6), T12, T13)) → hidden_flatten1_out_gaa(.(.(T5, T6), T7), T10, T13)
U7_gaa(T15, T16, T17, T19, X29, hidden_flatten1_out_gaa(.(T15, T16), T20, X29)) → hidden_flatten11_out_gaa(.(.(T15, T16), T17), T19, X29)
U5_gaa(T15, T16, T17, T19, X29, hidden_flatten11_out_gaa(T17, T19, X28)) → hidden_flatten11_out_gaa(.(.(T15, T16), T17), T19, X29)
U1_gaa(T5, T6, T7, T10, T11, hidden_flatten11_out_gaa(T7, T10, X14)) → hidden_flatten1_out_gaa(.(.(T5, T6), T7), T10, T11)

The argument filtering Pi contains the following mapping:
hidden_flatten1_in_gaa(x1, x2, x3)  =  hidden_flatten1_in_gaa(x1)
[]  =  []
hidden_flatten1_out_gaa(x1, x2, x3)  =  hidden_flatten1_out_gaa
.(x1, x2)  =  .(x1, x2)
U1_gaa(x1, x2, x3, x4, x5, x6)  =  U1_gaa(x6)
hidden_flatten11_in_gaa(x1, x2, x3)  =  hidden_flatten11_in_gaa(x1)
hidden_flatten11_out_gaa(x1, x2, x3)  =  hidden_flatten11_out_gaa
U5_gaa(x1, x2, x3, x4, x5, x6)  =  U5_gaa(x6)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x1, x2, x6)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x5)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U2_gaa(x1, x2, x3, x4, x5, x6)  =  U2_gaa(x1, x2, x6)
U3_gaa(x1, x2, x3, x4, x5, x6)  =  U3_gaa(x6)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

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

hidden_flatten1_in_gaa([], T4, T4) → hidden_flatten1_out_gaa([], T4, T4)
hidden_flatten1_in_gaa(.(.(T5, T6), T7), T10, T11) → U1_gaa(T5, T6, T7, T10, T11, hidden_flatten11_in_gaa(T7, T10, X14))
hidden_flatten11_in_gaa([], T14, T14) → hidden_flatten11_out_gaa([], T14, T14)
hidden_flatten11_in_gaa(.(.(T15, T16), T17), T19, X29) → U5_gaa(T15, T16, T17, T19, X29, hidden_flatten11_in_gaa(T17, T19, X28))
hidden_flatten11_in_gaa(.(.(T15, T16), T17), T19, X29) → U6_gaa(T15, T16, T17, T19, X29, hidden_flatten11_in_gaa(T17, T19, T20))
hidden_flatten11_in_gaa(.(T21, T22), T24, .(T21, X38)) → U8_gaa(T21, T22, T24, X38, hidden_flatten11_in_gaa(T22, T24, X38))
U8_gaa(T21, T22, T24, X38, hidden_flatten11_out_gaa(T22, T24, X38)) → hidden_flatten11_out_gaa(.(T21, T22), T24, .(T21, X38))
U6_gaa(T15, T16, T17, T19, X29, hidden_flatten11_out_gaa(T17, T19, T20)) → U7_gaa(T15, T16, T17, T19, X29, hidden_flatten1_in_gaa(.(T15, T16), T20, X29))
hidden_flatten1_in_gaa(.(.(T5, T6), T7), T10, T13) → U2_gaa(T5, T6, T7, T10, T13, hidden_flatten11_in_gaa(T7, T10, T12))
U2_gaa(T5, T6, T7, T10, T13, hidden_flatten11_out_gaa(T7, T10, T12)) → U3_gaa(T5, T6, T7, T10, T13, hidden_flatten1_in_gaa(.(T5, T6), T12, T13))
hidden_flatten1_in_gaa(.(T25, T26), T29, .(T25, T30)) → U4_gaa(T25, T26, T29, T30, hidden_flatten1_in_gaa(T26, T29, T30))
U4_gaa(T25, T26, T29, T30, hidden_flatten1_out_gaa(T26, T29, T30)) → hidden_flatten1_out_gaa(.(T25, T26), T29, .(T25, T30))
U3_gaa(T5, T6, T7, T10, T13, hidden_flatten1_out_gaa(.(T5, T6), T12, T13)) → hidden_flatten1_out_gaa(.(.(T5, T6), T7), T10, T13)
U7_gaa(T15, T16, T17, T19, X29, hidden_flatten1_out_gaa(.(T15, T16), T20, X29)) → hidden_flatten11_out_gaa(.(.(T15, T16), T17), T19, X29)
U5_gaa(T15, T16, T17, T19, X29, hidden_flatten11_out_gaa(T17, T19, X28)) → hidden_flatten11_out_gaa(.(.(T15, T16), T17), T19, X29)
U1_gaa(T5, T6, T7, T10, T11, hidden_flatten11_out_gaa(T7, T10, X14)) → hidden_flatten1_out_gaa(.(.(T5, T6), T7), T10, T11)

The argument filtering Pi contains the following mapping:
hidden_flatten1_in_gaa(x1, x2, x3)  =  hidden_flatten1_in_gaa(x1)
[]  =  []
hidden_flatten1_out_gaa(x1, x2, x3)  =  hidden_flatten1_out_gaa
.(x1, x2)  =  .(x1, x2)
U1_gaa(x1, x2, x3, x4, x5, x6)  =  U1_gaa(x6)
hidden_flatten11_in_gaa(x1, x2, x3)  =  hidden_flatten11_in_gaa(x1)
hidden_flatten11_out_gaa(x1, x2, x3)  =  hidden_flatten11_out_gaa
U5_gaa(x1, x2, x3, x4, x5, x6)  =  U5_gaa(x6)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x1, x2, x6)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x5)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U2_gaa(x1, x2, x3, x4, x5, x6)  =  U2_gaa(x1, x2, x6)
U3_gaa(x1, x2, x3, x4, x5, x6)  =  U3_gaa(x6)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)

(5) DependencyPairsProof (EQUIVALENT transformation)

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

HIDDEN_FLATTEN1_IN_GAA(.(.(T5, T6), T7), T10, T11) → U1_GAA(T5, T6, T7, T10, T11, hidden_flatten11_in_gaa(T7, T10, X14))
HIDDEN_FLATTEN1_IN_GAA(.(.(T5, T6), T7), T10, T11) → HIDDEN_FLATTEN11_IN_GAA(T7, T10, X14)
HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17), T19, X29) → U5_GAA(T15, T16, T17, T19, X29, hidden_flatten11_in_gaa(T17, T19, X28))
HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17), T19, X29) → HIDDEN_FLATTEN11_IN_GAA(T17, T19, X28)
HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17), T19, X29) → U6_GAA(T15, T16, T17, T19, X29, hidden_flatten11_in_gaa(T17, T19, T20))
HIDDEN_FLATTEN11_IN_GAA(.(T21, T22), T24, .(T21, X38)) → U8_GAA(T21, T22, T24, X38, hidden_flatten11_in_gaa(T22, T24, X38))
HIDDEN_FLATTEN11_IN_GAA(.(T21, T22), T24, .(T21, X38)) → HIDDEN_FLATTEN11_IN_GAA(T22, T24, X38)
U6_GAA(T15, T16, T17, T19, X29, hidden_flatten11_out_gaa(T17, T19, T20)) → U7_GAA(T15, T16, T17, T19, X29, hidden_flatten1_in_gaa(.(T15, T16), T20, X29))
U6_GAA(T15, T16, T17, T19, X29, hidden_flatten11_out_gaa(T17, T19, T20)) → HIDDEN_FLATTEN1_IN_GAA(.(T15, T16), T20, X29)
HIDDEN_FLATTEN1_IN_GAA(.(.(T5, T6), T7), T10, T13) → U2_GAA(T5, T6, T7, T10, T13, hidden_flatten11_in_gaa(T7, T10, T12))
U2_GAA(T5, T6, T7, T10, T13, hidden_flatten11_out_gaa(T7, T10, T12)) → U3_GAA(T5, T6, T7, T10, T13, hidden_flatten1_in_gaa(.(T5, T6), T12, T13))
U2_GAA(T5, T6, T7, T10, T13, hidden_flatten11_out_gaa(T7, T10, T12)) → HIDDEN_FLATTEN1_IN_GAA(.(T5, T6), T12, T13)
HIDDEN_FLATTEN1_IN_GAA(.(T25, T26), T29, .(T25, T30)) → U4_GAA(T25, T26, T29, T30, hidden_flatten1_in_gaa(T26, T29, T30))
HIDDEN_FLATTEN1_IN_GAA(.(T25, T26), T29, .(T25, T30)) → HIDDEN_FLATTEN1_IN_GAA(T26, T29, T30)

The TRS R consists of the following rules:

hidden_flatten1_in_gaa([], T4, T4) → hidden_flatten1_out_gaa([], T4, T4)
hidden_flatten1_in_gaa(.(.(T5, T6), T7), T10, T11) → U1_gaa(T5, T6, T7, T10, T11, hidden_flatten11_in_gaa(T7, T10, X14))
hidden_flatten11_in_gaa([], T14, T14) → hidden_flatten11_out_gaa([], T14, T14)
hidden_flatten11_in_gaa(.(.(T15, T16), T17), T19, X29) → U5_gaa(T15, T16, T17, T19, X29, hidden_flatten11_in_gaa(T17, T19, X28))
hidden_flatten11_in_gaa(.(.(T15, T16), T17), T19, X29) → U6_gaa(T15, T16, T17, T19, X29, hidden_flatten11_in_gaa(T17, T19, T20))
hidden_flatten11_in_gaa(.(T21, T22), T24, .(T21, X38)) → U8_gaa(T21, T22, T24, X38, hidden_flatten11_in_gaa(T22, T24, X38))
U8_gaa(T21, T22, T24, X38, hidden_flatten11_out_gaa(T22, T24, X38)) → hidden_flatten11_out_gaa(.(T21, T22), T24, .(T21, X38))
U6_gaa(T15, T16, T17, T19, X29, hidden_flatten11_out_gaa(T17, T19, T20)) → U7_gaa(T15, T16, T17, T19, X29, hidden_flatten1_in_gaa(.(T15, T16), T20, X29))
hidden_flatten1_in_gaa(.(.(T5, T6), T7), T10, T13) → U2_gaa(T5, T6, T7, T10, T13, hidden_flatten11_in_gaa(T7, T10, T12))
U2_gaa(T5, T6, T7, T10, T13, hidden_flatten11_out_gaa(T7, T10, T12)) → U3_gaa(T5, T6, T7, T10, T13, hidden_flatten1_in_gaa(.(T5, T6), T12, T13))
hidden_flatten1_in_gaa(.(T25, T26), T29, .(T25, T30)) → U4_gaa(T25, T26, T29, T30, hidden_flatten1_in_gaa(T26, T29, T30))
U4_gaa(T25, T26, T29, T30, hidden_flatten1_out_gaa(T26, T29, T30)) → hidden_flatten1_out_gaa(.(T25, T26), T29, .(T25, T30))
U3_gaa(T5, T6, T7, T10, T13, hidden_flatten1_out_gaa(.(T5, T6), T12, T13)) → hidden_flatten1_out_gaa(.(.(T5, T6), T7), T10, T13)
U7_gaa(T15, T16, T17, T19, X29, hidden_flatten1_out_gaa(.(T15, T16), T20, X29)) → hidden_flatten11_out_gaa(.(.(T15, T16), T17), T19, X29)
U5_gaa(T15, T16, T17, T19, X29, hidden_flatten11_out_gaa(T17, T19, X28)) → hidden_flatten11_out_gaa(.(.(T15, T16), T17), T19, X29)
U1_gaa(T5, T6, T7, T10, T11, hidden_flatten11_out_gaa(T7, T10, X14)) → hidden_flatten1_out_gaa(.(.(T5, T6), T7), T10, T11)

The argument filtering Pi contains the following mapping:
hidden_flatten1_in_gaa(x1, x2, x3)  =  hidden_flatten1_in_gaa(x1)
[]  =  []
hidden_flatten1_out_gaa(x1, x2, x3)  =  hidden_flatten1_out_gaa
.(x1, x2)  =  .(x1, x2)
U1_gaa(x1, x2, x3, x4, x5, x6)  =  U1_gaa(x6)
hidden_flatten11_in_gaa(x1, x2, x3)  =  hidden_flatten11_in_gaa(x1)
hidden_flatten11_out_gaa(x1, x2, x3)  =  hidden_flatten11_out_gaa
U5_gaa(x1, x2, x3, x4, x5, x6)  =  U5_gaa(x6)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x1, x2, x6)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x5)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U2_gaa(x1, x2, x3, x4, x5, x6)  =  U2_gaa(x1, x2, x6)
U3_gaa(x1, x2, x3, x4, x5, x6)  =  U3_gaa(x6)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
HIDDEN_FLATTEN1_IN_GAA(x1, x2, x3)  =  HIDDEN_FLATTEN1_IN_GAA(x1)
U1_GAA(x1, x2, x3, x4, x5, x6)  =  U1_GAA(x6)
HIDDEN_FLATTEN11_IN_GAA(x1, x2, x3)  =  HIDDEN_FLATTEN11_IN_GAA(x1)
U5_GAA(x1, x2, x3, x4, x5, x6)  =  U5_GAA(x6)
U6_GAA(x1, x2, x3, x4, x5, x6)  =  U6_GAA(x1, x2, x6)
U8_GAA(x1, x2, x3, x4, x5)  =  U8_GAA(x5)
U7_GAA(x1, x2, x3, x4, x5, x6)  =  U7_GAA(x6)
U2_GAA(x1, x2, x3, x4, x5, x6)  =  U2_GAA(x1, x2, x6)
U3_GAA(x1, x2, x3, x4, x5, x6)  =  U3_GAA(x6)
U4_GAA(x1, x2, x3, x4, x5)  =  U4_GAA(x5)

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

(6) Obligation:

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

HIDDEN_FLATTEN1_IN_GAA(.(.(T5, T6), T7), T10, T11) → U1_GAA(T5, T6, T7, T10, T11, hidden_flatten11_in_gaa(T7, T10, X14))
HIDDEN_FLATTEN1_IN_GAA(.(.(T5, T6), T7), T10, T11) → HIDDEN_FLATTEN11_IN_GAA(T7, T10, X14)
HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17), T19, X29) → U5_GAA(T15, T16, T17, T19, X29, hidden_flatten11_in_gaa(T17, T19, X28))
HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17), T19, X29) → HIDDEN_FLATTEN11_IN_GAA(T17, T19, X28)
HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17), T19, X29) → U6_GAA(T15, T16, T17, T19, X29, hidden_flatten11_in_gaa(T17, T19, T20))
HIDDEN_FLATTEN11_IN_GAA(.(T21, T22), T24, .(T21, X38)) → U8_GAA(T21, T22, T24, X38, hidden_flatten11_in_gaa(T22, T24, X38))
HIDDEN_FLATTEN11_IN_GAA(.(T21, T22), T24, .(T21, X38)) → HIDDEN_FLATTEN11_IN_GAA(T22, T24, X38)
U6_GAA(T15, T16, T17, T19, X29, hidden_flatten11_out_gaa(T17, T19, T20)) → U7_GAA(T15, T16, T17, T19, X29, hidden_flatten1_in_gaa(.(T15, T16), T20, X29))
U6_GAA(T15, T16, T17, T19, X29, hidden_flatten11_out_gaa(T17, T19, T20)) → HIDDEN_FLATTEN1_IN_GAA(.(T15, T16), T20, X29)
HIDDEN_FLATTEN1_IN_GAA(.(.(T5, T6), T7), T10, T13) → U2_GAA(T5, T6, T7, T10, T13, hidden_flatten11_in_gaa(T7, T10, T12))
U2_GAA(T5, T6, T7, T10, T13, hidden_flatten11_out_gaa(T7, T10, T12)) → U3_GAA(T5, T6, T7, T10, T13, hidden_flatten1_in_gaa(.(T5, T6), T12, T13))
U2_GAA(T5, T6, T7, T10, T13, hidden_flatten11_out_gaa(T7, T10, T12)) → HIDDEN_FLATTEN1_IN_GAA(.(T5, T6), T12, T13)
HIDDEN_FLATTEN1_IN_GAA(.(T25, T26), T29, .(T25, T30)) → U4_GAA(T25, T26, T29, T30, hidden_flatten1_in_gaa(T26, T29, T30))
HIDDEN_FLATTEN1_IN_GAA(.(T25, T26), T29, .(T25, T30)) → HIDDEN_FLATTEN1_IN_GAA(T26, T29, T30)

The TRS R consists of the following rules:

hidden_flatten1_in_gaa([], T4, T4) → hidden_flatten1_out_gaa([], T4, T4)
hidden_flatten1_in_gaa(.(.(T5, T6), T7), T10, T11) → U1_gaa(T5, T6, T7, T10, T11, hidden_flatten11_in_gaa(T7, T10, X14))
hidden_flatten11_in_gaa([], T14, T14) → hidden_flatten11_out_gaa([], T14, T14)
hidden_flatten11_in_gaa(.(.(T15, T16), T17), T19, X29) → U5_gaa(T15, T16, T17, T19, X29, hidden_flatten11_in_gaa(T17, T19, X28))
hidden_flatten11_in_gaa(.(.(T15, T16), T17), T19, X29) → U6_gaa(T15, T16, T17, T19, X29, hidden_flatten11_in_gaa(T17, T19, T20))
hidden_flatten11_in_gaa(.(T21, T22), T24, .(T21, X38)) → U8_gaa(T21, T22, T24, X38, hidden_flatten11_in_gaa(T22, T24, X38))
U8_gaa(T21, T22, T24, X38, hidden_flatten11_out_gaa(T22, T24, X38)) → hidden_flatten11_out_gaa(.(T21, T22), T24, .(T21, X38))
U6_gaa(T15, T16, T17, T19, X29, hidden_flatten11_out_gaa(T17, T19, T20)) → U7_gaa(T15, T16, T17, T19, X29, hidden_flatten1_in_gaa(.(T15, T16), T20, X29))
hidden_flatten1_in_gaa(.(.(T5, T6), T7), T10, T13) → U2_gaa(T5, T6, T7, T10, T13, hidden_flatten11_in_gaa(T7, T10, T12))
U2_gaa(T5, T6, T7, T10, T13, hidden_flatten11_out_gaa(T7, T10, T12)) → U3_gaa(T5, T6, T7, T10, T13, hidden_flatten1_in_gaa(.(T5, T6), T12, T13))
hidden_flatten1_in_gaa(.(T25, T26), T29, .(T25, T30)) → U4_gaa(T25, T26, T29, T30, hidden_flatten1_in_gaa(T26, T29, T30))
U4_gaa(T25, T26, T29, T30, hidden_flatten1_out_gaa(T26, T29, T30)) → hidden_flatten1_out_gaa(.(T25, T26), T29, .(T25, T30))
U3_gaa(T5, T6, T7, T10, T13, hidden_flatten1_out_gaa(.(T5, T6), T12, T13)) → hidden_flatten1_out_gaa(.(.(T5, T6), T7), T10, T13)
U7_gaa(T15, T16, T17, T19, X29, hidden_flatten1_out_gaa(.(T15, T16), T20, X29)) → hidden_flatten11_out_gaa(.(.(T15, T16), T17), T19, X29)
U5_gaa(T15, T16, T17, T19, X29, hidden_flatten11_out_gaa(T17, T19, X28)) → hidden_flatten11_out_gaa(.(.(T15, T16), T17), T19, X29)
U1_gaa(T5, T6, T7, T10, T11, hidden_flatten11_out_gaa(T7, T10, X14)) → hidden_flatten1_out_gaa(.(.(T5, T6), T7), T10, T11)

The argument filtering Pi contains the following mapping:
hidden_flatten1_in_gaa(x1, x2, x3)  =  hidden_flatten1_in_gaa(x1)
[]  =  []
hidden_flatten1_out_gaa(x1, x2, x3)  =  hidden_flatten1_out_gaa
.(x1, x2)  =  .(x1, x2)
U1_gaa(x1, x2, x3, x4, x5, x6)  =  U1_gaa(x6)
hidden_flatten11_in_gaa(x1, x2, x3)  =  hidden_flatten11_in_gaa(x1)
hidden_flatten11_out_gaa(x1, x2, x3)  =  hidden_flatten11_out_gaa
U5_gaa(x1, x2, x3, x4, x5, x6)  =  U5_gaa(x6)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x1, x2, x6)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x5)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U2_gaa(x1, x2, x3, x4, x5, x6)  =  U2_gaa(x1, x2, x6)
U3_gaa(x1, x2, x3, x4, x5, x6)  =  U3_gaa(x6)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
HIDDEN_FLATTEN1_IN_GAA(x1, x2, x3)  =  HIDDEN_FLATTEN1_IN_GAA(x1)
U1_GAA(x1, x2, x3, x4, x5, x6)  =  U1_GAA(x6)
HIDDEN_FLATTEN11_IN_GAA(x1, x2, x3)  =  HIDDEN_FLATTEN11_IN_GAA(x1)
U5_GAA(x1, x2, x3, x4, x5, x6)  =  U5_GAA(x6)
U6_GAA(x1, x2, x3, x4, x5, x6)  =  U6_GAA(x1, x2, x6)
U8_GAA(x1, x2, x3, x4, x5)  =  U8_GAA(x5)
U7_GAA(x1, x2, x3, x4, x5, x6)  =  U7_GAA(x6)
U2_GAA(x1, x2, x3, x4, x5, x6)  =  U2_GAA(x1, x2, x6)
U3_GAA(x1, x2, x3, x4, x5, x6)  =  U3_GAA(x6)
U4_GAA(x1, x2, x3, x4, x5)  =  U4_GAA(x5)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 6 less nodes.

(8) Obligation:

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

HIDDEN_FLATTEN1_IN_GAA(.(.(T5, T6), T7), T10, T11) → HIDDEN_FLATTEN11_IN_GAA(T7, T10, X14)
HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17), T19, X29) → HIDDEN_FLATTEN11_IN_GAA(T17, T19, X28)
HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17), T19, X29) → U6_GAA(T15, T16, T17, T19, X29, hidden_flatten11_in_gaa(T17, T19, T20))
U6_GAA(T15, T16, T17, T19, X29, hidden_flatten11_out_gaa(T17, T19, T20)) → HIDDEN_FLATTEN1_IN_GAA(.(T15, T16), T20, X29)
HIDDEN_FLATTEN1_IN_GAA(.(.(T5, T6), T7), T10, T13) → U2_GAA(T5, T6, T7, T10, T13, hidden_flatten11_in_gaa(T7, T10, T12))
U2_GAA(T5, T6, T7, T10, T13, hidden_flatten11_out_gaa(T7, T10, T12)) → HIDDEN_FLATTEN1_IN_GAA(.(T5, T6), T12, T13)
HIDDEN_FLATTEN1_IN_GAA(.(T25, T26), T29, .(T25, T30)) → HIDDEN_FLATTEN1_IN_GAA(T26, T29, T30)
HIDDEN_FLATTEN11_IN_GAA(.(T21, T22), T24, .(T21, X38)) → HIDDEN_FLATTEN11_IN_GAA(T22, T24, X38)

The TRS R consists of the following rules:

hidden_flatten1_in_gaa([], T4, T4) → hidden_flatten1_out_gaa([], T4, T4)
hidden_flatten1_in_gaa(.(.(T5, T6), T7), T10, T11) → U1_gaa(T5, T6, T7, T10, T11, hidden_flatten11_in_gaa(T7, T10, X14))
hidden_flatten11_in_gaa([], T14, T14) → hidden_flatten11_out_gaa([], T14, T14)
hidden_flatten11_in_gaa(.(.(T15, T16), T17), T19, X29) → U5_gaa(T15, T16, T17, T19, X29, hidden_flatten11_in_gaa(T17, T19, X28))
hidden_flatten11_in_gaa(.(.(T15, T16), T17), T19, X29) → U6_gaa(T15, T16, T17, T19, X29, hidden_flatten11_in_gaa(T17, T19, T20))
hidden_flatten11_in_gaa(.(T21, T22), T24, .(T21, X38)) → U8_gaa(T21, T22, T24, X38, hidden_flatten11_in_gaa(T22, T24, X38))
U8_gaa(T21, T22, T24, X38, hidden_flatten11_out_gaa(T22, T24, X38)) → hidden_flatten11_out_gaa(.(T21, T22), T24, .(T21, X38))
U6_gaa(T15, T16, T17, T19, X29, hidden_flatten11_out_gaa(T17, T19, T20)) → U7_gaa(T15, T16, T17, T19, X29, hidden_flatten1_in_gaa(.(T15, T16), T20, X29))
hidden_flatten1_in_gaa(.(.(T5, T6), T7), T10, T13) → U2_gaa(T5, T6, T7, T10, T13, hidden_flatten11_in_gaa(T7, T10, T12))
U2_gaa(T5, T6, T7, T10, T13, hidden_flatten11_out_gaa(T7, T10, T12)) → U3_gaa(T5, T6, T7, T10, T13, hidden_flatten1_in_gaa(.(T5, T6), T12, T13))
hidden_flatten1_in_gaa(.(T25, T26), T29, .(T25, T30)) → U4_gaa(T25, T26, T29, T30, hidden_flatten1_in_gaa(T26, T29, T30))
U4_gaa(T25, T26, T29, T30, hidden_flatten1_out_gaa(T26, T29, T30)) → hidden_flatten1_out_gaa(.(T25, T26), T29, .(T25, T30))
U3_gaa(T5, T6, T7, T10, T13, hidden_flatten1_out_gaa(.(T5, T6), T12, T13)) → hidden_flatten1_out_gaa(.(.(T5, T6), T7), T10, T13)
U7_gaa(T15, T16, T17, T19, X29, hidden_flatten1_out_gaa(.(T15, T16), T20, X29)) → hidden_flatten11_out_gaa(.(.(T15, T16), T17), T19, X29)
U5_gaa(T15, T16, T17, T19, X29, hidden_flatten11_out_gaa(T17, T19, X28)) → hidden_flatten11_out_gaa(.(.(T15, T16), T17), T19, X29)
U1_gaa(T5, T6, T7, T10, T11, hidden_flatten11_out_gaa(T7, T10, X14)) → hidden_flatten1_out_gaa(.(.(T5, T6), T7), T10, T11)

The argument filtering Pi contains the following mapping:
hidden_flatten1_in_gaa(x1, x2, x3)  =  hidden_flatten1_in_gaa(x1)
[]  =  []
hidden_flatten1_out_gaa(x1, x2, x3)  =  hidden_flatten1_out_gaa
.(x1, x2)  =  .(x1, x2)
U1_gaa(x1, x2, x3, x4, x5, x6)  =  U1_gaa(x6)
hidden_flatten11_in_gaa(x1, x2, x3)  =  hidden_flatten11_in_gaa(x1)
hidden_flatten11_out_gaa(x1, x2, x3)  =  hidden_flatten11_out_gaa
U5_gaa(x1, x2, x3, x4, x5, x6)  =  U5_gaa(x6)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x1, x2, x6)
U8_gaa(x1, x2, x3, x4, x5)  =  U8_gaa(x5)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U2_gaa(x1, x2, x3, x4, x5, x6)  =  U2_gaa(x1, x2, x6)
U3_gaa(x1, x2, x3, x4, x5, x6)  =  U3_gaa(x6)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
HIDDEN_FLATTEN1_IN_GAA(x1, x2, x3)  =  HIDDEN_FLATTEN1_IN_GAA(x1)
HIDDEN_FLATTEN11_IN_GAA(x1, x2, x3)  =  HIDDEN_FLATTEN11_IN_GAA(x1)
U6_GAA(x1, x2, x3, x4, x5, x6)  =  U6_GAA(x1, x2, x6)
U2_GAA(x1, x2, x3, x4, x5, x6)  =  U2_GAA(x1, x2, x6)

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

(9) PiDPToQDPProof (SOUND transformation)

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

(10) Obligation:

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

HIDDEN_FLATTEN1_IN_GAA(.(.(T5, T6), T7)) → HIDDEN_FLATTEN11_IN_GAA(T7)
HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17)) → HIDDEN_FLATTEN11_IN_GAA(T17)
HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17)) → U6_GAA(T15, T16, hidden_flatten11_in_gaa(T17))
U6_GAA(T15, T16, hidden_flatten11_out_gaa) → HIDDEN_FLATTEN1_IN_GAA(.(T15, T16))
HIDDEN_FLATTEN1_IN_GAA(.(.(T5, T6), T7)) → U2_GAA(T5, T6, hidden_flatten11_in_gaa(T7))
U2_GAA(T5, T6, hidden_flatten11_out_gaa) → HIDDEN_FLATTEN1_IN_GAA(.(T5, T6))
HIDDEN_FLATTEN1_IN_GAA(.(T25, T26)) → HIDDEN_FLATTEN1_IN_GAA(T26)
HIDDEN_FLATTEN11_IN_GAA(.(T21, T22)) → HIDDEN_FLATTEN11_IN_GAA(T22)

The TRS R consists of the following rules:

hidden_flatten1_in_gaa([]) → hidden_flatten1_out_gaa
hidden_flatten1_in_gaa(.(.(T5, T6), T7)) → U1_gaa(hidden_flatten11_in_gaa(T7))
hidden_flatten11_in_gaa([]) → hidden_flatten11_out_gaa
hidden_flatten11_in_gaa(.(.(T15, T16), T17)) → U5_gaa(hidden_flatten11_in_gaa(T17))
hidden_flatten11_in_gaa(.(.(T15, T16), T17)) → U6_gaa(T15, T16, hidden_flatten11_in_gaa(T17))
hidden_flatten11_in_gaa(.(T21, T22)) → U8_gaa(hidden_flatten11_in_gaa(T22))
U8_gaa(hidden_flatten11_out_gaa) → hidden_flatten11_out_gaa
U6_gaa(T15, T16, hidden_flatten11_out_gaa) → U7_gaa(hidden_flatten1_in_gaa(.(T15, T16)))
hidden_flatten1_in_gaa(.(.(T5, T6), T7)) → U2_gaa(T5, T6, hidden_flatten11_in_gaa(T7))
U2_gaa(T5, T6, hidden_flatten11_out_gaa) → U3_gaa(hidden_flatten1_in_gaa(.(T5, T6)))
hidden_flatten1_in_gaa(.(T25, T26)) → U4_gaa(hidden_flatten1_in_gaa(T26))
U4_gaa(hidden_flatten1_out_gaa) → hidden_flatten1_out_gaa
U3_gaa(hidden_flatten1_out_gaa) → hidden_flatten1_out_gaa
U7_gaa(hidden_flatten1_out_gaa) → hidden_flatten11_out_gaa
U5_gaa(hidden_flatten11_out_gaa) → hidden_flatten11_out_gaa
U1_gaa(hidden_flatten11_out_gaa) → hidden_flatten1_out_gaa

The set Q consists of the following terms:

hidden_flatten1_in_gaa(x0)
hidden_flatten11_in_gaa(x0)
U8_gaa(x0)
U6_gaa(x0, x1, x2)
U2_gaa(x0, x1, x2)
U4_gaa(x0)
U3_gaa(x0)
U7_gaa(x0)
U5_gaa(x0)
U1_gaa(x0)

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

(11) UsableRulesReductionPairsProof (EQUIVALENT transformation)

By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

The following rules are removed from R:

hidden_flatten11_in_gaa([]) → hidden_flatten11_out_gaa
hidden_flatten1_in_gaa([]) → hidden_flatten1_out_gaa
Used ordering: POLO with Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 2·x1 + x2   
POL(HIDDEN_FLATTEN11_IN_GAA(x1)) = x1   
POL(HIDDEN_FLATTEN1_IN_GAA(x1)) = x1   
POL(U1_gaa(x1)) = x1   
POL(U2_GAA(x1, x2, x3)) = 2·x1 + x2 + x3   
POL(U2_gaa(x1, x2, x3)) = 2·x1 + x2 + x3   
POL(U3_gaa(x1)) = x1   
POL(U4_gaa(x1)) = x1   
POL(U5_gaa(x1)) = x1   
POL(U6_GAA(x1, x2, x3)) = 2·x1 + 2·x2 + x3   
POL(U6_gaa(x1, x2, x3)) = 2·x1 + x2 + x3   
POL(U7_gaa(x1)) = x1   
POL(U8_gaa(x1)) = x1   
POL([]) = 1   
POL(hidden_flatten11_in_gaa(x1)) = x1   
POL(hidden_flatten11_out_gaa) = 0   
POL(hidden_flatten1_in_gaa(x1)) = x1   
POL(hidden_flatten1_out_gaa) = 0   

(12) Obligation:

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

HIDDEN_FLATTEN1_IN_GAA(.(.(T5, T6), T7)) → HIDDEN_FLATTEN11_IN_GAA(T7)
HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17)) → HIDDEN_FLATTEN11_IN_GAA(T17)
HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17)) → U6_GAA(T15, T16, hidden_flatten11_in_gaa(T17))
U6_GAA(T15, T16, hidden_flatten11_out_gaa) → HIDDEN_FLATTEN1_IN_GAA(.(T15, T16))
HIDDEN_FLATTEN1_IN_GAA(.(.(T5, T6), T7)) → U2_GAA(T5, T6, hidden_flatten11_in_gaa(T7))
U2_GAA(T5, T6, hidden_flatten11_out_gaa) → HIDDEN_FLATTEN1_IN_GAA(.(T5, T6))
HIDDEN_FLATTEN1_IN_GAA(.(T25, T26)) → HIDDEN_FLATTEN1_IN_GAA(T26)
HIDDEN_FLATTEN11_IN_GAA(.(T21, T22)) → HIDDEN_FLATTEN11_IN_GAA(T22)

The TRS R consists of the following rules:

hidden_flatten11_in_gaa(.(.(T15, T16), T17)) → U5_gaa(hidden_flatten11_in_gaa(T17))
hidden_flatten11_in_gaa(.(.(T15, T16), T17)) → U6_gaa(T15, T16, hidden_flatten11_in_gaa(T17))
hidden_flatten11_in_gaa(.(T21, T22)) → U8_gaa(hidden_flatten11_in_gaa(T22))
U8_gaa(hidden_flatten11_out_gaa) → hidden_flatten11_out_gaa
U6_gaa(T15, T16, hidden_flatten11_out_gaa) → U7_gaa(hidden_flatten1_in_gaa(.(T15, T16)))
hidden_flatten1_in_gaa(.(.(T5, T6), T7)) → U1_gaa(hidden_flatten11_in_gaa(T7))
hidden_flatten1_in_gaa(.(.(T5, T6), T7)) → U2_gaa(T5, T6, hidden_flatten11_in_gaa(T7))
hidden_flatten1_in_gaa(.(T25, T26)) → U4_gaa(hidden_flatten1_in_gaa(T26))
U7_gaa(hidden_flatten1_out_gaa) → hidden_flatten11_out_gaa
U4_gaa(hidden_flatten1_out_gaa) → hidden_flatten1_out_gaa
U2_gaa(T5, T6, hidden_flatten11_out_gaa) → U3_gaa(hidden_flatten1_in_gaa(.(T5, T6)))
U3_gaa(hidden_flatten1_out_gaa) → hidden_flatten1_out_gaa
U1_gaa(hidden_flatten11_out_gaa) → hidden_flatten1_out_gaa
U5_gaa(hidden_flatten11_out_gaa) → hidden_flatten11_out_gaa

The set Q consists of the following terms:

hidden_flatten1_in_gaa(x0)
hidden_flatten11_in_gaa(x0)
U8_gaa(x0)
U6_gaa(x0, x1, x2)
U2_gaa(x0, x1, x2)
U4_gaa(x0)
U3_gaa(x0)
U7_gaa(x0)
U5_gaa(x0)
U1_gaa(x0)

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

(13) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

HIDDEN_FLATTEN1_IN_GAA(.(.(T5, T6), T7)) → HIDDEN_FLATTEN11_IN_GAA(T7)
HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17)) → U6_GAA(T15, T16, hidden_flatten11_in_gaa(T17))
U6_GAA(T15, T16, hidden_flatten11_out_gaa) → HIDDEN_FLATTEN1_IN_GAA(.(T15, T16))
HIDDEN_FLATTEN1_IN_GAA(.(.(T5, T6), T7)) → U2_GAA(T5, T6, hidden_flatten11_in_gaa(T7))
U2_GAA(T5, T6, hidden_flatten11_out_gaa) → HIDDEN_FLATTEN1_IN_GAA(.(T5, T6))

Strictly oriented rules of the TRS R:

U6_gaa(T15, T16, hidden_flatten11_out_gaa) → U7_gaa(hidden_flatten1_in_gaa(.(T15, T16)))
hidden_flatten1_in_gaa(.(.(T5, T6), T7)) → U1_gaa(hidden_flatten11_in_gaa(T7))
hidden_flatten1_in_gaa(.(.(T5, T6), T7)) → U2_gaa(T5, T6, hidden_flatten11_in_gaa(T7))
U7_gaa(hidden_flatten1_out_gaa) → hidden_flatten11_out_gaa
U2_gaa(T5, T6, hidden_flatten11_out_gaa) → U3_gaa(hidden_flatten1_in_gaa(.(T5, T6)))
U3_gaa(hidden_flatten1_out_gaa) → hidden_flatten1_out_gaa
U1_gaa(hidden_flatten11_out_gaa) → hidden_flatten1_out_gaa

Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = x1 + x2   
POL(HIDDEN_FLATTEN11_IN_GAA(x1)) = 1 + x1   
POL(HIDDEN_FLATTEN1_IN_GAA(x1)) = 2 + x1   
POL(U1_gaa(x1)) = x1   
POL(U2_GAA(x1, x2, x3)) = 1 + x1 + x2 + x3   
POL(U2_gaa(x1, x2, x3)) = x1 + x2 + x3   
POL(U3_gaa(x1)) = 1 + x1   
POL(U4_gaa(x1)) = x1   
POL(U5_gaa(x1)) = x1   
POL(U6_GAA(x1, x2, x3)) = x1 + x2 + x3   
POL(U6_gaa(x1, x2, x3)) = x1 + x2 + x3   
POL(U7_gaa(x1)) = 2 + x1   
POL(U8_gaa(x1)) = x1   
POL(hidden_flatten11_in_gaa(x1)) = x1   
POL(hidden_flatten11_out_gaa) = 4   
POL(hidden_flatten1_in_gaa(x1)) = 1 + x1   
POL(hidden_flatten1_out_gaa) = 3   

(14) Obligation:

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

HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17)) → HIDDEN_FLATTEN11_IN_GAA(T17)
HIDDEN_FLATTEN1_IN_GAA(.(T25, T26)) → HIDDEN_FLATTEN1_IN_GAA(T26)
HIDDEN_FLATTEN11_IN_GAA(.(T21, T22)) → HIDDEN_FLATTEN11_IN_GAA(T22)

The TRS R consists of the following rules:

hidden_flatten11_in_gaa(.(.(T15, T16), T17)) → U5_gaa(hidden_flatten11_in_gaa(T17))
hidden_flatten11_in_gaa(.(.(T15, T16), T17)) → U6_gaa(T15, T16, hidden_flatten11_in_gaa(T17))
hidden_flatten11_in_gaa(.(T21, T22)) → U8_gaa(hidden_flatten11_in_gaa(T22))
U8_gaa(hidden_flatten11_out_gaa) → hidden_flatten11_out_gaa
hidden_flatten1_in_gaa(.(T25, T26)) → U4_gaa(hidden_flatten1_in_gaa(T26))
U4_gaa(hidden_flatten1_out_gaa) → hidden_flatten1_out_gaa
U5_gaa(hidden_flatten11_out_gaa) → hidden_flatten11_out_gaa

The set Q consists of the following terms:

hidden_flatten1_in_gaa(x0)
hidden_flatten11_in_gaa(x0)
U8_gaa(x0)
U6_gaa(x0, x1, x2)
U2_gaa(x0, x1, x2)
U4_gaa(x0)
U3_gaa(x0)
U7_gaa(x0)
U5_gaa(x0)
U1_gaa(x0)

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

(15) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs.

(16) Complex Obligation (AND)

(17) Obligation:

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

HIDDEN_FLATTEN1_IN_GAA(.(T25, T26)) → HIDDEN_FLATTEN1_IN_GAA(T26)

The TRS R consists of the following rules:

hidden_flatten11_in_gaa(.(.(T15, T16), T17)) → U5_gaa(hidden_flatten11_in_gaa(T17))
hidden_flatten11_in_gaa(.(.(T15, T16), T17)) → U6_gaa(T15, T16, hidden_flatten11_in_gaa(T17))
hidden_flatten11_in_gaa(.(T21, T22)) → U8_gaa(hidden_flatten11_in_gaa(T22))
U8_gaa(hidden_flatten11_out_gaa) → hidden_flatten11_out_gaa
hidden_flatten1_in_gaa(.(T25, T26)) → U4_gaa(hidden_flatten1_in_gaa(T26))
U4_gaa(hidden_flatten1_out_gaa) → hidden_flatten1_out_gaa
U5_gaa(hidden_flatten11_out_gaa) → hidden_flatten11_out_gaa

The set Q consists of the following terms:

hidden_flatten1_in_gaa(x0)
hidden_flatten11_in_gaa(x0)
U8_gaa(x0)
U6_gaa(x0, x1, x2)
U2_gaa(x0, x1, x2)
U4_gaa(x0)
U3_gaa(x0)
U7_gaa(x0)
U5_gaa(x0)
U1_gaa(x0)

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

(18) UsableRulesProof (EQUIVALENT transformation)

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.

(19) Obligation:

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

HIDDEN_FLATTEN1_IN_GAA(.(T25, T26)) → HIDDEN_FLATTEN1_IN_GAA(T26)

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

hidden_flatten1_in_gaa(x0)
hidden_flatten11_in_gaa(x0)
U8_gaa(x0)
U6_gaa(x0, x1, x2)
U2_gaa(x0, x1, x2)
U4_gaa(x0)
U3_gaa(x0)
U7_gaa(x0)
U5_gaa(x0)
U1_gaa(x0)

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

(20) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

hidden_flatten1_in_gaa(x0)
hidden_flatten11_in_gaa(x0)
U8_gaa(x0)
U6_gaa(x0, x1, x2)
U2_gaa(x0, x1, x2)
U4_gaa(x0)
U3_gaa(x0)
U7_gaa(x0)
U5_gaa(x0)
U1_gaa(x0)

(21) Obligation:

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

HIDDEN_FLATTEN1_IN_GAA(.(T25, T26)) → HIDDEN_FLATTEN1_IN_GAA(T26)

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

(22) QDPSizeChangeProof (EQUIVALENT transformation)

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:

  • HIDDEN_FLATTEN1_IN_GAA(.(T25, T26)) → HIDDEN_FLATTEN1_IN_GAA(T26)
    The graph contains the following edges 1 > 1

(23) TRUE

(24) Obligation:

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

HIDDEN_FLATTEN11_IN_GAA(.(T21, T22)) → HIDDEN_FLATTEN11_IN_GAA(T22)
HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17)) → HIDDEN_FLATTEN11_IN_GAA(T17)

The TRS R consists of the following rules:

hidden_flatten11_in_gaa(.(.(T15, T16), T17)) → U5_gaa(hidden_flatten11_in_gaa(T17))
hidden_flatten11_in_gaa(.(.(T15, T16), T17)) → U6_gaa(T15, T16, hidden_flatten11_in_gaa(T17))
hidden_flatten11_in_gaa(.(T21, T22)) → U8_gaa(hidden_flatten11_in_gaa(T22))
U8_gaa(hidden_flatten11_out_gaa) → hidden_flatten11_out_gaa
hidden_flatten1_in_gaa(.(T25, T26)) → U4_gaa(hidden_flatten1_in_gaa(T26))
U4_gaa(hidden_flatten1_out_gaa) → hidden_flatten1_out_gaa
U5_gaa(hidden_flatten11_out_gaa) → hidden_flatten11_out_gaa

The set Q consists of the following terms:

hidden_flatten1_in_gaa(x0)
hidden_flatten11_in_gaa(x0)
U8_gaa(x0)
U6_gaa(x0, x1, x2)
U2_gaa(x0, x1, x2)
U4_gaa(x0)
U3_gaa(x0)
U7_gaa(x0)
U5_gaa(x0)
U1_gaa(x0)

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

(25) UsableRulesProof (EQUIVALENT transformation)

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.

(26) Obligation:

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

HIDDEN_FLATTEN11_IN_GAA(.(T21, T22)) → HIDDEN_FLATTEN11_IN_GAA(T22)
HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17)) → HIDDEN_FLATTEN11_IN_GAA(T17)

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

hidden_flatten1_in_gaa(x0)
hidden_flatten11_in_gaa(x0)
U8_gaa(x0)
U6_gaa(x0, x1, x2)
U2_gaa(x0, x1, x2)
U4_gaa(x0)
U3_gaa(x0)
U7_gaa(x0)
U5_gaa(x0)
U1_gaa(x0)

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

(27) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

hidden_flatten1_in_gaa(x0)
hidden_flatten11_in_gaa(x0)
U8_gaa(x0)
U6_gaa(x0, x1, x2)
U2_gaa(x0, x1, x2)
U4_gaa(x0)
U3_gaa(x0)
U7_gaa(x0)
U5_gaa(x0)
U1_gaa(x0)

(28) Obligation:

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

HIDDEN_FLATTEN11_IN_GAA(.(T21, T22)) → HIDDEN_FLATTEN11_IN_GAA(T22)
HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17)) → HIDDEN_FLATTEN11_IN_GAA(T17)

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

(29) QDPSizeChangeProof (EQUIVALENT transformation)

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:

  • HIDDEN_FLATTEN11_IN_GAA(.(T21, T22)) → HIDDEN_FLATTEN11_IN_GAA(T22)
    The graph contains the following edges 1 > 1

  • HIDDEN_FLATTEN11_IN_GAA(.(.(T15, T16), T17)) → HIDDEN_FLATTEN11_IN_GAA(T17)
    The graph contains the following edges 1 > 1

(30) TRUE