MAYBE proof of input_HH8dwZlDWH.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, INF). (0) CpxTRS (1) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxTRS (3) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (4) CpxTRS (5) RelTrsToWeightedTrsProof [UPPER BOUND(ID), 0 ms] (6) CpxWeightedTrs (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTypedWeightedTrs (9) CompletionProof [UPPER BOUND(ID), 0 ms] (10) CpxTypedWeightedCompleteTrs (11) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxTypedWeightedCompleteTrs (13) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (14) CpxRNTS (15) InliningProof [UPPER BOUND(ID), 0 ms] (16) CpxRNTS (17) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (18) CpxRNTS (19) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (20) CpxRNTS (21) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (22) CpxRNTS (23) IntTrsBoundProof [UPPER BOUND(ID), 220 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 68 ms] (26) CpxRNTS (27) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 163 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 53 ms] (32) CpxRNTS (33) CompletionProof [UPPER BOUND(ID), 0 ms] (34) CpxTypedWeightedCompleteTrs (35) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (36) CpxRNTS (37) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (38) CdtProblem (39) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (40) CdtProblem (41) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (42) CdtProblem (43) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (44) CdtProblem (45) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (46) CdtProblem ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, INF). The TRS R consists of the following rules: f(X) -> if(X, c, f(true)) if(true, X, Y) -> X if(false, X, Y) -> Y S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (2) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, INF). The TRS R consists of the following rules: f(X) -> if(X, c, f(true)) if(true, X, Y) -> X if(false, X, Y) -> Y S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (3) RelTrsToTrsProof (UPPER BOUND(ID)) transformed relative TRS to TRS ---------------------------------------- (4) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, INF). The TRS R consists of the following rules: f(X) -> if(X, c, f(true)) if(true, X, Y) -> X if(false, X, Y) -> Y S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (5) RelTrsToWeightedTrsProof (UPPER BOUND(ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (6) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, INF). The TRS R consists of the following rules: f(X) -> if(X, c, f(true)) [1] if(true, X, Y) -> X [1] if(false, X, Y) -> Y [1] Rewrite Strategy: INNERMOST ---------------------------------------- (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (8) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: f(X) -> if(X, c, f(true)) [1] if(true, X, Y) -> X [1] if(false, X, Y) -> Y [1] The TRS has the following type information: f :: true:false -> c if :: true:false -> c -> c -> c c :: c true :: true:false false :: true:false Rewrite Strategy: INNERMOST ---------------------------------------- (9) CompletionProof (UPPER BOUND(ID)) 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: f_1 if_3 Due to the following rules being added: none And the following fresh constants: none ---------------------------------------- (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: f(X) -> if(X, c, f(true)) [1] if(true, X, Y) -> X [1] if(false, X, Y) -> Y [1] The TRS has the following type information: f :: true:false -> c if :: true:false -> c -> c -> c c :: c true :: true:false false :: true:false Rewrite Strategy: INNERMOST ---------------------------------------- (11) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (12) 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: f(X) -> if(X, c, if(true, c, f(true))) [2] if(true, X, Y) -> X [1] if(false, X, Y) -> Y [1] The TRS has the following type information: f :: true:false -> c if :: true:false -> c -> c -> c c :: c true :: true:false false :: true:false Rewrite Strategy: INNERMOST ---------------------------------------- (13) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: c => 0 true => 1 false => 0 ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> if(X, 0, if(1, 0, f(1))) :|: X >= 0, z = X if(z, z', z'') -{ 1 }-> X :|: z' = X, Y >= 0, z = 1, z'' = Y, X >= 0 if(z, z', z'') -{ 1 }-> Y :|: z' = X, Y >= 0, z'' = Y, X >= 0, z = 0 ---------------------------------------- (15) InliningProof (UPPER BOUND(ID)) Inlined the following terminating rules on right-hand sides where appropriate: if(z, z', z'') -{ 1 }-> X :|: z' = X, Y >= 0, z = 1, z'' = Y, X >= 0 if(z, z', z'') -{ 1 }-> Y :|: z' = X, Y >= 0, z'' = Y, X >= 0, z = 0 ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> if(X, 0, if(1, 0, f(1))) :|: X >= 0, z = X if(z, z', z'') -{ 1 }-> X :|: z' = X, Y >= 0, z = 1, z'' = Y, X >= 0 if(z, z', z'') -{ 1 }-> Y :|: z' = X, Y >= 0, z'' = Y, X >= 0, z = 0 ---------------------------------------- (17) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> if(z, 0, if(1, 0, f(1))) :|: z >= 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 ---------------------------------------- (19) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { if } { f } ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> if(z, 0, if(1, 0, f(1))) :|: z >= 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 Function symbols to be analyzed: {if}, {f} ---------------------------------------- (21) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (22) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> if(z, 0, if(1, 0, f(1))) :|: z >= 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 Function symbols to be analyzed: {if}, {f} ---------------------------------------- (23) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: if after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z' + z'' ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> if(z, 0, if(1, 0, f(1))) :|: z >= 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 Function symbols to be analyzed: {if}, {f} Previous analysis results are: if: runtime: ?, size: O(n^1) [z' + z''] ---------------------------------------- (25) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: if after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> if(z, 0, if(1, 0, f(1))) :|: z >= 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 Function symbols to be analyzed: {f} Previous analysis results are: if: runtime: O(1) [1], size: O(n^1) [z' + z''] ---------------------------------------- (27) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> if(z, 0, if(1, 0, f(1))) :|: z >= 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 Function symbols to be analyzed: {f} Previous analysis results are: if: runtime: O(1) [1], size: O(n^1) [z' + z''] ---------------------------------------- (29) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: f after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> if(z, 0, if(1, 0, f(1))) :|: z >= 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 Function symbols to be analyzed: {f} Previous analysis results are: if: runtime: O(1) [1], size: O(n^1) [z' + z''] f: runtime: ?, size: O(1) [0] ---------------------------------------- (31) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: f after applying outer abstraction to obtain an ITS, resulting in: INF with polynomial bound: ? ---------------------------------------- (32) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> if(z, 0, if(1, 0, f(1))) :|: z >= 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 Function symbols to be analyzed: {f} Previous analysis results are: if: runtime: O(1) [1], size: O(n^1) [z' + z''] f: runtime: INF, size: O(1) [0] ---------------------------------------- (33) CompletionProof (UPPER BOUND(ID)) The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: none And the following fresh constants: none ---------------------------------------- (34) Obligation: Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: f(X) -> if(X, c, f(true)) [1] if(true, X, Y) -> X [1] if(false, X, Y) -> Y [1] The TRS has the following type information: f :: true:false -> c if :: true:false -> c -> c -> c c :: c true :: true:false false :: true:false Rewrite Strategy: INNERMOST ---------------------------------------- (35) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: c => 0 true => 1 false => 0 ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 1 }-> if(X, 0, f(1)) :|: X >= 0, z = X if(z, z', z'') -{ 1 }-> X :|: z' = X, Y >= 0, z = 1, z'' = Y, X >= 0 if(z, z', z'') -{ 1 }-> Y :|: z' = X, Y >= 0, z'' = Y, X >= 0, z = 0 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (37) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (38) Obligation: Complexity Dependency Tuples Problem Rules: f(z0) -> if(z0, c, f(true)) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Tuples: F(z0) -> c1(IF(z0, c, f(true)), F(true)) IF(true, z0, z1) -> c2 IF(false, z0, z1) -> c3 S tuples: F(z0) -> c1(IF(z0, c, f(true)), F(true)) IF(true, z0, z1) -> c2 IF(false, z0, z1) -> c3 K tuples:none Defined Rule Symbols: f_1, if_3 Defined Pair Symbols: F_1, IF_3 Compound Symbols: c1_2, c2, c3 ---------------------------------------- (39) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing nodes: IF(false, z0, z1) -> c3 IF(true, z0, z1) -> c2 ---------------------------------------- (40) Obligation: Complexity Dependency Tuples Problem Rules: f(z0) -> if(z0, c, f(true)) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Tuples: F(z0) -> c1(IF(z0, c, f(true)), F(true)) S tuples: F(z0) -> c1(IF(z0, c, f(true)), F(true)) K tuples:none Defined Rule Symbols: f_1, if_3 Defined Pair Symbols: F_1 Compound Symbols: c1_2 ---------------------------------------- (41) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (42) Obligation: Complexity Dependency Tuples Problem Rules: f(z0) -> if(z0, c, f(true)) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Tuples: F(z0) -> c1(F(true)) S tuples: F(z0) -> c1(F(true)) K tuples:none Defined Rule Symbols: f_1, if_3 Defined Pair Symbols: F_1 Compound Symbols: c1_1 ---------------------------------------- (43) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: f(z0) -> if(z0, c, f(true)) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 ---------------------------------------- (44) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: F(z0) -> c1(F(true)) S tuples: F(z0) -> c1(F(true)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: F_1 Compound Symbols: c1_1 ---------------------------------------- (45) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace F(z0) -> c1(F(true)) by F(true) -> c1(F(true)) ---------------------------------------- (46) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: F(true) -> c1(F(true)) S tuples: F(true) -> c1(F(true)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: F_1 Compound Symbols: c1_1