(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

not(and(x, y)) → or(not(x), not(y))
not(or(x, y)) → and(not(x), not(y))
and(x, or(y, z)) → or(and(x, y), and(x, z))

Rewrite Strategy: INNERMOST

(1) NestedDefinedSymbolProof (BOTH BOUNDS(ID, ID) transformation)

The following defined symbols can occur below the 0th argument of and: and, not
The following defined symbols can occur below the 1th argument of and: and, not

Hence, the left-hand sides of the following rules are not basic-reachable and can be removed:
not(and(x, y)) → or(not(x), not(y))

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

and(x, or(y, z)) → or(and(x, y), and(x, z))
not(or(x, y)) → and(not(x), not(y))

Rewrite Strategy: INNERMOST

(3) TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed TRS to weighted TRS

(4) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

and(x, or(y, z)) → or(and(x, y), and(x, z)) [1]
not(or(x, y)) → and(not(x), not(y)) [1]

Rewrite Strategy: INNERMOST

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

and(x, or(y, z)) → or(and(x, y), and(x, z)) [1]
not(or(x, y)) → and(not(x), not(y)) [1]

The TRS has the following type information:
and :: or → or → or
or :: or → or → or
not :: or → or

Rewrite Strategy: INNERMOST

(7) CompletionProof (UPPER BOUND(ID) transformation)

The transformation into a RNTS is sound, since:

(a) The obligation is a constructor system where every type has a constant constructor,

(b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols:
none

(c) The following functions are completely defined:


not
and

Due to the following rules being added:

not(v0) → const [0]
and(v0, v1) → const [0]

And the following fresh constants:

const

(8) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

and(x, or(y, z)) → or(and(x, y), and(x, z)) [1]
not(or(x, y)) → and(not(x), not(y)) [1]
not(v0) → const [0]
and(v0, v1) → const [0]

The TRS has the following type information:
and :: or:const → or:const → or:const
or :: or:const → or:const → or:const
not :: or:const → or:const
const :: or:const

Rewrite Strategy: INNERMOST

(9) NarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Narrowed the inner basic terms of all right-hand sides by a single narrowing step.

(10) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

and(x, or(y, z)) → or(and(x, y), and(x, z)) [1]
not(or(or(x', y'), or(x'', y''))) → and(and(not(x'), not(y')), and(not(x''), not(y''))) [3]
not(or(or(x', y'), y)) → and(and(not(x'), not(y')), const) [2]
not(or(x, or(x1, y1))) → and(const, and(not(x1), not(y1))) [2]
not(or(x, y)) → and(const, const) [1]
not(v0) → const [0]
and(v0, v1) → const [0]

The TRS has the following type information:
and :: or:const → or:const → or:const
or :: or:const → or:const → or:const
not :: or:const → or:const
const :: or:const

Rewrite Strategy: INNERMOST

(11) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

const => 0

(12) Obligation:

Complexity RNTS consisting of the following rules:

and(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
and(z', z'') -{ 1 }→ 1 + and(x, y) + and(x, z) :|: z >= 0, z' = x, x >= 0, y >= 0, z'' = 1 + y + z
not(z') -{ 3 }→ and(and(not(x'), not(y')), and(not(x''), not(y''))) :|: x' >= 0, z' = 1 + (1 + x' + y') + (1 + x'' + y''), y' >= 0, y'' >= 0, x'' >= 0
not(z') -{ 2 }→ and(and(not(x'), not(y')), 0) :|: x' >= 0, y >= 0, z' = 1 + (1 + x' + y') + y, y' >= 0
not(z') -{ 2 }→ and(0, and(not(x1), not(y1))) :|: y1 >= 0, x1 >= 0, x >= 0, z' = 1 + x + (1 + x1 + y1)
not(z') -{ 1 }→ and(0, 0) :|: z' = 1 + x + y, x >= 0, y >= 0
not(z') -{ 0 }→ 0 :|: v0 >= 0, z' = v0

(13) SimplificationProof (BOTH BOUNDS(ID, ID) transformation)

Simplified the RNTS by moving equalities from the constraints into the right-hand sides.

(14) Obligation:

Complexity RNTS consisting of the following rules:

and(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
and(z', z'') -{ 1 }→ 1 + and(z', y) + and(z', z) :|: z >= 0, z' >= 0, y >= 0, z'' = 1 + y + z
not(z') -{ 3 }→ and(and(not(x'), not(y')), and(not(x''), not(y''))) :|: x' >= 0, z' = 1 + (1 + x' + y') + (1 + x'' + y''), y' >= 0, y'' >= 0, x'' >= 0
not(z') -{ 2 }→ and(and(not(x'), not(y')), 0) :|: x' >= 0, y >= 0, z' = 1 + (1 + x' + y') + y, y' >= 0
not(z') -{ 2 }→ and(0, and(not(x1), not(y1))) :|: y1 >= 0, x1 >= 0, x >= 0, z' = 1 + x + (1 + x1 + y1)
not(z') -{ 1 }→ and(0, 0) :|: z' = 1 + x + y, x >= 0, y >= 0
not(z') -{ 0 }→ 0 :|: z' >= 0

(15) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID) transformation)

Found the following analysis order by SCC decomposition:

{ and }
{ not }

(16) Obligation:

Complexity RNTS consisting of the following rules:

and(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
and(z', z'') -{ 1 }→ 1 + and(z', y) + and(z', z) :|: z >= 0, z' >= 0, y >= 0, z'' = 1 + y + z
not(z') -{ 3 }→ and(and(not(x'), not(y')), and(not(x''), not(y''))) :|: x' >= 0, z' = 1 + (1 + x' + y') + (1 + x'' + y''), y' >= 0, y'' >= 0, x'' >= 0
not(z') -{ 2 }→ and(and(not(x'), not(y')), 0) :|: x' >= 0, y >= 0, z' = 1 + (1 + x' + y') + y, y' >= 0
not(z') -{ 2 }→ and(0, and(not(x1), not(y1))) :|: y1 >= 0, x1 >= 0, x >= 0, z' = 1 + x + (1 + x1 + y1)
not(z') -{ 1 }→ and(0, 0) :|: z' = 1 + x + y, x >= 0, y >= 0
not(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {and}, {not}

(17) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: and
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z''

(18) Obligation:

Complexity RNTS consisting of the following rules:

and(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
and(z', z'') -{ 1 }→ 1 + and(z', y) + and(z', z) :|: z >= 0, z' >= 0, y >= 0, z'' = 1 + y + z
not(z') -{ 3 }→ and(and(not(x'), not(y')), and(not(x''), not(y''))) :|: x' >= 0, z' = 1 + (1 + x' + y') + (1 + x'' + y''), y' >= 0, y'' >= 0, x'' >= 0
not(z') -{ 2 }→ and(and(not(x'), not(y')), 0) :|: x' >= 0, y >= 0, z' = 1 + (1 + x' + y') + y, y' >= 0
not(z') -{ 2 }→ and(0, and(not(x1), not(y1))) :|: y1 >= 0, x1 >= 0, x >= 0, z' = 1 + x + (1 + x1 + y1)
not(z') -{ 1 }→ and(0, 0) :|: z' = 1 + x + y, x >= 0, y >= 0
not(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {and}, {not}
Previous analysis results are:
and: runtime: ?, size: O(n1) [z'']

(19) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: and
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z''

(20) Obligation:

Complexity RNTS consisting of the following rules:

and(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
and(z', z'') -{ 1 }→ 1 + and(z', y) + and(z', z) :|: z >= 0, z' >= 0, y >= 0, z'' = 1 + y + z
not(z') -{ 3 }→ and(and(not(x'), not(y')), and(not(x''), not(y''))) :|: x' >= 0, z' = 1 + (1 + x' + y') + (1 + x'' + y''), y' >= 0, y'' >= 0, x'' >= 0
not(z') -{ 2 }→ and(and(not(x'), not(y')), 0) :|: x' >= 0, y >= 0, z' = 1 + (1 + x' + y') + y, y' >= 0
not(z') -{ 2 }→ and(0, and(not(x1), not(y1))) :|: y1 >= 0, x1 >= 0, x >= 0, z' = 1 + x + (1 + x1 + y1)
not(z') -{ 1 }→ and(0, 0) :|: z' = 1 + x + y, x >= 0, y >= 0
not(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {not}
Previous analysis results are:
and: runtime: O(n1) [z''], size: O(n1) [z'']

(21) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(22) Obligation:

Complexity RNTS consisting of the following rules:

and(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
and(z', z'') -{ 1 + y + z }→ 1 + s + s' :|: s >= 0, s <= 1 * y, s' >= 0, s' <= 1 * z, z >= 0, z' >= 0, y >= 0, z'' = 1 + y + z
not(z') -{ 1 }→ s'' :|: s'' >= 0, s'' <= 1 * 0, z' = 1 + x + y, x >= 0, y >= 0
not(z') -{ 3 }→ and(and(not(x'), not(y')), and(not(x''), not(y''))) :|: x' >= 0, z' = 1 + (1 + x' + y') + (1 + x'' + y''), y' >= 0, y'' >= 0, x'' >= 0
not(z') -{ 2 }→ and(and(not(x'), not(y')), 0) :|: x' >= 0, y >= 0, z' = 1 + (1 + x' + y') + y, y' >= 0
not(z') -{ 2 }→ and(0, and(not(x1), not(y1))) :|: y1 >= 0, x1 >= 0, x >= 0, z' = 1 + x + (1 + x1 + y1)
not(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {not}
Previous analysis results are:
and: runtime: O(n1) [z''], size: O(n1) [z'']

(23) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: not
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(24) Obligation:

Complexity RNTS consisting of the following rules:

and(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
and(z', z'') -{ 1 + y + z }→ 1 + s + s' :|: s >= 0, s <= 1 * y, s' >= 0, s' <= 1 * z, z >= 0, z' >= 0, y >= 0, z'' = 1 + y + z
not(z') -{ 1 }→ s'' :|: s'' >= 0, s'' <= 1 * 0, z' = 1 + x + y, x >= 0, y >= 0
not(z') -{ 3 }→ and(and(not(x'), not(y')), and(not(x''), not(y''))) :|: x' >= 0, z' = 1 + (1 + x' + y') + (1 + x'' + y''), y' >= 0, y'' >= 0, x'' >= 0
not(z') -{ 2 }→ and(and(not(x'), not(y')), 0) :|: x' >= 0, y >= 0, z' = 1 + (1 + x' + y') + y, y' >= 0
not(z') -{ 2 }→ and(0, and(not(x1), not(y1))) :|: y1 >= 0, x1 >= 0, x >= 0, z' = 1 + x + (1 + x1 + y1)
not(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {not}
Previous analysis results are:
and: runtime: O(n1) [z''], size: O(n1) [z'']
not: runtime: ?, size: O(1) [0]

(25) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: not
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + 5·z'

(26) Obligation:

Complexity RNTS consisting of the following rules:

and(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
and(z', z'') -{ 1 + y + z }→ 1 + s + s' :|: s >= 0, s <= 1 * y, s' >= 0, s' <= 1 * z, z >= 0, z' >= 0, y >= 0, z'' = 1 + y + z
not(z') -{ 1 }→ s'' :|: s'' >= 0, s'' <= 1 * 0, z' = 1 + x + y, x >= 0, y >= 0
not(z') -{ 3 }→ and(and(not(x'), not(y')), and(not(x''), not(y''))) :|: x' >= 0, z' = 1 + (1 + x' + y') + (1 + x'' + y''), y' >= 0, y'' >= 0, x'' >= 0
not(z') -{ 2 }→ and(and(not(x'), not(y')), 0) :|: x' >= 0, y >= 0, z' = 1 + (1 + x' + y') + y, y' >= 0
not(z') -{ 2 }→ and(0, and(not(x1), not(y1))) :|: y1 >= 0, x1 >= 0, x >= 0, z' = 1 + x + (1 + x1 + y1)
not(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed:
Previous analysis results are:
and: runtime: O(n1) [z''], size: O(n1) [z'']
not: runtime: O(n1) [1 + 5·z'], size: O(1) [0]

(27) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(28) BOUNDS(1, n^1)