(0) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
a__U11(tt, N) → mark(N)
a__U21(tt, M, N) → s(a__plus(mark(N), mark(M)))
a__U31(tt) → 0
a__U41(tt, M, N) → a__plus(a__x(mark(N), mark(M)), mark(N))
a__and(tt, X) → mark(X)
a__isNat(0) → tt
a__isNat(plus(V1, V2)) → a__and(a__isNat(V1), isNat(V2))
a__isNat(s(V1)) → a__isNat(V1)
a__isNat(x(V1, V2)) → a__and(a__isNat(V1), isNat(V2))
a__plus(N, 0) → a__U11(a__isNat(N), N)
a__plus(N, s(M)) → a__U21(a__and(a__isNat(M), isNat(N)), M, N)
a__x(N, 0) → a__U31(a__isNat(N))
a__x(N, s(M)) → a__U41(a__and(a__isNat(M), isNat(N)), M, N)
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U21(X1, X2, X3)) → a__U21(mark(X1), X2, X3)
mark(plus(X1, X2)) → a__plus(mark(X1), mark(X2))
mark(U31(X)) → a__U31(mark(X))
mark(U41(X1, X2, X3)) → a__U41(mark(X1), X2, X3)
mark(x(X1, X2)) → a__x(mark(X1), mark(X2))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(isNat(X)) → a__isNat(X)
mark(tt) → tt
mark(s(X)) → s(mark(X))
mark(0) → 0
a__U11(X1, X2) → U11(X1, X2)
a__U21(X1, X2, X3) → U21(X1, X2, X3)
a__plus(X1, X2) → plus(X1, X2)
a__U31(X) → U31(X)
a__U41(X1, X2, X3) → U41(X1, X2, X3)
a__x(X1, X2) → x(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__isNat(X) → isNat(X)
Q is empty.
(1) QTRSRRRProof (EQUIVALENT transformation)
Used ordering:
Combined order from the following AFS and order.
a__U11(
x1,
x2) =
a__U11(
x1,
x2)
tt =
tt
mark(
x1) =
x1
a__U21(
x1,
x2,
x3) =
a__U21(
x1,
x2,
x3)
s(
x1) =
s(
x1)
a__plus(
x1,
x2) =
a__plus(
x1,
x2)
a__U31(
x1) =
x1
0 =
0
a__U41(
x1,
x2,
x3) =
a__U41(
x1,
x2,
x3)
a__x(
x1,
x2) =
a__x(
x1,
x2)
a__and(
x1,
x2) =
a__and(
x1,
x2)
a__isNat(
x1) =
a__isNat(
x1)
plus(
x1,
x2) =
plus(
x1,
x2)
isNat(
x1) =
isNat(
x1)
x(
x1,
x2) =
x(
x1,
x2)
U11(
x1,
x2) =
U11(
x1,
x2)
U21(
x1,
x2,
x3) =
U21(
x1,
x2,
x3)
U31(
x1) =
x1
U41(
x1,
x2,
x3) =
U41(
x1,
x2,
x3)
and(
x1,
x2) =
and(
x1,
x2)
Recursive path order with status [RPO].
Quasi-Precedence:
[tt, 0] > [aU413, ax2, x2, U413] > [aU213, aplus2, plus2, U213] > [aU112, s1, aand2, aisNat1, isNat1, U112, and2]
Status:
aU112: multiset
tt: multiset
aU213: [3,2,1]
s1: [1]
aplus2: [1,2]
0: multiset
aU413: [2,3,1]
ax2: [2,1]
aand2: multiset
aisNat1: multiset
plus2: [1,2]
isNat1: multiset
x2: [2,1]
U112: multiset
U213: [3,2,1]
U413: [2,3,1]
and2: multiset
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:
a__U11(tt, N) → mark(N)
a__U21(tt, M, N) → s(a__plus(mark(N), mark(M)))
a__U41(tt, M, N) → a__plus(a__x(mark(N), mark(M)), mark(N))
a__and(tt, X) → mark(X)
a__isNat(0) → tt
a__isNat(plus(V1, V2)) → a__and(a__isNat(V1), isNat(V2))
a__isNat(s(V1)) → a__isNat(V1)
a__isNat(x(V1, V2)) → a__and(a__isNat(V1), isNat(V2))
a__plus(N, 0) → a__U11(a__isNat(N), N)
a__plus(N, s(M)) → a__U21(a__and(a__isNat(M), isNat(N)), M, N)
a__x(N, 0) → a__U31(a__isNat(N))
a__x(N, s(M)) → a__U41(a__and(a__isNat(M), isNat(N)), M, N)
(2) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
a__U31(tt) → 0
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U21(X1, X2, X3)) → a__U21(mark(X1), X2, X3)
mark(plus(X1, X2)) → a__plus(mark(X1), mark(X2))
mark(U31(X)) → a__U31(mark(X))
mark(U41(X1, X2, X3)) → a__U41(mark(X1), X2, X3)
mark(x(X1, X2)) → a__x(mark(X1), mark(X2))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(isNat(X)) → a__isNat(X)
mark(tt) → tt
mark(s(X)) → s(mark(X))
mark(0) → 0
a__U11(X1, X2) → U11(X1, X2)
a__U21(X1, X2, X3) → U21(X1, X2, X3)
a__plus(X1, X2) → plus(X1, X2)
a__U31(X) → U31(X)
a__U41(X1, X2, X3) → U41(X1, X2, X3)
a__x(X1, X2) → x(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__isNat(X) → isNat(X)
Q is empty.
(3) QTRSRRRProof (EQUIVALENT transformation)
Used ordering:
Knuth-Bendix order [KBO] with precedence:
mark1 > s1 > aisNat1 > isNat1 > aand2 > aU213 > U213 > aU112 > U112 > and2 > aU311 > aplus2 > aU413 > plus2 > tt > U413 > U311 > ax2 > x2 > 0
and weight map:
tt=1
0=2
a__U31_1=1
mark_1=0
U31_1=1
isNat_1=1
a__isNat_1=1
s_1=1
U11_2=0
a__U11_2=0
U21_3=0
a__U21_3=0
plus_2=0
a__plus_2=0
U41_3=0
a__U41_3=0
x_2=0
a__x_2=0
and_2=0
a__and_2=0
The variable weight is 1With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:
a__U31(tt) → 0
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U21(X1, X2, X3)) → a__U21(mark(X1), X2, X3)
mark(plus(X1, X2)) → a__plus(mark(X1), mark(X2))
mark(U31(X)) → a__U31(mark(X))
mark(U41(X1, X2, X3)) → a__U41(mark(X1), X2, X3)
mark(x(X1, X2)) → a__x(mark(X1), mark(X2))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(isNat(X)) → a__isNat(X)
mark(tt) → tt
mark(s(X)) → s(mark(X))
mark(0) → 0
a__U11(X1, X2) → U11(X1, X2)
a__U21(X1, X2, X3) → U21(X1, X2, X3)
a__plus(X1, X2) → plus(X1, X2)
a__U31(X) → U31(X)
a__U41(X1, X2, X3) → U41(X1, X2, X3)
a__x(X1, X2) → x(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__isNat(X) → isNat(X)
(4) Obligation:
Q restricted rewrite system:
R is empty.
Q is empty.
(5) RisEmptyProof (EQUIVALENT transformation)
The TRS R is empty. Hence, termination is trivially proven.
(6) YES