The 15th-century Islamic mosaics in Spain's Alhambra palace display a near-perfect understanding of mathematical logic and 16 of 17 types of symmetry identified by modern mathematicians.