*** 1 Progress [(O(1),O(n^2))] ***
Considered Problem:
Strict DP Rules:
Strict TRS Rules:
domatch(patcs,Cons(x,xs),n) -> domatch[Ite](prefix(patcs,Cons(x,xs)),patcs,Cons(x,xs),n)
domatch(Cons(x,xs),Nil(),n) -> Nil()
domatch(Nil(),Nil(),n) -> Cons(n,Nil())
eqNatList(Cons(x,xs),Cons(y,ys)) -> eqNatList[Ite](!EQ(x,y),y,ys,x,xs)
eqNatList(Cons(x,xs),Nil()) -> False()
eqNatList(Nil(),Cons(y,ys)) -> False()
eqNatList(Nil(),Nil()) -> True()
notEmpty(Cons(x,xs)) -> True()
notEmpty(Nil()) -> False()
prefix(Cons(x,xs),Nil()) -> False()
prefix(Cons(x',xs'),Cons(x,xs)) -> and(!EQ(x',x),prefix(xs',xs))
prefix(Nil(),cs) -> True()
strmatch(patstr,str) -> domatch(patstr,str,Nil())
Weak DP Rules:
Weak TRS Rules:
!EQ(0(),0()) -> True()
!EQ(0(),S(y)) -> False()
!EQ(S(x),0()) -> False()
!EQ(S(x),S(y)) -> !EQ(x,y)
and(False(),False()) -> False()
and(False(),True()) -> False()
and(True(),False()) -> False()
and(True(),True()) -> True()
domatch[Ite](False(),patcs,Cons(x,xs),n) -> domatch(patcs,xs,Cons(n,Cons(Nil(),Nil())))
domatch[Ite](True(),patcs,Cons(x,xs),n) -> Cons(n,domatch(patcs,xs,Cons(n,Cons(Nil(),Nil()))))
eqNatList[Ite](False(),y,ys,x,xs) -> False()
eqNatList[Ite](True(),y,ys,x,xs) -> eqNatList(xs,ys)
Signature:
{!EQ/2,and/2,domatch/3,domatch[Ite]/4,eqNatList/2,eqNatList[Ite]/5,notEmpty/1,prefix/2,strmatch/2} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0}
Obligation:
Innermost
basic terms: {!EQ,and,domatch,domatch[Ite],eqNatList,eqNatList[Ite],notEmpty,prefix,strmatch}/{0,Cons,False,Nil,S,True}
Applied Processor:
NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just any strict-rules, greedy = NoGreedy}
Proof:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(Cons) = {2},
uargs(and) = {1,2},
uargs(domatch[Ite]) = {1},
uargs(eqNatList[Ite]) = {1}
Following symbols are considered usable:
{!EQ,and,domatch,domatch[Ite],eqNatList,eqNatList[Ite],notEmpty,prefix,strmatch}
TcT has computed the following interpretation:
p(!EQ) = [0]
p(0) = [0]
p(Cons) = [1] x2 + [0]
p(False) = [0]
p(Nil) = [1]
p(S) = [1] x1 + [0]
p(True) = [0]
p(and) = [2] x1 + [1] x2 + [0]
p(domatch) = [6] x1 + [3]
p(domatch[Ite]) = [4] x1 + [6] x2 + [3]
p(eqNatList) = [1]
p(eqNatList[Ite]) = [4] x1 + [1]
p(notEmpty) = [5]
p(prefix) = [0]
p(strmatch) = [7] x1 + [4] x2 + [5]
Following rules are strictly oriented:
domatch(Cons(x,xs),Nil(),n) = [6] xs + [3]
> [1]
= Nil()
domatch(Nil(),Nil(),n) = [9]
> [1]
= Cons(n,Nil())
eqNatList(Cons(x,xs),Nil()) = [1]
> [0]
= False()
eqNatList(Nil(),Cons(y,ys)) = [1]
> [0]
= False()
eqNatList(Nil(),Nil()) = [1]
> [0]
= True()
notEmpty(Cons(x,xs)) = [5]
> [0]
= True()
notEmpty(Nil()) = [5]
> [0]
= False()
strmatch(patstr,str) = [7] patstr + [4] str + [5]
> [6] patstr + [3]
= domatch(patstr,str,Nil())
Following rules are (at-least) weakly oriented:
!EQ(0(),0()) = [0]
>= [0]
= True()
!EQ(0(),S(y)) = [0]
>= [0]
= False()
!EQ(S(x),0()) = [0]
>= [0]
= False()
!EQ(S(x),S(y)) = [0]
>= [0]
= !EQ(x,y)
and(False(),False()) = [0]
>= [0]
= False()
and(False(),True()) = [0]
>= [0]
= False()
and(True(),False()) = [0]
>= [0]
= False()
and(True(),True()) = [0]
>= [0]
= True()
domatch(patcs,Cons(x,xs),n) = [6] patcs + [3]
>= [6] patcs + [3]
= domatch[Ite](prefix(patcs
,Cons(x,xs))
,patcs
,Cons(x,xs)
,n)
domatch[Ite](False() = [6] patcs + [3]
,patcs
,Cons(x,xs)
,n)
>= [6] patcs + [3]
= domatch(patcs
,xs
,Cons(n,Cons(Nil(),Nil())))
domatch[Ite](True() = [6] patcs + [3]
,patcs
,Cons(x,xs)
,n)
>= [6] patcs + [3]
= Cons(n
,domatch(patcs
,xs
,Cons(n,Cons(Nil(),Nil()))))
eqNatList(Cons(x,xs),Cons(y,ys)) = [1]
>= [1]
= eqNatList[Ite](!EQ(x,y)
,y
,ys
,x
,xs)
eqNatList[Ite](False() = [1]
,y
,ys
,x
,xs)
>= [0]
= False()
eqNatList[Ite](True(),y,ys,x,xs) = [1]
>= [1]
= eqNatList(xs,ys)
prefix(Cons(x,xs),Nil()) = [0]
>= [0]
= False()
prefix(Cons(x',xs'),Cons(x,xs)) = [0]
>= [0]
= and(!EQ(x',x),prefix(xs',xs))
prefix(Nil(),cs) = [0]
>= [0]
= True()
*** 1.1 Progress [(O(1),O(n^2))] ***
Considered Problem:
Strict DP Rules:
Strict TRS Rules:
domatch(patcs,Cons(x,xs),n) -> domatch[Ite](prefix(patcs,Cons(x,xs)),patcs,Cons(x,xs),n)
eqNatList(Cons(x,xs),Cons(y,ys)) -> eqNatList[Ite](!EQ(x,y),y,ys,x,xs)
prefix(Cons(x,xs),Nil()) -> False()
prefix(Cons(x',xs'),Cons(x,xs)) -> and(!EQ(x',x),prefix(xs',xs))
prefix(Nil(),cs) -> True()
Weak DP Rules:
Weak TRS Rules:
!EQ(0(),0()) -> True()
!EQ(0(),S(y)) -> False()
!EQ(S(x),0()) -> False()
!EQ(S(x),S(y)) -> !EQ(x,y)
and(False(),False()) -> False()
and(False(),True()) -> False()
and(True(),False()) -> False()
and(True(),True()) -> True()
domatch(Cons(x,xs),Nil(),n) -> Nil()
domatch(Nil(),Nil(),n) -> Cons(n,Nil())
domatch[Ite](False(),patcs,Cons(x,xs),n) -> domatch(patcs,xs,Cons(n,Cons(Nil(),Nil())))
domatch[Ite](True(),patcs,Cons(x,xs),n) -> Cons(n,domatch(patcs,xs,Cons(n,Cons(Nil(),Nil()))))
eqNatList(Cons(x,xs),Nil()) -> False()
eqNatList(Nil(),Cons(y,ys)) -> False()
eqNatList(Nil(),Nil()) -> True()
eqNatList[Ite](False(),y,ys,x,xs) -> False()
eqNatList[Ite](True(),y,ys,x,xs) -> eqNatList(xs,ys)
notEmpty(Cons(x,xs)) -> True()
notEmpty(Nil()) -> False()
strmatch(patstr,str) -> domatch(patstr,str,Nil())
Signature:
{!EQ/2,and/2,domatch/3,domatch[Ite]/4,eqNatList/2,eqNatList[Ite]/5,notEmpty/1,prefix/2,strmatch/2} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0}
Obligation:
Innermost
basic terms: {!EQ,and,domatch,domatch[Ite],eqNatList,eqNatList[Ite],notEmpty,prefix,strmatch}/{0,Cons,False,Nil,S,True}
Applied Processor:
WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny}
Proof:
The weightgap principle applies using the following nonconstant growth matrix-interpretation:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(Cons) = {2},
uargs(and) = {1,2},
uargs(domatch[Ite]) = {1},
uargs(eqNatList[Ite]) = {1}
Following symbols are considered usable:
{}
TcT has computed the following interpretation:
p(!EQ) = [1]
p(0) = [0]
p(Cons) = [1] x2 + [0]
p(False) = [1]
p(Nil) = [1]
p(S) = [0]
p(True) = [1]
p(and) = [1] x1 + [1] x2 + [2]
p(domatch) = [2] x1 + [7] x2 + [4] x3 + [0]
p(domatch[Ite]) = [1] x1 + [2] x2 + [7] x3 + [2] x4 + [3]
p(eqNatList) = [3] x1 + [4] x2 + [0]
p(eqNatList[Ite]) = [1] x1 + [4] x3 + [3] x5 + [0]
p(notEmpty) = [1] x1 + [2]
p(prefix) = [5]
p(strmatch) = [4] x1 + [7] x2 + [4]
Following rules are strictly oriented:
prefix(Cons(x,xs),Nil()) = [5]
> [1]
= False()
prefix(Nil(),cs) = [5]
> [1]
= True()
Following rules are (at-least) weakly oriented:
!EQ(0(),0()) = [1]
>= [1]
= True()
!EQ(0(),S(y)) = [1]
>= [1]
= False()
!EQ(S(x),0()) = [1]
>= [1]
= False()
!EQ(S(x),S(y)) = [1]
>= [1]
= !EQ(x,y)
and(False(),False()) = [4]
>= [1]
= False()
and(False(),True()) = [4]
>= [1]
= False()
and(True(),False()) = [4]
>= [1]
= False()
and(True(),True()) = [4]
>= [1]
= True()
domatch(patcs,Cons(x,xs),n) = [4] n + [2] patcs + [7] xs + [0]
>= [2] n + [2] patcs + [7] xs + [8]
= domatch[Ite](prefix(patcs
,Cons(x,xs))
,patcs
,Cons(x,xs)
,n)
domatch(Cons(x,xs),Nil(),n) = [4] n + [2] xs + [7]
>= [1]
= Nil()
domatch(Nil(),Nil(),n) = [4] n + [9]
>= [1]
= Cons(n,Nil())
domatch[Ite](False() = [2] n + [2] patcs + [7] xs + [4]
,patcs
,Cons(x,xs)
,n)
>= [2] patcs + [7] xs + [4]
= domatch(patcs
,xs
,Cons(n,Cons(Nil(),Nil())))
domatch[Ite](True() = [2] n + [2] patcs + [7] xs + [4]
,patcs
,Cons(x,xs)
,n)
>= [2] patcs + [7] xs + [4]
= Cons(n
,domatch(patcs
,xs
,Cons(n,Cons(Nil(),Nil()))))
eqNatList(Cons(x,xs),Cons(y,ys)) = [3] xs + [4] ys + [0]
>= [3] xs + [4] ys + [1]
= eqNatList[Ite](!EQ(x,y)
,y
,ys
,x
,xs)
eqNatList(Cons(x,xs),Nil()) = [3] xs + [4]
>= [1]
= False()
eqNatList(Nil(),Cons(y,ys)) = [4] ys + [3]
>= [1]
= False()
eqNatList(Nil(),Nil()) = [7]
>= [1]
= True()
eqNatList[Ite](False() = [3] xs + [4] ys + [1]
,y
,ys
,x
,xs)
>= [1]
= False()
eqNatList[Ite](True(),y,ys,x,xs) = [3] xs + [4] ys + [1]
>= [3] xs + [4] ys + [0]
= eqNatList(xs,ys)
notEmpty(Cons(x,xs)) = [1] xs + [2]
>= [1]
= True()
notEmpty(Nil()) = [3]
>= [1]
= False()
prefix(Cons(x',xs'),Cons(x,xs)) = [5]
>= [8]
= and(!EQ(x',x),prefix(xs',xs))
strmatch(patstr,str) = [4] patstr + [7] str + [4]
>= [2] patstr + [7] str + [4]
= domatch(patstr,str,Nil())
Further, it can be verified that all rules not oriented are covered by the weightgap condition.
*** 1.1.1 Progress [(O(1),O(n^2))] ***
Considered Problem:
Strict DP Rules:
Strict TRS Rules:
domatch(patcs,Cons(x,xs),n) -> domatch[Ite](prefix(patcs,Cons(x,xs)),patcs,Cons(x,xs),n)
eqNatList(Cons(x,xs),Cons(y,ys)) -> eqNatList[Ite](!EQ(x,y),y,ys,x,xs)
prefix(Cons(x',xs'),Cons(x,xs)) -> and(!EQ(x',x),prefix(xs',xs))
Weak DP Rules:
Weak TRS Rules:
!EQ(0(),0()) -> True()
!EQ(0(),S(y)) -> False()
!EQ(S(x),0()) -> False()
!EQ(S(x),S(y)) -> !EQ(x,y)
and(False(),False()) -> False()
and(False(),True()) -> False()
and(True(),False()) -> False()
and(True(),True()) -> True()
domatch(Cons(x,xs),Nil(),n) -> Nil()
domatch(Nil(),Nil(),n) -> Cons(n,Nil())
domatch[Ite](False(),patcs,Cons(x,xs),n) -> domatch(patcs,xs,Cons(n,Cons(Nil(),Nil())))
domatch[Ite](True(),patcs,Cons(x,xs),n) -> Cons(n,domatch(patcs,xs,Cons(n,Cons(Nil(),Nil()))))
eqNatList(Cons(x,xs),Nil()) -> False()
eqNatList(Nil(),Cons(y,ys)) -> False()
eqNatList(Nil(),Nil()) -> True()
eqNatList[Ite](False(),y,ys,x,xs) -> False()
eqNatList[Ite](True(),y,ys,x,xs) -> eqNatList(xs,ys)
notEmpty(Cons(x,xs)) -> True()
notEmpty(Nil()) -> False()
prefix(Cons(x,xs),Nil()) -> False()
prefix(Nil(),cs) -> True()
strmatch(patstr,str) -> domatch(patstr,str,Nil())
Signature:
{!EQ/2,and/2,domatch/3,domatch[Ite]/4,eqNatList/2,eqNatList[Ite]/5,notEmpty/1,prefix/2,strmatch/2} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0}
Obligation:
Innermost
basic terms: {!EQ,and,domatch,domatch[Ite],eqNatList,eqNatList[Ite],notEmpty,prefix,strmatch}/{0,Cons,False,Nil,S,True}
Applied Processor:
WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny}
Proof:
The weightgap principle applies using the following nonconstant growth matrix-interpretation:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(Cons) = {2},
uargs(and) = {1,2},
uargs(domatch[Ite]) = {1},
uargs(eqNatList[Ite]) = {1}
Following symbols are considered usable:
{}
TcT has computed the following interpretation:
p(!EQ) = [1]
p(0) = [1]
p(Cons) = [1] x2 + [2]
p(False) = [0]
p(Nil) = [1]
p(S) = [0]
p(True) = [0]
p(and) = [1] x1 + [1] x2 + [0]
p(domatch) = [3] x1 + [0]
p(domatch[Ite]) = [1] x1 + [3] x2 + [2]
p(eqNatList) = [4] x1 + [1]
p(eqNatList[Ite]) = [1] x1 + [4] x5 + [1]
p(notEmpty) = [3] x1 + [2]
p(prefix) = [5]
p(strmatch) = [3] x1 + [2] x2 + [1]
Following rules are strictly oriented:
eqNatList(Cons(x,xs),Cons(y,ys)) = [4] xs + [9]
> [4] xs + [2]
= eqNatList[Ite](!EQ(x,y)
,y
,ys
,x
,xs)
Following rules are (at-least) weakly oriented:
!EQ(0(),0()) = [1]
>= [0]
= True()
!EQ(0(),S(y)) = [1]
>= [0]
= False()
!EQ(S(x),0()) = [1]
>= [0]
= False()
!EQ(S(x),S(y)) = [1]
>= [1]
= !EQ(x,y)
and(False(),False()) = [0]
>= [0]
= False()
and(False(),True()) = [0]
>= [0]
= False()
and(True(),False()) = [0]
>= [0]
= False()
and(True(),True()) = [0]
>= [0]
= True()
domatch(patcs,Cons(x,xs),n) = [3] patcs + [0]
>= [3] patcs + [7]
= domatch[Ite](prefix(patcs
,Cons(x,xs))
,patcs
,Cons(x,xs)
,n)
domatch(Cons(x,xs),Nil(),n) = [3] xs + [6]
>= [1]
= Nil()
domatch(Nil(),Nil(),n) = [3]
>= [3]
= Cons(n,Nil())
domatch[Ite](False() = [3] patcs + [2]
,patcs
,Cons(x,xs)
,n)
>= [3] patcs + [0]
= domatch(patcs
,xs
,Cons(n,Cons(Nil(),Nil())))
domatch[Ite](True() = [3] patcs + [2]
,patcs
,Cons(x,xs)
,n)
>= [3] patcs + [2]
= Cons(n
,domatch(patcs
,xs
,Cons(n,Cons(Nil(),Nil()))))
eqNatList(Cons(x,xs),Nil()) = [4] xs + [9]
>= [0]
= False()
eqNatList(Nil(),Cons(y,ys)) = [5]
>= [0]
= False()
eqNatList(Nil(),Nil()) = [5]
>= [0]
= True()
eqNatList[Ite](False() = [4] xs + [1]
,y
,ys
,x
,xs)
>= [0]
= False()
eqNatList[Ite](True(),y,ys,x,xs) = [4] xs + [1]
>= [4] xs + [1]
= eqNatList(xs,ys)
notEmpty(Cons(x,xs)) = [3] xs + [8]
>= [0]
= True()
notEmpty(Nil()) = [5]
>= [0]
= False()
prefix(Cons(x,xs),Nil()) = [5]
>= [0]
= False()
prefix(Cons(x',xs'),Cons(x,xs)) = [5]
>= [6]
= and(!EQ(x',x),prefix(xs',xs))
prefix(Nil(),cs) = [5]
>= [0]
= True()
strmatch(patstr,str) = [3] patstr + [2] str + [1]
>= [3] patstr + [0]
= domatch(patstr,str,Nil())
Further, it can be verified that all rules not oriented are covered by the weightgap condition.
*** 1.1.1.1 Progress [(O(1),O(n^2))] ***
Considered Problem:
Strict DP Rules:
Strict TRS Rules:
domatch(patcs,Cons(x,xs),n) -> domatch[Ite](prefix(patcs,Cons(x,xs)),patcs,Cons(x,xs),n)
prefix(Cons(x',xs'),Cons(x,xs)) -> and(!EQ(x',x),prefix(xs',xs))
Weak DP Rules:
Weak TRS Rules:
!EQ(0(),0()) -> True()
!EQ(0(),S(y)) -> False()
!EQ(S(x),0()) -> False()
!EQ(S(x),S(y)) -> !EQ(x,y)
and(False(),False()) -> False()
and(False(),True()) -> False()
and(True(),False()) -> False()
and(True(),True()) -> True()
domatch(Cons(x,xs),Nil(),n) -> Nil()
domatch(Nil(),Nil(),n) -> Cons(n,Nil())
domatch[Ite](False(),patcs,Cons(x,xs),n) -> domatch(patcs,xs,Cons(n,Cons(Nil(),Nil())))
domatch[Ite](True(),patcs,Cons(x,xs),n) -> Cons(n,domatch(patcs,xs,Cons(n,Cons(Nil(),Nil()))))
eqNatList(Cons(x,xs),Cons(y,ys)) -> eqNatList[Ite](!EQ(x,y),y,ys,x,xs)
eqNatList(Cons(x,xs),Nil()) -> False()
eqNatList(Nil(),Cons(y,ys)) -> False()
eqNatList(Nil(),Nil()) -> True()
eqNatList[Ite](False(),y,ys,x,xs) -> False()
eqNatList[Ite](True(),y,ys,x,xs) -> eqNatList(xs,ys)
notEmpty(Cons(x,xs)) -> True()
notEmpty(Nil()) -> False()
prefix(Cons(x,xs),Nil()) -> False()
prefix(Nil(),cs) -> True()
strmatch(patstr,str) -> domatch(patstr,str,Nil())
Signature:
{!EQ/2,and/2,domatch/3,domatch[Ite]/4,eqNatList/2,eqNatList[Ite]/5,notEmpty/1,prefix/2,strmatch/2} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0}
Obligation:
Innermost
basic terms: {!EQ,and,domatch,domatch[Ite],eqNatList,eqNatList[Ite],notEmpty,prefix,strmatch}/{0,Cons,False,Nil,S,True}
Applied Processor:
WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny}
Proof:
The weightgap principle applies using the following nonconstant growth matrix-interpretation:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(Cons) = {2},
uargs(and) = {1,2},
uargs(domatch[Ite]) = {1},
uargs(eqNatList[Ite]) = {1}
Following symbols are considered usable:
{}
TcT has computed the following interpretation:
p(!EQ) = [5]
p(0) = [2]
p(Cons) = [1] x2 + [2]
p(False) = [0]
p(Nil) = [1]
p(S) = [0]
p(True) = [0]
p(and) = [1] x1 + [1] x2 + [4]
p(domatch) = [2] x2 + [1]
p(domatch[Ite]) = [1] x1 + [2] x3 + [0]
p(eqNatList) = [1] x1 + [2] x2 + [3]
p(eqNatList[Ite]) = [1] x1 + [2] x3 + [1] x5 + [4]
p(notEmpty) = [0]
p(prefix) = [0]
p(strmatch) = [1] x1 + [4] x2 + [3]
Following rules are strictly oriented:
domatch(patcs,Cons(x,xs),n) = [2] xs + [5]
> [2] xs + [4]
= domatch[Ite](prefix(patcs
,Cons(x,xs))
,patcs
,Cons(x,xs)
,n)
Following rules are (at-least) weakly oriented:
!EQ(0(),0()) = [5]
>= [0]
= True()
!EQ(0(),S(y)) = [5]
>= [0]
= False()
!EQ(S(x),0()) = [5]
>= [0]
= False()
!EQ(S(x),S(y)) = [5]
>= [5]
= !EQ(x,y)
and(False(),False()) = [4]
>= [0]
= False()
and(False(),True()) = [4]
>= [0]
= False()
and(True(),False()) = [4]
>= [0]
= False()
and(True(),True()) = [4]
>= [0]
= True()
domatch(Cons(x,xs),Nil(),n) = [3]
>= [1]
= Nil()
domatch(Nil(),Nil(),n) = [3]
>= [3]
= Cons(n,Nil())
domatch[Ite](False() = [2] xs + [4]
,patcs
,Cons(x,xs)
,n)
>= [2] xs + [1]
= domatch(patcs
,xs
,Cons(n,Cons(Nil(),Nil())))
domatch[Ite](True() = [2] xs + [4]
,patcs
,Cons(x,xs)
,n)
>= [2] xs + [3]
= Cons(n
,domatch(patcs
,xs
,Cons(n,Cons(Nil(),Nil()))))
eqNatList(Cons(x,xs),Cons(y,ys)) = [1] xs + [2] ys + [9]
>= [1] xs + [2] ys + [9]
= eqNatList[Ite](!EQ(x,y)
,y
,ys
,x
,xs)
eqNatList(Cons(x,xs),Nil()) = [1] xs + [7]
>= [0]
= False()
eqNatList(Nil(),Cons(y,ys)) = [2] ys + [8]
>= [0]
= False()
eqNatList(Nil(),Nil()) = [6]
>= [0]
= True()
eqNatList[Ite](False() = [1] xs + [2] ys + [4]
,y
,ys
,x
,xs)
>= [0]
= False()
eqNatList[Ite](True(),y,ys,x,xs) = [1] xs + [2] ys + [4]
>= [1] xs + [2] ys + [3]
= eqNatList(xs,ys)
notEmpty(Cons(x,xs)) = [0]
>= [0]
= True()
notEmpty(Nil()) = [0]
>= [0]
= False()
prefix(Cons(x,xs),Nil()) = [0]
>= [0]
= False()
prefix(Cons(x',xs'),Cons(x,xs)) = [0]
>= [9]
= and(!EQ(x',x),prefix(xs',xs))
prefix(Nil(),cs) = [0]
>= [0]
= True()
strmatch(patstr,str) = [1] patstr + [4] str + [3]
>= [2] str + [1]
= domatch(patstr,str,Nil())
Further, it can be verified that all rules not oriented are covered by the weightgap condition.
*** 1.1.1.1.1 Progress [(O(1),O(n^2))] ***
Considered Problem:
Strict DP Rules:
Strict TRS Rules:
prefix(Cons(x',xs'),Cons(x,xs)) -> and(!EQ(x',x),prefix(xs',xs))
Weak DP Rules:
Weak TRS Rules:
!EQ(0(),0()) -> True()
!EQ(0(),S(y)) -> False()
!EQ(S(x),0()) -> False()
!EQ(S(x),S(y)) -> !EQ(x,y)
and(False(),False()) -> False()
and(False(),True()) -> False()
and(True(),False()) -> False()
and(True(),True()) -> True()
domatch(patcs,Cons(x,xs),n) -> domatch[Ite](prefix(patcs,Cons(x,xs)),patcs,Cons(x,xs),n)
domatch(Cons(x,xs),Nil(),n) -> Nil()
domatch(Nil(),Nil(),n) -> Cons(n,Nil())
domatch[Ite](False(),patcs,Cons(x,xs),n) -> domatch(patcs,xs,Cons(n,Cons(Nil(),Nil())))
domatch[Ite](True(),patcs,Cons(x,xs),n) -> Cons(n,domatch(patcs,xs,Cons(n,Cons(Nil(),Nil()))))
eqNatList(Cons(x,xs),Cons(y,ys)) -> eqNatList[Ite](!EQ(x,y),y,ys,x,xs)
eqNatList(Cons(x,xs),Nil()) -> False()
eqNatList(Nil(),Cons(y,ys)) -> False()
eqNatList(Nil(),Nil()) -> True()
eqNatList[Ite](False(),y,ys,x,xs) -> False()
eqNatList[Ite](True(),y,ys,x,xs) -> eqNatList(xs,ys)
notEmpty(Cons(x,xs)) -> True()
notEmpty(Nil()) -> False()
prefix(Cons(x,xs),Nil()) -> False()
prefix(Nil(),cs) -> True()
strmatch(patstr,str) -> domatch(patstr,str,Nil())
Signature:
{!EQ/2,and/2,domatch/3,domatch[Ite]/4,eqNatList/2,eqNatList[Ite]/5,notEmpty/1,prefix/2,strmatch/2} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0}
Obligation:
Innermost
basic terms: {!EQ,and,domatch,domatch[Ite],eqNatList,eqNatList[Ite],notEmpty,prefix,strmatch}/{0,Cons,False,Nil,S,True}
Applied Processor:
NaturalMI {miDimension = 2, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just any strict-rules, greedy = NoGreedy}
Proof:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(Cons) = {2},
uargs(and) = {1,2},
uargs(domatch[Ite]) = {1},
uargs(eqNatList[Ite]) = {1}
Following symbols are considered usable:
{!EQ,and,domatch,domatch[Ite],eqNatList,eqNatList[Ite],notEmpty,prefix,strmatch}
TcT has computed the following interpretation:
p(!EQ) = [0 0] x2 + [0]
[4 0] [0]
p(0) = [2]
[0]
p(Cons) = [1 4] x2 + [4]
[0 1] [1]
p(False) = [0]
[0]
p(Nil) = [2]
[0]
p(S) = [1 3] x1 + [0]
[0 1] [0]
p(True) = [0]
[0]
p(and) = [4 0] x1 + [1 0] x2 + [0]
[1 0] [0 0] [1]
p(domatch) = [2 1] x1 + [3 3] x2 + [0]
[0 0] [0 2] [2]
p(domatch[Ite]) = [1 2] x1 + [2 1] x2 + [3
0] x3 + [0]
[0 0] [0 0] [0
2] [1]
p(eqNatList) = [1 3] x1 + [1 1] x2 + [1]
[1 3] [1 0] [0]
p(eqNatList[Ite]) = [4 0] x1 + [1 5] x3 + [1
3] x5 + [1]
[4 0] [1 0] [1
4] [1]
p(notEmpty) = [0 1] x1 + [6]
[0 4] [1]
p(prefix) = [0 1] x2 + [0]
[0 1] [0]
p(strmatch) = [3 2] x1 + [4 3] x2 + [0]
[4 2] [0 2] [2]
Following rules are strictly oriented:
prefix(Cons(x',xs'),Cons(x,xs)) = [0 1] xs + [1]
[0 1] [1]
> [0 1] xs + [0]
[0 0] [1]
= and(!EQ(x',x),prefix(xs',xs))
Following rules are (at-least) weakly oriented:
!EQ(0(),0()) = [0]
[8]
>= [0]
[0]
= True()
!EQ(0(),S(y)) = [0 0] y + [0]
[4 12] [0]
>= [0]
[0]
= False()
!EQ(S(x),0()) = [0]
[8]
>= [0]
[0]
= False()
!EQ(S(x),S(y)) = [0 0] y + [0]
[4 12] [0]
>= [0 0] y + [0]
[4 0] [0]
= !EQ(x,y)
and(False(),False()) = [0]
[1]
>= [0]
[0]
= False()
and(False(),True()) = [0]
[1]
>= [0]
[0]
= False()
and(True(),False()) = [0]
[1]
>= [0]
[0]
= False()
and(True(),True()) = [0]
[1]
>= [0]
[0]
= True()
domatch(patcs,Cons(x,xs),n) = [2 1] patcs + [3 15] xs + [15]
[0 0] [0 2] [4]
>= [2 1] patcs + [3 15] xs + [15]
[0 0] [0 2] [3]
= domatch[Ite](prefix(patcs
,Cons(x,xs))
,patcs
,Cons(x,xs)
,n)
domatch(Cons(x,xs),Nil(),n) = [2 9] xs + [15]
[0 0] [2]
>= [2]
[0]
= Nil()
domatch(Nil(),Nil(),n) = [10]
[2]
>= [6]
[1]
= Cons(n,Nil())
domatch[Ite](False() = [2 1] patcs + [3 12] xs + [12]
,patcs [0 0] [0 2] [3]
,Cons(x,xs)
,n)
>= [2 1] patcs + [3 3] xs + [0]
[0 0] [0 2] [2]
= domatch(patcs
,xs
,Cons(n,Cons(Nil(),Nil())))
domatch[Ite](True() = [2 1] patcs + [3 12] xs + [12]
,patcs [0 0] [0 2] [3]
,Cons(x,xs)
,n)
>= [2 1] patcs + [3 11] xs + [12]
[0 0] [0 2] [3]
= Cons(n
,domatch(patcs
,xs
,Cons(n,Cons(Nil(),Nil()))))
eqNatList(Cons(x,xs),Cons(y,ys)) = [1 7] xs + [1 5] ys + [13]
[1 7] [1 4] [11]
>= [1 3] xs + [1 5] ys + [1]
[1 4] [1 0] [1]
= eqNatList[Ite](!EQ(x,y)
,y
,ys
,x
,xs)
eqNatList(Cons(x,xs),Nil()) = [1 7] xs + [10]
[1 7] [9]
>= [0]
[0]
= False()
eqNatList(Nil(),Cons(y,ys)) = [1 5] ys + [8]
[1 4] [6]
>= [0]
[0]
= False()
eqNatList(Nil(),Nil()) = [5]
[4]
>= [0]
[0]
= True()
eqNatList[Ite](False() = [1 3] xs + [1 5] ys + [1]
,y [1 4] [1 0] [1]
,ys
,x
,xs)
>= [0]
[0]
= False()
eqNatList[Ite](True(),y,ys,x,xs) = [1 3] xs + [1 5] ys + [1]
[1 4] [1 0] [1]
>= [1 3] xs + [1 1] ys + [1]
[1 3] [1 0] [0]
= eqNatList(xs,ys)
notEmpty(Cons(x,xs)) = [0 1] xs + [7]
[0 4] [5]
>= [0]
[0]
= True()
notEmpty(Nil()) = [6]
[1]
>= [0]
[0]
= False()
prefix(Cons(x,xs),Nil()) = [0]
[0]
>= [0]
[0]
= False()
prefix(Nil(),cs) = [0 1] cs + [0]
[0 1] [0]
>= [0]
[0]
= True()
strmatch(patstr,str) = [3 2] patstr + [4 3] str + [0]
[4 2] [0 2] [2]
>= [2 1] patstr + [3 3] str + [0]
[0 0] [0 2] [2]
= domatch(patstr,str,Nil())
*** 1.1.1.1.1.1 Progress [(O(1),O(1))] ***
Considered Problem:
Strict DP Rules:
Strict TRS Rules:
Weak DP Rules:
Weak TRS Rules:
!EQ(0(),0()) -> True()
!EQ(0(),S(y)) -> False()
!EQ(S(x),0()) -> False()
!EQ(S(x),S(y)) -> !EQ(x,y)
and(False(),False()) -> False()
and(False(),True()) -> False()
and(True(),False()) -> False()
and(True(),True()) -> True()
domatch(patcs,Cons(x,xs),n) -> domatch[Ite](prefix(patcs,Cons(x,xs)),patcs,Cons(x,xs),n)
domatch(Cons(x,xs),Nil(),n) -> Nil()
domatch(Nil(),Nil(),n) -> Cons(n,Nil())
domatch[Ite](False(),patcs,Cons(x,xs),n) -> domatch(patcs,xs,Cons(n,Cons(Nil(),Nil())))
domatch[Ite](True(),patcs,Cons(x,xs),n) -> Cons(n,domatch(patcs,xs,Cons(n,Cons(Nil(),Nil()))))
eqNatList(Cons(x,xs),Cons(y,ys)) -> eqNatList[Ite](!EQ(x,y),y,ys,x,xs)
eqNatList(Cons(x,xs),Nil()) -> False()
eqNatList(Nil(),Cons(y,ys)) -> False()
eqNatList(Nil(),Nil()) -> True()
eqNatList[Ite](False(),y,ys,x,xs) -> False()
eqNatList[Ite](True(),y,ys,x,xs) -> eqNatList(xs,ys)
notEmpty(Cons(x,xs)) -> True()
notEmpty(Nil()) -> False()
prefix(Cons(x,xs),Nil()) -> False()
prefix(Cons(x',xs'),Cons(x,xs)) -> and(!EQ(x',x),prefix(xs',xs))
prefix(Nil(),cs) -> True()
strmatch(patstr,str) -> domatch(patstr,str,Nil())
Signature:
{!EQ/2,and/2,domatch/3,domatch[Ite]/4,eqNatList/2,eqNatList[Ite]/5,notEmpty/1,prefix/2,strmatch/2} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0}
Obligation:
Innermost
basic terms: {!EQ,and,domatch,domatch[Ite],eqNatList,eqNatList[Ite],notEmpty,prefix,strmatch}/{0,Cons,False,Nil,S,True}
Applied Processor:
EmptyProcessor
Proof:
The problem is already closed. The intended complexity is O(1).