[Question]
  [
This is a [cops-and-robbers](/questions/tagged/cops-and-robbers "show questions tagged 'cops-and-robbers'") puzzle the robbers' thread can be found [here](https://codegolf.stackexchange.com/questions/107014/hidden-inversions-robbers-thread).
Your task will be two write two programs (or functions) such that they are [anagrams](https://en.wikipedia.org/wiki/Anagram) of each other and one performs the left [inverse](https://en.wikipedia.org/wiki/Inverse_function) of the other. These programs may accept and output as many *integers* or complex numbers as you wish. If you choose take numbers as character points or any other reasonable means you must indicate you are doing so in your answer. If you choose to restrict the domain of your function you must also indicate the restricted domain in your answer.
You will then present the first program in the form of an answer with left inverse hidden for robbers to find.
The shown program must implement a injective function (otherwise it would be impossible for a hidden answer to exist).
If your answer has not been cracked in one week you may reveal the hidden answer and mark it as **safe**. Safe answers cannot be cracked by robbers and will remain un-cracked indefinitely.
The goal will be to create the shortest un-cracked answer in bytes.
### Example
You could show the following python program that adds one to the input
```
lambda x:~-x
```
A solution could be:
```
lambda x:-~x
```
This subtracts one from the input
  
[Answer]
## Python 3, 80 bytes ([Cracked](https://codegolf.stackexchange.com/a/107477/64436))
```
bhmq = int(input())
print(bhmq ** 2)
(1 or [(sqrt),(specification+of*integerr)])
```
Domain: positive integers. Function is just squaring of a number. Input to stdin, output to stdout, as well as in the inverse function. Note that Python ignores the third line here, because it is syntactically valid and 1 is already a truthy value, so Python doesn't even look whether the right part of 'or' is well-defined.
Robbers should write a sqrt function that will work correct on all non-zero squares, printing integer value as is, without floating point (so on input '4' output should be '2' or '2\n', not '2.0' or '2.0\n').
[Answer]
# Python 3, 46 bytes, [cracked](https://codegolf.stackexchange.com/a/107020/3852)
```
lambda x:x*(1999888577766665//844333333222200)
```
Doubles the input.
[Answer]
# [7](http://esolangs.org/wiki/7), 9 bytes, [Cracked](https://codegolf.stackexchange.com/a/107103/62131)
This program's full of nonprintable characters, so here's a hexdump:
```
00000000: 2573 dc01 7e13 dcb6 1f                   %s..~....
```
Note: this uses a numeric input routine that's incapable of inputting negative numbers, so this submission is restricted to nonnegative integers only.
One problem with [cops-and-robbers](/questions/tagged/cops-and-robbers "show questions tagged 'cops-and-robbers'") challenges is that you don't write explanations of the code (to make it harder to crack). On the other hand, this means that I don't have to go to to the trouble here.
I picked 7 as the language because, especially in its compressed notation, it's pretty hard to read, and I don't see why it should be only *me* who has to go to the trouble of moving around 8-bit chunks of programs written in a 3-bit encoding. Good luck!
## Explanation
Now that the program's been cracked (by brute force, unfortunately; that's always a danger in these short solutions), I may as well explain what I was getting at. This was actually fairly solvable by reading the program; I could have made it much more difficult, but that felt like a bad idea when brute-force cracks exist.
We'll start by representing the program in a more natural encoding. As usual, bolded numbers indicate commands that run immediately (not all of which are representable in a program; **`6`** and **`7`** are but **`2`** to **`5`** aren't), unbolded numbers represent their escaped equivalents (`0` to `5`, all of which are representable in the original program; note that `0` is an escaped **`6`** and `1` is an escaped **`7`**):
```
112**7**1**7**34002**77**023**67**13303
```
The set of commands available in a 7 program source mean that it's basically just a literal that represents the original stack (there's nothing else you can do with just escaped commands, **`6`** and **`7`**). So the first thing a program will do is push a bunch of stuff onto the stack. Here's how the stack looks after the program's run (`|` separates stack elements, as usual in 7):
```
**772**|**7**|**34662**|023|**73363**
```
The final stack element then gets copied to become the code to run (while remaining on the stack). As it happens, this is the only part of the program that's code; everything else is just data. Here's what it translates to:
```
**73363**
**7**      Push an empty element onto the stack
 **3**     Output the top stack element, discard the element below
**73**     Combined effect of these: discard the top stack element
  **3**    Output the top stack element, discard the element below
   **6**   Escape the top stack element, then append it to the element below
    **3**  Output the top stack element, discard the element below
```
In other words, this is mostly just a bunch of I/O instructions. Let's analyse this in detail:
* **`73`** discards the **`73363`** that's still on top of the stack.
* **`3`** outputs the `023`, and discards the **`34662`**. It can thus be seen that the **`34662`** is a comment, which was used to store the bytes needed in the other version of the program. As for what `023` does when output, it selects I/O format 0 (integers), then `23` is a directive which requests the implementation to input an integer (in 7, you do input via outputting specific codes that request input). The input is done by making copies of the stack element below, e.g. if the input integer is 10, the next stack element (currently **`7`**) will become **`7777777777`**. Thus, we're accepting input from the user in decimal, but it's being stored as unary.
* **`6`** escapes the top stack element (changing each instance of **`7`** to `1`; this is how strings consisting entirely of **`7`**s are escaped), then appends it to the stack element before (**`772`**). So our data is now something like `**772**1111111111`.
* Finally, **`3`** outputs the stack element in question (and pops a blank stack element that's part of the default initial stack). Its value is calculated by taking the number of `1`s and **`7`**s, and subtracting the number of `0`s and **`6`**s. (The **`2`** in the middle is ignored in most cases; if it's at the end of the string, it'll become a trailing newline instead of being ignored, but PPCG rules don't care about that.) Thus, the output is the original input plus 2.
At this point, there's nothing useful on the stack and nothing in the program, so the program exits.
How do we reverse this? It's a simple matter of changing the `11` to `00`, so that we're prepending characters to the input that make it 2 lower, rather than 2 higher. There's a `00` conveniently hidden eight octal digits further on in the program (so that octal digits and bytes line up with each other), so we can simply swap it with the `11` at the start.
[Answer]
## JavaScript (ES6), 21 bytes, [Cracked](https://codegolf.stackexchange.com/a/107024/58563)
This is an easy one.
```
b=>Math.pow(b,torc=3)
```
Returns the cube of the input.
[Answer]
# Python 2, 83 bytes, [cracked](https://codegolf.stackexchange.com/a/107042)
```
#((()))****+,,---/2289;==oppppppqqqqqw~~
lambda n:pow(n,65537,10998167423251438693)
```
This is similar to my other answer. However, this uses 64-bit RSA, and is cryptographically quite weak. If you can rob this answer, you can theoretically rob my other one as well, given enough time.
[Answer]
# Python 2, 47 bytes, [Cracked](https://codegolf.stackexchange.com/a/107418/56656)
```
lambda x:x**2or (iron() and saxifrage.extend())
```
The domain for this function is {x ∈ ℤ | x > 0}. It squares its input.
---
[nmjcman101](https://codegolf.stackexchange.com/users/62346/nmjcman101) found the intended solution:
> 
>  `lambda x:sorted(a**2for a in range(x)).index(x)`
> 
> 
> 
[Answer]
# JavaScript (ES6), 46 bytes, [Cracked](https://codegolf.stackexchange.com/a/107520/32628)
```
x=>Math.log(x+(+String(t=985921996597669)[5]))
```
This function returns `ln(x+1)` where `x` is a non-negative number.
### Usage
```
(x=>Math.log(x+(+String(t=985921996597669)[5])))(5)
```
**Note:** Due to the nature of floating point numbers `f(g(x))` may not exactly equal `x`. Example: `f(g(4))=3.9999999999999996`
[Answer]
# J, 8 bytes, [cracked](https://codegolf.stackexchange.com/a/107045/6710)
Another simple one to start off with.
```
[:]+:[-:
```
Doubles the input.
[Answer]
# Processing.js, 59 bytes, [Cracked!](https://codegolf.stackexchange.com/questions/107014/hidden-inversions-robbers-thread/107048#107048)
```
float igetuwebaoli(int p){return p*(((17*-4*-3)))+0+0;}//,,
```
This function multiplies the input by `204` (`17*-4*-3=204`). It takes in an int as input and outputs a float. As expected, the inverse divides the input by `204`.
An online interpreter for processing-js can be found [here](http://js.do/blog/processing/editor/).
[Answer]
# J, 10 bytes, [cracked](https://codegolf.stackexchange.com/a/107106/6710)
```
1%~<:[@*>:
```
Another simple one. Returns *n*2-1.
[Answer]
# JavaScript (ES6), 15 bytes, [cracked by Emigna](https://codegolf.stackexchange.com/a/107101/41859)
```
t=>(!!0+~~t+~0)
```
> 
> This functions returns `n-1`.
> 
> 
> 
---
You can test it like:
```
(t=>(!!0+~~t+~0))(6)
```
---
**Cracked**
My intended solution is a bit different than Emigna's crack:
> 
>  `t=>t+(+!!~~~00)`
> 
> 
> 
[Answer]
# [J](http://jsoftware.com/), 29 bytes ([Cracked](https://codegolf.stackexchange.com/a/107792/32014) by miles)
```
5#.[:,(3 5&#:(-$]-)7)#.inv"0]
```
This is a verb that takes a **positive integer** as input, and does the following:
1. Convert to bases 2 and 4.
2. Pad the base-4 representation with 0s to have the same length as the base-2 representation.
3. Concatenate the two representations (base-2 first).
4. Interpret the concatenation as a base-5 representation and convert to integer.
[Try it online!](https://tio.run/nexus/j#@5@mYGulYKqsF22lo2GsYKqmbKWhqxKrq2muqayXmVemZBD7PzU5I18hTcHU7D8A "J – TIO Nexus")
## My solution
The logic is pretty much the same as in the crack.
The rank conjunction `"` can be stuck in many different places (and I use it to get rid of the unnecessary `0` and `3`), since it doesn't really do anything in the solution.
```
(7-5)#.[:(]-:&#$,)5#.inv"0 3]
```
[Answer]
# Processing (java), 59 bytes, SAFE
```
float igetuwebaoli(int p){return p*(((17*-4*-3)))+0+0;}//,,
```
This function multiplies the input by `204` (`17*-4*-3=204`). It takes in an int as input and outputs a float. As expected, the inverse divides the input by `204`.
 Note: both programs take an int as input and output a float.
This answer is exactly the same as my other answer, except that my other answer was written in Processing.js. Meet Processing-java, the less verbose cousin of Java. You can download Processing [here](https://www.processing.org/download/) at processing.org.
### The Crack
```
float ap(int i){return i*pow(blue(get(0,0)),-1);}//++7*4*-3
```
This program divides the argument by `204`. But how? Let's go inside the function.
```
i *                              //multiply i by
         blue( get(0, 0) )       //this (evaluates to 204)
    pow(                  , -1)  //raises to the -1 power (ie its reciprocal)
```
Simple enough, but how does `blue( get(0, 0) )` become `204`? This is the centrepiece of this submission. First of all, `get(0,0)` gets the colour of the pixel located at `(0,0)` (the top left corner of the window, which always opens in a Processing sketch). Next, `blue()` gets the blue value of that pixel, which is `204`!
To come up with this submission, I experimented by printing the different attributes of the colour obtained by `get(0,0)`. I have found out that the red, green, blue, alpha values are `204`, `204`, `204` and `255` respectively. From this, I decided to do a simple operation with this number and ended up with this post.
[Answer]
# JavaScript (ES6), 63 bytes [Cracked by Ilmari Karonen](https://codegolf.stackexchange.com/a/107185/32628)
```
x=>eval(atob`eCp4KzEvLyAgfXBModLS4TvEn4wp1iys9YRRKC85KLIhNMC=`)
```
Time for some `atob` nonesense. This function returns `x*x+1` where `x` is a non-negative number.
### Usage
```
(x=>eval(atob`eCp4KzEvLyAgfXBModLS4TvEn4wp1iys9YRRKC85KLIhNMC=`))(5)
```
### Intended
> 
> `x=>eval(atob`Lyp5fMRwICAgKi9NYXRoLnBvdyh4LTEsMC41KS8veCp4KzE=`)`
> 
> 
> 
There's a large number of potential solutions, but I was hoping that the leading characters would throw off the byte order enough to make this harder. C'est la `atob`
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), 26 bytes, [Cracked](https://codegolf.stackexchange.com/a/107038/56656)
## Original
```
((((()()())){}[()]){}{}{})
```
## My Crack
> 
>  `([(((()())){}()){}{}()]{})`
> 
> 
> 
## [1000000000](https://codegolf.stackexchange.com/users/20059/1000000000)'s Crack
> 
>  `([(((()())()){}){}{}](){})`
> 
> 
> 
[Answer]
# Python 2, 225 bytes, [cracked by Sp3000](https://codegolf.stackexchange.com/a/107660/21487)
```
#((()))****+,,---/000555666888;==oppppppqqqqqw~~
lambda n:pow(n,65537,9273089718324971160906816222280219512637222672577602579509954532420895497077475973192045191331307498433055746131266769952623190481881511473086869829441397)
```
Domain of this function is [0, n), where n is the huge number above. Yes, this function is invertible on this domain. And unless I messed up, breaking this answer is as hard as breaking 512 bit RSA.
[Answer]
# J, 15 bytes
```
(".&,'10.')#.#:
```
Takes a non-negative integer *n*, converts it to a list of binary digits, and combines those digits as a base 10 number.
[Try it online!](https://tio.run/nexus/j#@5@mYGuloKGkp6ajbmigp66prKdsxcWVmpyRr6Cho5emZKCpoJGpp2AEpHUUjA3MTRVMDIDg/38A)
]