I'm guessing you can only contribute what I've seen called Federal gross income which is the income after your pretax deductions like 401K contributions. I know if you have foreign earned income (if you work overseas), you can deduct that income (up to a limit) off your AGI. However when you do that, that also decreases the amount eligible for contribution to an IRA. Your question seems similar. The TIRA contribution limits are the same as the Roth. If you consider the TIRA: if you were allowed to contribute 4K to the TIRA and deduct those contributions and also weren't taxed on the 1K 401K contribution......you would have (gross) earned 4K and essentially deducted 5K (on your tax return, it would be Federal earnings of 3K and a 4K TIRA deduction) which means you would be sheltering 1K of other earnings which doesn't sound like the intent.
Michael B's link has this: The last paragraph contains the words "taxable compensation". The instructions for the table refer to AGI which starts
with what I called Federal gross income (gross income less pretax contributions). Perhaps they mean the same thing?
*******************************************************
from Pub 590
This means that your contribution limit is the lesser of:
$5,500 ($6,500 if you are age 50 or older) minus all contributions (other than employer contributions under a SEP or SIMPLE IRA plan) for the year to all IRAs other than Roth IRAs, or
Your taxable compensation minus all contributions (other than employer contributions under a SEP or SIMPLE IRA plan) for the year to all IRAs other than Roth IRAs.