A councilman in the southern city of Porto Alegre revealed, after his colleagues passed the ordinance, that artificial intelligence had crafted the proposal.