Documentation

Complexitylib.Metacomplexity.ScaledExponent

Positive rational exponent scales #

This module exposes natural-number versions of the rational exponents used in hardness magnification. Floor and ceiling differ by at most one in the exponent, so their powers of two differ by at most a factor of two. It also provides the exact power-of-two input-length identity for a rounded N^(1+epsilon) bound.

Every represented rational scale is strictly positive.

theorem Complexity.PositiveRationalScale.eventually_atZeroFromPositive_iff {predicate : PositiveRationalScaleProp} :
(∀ᶠ (scale : PositiveRationalScale) in atZeroFromPositive, predicate scale) ∃ (cutoff : PositiveRationalScale), scalecutoff, predicate scale

A property holds for all sufficiently small positive rational scales exactly when it holds below one positive rational cutoff.

@[simp]

Scaling zero gives zero under floor rounding.

@[simp]

Scaling zero gives zero under ceiling rounding.

Floor-scaled multiplication is monotone in the natural argument.

theorem Complexity.PositiveRationalScale.floorMul_add_le (scale : PositiveRationalScale) (first second : ) :
scale.floorMul first + scale.floorMul second scale.floorMul (first + second)

The sum of two floor-rounded scaled exponents does not exceed the floor-rounded scale of their sum.

The floor-scaled exponent tends to infinity for every positive rational scale.

theorem Complexity.PositiveRationalScale.eventually_coefficient_mul_succ_le_two_pow (coefficient : ) :
∀ᶠ (exponent : ) in Filter.atTop, coefficient * (exponent + 1) 2 ^ exponent

Every fixed multiple of n + 1 is eventually bounded by 2^n.

theorem Complexity.PositiveRationalScale.eventually_coefficient_mul_succ_pow_le_two_pow (coefficient degree : ) :
∀ᶠ (exponent : ) in Filter.atTop, coefficient * (exponent + 1) ^ degree 2 ^ exponent

Every fixed coefficient times a fixed power of n + 1 is eventually bounded by the binary exponential 2^n.

Every fixed polynomial is eventually bounded by a floor-rounded binary exponential at any positive rational scale.

Ceiling-scaled multiplication is monotone in the natural argument.

Floor rounding never exceeds the exact scaled numerator after restoring the denominator.

Ceiling rounding covers the exact scaled numerator after restoring the denominator.

Floor rounding is no larger than ceiling rounding.

Floor and ceiling rounding differ by at most one.

Once the unrounded numerator reaches the denominator, its floor-scaled value is positive.

Rounded-down powers of two are positive.

Rounded-up powers of two are positive.

Rounded-down powers are monotone in the natural argument.

theorem Complexity.PositiveRationalScale.powFloor_mul_le_powFloor_add (scale : PositiveRationalScale) (first second : ) :
scale.powFloor first * scale.powFloor second scale.powFloor (first + second)

The product of two floor-rounded binary powers is bounded by the rounded power at the sum of their arguments.

theorem Complexity.PositiveRationalScale.powFloor_pow_le_mul (scale : PositiveRationalScale) (n multiplier : ) :
scale.powFloor n ^ multiplier scale.powFloor (multiplier * n)

A fixed power of a floor-rounded binary power is bounded by scaling the natural argument by the same multiplier.

Rounded-up powers are monotone in the natural argument.

Rounding the exponent down gives no larger a power than rounding it up.

Changing floor to ceiling costs at most a factor of two for binary exponentials.

@[simp]

The rounded N^(1+scale) bound factors into its linear and fractional binary powers.

The rounded N^(1+scale) bound is at least the raw input length N.

@[simp]

On an exact 2^n-bit input, recovering arity from length gives the intended rounded N^(1+scale) bound exactly.