# Does a constant time compression algorithm proves that P=NP?

Supposed someone came up with a compression algorithm that doesn't iterate through bytes or anything to compress data, does that proves P=NP?

That is, an algorithm that doesn't rely on patterns/redundancy occurrence in data to work, but instead on some clever mathematical operations.

Such algorithm will be able to compress random data, but of course, not every data, since it will need to output the variables that the decompression part of it will run mathematical operations on to rebuild the original data.

Please try not be condescending in your answer. I'm a programmer too, but I'm aware I know little compared to most of you here.

I just want to know if such algorithm proves P=NP.

I'm not asking about the possibility of the algorithm, so try not to tell me especially in a condescending way it is impossible.

I'm very aware of the impossibility based on patterns/redundancy reliance for the current algorithms to work on.

I'm working on an alternative method that uses pure mathematics right now. No reliance on data redundancy. But I won't say I have the algorithm. Sometimes you thought you've had something but turns out it's just another mirage.

If it's really a practical and better alternative to the current ones, I will edit this post and post a link to it for you to review before I file a patent (1 year grace in the US after disclosure)

Let $$c$$ be a constant. Does the existence of an algorithm that takes a string $$x \in \{0,1\}^*$$ as input and outputs a string $$f(x) \in \cup_{i=0}^c \{0,1\}^c$$ such that $$f$$ is invertible (i.e., there exists some function $$f^{-1}$$ such that $$f^{-1}(f(x)) = x$$ for every $$x$$) imply that $$\mathsf{P}=\mathsf{NP}$$?
Formally, the answer to your question is "yes" but you might find the argument unsatisfactory: since there can be no algorithm with the properties above, the question is equivalent to "is it true that $$\mathsf{false}$$ implies $$\mathsf{P}=\mathsf{NP}$$?", which is clearly true (see principle of explosion).
If you want a more direct proof you can reason as follows. Take any $$\mathsf{NP}$$-complete language $$L$$ and consider the language $$L' \in \{f(x) \mid x \in L\}$$. Since $$f$$ is injective, $$|L| \le |L'| < 2^{c+1}$$ implying that $$L$$ is a finite language and hence it belongs to $$\mathsf{P}$$.