This is a very subjective question - it's more one for a discussion forum than a Q+A one like this.
I've worked for a few companies where layoffs were made and I would say there is a large mix of attitudes in the people that remain:
People who have been laid off but with notice (i.e. not immeadiately fired) will do as little as possible, being totally demoralised and not seeing the point in working hard.
People will hold out for a redundancy package, so they won't care, or might even be happy if they're next.
People will think "I might be next!" and just go looking for another job. Unfortunately for this company, it is the more capable of these that are more likely to get them and therefore more likely to leave.
People will blame / be angry at the management and do the bare minimum. Especially if the laid off people are replaced with cheaper outsourcees. (In this case they will also resent the outsourcees, be less likely to work well with them, and tend to blame them for anything that goes wrong)
People will work harder out of fear that they might be next. However, if they weren't working hard before now, then they are more likely to be amongst the lay-offs and so there won't be many of these people.
People will work harder out of loyalty to the company and the desire to save it. However, these people were probably already working hard before and so probably will not be able to improve by much.
In summary, no I don't think there can be much of a positive effect on productivity arising from layoffs.
We are a software company, the definition of “work hard” to my boss is simple, deliver fast with less bug.
I know you didn't want to get side-tracked but I felt this should be addressed, and it's probably the misconception that lead your boss to his initial thought regarding the productivity. You can't deliver faster and have less bugs! If you want less bugs you have to spend more time testing / checking your work, so you're not going to be faster!