One of the consequences of Lucas' critique is that models must be microfounded. On the other side, Sonnenschein-Mantel-Debreu (SMD) theorem claims that microfoundation doesn't have any repercussion on aggregate economics. Then what does Lucas says about SMD? is there a counterargument to SMD? are there any additional conditions at the micro level to generate nice behaved aggregate demand?