Documentation

CslibFrontier.Computability.RelationAlgebra.Tiling.Frame

The relation algebra of a list of Wang tiles #

Hirsch and Hodkinson associate with a finite set τ of Wang tiles a finite algebra RA(τ) whose networks force the tile atoms to form tilings [HH01], Section 4. It has 2k + 28 atoms for k tiles, and is given by a converse, three identity atoms and a list of inconsistent triangles. It need not be associative, so it is defined here as an AtomStructure, which does not include the laws (LawfulAtomStructure).

The tiles are given as a list L, and the tile atoms are indexed by the positions of L, so that a repeated tile contributes two atoms for each of its positions. The tile at position 0 plays the part of the source's special tile T₀: rule 3 exempts it, and nothing else is asked of it in the definition.

Conventions #

A cycle (r, s, t) of a frame means t ≤ r;s, whereas the source's triangle (a, b, c) is consistent when c˘ ≤ a;b. The source's triangle (a, b, c) is therefore the triple (a, b, c˘) here, and its six Peircean transforms are the triples (r, s, t), (s, t˘, r˘), (t˘, r, s˘), (r˘, t, s), (t, s˘, r) and (s˘, r˘, t˘).

Main definitions #

Main results #

References #

The three kinds of node in a network over RA(τ). The identity of RA(τ) is the join of three units e₀, e₁, e₂, and a node is an i-node when its loop is labelled eᵢ.

  • zero : Kind

    The 0-nodes, the apexes of green edges.

  • one : Kind

    The 1-nodes, which index the columns of a tiling.

  • two : Kind

    The 2-nodes, which index the rows of a tiling.

The two kinds of node other than 0, which are also the two axes of the plane: steps between 1-nodes move along the first coordinate, and steps between 2-nodes along the second.

  • one : Axis

    The kind 1, and the first coordinate.

  • two : Axis

    The kind 2, and the second coordinate.

The kind of node named by an axis.

An atom that is not its own converse is either the forward atom of its pair or the reverse one, which is the converse of the forward atom.

  • forward : Direction

    The atoms g₀ᵢ, u₀ᵢ, v₀ᵢ, +1ᵢ and T₁₂ⁱ of the source.

  • reverse : Direction

    Their converses gᵢ₀, uᵢ₀, vᵢ₀, -1ᵢ and T₂₁ⁱ.

inductive Cslib.RelationAlgebra.Tiling.Atom (ι : Type u_1) :
Type u_1

The atoms of RA(τ) for tiles indexed by ι [HH01], Section 4.1: there are 2k + 28 of them when ι has k elements.

  • unit {ι : Type u_1} (i : Kind) : Atom ι

    The unit eᵢ, the part of the identity on the i-nodes.

  • white {ι : Type u_1} (i j : Kind) : Atom ι

    The white atom wᵢⱼ from i-nodes to j-nodes; the source writes wᵢ for wᵢᵢ.

  • green {ι : Type u_1} (d : Axis) (o : Direction) : Atom ι

    The green atom g₀d from 0-nodes to d-nodes, and its converse g_d0.

  • u {ι : Type u_1} (d : Axis) (o : Direction) : Atom ι

    The atom u₀d from 0-nodes to d-nodes, and its converse u_d0.

  • v {ι : Type u_1} (d : Axis) (o : Direction) : Atom ι

    The atom v₀d from 0-nodes to d-nodes, and its converse v_d0.

  • step {ι : Type u_1} (d : Axis) (o : Direction) : Atom ι

    The step +1_d between d-nodes, and its converse -1_d.

  • tile {ι : Type u_1} (i : ι) (o : Direction) : Atom ι

    The tile atom T₁₂ⁱ from 1-nodes to 2-nodes, and its converse T₂₁ⁱ.

Instances For
    def Cslib.RelationAlgebra.Tiling.instDecidableEqAtom.decEq {ι✝ : Type u_1} [DecidableEq ι✝] (x✝ x✝¹ : Atom ι✝) :
    Decidable (x✝ = x✝¹)
    @[instance_reducible]

    The converse of an atom [HH01], Section 4.2.

    The kind of node at which the edges labelled by an atom start: the index of the source's start unit.

    The kind of node at which the edges labelled by an atom end: the index of the source's end unit.

    The identity atoms are the three units.

    Instances For
      @[simp]

      The inconsistent triangles listed in [HH01], Section 4.2: rule 1, rules 2–4 and the duals of rules 2–4, which exchange the kinds 1 and 2, left with bottom and right with top. The triple (r, s, t) is the source's triangle (r, s, t˘); in particular the step +1 of the source's rule 2 appears here as its converse. The colours compared are those of the tiles at the two positions of L, and rule 3 concerns every position but 0.

      Instances For
        @[instance_reducible]

        A triangle is forbidden when it or one of its five other Peircean transforms is listed in Rule.

        Instances For
          @[instance_reducible]

          The consistent triangles of RA(τ), as triples (r, s, t) with t ≤ r;s [HH01], Section 4.2: the kinds of node match, a triangle with an identity atom is degenerate, and the triangle is not forbidden.

          • tgt_eq_src : r.tgt = s.src

            The edge labelled s starts where the edge labelled r ends.

          • src_eq_src : r.src = t.src

            The edges labelled r and t start at the same kind of node.

          • tgt_eq_tgt : s.tgt = t.tgt

            The edges labelled s and t end at the same kind of node.

          • eq_of_isUnit_left : r.IsUnit → t = s

            The source's (eᵢ, x, y) is inconsistent unless x = y˘.

          • eq_of_isUnit_right : s.IsUnit → t = r

            The transform of that rule in which the unit is the second atom.

          • eq_conv_of_isUnit : t.IsUnit → s = r.conv

            The transform of that rule in which the unit is the third atom.

          • not_forbidden : ¬Forbidden L r s t

            Neither the triangle nor any of its Peircean transforms is listed in Rule.

          Instances For
            theorem Cslib.RelationAlgebra.Tiling.cycle_iff {L : List WangTile} {r s t : Atom (Fin L.length)} :
            Cycle L r s t ↔ r.tgt = s.src ∧ r.src = t.src ∧ s.tgt = t.tgt ∧ (r.IsUnit → t = s) ∧ (s.IsUnit → t = r) ∧ (t.IsUnit → s = r.conv) ∧ ¬Forbidden L r s t
            @[instance_reducible]

            By rule 1, an edge from a 1-node to a 2-node that some 0-node joins by green edges is labelled by a tile atom: the atoms from 1-nodes to 2-nodes are the tile atoms and the white atom w₁₂, which rule 1 forbids here.

            The frame of the algebra RA(τ) of [HH01], Section 4, for the tiles listed in L: its atoms, their converses, the three identity atoms and the consistent triangles. The tile at position 0 is the one exempted by rule 3. The algebra need not be associative, so this is a frame and not an atom structure.

            def Cslib.RelationAlgebra.Tiling.network {L : List WangTile} {D : Type u_1} (label : D → D → Atom (Fin L.length)) (kind : D → Kind) (isUnit_label : ∀ (d e : D), (label d e).IsUnit ↔ d = e) (conv_label : ∀ (d e : D), (label d e).conv = label e d) (src_label : ∀ (d e : D), (label d e).src = kind d) (not_rule : ∀ (d e f : D), ¬Rule L (label d e) (label e f) (label d f)) :

            A network over the frame of RA(τ), from a labelling of the ordered pairs of nodes in which the loops are the edges with unit labels, reversed edges carry converse atoms, every label starts at the kind of its first node, and no three nodes, taken in any order, form a triangle listed in Rule. The six Peircean transforms of a triangle of a network are its six orderings, so the rules need to be checked only as listed.

            @[simp]
            theorem Cslib.RelationAlgebra.Tiling.network_label {L : List WangTile} {D : Type u_1} (label : D → D → Atom (Fin L.length)) (kind : D → Kind) (isUnit_label : ∀ (d e : D), (label d e).IsUnit ↔ d = e) (conv_label : ∀ (d e : D), (label d e).conv = label e d) (src_label : ∀ (d e : D), (label d e).src = kind d) (not_rule : ∀ (d e f : D), ¬Rule L (label d e) (label e f) (label d f)) (a✝ a✝¹ : D) :
            (network label kind isUnit_label conv_label src_label not_rule).label a✝ a✝¹ = label a✝ a✝¹

            The numbering of the atoms #

            The number of a kind of node.

            The axes are numbered 0 and 1.

            The forward direction is numbered 0 and the reverse direction 1.

            The number of an atom of RA(τ) for k tiles, among 0, …, 2k + 27:

            numbersatoms
            0, 1, 2e₀, e₁, e₂
            3 + 3i + jwᵢⱼ
            12, 13, 14, 15+1₁, -1₁, +1₂, -1₂
            16, 17, 18, 19g₀₁, g₁₀, g₀₂, g₂₀
            20, 21, 22, 23u₀₁, u₁₀, u₀₂, u₂₀
            24, 25, 26, 27v₀₁, v₁₀, v₀₂, v₂₀
            28 + 2i, 29 + 2iT₁₂ⁱ, T₂₁ⁱ

            RA(τ) has 2k + 28 atoms for k tiles: the numbering Atom.code is a bijection.