In Lean, the proof is to the statement, as an object is to a class (in e.g. Python). Lean only compiles your proof if it is a valid "object" of your statement.
So the statement can exist without a proof. Thus, imports that are scoped just for the proof is valid.