You are getting screwed. I was putting this in excel making a balance sheet for you till I realized there is an easier way. Basic accounting states
Assets = Liabilities + Owner's Equity ..... equation 1
=> Owner's Equity = Assets - Liabilities (just like your partner said)
First, lets look at the programming $4000. That's put as $4000 worth of assets ("intangible asset" account) and a $4000 liability ("accounts payable" account). Recall it has to balance, so from equation1, 4000=4000+0. Great.
: $4000 is the book value based on the agreement (hopefully written in a contract or even email). The market value could be more or less - you don't care because the debt owed by the partnership to you is on the book value.
That accounts payable is an account that captures all pending dues. Fast forward to today, the partnership appears to have a negative equity value on your balance sheet. This doesn't mean it's bankrupt yet because although you have nothing left, nothing is due "yet".
This would have been ok except that the entity to whom the partnership owes money - is you and you're demanding that the debt be paid. Usually LLCs/Corporations have shields that shield the owners' personal assets from company debts. That's not true for partnerships. Both you and your partner are ALSO personally liable to any/all debtors. So not only can you go after the partnership's assets, you can also go after his personal assets like car/house etc. Obviously, you will not sue yourself and you own him no debt - so you're in the clear. Search for partnership bankruptcy if you want.
If I were you, I'd talk to an attorney who is willing to work for a low flat fee (avoid) or share % of proceeds (preferred). But that's me. I would recommend an attorney!
If you DO want to take the peaceful route, you can write a letter to the small claims court along with all documented evidence (agreements, emails showing you both agreeing on things etc). Small claims courts deal with sub-$5000 issues.
Please get a lawyer so he doesn't screw others in the future and you stand for what is rightfully yours.
Good luck, we're here for any assistance. (but I'm not a lawyer!)