This question may be construed with respect to specification or implementation. Obviously, implementations may change, but you may want to rewrite your code when this happens, so I will answer both.
It also depends on what you want to do. Do you want to optimize or are you looking for reliable guarantees that two instances (or are not) of the same function? (If the latter, you will encounter computational physics, that even problems as simple as the question of whether two functions can calculate the same thing are unsolvable.)
From the point of view of the specification, the specification of the promises language consists only in the fact that the result of computing (not calling) the lambda expression is an instance of a class that implements the target functional interface. He does not make promises about the identity or degree of smoothing of the result. This is by design to provide maximum implementation flexibility, to provide better performance (since lambdas can be faster than inner classes, we are not tied to the "need to create a unique instance" constraint that contains inner classes.)
Basically, the specification does not give you much, except, obviously, the two lambdas that are referenced (==) are going to compute the same function.
In terms of implementation, you can do a few more. There is (currently subject to change) a 1: 1 ratio between synthetic classes that implement lambda and capture points in the program. Thus, two separate code bits that capture "x โ x + 1" can be mapped to different classes. But if you evaluate the same lambda in the same capture area and that the lambda does not capture, you get the same instance that can be compared with reference equality.
If your lambdas are serializable, they can easily give up their fortune in exchange for sacrificing some performance and security (without a free lunch.)
One area where it would be useful to set up a definition of equality is to refer to methods, as this will allow them to be used as listeners and to be properly unregistered. This is being considered.
I think you are trying to understand: if two lambdas are converted to the same functional interface, they are represented by the same behavior function and have the same captured arguments, they are the same
Unfortunately, this is difficult to do (for non-serializable lambdas, you cannot get on all its components) and not enough (since two separately compiled files can convert the same lambdas to the same type of functional interface, and you cannot tell. )
EG discussed whether sufficient information should be provided to be able to make these judgments, and whether lambdas should use more selective equals / hashCode or more descriptive toString. The conclusion was that we did not want to pay anything at the cost of execution in order to make this information available to the caller (a bad compromise, punishing 99.99% of users for the benefit of 0.01%).
The final conclusion about toString was not reached, but remained open for revision in the future. However, good arguments were expressed in favor of both sides on this issue; this is not spanking.