I'm not a lawyer, but the governing principle was established in English law by Prime Minister Pitt who decalred: "The poorest man may in his cottage bid defiance to all the forces of the crown. It may be frail - its roof may shake - the wind may blow through it - the storm may enter - the rain may enter - but the King of England cannot enter."This principle was further brought into american law by one of the framers of the Constitution who said: "Exalt the citizen. As the State is the unit of government he is the unit of the State. Teach him that his home is his castle, and his sovereignty rests beneath his hat."
Basically it means that a person may do as s/he wishes within the confines of his/her home, provided that the act would not be illegal outside it--i.e., building a nuclear device, to invoke an extreme example.
The co-op association may state that smoking in the apartment is illegal because it would be so in the common areas of the building, but then so is walking around naked or having sex for that matter.
In the other words, in the opinion of this non-lawyer, you may have the law on your side, but only your attorney can give you the best advice, and then, you'd most likely have to do to court, and have the court declare the association's rule to be an unconscionable intrusion into your rights as a citizen.