Wang tilings, periodic tilings, and aperiodic tilesets
DefinitionDominoProblem_Tilingdomino-problemtilingwang-tiles
A tiling of the integer plane by a finite Wang tileset places an allowed tile at every lattice site, matching south to north between successive rows and east to west between successive columns. A tiling is periodic if it repeats after a positive number of rows and after a positive number of columns. A tileset admits a periodic tiling if at least one such placement exists. It is aperiodic if it tiles the plane but admits no periodic tiling.
Definition code
import Definitions.Def_DominoProblem_WangTile
namespace DominoProblem
/-- A tiling uses tiles from `s` and matches colors across every shared edge.
Rows increase southward and columns increase eastward. -/
def IsTiling (s : Tileset) (f : ℤ → ℤ → Tile) : Prop :=
(∀ r c, f r c ∈ s) ∧
(∀ r c, (f r c).S = (f (r + 1) c).N) ∧
(∀ r c, (f r c).E = (f r (c + 1)).W)
/-- A tiling by `s` that repeats with positive height and width. -/
def IsPeriodicTiling (s : Tileset) (f : ℤ → ℤ → Tile) : Prop :=
IsTiling s f ∧
∃ h w : ℕ, 0 < h ∧ 0 < w ∧
(∀ r c, f (r + h) c = f r c) ∧
(∀ r c, f r (c + w) = f r c)
/-- Some periodic tiling of the plane uses tiles from `s`. -/
def AdmitsPeriodicTiling (s : Tileset) : Prop :=
∃ f, IsPeriodicTiling s f
/-- The tileset admits a tiling of the plane but no periodic tiling. -/
def IsAperiodicTileset (s : Tileset) : Prop :=
(∃ f, IsTiling s f) ∧ ¬ AdmitsPeriodicTiling s
end DominoProblem
Source
Hao Wang, “Proving Theorems by Pattern Recognition — II,” Bell System Technical Journal 40 (1961), §4.1, p. 22 (edge-matching tilings). https://doi.org/10.1002/j.1538-7305.1961.tb03975.x
Lean tiling and rectangular-period predicates adapted from Alex P. Klinkhamer, PeriodicDomino/Basic.lean, lines 27–37 (0BSD). https://github.com/ProtocolConvergence/periodic-domino-lean/blob/af6699cbf84ea7e57a0eddcead118c59f0e3dbe9/PeriodicDomino/Basic.lean#L27-L37