LONDON - The United Kingdom is set to formally leave the European Union on Friday evening after 47 years of membership, paving the way for new trade deals with Japan and the United States.