It's against the law to lie to a lawyer, isn't it?
This will vary by state, but I understand that almost any attorney admitted to practice in at least one court (that would be most attorneys by far) is an officer of that court. If a particular lie is perjury (thus a violation of law, which defines perjury differently in some different jurisdictions) when uttered to the government, then uttering that lie to an attorney who is an officer of a court of the same government is perjury. This would not be limited to attorneys acting for a government such as prosecutors or private attorneys general. It would not matter whether the lawyer is representing the person who thus lied, under consideration to provide representation, or neither. It probably would not matter whether the lie is being told in the jurisdiction where the lawyer is an officer of a court, the lawyer was admitted pro hac vice, i.e., for purposes limited to one case, the lawyer does not have an active practice, the lawyer only advises other lawyers and does not represent anyone (such as by performing legal research without a confidentiality privilege), the lawyer is retired (but not diisbarred), the lie involves fraud, or the lawyer tells anyone else the content of the statement that is a lie without the lawyer personally intending to lie (as in "my client said . . ."). It probably matters whether the person who is lying knew or should have known that the person to be lied to is an attorney admitted to practice somewhere, or at least is an attorney.
I don't think it's possible to distinguish between lying to the government and lying to an individual who is part of that government, because there is no other way to lie to the government. Even if the lie were told in a letter addressed only to "Government, State of . . ., [capital city, state, and Zip code]" and a machine opened the letter, scanned it into a computer, and used artificial intelligence to parse it with the AI having been written as free open-source software by a nongovernment programmer, if a human being on behalf of the government acts on the letter (including by deciding not to act on it), the lie is to a human who programmed the parsing system and/or to a human who acted on the parsed letter.
Unless there's a law specifically exempting the liar from liability (criminal and civil) when lying to a lawyer (and it would be interesting to theorize about the rationale for such a law), how is it not illegal (unlawful) to lie to a lawyer under the above circumstances?
I have no case involving this possibility. I'm thinking of writing about this, and I've seen various discussions that it's not illegal except for fraud (fraud has at least one additional element that makes it harder to prove than perjury), but none of the discussions I saw cited a source in the law. On the other hand, while I don't follow developments in the law with a practicing lawyer's diligence, I haven't heard of, say, a case against a client for having lied to their lawyer (viz., "I didn't go to the bank" while confessing to the police about robbing it in person without recanting the confession), and I imagine a few lawyers would gladly sue people for perjury to them. On the other hand, and this is just my speculation, maybe most lawyers don't think there's much of a problem and that letting the courts decide would create more problems than it's worth.