Logic

Should we consider logic as a function or a build-in capacity of our neocortex? Or as result of brain chemistry? What happens to logic when our brain dies?