Trump used the G7 summit to present the Iran agreement as a pragmatic effort to end a costly conflict, reopen global energy routes and avoid a wider economic crisis.