Negotiating an Agreement on Global Warming: A Theoretical Analysis