Institutional diagnosis of the mining sector