The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V21. Dynamics, ergodic theory and information theory

Mathlib.Dynamics.SymbolicDynamics.Basic

71 declarations and 1 deprecated aliases. Mathlib docs · Source

Symbolic dynamics on cancellative monoids

This file develops a minimal API for symbolic dynamics over a left-cancellative monoid G—formally, a structure carrying [Monoid G] and [IsLeftCancelMul G] (which becomes [AddMonoid G] and [IsLeftCancelAdd G] in the additive form). Throughout the documentation we use the additive notations, which are the most common in symbolic dynamics, although all the notions introduced are defined in the multiplicative notations and adapted to the additive notation.

Given a finite alphabet A, the ambient configuration space is the set of functions G → A, endowed with the product topology. We define the left-translation action, cylinders, finite patterns, their occurrences, forbidden sets, and subshifts (closed, shift-invariant subsets). Basic topological facts (e.g. cylinders are clopen, occurrence sets are clopen, forbidden sets are closed) are proved under discreteness assumptions on the alphabet.

The development is generic for left-cancellative monoids. This covers both groups (the standard setting of symbolic dynamics) and more general monoids where cancellation holds but inverses may not exist. Geometry specific to ℤ^d (boxes/cubes and the box-based entropy) is deferred to a separate specialization.

Why cancellativity?

Some constructions, such as translating a finite pattern to occur at a point v, require solving equations of the form w + v = h. For this to have a unique solution w given h and v, we assume left-cancellation: if v + a = v + b then a = b. This allows us to define Pattern.shift (which shifts a pattern) without using inverses, so that the theory works not only for groups but also for cancellative monoids.

Main definitions

  • shift g x — left translation: in additive notation (shift v x) u = x (v + u) (using the left action of G on configurations).
  • cylinder U x — configurations agreeing with x on a finite set U ⊆ G.
  • Pattern A G — a configuration which takes default value outside of a finite support, together with this support.
  • Pattern.occursInAt p x g — occurrence of p in x at translate g.
  • forbidden F — configurations avoiding every pattern in F.
  • Subshift A G — closed, shift-invariant subsets of the full shift.
  • MulSubshift.ofForbidden F — the subshift defined by forbidding a family of patterns.
  • subshift_of_finite_type F — a subshift of finite type defined by a finite set of forbidden patterns.
  • languageOn X U — the set of patterns of shape U obtained by restricting some x ∈ X.

Design choice: ambient vs. inner (subshift-relative) viewpoint

All core notions (shift, cylinder, occurrence, language, …) are defined in the ambient full shift G → A. A subshift is then a closed, invariant subset, bundled as Subshift A G. Working inside a subshift is done by restriction.

Motivation.

If cylinders and shifts were defined only inside a subshift, local ergonomics would improve but global operations would become awkward. For instance, to prove that for finite shape U:

languageOn (X ∪ Y) U = languageOn X U ∪ languageOn Y U,

one must eventually move both sides to the ambient pattern type. Similar issues arise for intersections, factors, and products. By contrast, with ambient definitions these set-theoretic identities are tautological. Thus the file develops the theory ambiently, and subshifts reuse it by restriction.

Working inside a subshift.

For Y : Subshift A G, cylinders and occurrence sets inside Y are simply preimages of the ambient ones under the inclusion Y → (G → A). For example:

{ y : Y | ∀ i ∈ U, (y : G → A) i = (x : G → A) i } = (Subtype.val) ⁻¹' (cylinder U (x : G → A)).

Shift invariance guarantees that the ambient shift restricts to Y.

Ergonomics.

Thin wrappers (e.g. Subshift.shift, Subshift.cylinder, Subshift.languageOn) may be added for convenience. They introduce no new theory and unfold to the ambient definitions.

Namespacing policy

All ambient definitions live under the namespace SymbolicDynamics.FullShift. If inner, subshift-relative wrappers are provided, they will be placed in the subnamespace SymbolicDynamics.Subshift. This separation avoids name clashes between the two viewpoints, since both may naturally want to reuse names like cylinder, shift, occursAt, or languageOn.

Implementation notes

  • Openness results for cylinders and occurrence sets use [DiscreteTopology A]. Closeness results use [T1Space A].

Full shift and shift action

Cylinders

Patterns and occurrences

Forbidden sets and subshifts

def SymbolicDynamics.FullShift.Pattern.ctorIdx E1 #

{A : Type u_1} → {G : Type u_2} → {inst : Inhabited A} → SymbolicDynamics.FullShift.Pattern A G → ℕ

theorem SymbolicDynamics.FullShift.Pattern.mk.injEq E0 #

∀ {A : Type u_1} {G : Type u_2} [inst : Inhabited A] (config : G → A) (support : Finset G)
  (condition : ∀ g ∉ support, config g = default) (config_1 : G → A) (support_1 : Finset G)
  (condition_1 : ∀ g ∉ support_1, config_1 g = default),
  ({ config := config, support := support, condition := condition } =
      { config := config_1, support := support_1, condition := condition_1 }) =
    (config = config_1 ∧ support = support_1)

theorem SymbolicDynamics.FullShift.Pattern.mk.congr_simp E1 #

∀ {A : Type u_1} {G : Type u_2} [inst : Inhabited A] (config config_1 : G → A) (e_config : config = config_1)
  (support support_1 : Finset G) (e_support : support = support_1) (condition : ∀ g ∉ support, config g = default),
  { config := config, support := support, condition := condition } =
    { config := config_1, support := support_1, condition := ⋯ }

theorem SymbolicDynamics.FullShift.Subshift.mk.inj E1 #

∀ {A : Type u_1} {inst : TopologicalSpace A} {G : Type u_2} {inst_1 : AddMonoid G} {carrier : Set (G → A)}
  {isClosed : IsClosed carrier} {mapsTo : ∀ (g : G), Set.MapsTo (SymbolicDynamics.FullShift.shift g) carrier carrier}
  {carrier_1 : Set (G → A)} {isClosed_1 : IsClosed carrier_1}
  {mapsTo_1 : ∀ (g : G), Set.MapsTo (SymbolicDynamics.FullShift.shift g) carrier_1 carrier_1},
  { carrier := carrier, isClosed := isClosed, mapsTo := mapsTo } =
      { carrier := carrier_1, isClosed := isClosed_1, mapsTo := mapsTo_1 } →
    carrier = carrier_1

theorem SymbolicDynamics.FullShift.Pattern.mk.inj E1 #

∀ {A : Type u_1} {G : Type u_2} {inst : Inhabited A} {config : G → A} {support : Finset G}
  {condition : ∀ g ∉ support, config g = default} {config_1 : G → A} {support_1 : Finset G}
  {condition_1 : ∀ g ∉ support_1, config_1 g = default},
  { config := config, support := support, condition := condition } =
      { config := config_1, support := support_1, condition := condition_1 } →
    config = config_1 ∧ support = support_1

def SymbolicDynamics.FullShift.Subshift.ctorIdx E1 #

{A : Type u_1} →
  {inst : TopologicalSpace A} → {G : Type u_2} → {inst_1 : AddMonoid G} → SymbolicDynamics.FullShift.Subshift A G → ℕ

theorem SymbolicDynamics.FullShift.Subshift.mk.injEq E0 #

∀ {A : Type u_1} [inst : TopologicalSpace A] {G : Type u_2} [inst_1 : AddMonoid G] (carrier : Set (G → A))
  (isClosed : IsClosed carrier) (mapsTo : ∀ (g : G), Set.MapsTo (SymbolicDynamics.FullShift.shift g) carrier carrier)
  (carrier_1 : Set (G → A)) (isClosed_1 : IsClosed carrier_1)
  (mapsTo_1 : ∀ (g : G), Set.MapsTo (SymbolicDynamics.FullShift.shift g) carrier_1 carrier_1),
  ({ carrier := carrier, isClosed := isClosed, mapsTo := mapsTo } =
      { carrier := carrier_1, isClosed := isClosed_1, mapsTo := mapsTo_1 }) =
    (carrier = carrier_1)

theorem SymbolicDynamics.FullShift.MulSubshift.mk.inj E1 #

∀ {A : Type u_1} {inst : TopologicalSpace A} {G : Type u_2} {inst_1 : Monoid G} {carrier : Set (G → A)}
  {isClosed : IsClosed carrier} {mapsTo : ∀ (g : G), Set.MapsTo (SymbolicDynamics.FullShift.mulShift g) carrier carrier}
  {carrier_1 : Set (G → A)} {isClosed_1 : IsClosed carrier_1}
  {mapsTo_1 : ∀ (g : G), Set.MapsTo (SymbolicDynamics.FullShift.mulShift g) carrier_1 carrier_1},
  { carrier := carrier, isClosed := isClosed, mapsTo := mapsTo } =
      { carrier := carrier_1, isClosed := isClosed_1, mapsTo := mapsTo_1 } →
    carrier = carrier_1

def SymbolicDynamics.FullShift.MulSubshift.ctorIdx E1 #

{A : Type u_1} →
  {inst : TopologicalSpace A} → {G : Type u_2} → {inst_1 : Monoid G} → SymbolicDynamics.FullShift.MulSubshift A G → ℕ

theorem SymbolicDynamics.FullShift.MulSubshift.mk.injEq E0 #

∀ {A : Type u_1} [inst : TopologicalSpace A] {G : Type u_2} [inst_1 : Monoid G] (carrier : Set (G → A))
  (isClosed : IsClosed carrier) (mapsTo : ∀ (g : G), Set.MapsTo (SymbolicDynamics.FullShift.mulShift g) carrier carrier)
  (carrier_1 : Set (G → A)) (isClosed_1 : IsClosed carrier_1)
  (mapsTo_1 : ∀ (g : G), Set.MapsTo (SymbolicDynamics.FullShift.mulShift g) carrier_1 carrier_1),
  ({ carrier := carrier, isClosed := isClosed, mapsTo := mapsTo } =
      { carrier := carrier_1, isClosed := isClosed_1, mapsTo := mapsTo_1 }) =
    (carrier = carrier_1)

def SymbolicDynamics.FullShift.mulShift E1 #

{A : Type u_1} → {G : Type u_2} → [Monoid G] → G → (G → A) → G → A

The left-translation shift on configurations.

We call configuration an element of G → A.

Given a configuration x : G → A and an element g : G of the monoid, the shifted configuration mulShift g x is defined by (mulShift g x) h = x (g * h).

Intuitively, this moves the whole configuration "in the direction of g": the value at position h in the shifted configuration is the value that was at position g * h in the original one.

For example, if G = ℤ (with addition) and A = {0, 1}, then mulShift 1 x is the sequence obtained from x by shifting every symbol one step to the left.

def SymbolicDynamics.FullShift.shift E1 #

{A : Type u_1} → {G : Type u_2} → [AddMonoid G] → G → (G → A) → G → A

The left-translation shift on configurations, in additive notation.

We call configuration an element of G → A.

Given a configuration x : G → A and an element g : G of the additive monoid, the shifted configuration shift g x is defined by (shift g x) h = x (g + h).

Intuitively, this moves the whole configuration "in the direction of g": the value at position h in the shifted configuration is the value that was at position g + h in the original one.

For example, if G = ℤ and A = {0, 1}, then shift 1 x is the sequence obtained from x by shifting every symbol one step to the left.

theorem SymbolicDynamics.FullShift.mulShift_apply E0 #

∀ {A : Type u_1} {G : Type u_2} [inst : Monoid G] (g : G) (x : G → A) (h : G),
  SymbolicDynamics.FullShift.mulShift g x h = x (g * h)

theorem SymbolicDynamics.FullShift.shift_apply E0 #

∀ {A : Type u_1} {G : Type u_2} [inst : AddMonoid G] (g : G) (x : G → A) (h : G),
  SymbolicDynamics.FullShift.shift g x h = x (g + h)

theorem SymbolicDynamics.FullShift.shift_zero E0 #

∀ {A : Type u_1} {G : Type u_2} [inst : AddMonoid G] (x : G → A), SymbolicDynamics.FullShift.shift 0 x = x

theorem SymbolicDynamics.FullShift.mulShift_one E0 #

∀ {A : Type u_1} {G : Type u_2} [inst : Monoid G] (x : G → A), SymbolicDynamics.FullShift.mulShift 1 x = x

theorem SymbolicDynamics.FullShift.mulShift_mul E1 #

∀ {A : Type u_1} {G : Type u_2} [inst : Monoid G] (g₁ g₂ : G) (x : G → A),
  SymbolicDynamics.FullShift.mulShift (g₁ * g₂) x =
    SymbolicDynamics.FullShift.mulShift g₂ (SymbolicDynamics.FullShift.mulShift g₁ x)

Composition of left-translation shifts corresponds to multiplication in the monoid G.

theorem SymbolicDynamics.FullShift.shift_add E1 #

∀ {A : Type u_1} {G : Type u_2} [inst : AddMonoid G] (g₁ g₂ : G) (x : G → A),
  SymbolicDynamics.FullShift.shift (g₁ + g₂) x =
    SymbolicDynamics.FullShift.shift g₂ (SymbolicDynamics.FullShift.shift g₁ x)

Composition of left-translation shifts corresponds to addition in the additive monoid G.

theorem SymbolicDynamics.FullShift.continuous_mulShift E1 #

∀ {A : Type u_1} {G : Type u_2} [inst : Monoid G] [inst_1 : TopologicalSpace A] (g : G),
  Continuous (SymbolicDynamics.FullShift.mulShift g)

The left-translation shift is continuous.

theorem SymbolicDynamics.FullShift.continuous_shift E1 #

∀ {A : Type u_1} {G : Type u_2} [inst : AddMonoid G] [inst_1 : TopologicalSpace A] (g : G),
  Continuous (SymbolicDynamics.FullShift.shift g)

The left-translation shift is continuous.

def SymbolicDynamics.FullShift.cylinder E1 #

{A : Type u_1} → {G : Type u_2} → Finset G → (G → A) → Set (G → A)

A cylinder set is the set of all configurations that agree with a given reference configuration x on a fixed finite subset U of the index set G.

The set U is called the support of the cylinder.

Intuitively, cylinders specify the "letters" on finitely many coordinates, while leaving all other coordinates free. For example, in the full shift {0, 1}^ℤ, the cylinder determined by U = {0, 1} and x 0 = 1, x 1 = 0 consists of all bi-infinite sequences of 0s and 1s whose entries on positions 0 and 1 respectively are 1 and 0.

When A has the discrete topology, cylinder sets form a basis of clopen sets for the product topology on G → A.

theorem SymbolicDynamics.FullShift.cylinder_eq_set_pi E1 #

∀ {A : Type u_1} {G : Type u_2} (U : Finset G) (x : G → A),
  SymbolicDynamics.FullShift.cylinder U x = (↑U).pi fun i ↦ {x i}

A cylinder set on U is the Set.pi over U of the singletons {x i}, viewed as a subset of G → A. Equivalently, it is the preimage of that product of singletons in U → A under the restriction map (G → A) → (U → A).

theorem SymbolicDynamics.FullShift.mem_cylinder E0 #

∀ {A : Type u_1} {G : Type u_2} {U : Finset G} {x y : G → A},
  y ∈ SymbolicDynamics.FullShift.cylinder U x ↔ ∀ i ∈ U, y i = x i

theorem SymbolicDynamics.FullShift.isOpen_cylinder E1 #

∀ {A : Type u_1} {G : Type u_2} [inst : TopologicalSpace A] [DiscreteTopology A] (U : Finset G) (x : G → A),
  IsOpen (SymbolicDynamics.FullShift.cylinder U x)

Cylinders are open when A is discrete.

theorem SymbolicDynamics.FullShift.isClosed_cylinder E1 #

∀ {A : Type u_1} {G : Type u_2} [inst : TopologicalSpace A] [T1Space A] (U : Finset G) (x : G → A),
  IsClosed (SymbolicDynamics.FullShift.cylinder U x)

Cylinders are closed when A is a T1 Space.

structure SymbolicDynamics.FullShift.Subshift E1 #

(A : Type u_1) → [TopologicalSpace A] → (G : Type u_2) → [AddMonoid G] → Type (max u_1 u_2)

A subshift on an alphabet A is a closed, shift-invariant subset of G → A. Formally, it is composed of:

  • carrier: the underlying set of allowed configurations.
  • isClosed: the set is topologically closed in A^G.
  • mapsTo: the set is invariant under all left-translation shifts (shift g).

ctor SymbolicDynamics.FullShift.Subshift.mk E0 #

{A : Type u_1} →
  [inst : TopologicalSpace A] →
    {G : Type u_2} →
      [inst_1 : AddMonoid G] →
        (carrier : Set (G → A)) →
          IsClosed carrier →
            (∀ (g : G), Set.MapsTo (SymbolicDynamics.FullShift.shift g) carrier carrier) →
              SymbolicDynamics.FullShift.Subshift A G

abbrev SymbolicDynamics.FullShift.Subshift.carrier E1 #

{A : Type u_1} →
  [inst : TopologicalSpace A] →
    {G : Type u_2} → [inst_1 : AddMonoid G] → SymbolicDynamics.FullShift.Subshift A G → Set (G → A)

The underlying set of configurations (additive monoid version).

theorem SymbolicDynamics.FullShift.Subshift.isClosed E1 #

∀ {A : Type u_1} [inst : TopologicalSpace A] {G : Type u_2} [inst_1 : AddMonoid G]
  (self : SymbolicDynamics.FullShift.Subshift A G), IsClosed self.carrier

Closedness of carrier.

theorem SymbolicDynamics.FullShift.Subshift.mapsTo E1 #

∀ {A : Type u_1} [inst : TopologicalSpace A] {G : Type u_2} [inst_1 : AddMonoid G]
  (self : SymbolicDynamics.FullShift.Subshift A G) (g : G),
  Set.MapsTo (SymbolicDynamics.FullShift.shift g) self.carrier self.carrier

Shift invariance of carrier for the additive shift shift.

structure SymbolicDynamics.FullShift.MulSubshift E1 #

(A : Type u_1) → [TopologicalSpace A] → (G : Type u_2) → [Monoid G] → Type (max u_1 u_2)

A subshift on an alphabet A over a multiplicative monoid G is a closed, shift-invariant subset of G → A, where the shift is given by left-multiplication. Formally, it is composed of:

  • carrier: the underlying set of allowed configurations.
  • isClosed: the set is topologically closed in A^G.
  • mapsTo: the set is invariant under all left-translation shifts (mulShift g).

ctor SymbolicDynamics.FullShift.MulSubshift.mk E0 #

{A : Type u_1} →
  [inst : TopologicalSpace A] →
    {G : Type u_2} →
      [inst_1 : Monoid G] →
        (carrier : Set (G → A)) →
          IsClosed carrier →
            (∀ (g : G), Set.MapsTo (SymbolicDynamics.FullShift.mulShift g) carrier carrier) →
              SymbolicDynamics.FullShift.MulSubshift A G

abbrev SymbolicDynamics.FullShift.MulSubshift.carrier E1 #

{A : Type u_1} →
  [inst : TopologicalSpace A] →
    {G : Type u_2} → [inst_1 : Monoid G] → SymbolicDynamics.FullShift.MulSubshift A G → Set (G → A)

The underlying set of configurations.

theorem SymbolicDynamics.FullShift.MulSubshift.isClosed E1 #

∀ {A : Type u_1} [inst : TopologicalSpace A] {G : Type u_2} [inst_1 : Monoid G]
  (self : SymbolicDynamics.FullShift.MulSubshift A G), IsClosed self.carrier

Closedness of carrier.

theorem SymbolicDynamics.FullShift.MulSubshift.mapsTo E1 #

∀ {A : Type u_1} [inst : TopologicalSpace A] {G : Type u_2} [inst_1 : Monoid G]
  (self : SymbolicDynamics.FullShift.MulSubshift A G) (g : G),
  Set.MapsTo (SymbolicDynamics.FullShift.mulShift g) self.carrier self.carrier

Shift invariance of carrier.

def SymbolicDynamics.FullShift.mulFullShift E1 #

(A : Type u_1) →
  (G : Type u_2) → [inst : TopologicalSpace A] → [inst_1 : Monoid G] → SymbolicDynamics.FullShift.MulSubshift A G

Example: the full shift on alphabet A over the multiplicative monoid G. It is the subshift whose underlying set is the set of all configurations G → A.

def SymbolicDynamics.FullShift.fullShift E1 #

(A : Type u_1) →
  (G : Type u_2) → [inst : TopologicalSpace A] → [inst_1 : AddMonoid G] → SymbolicDynamics.FullShift.Subshift A G

Example: the full shift on alphabet A over the additive monoid G.

It is the subshift whose underlying set is the set of all configurations G → A.

structure SymbolicDynamics.FullShift.Pattern E1 #

(A : Type u_1) → Type u_2 → [Inhabited A] → Type (max u_1 u_2)

A pattern is a finite configuration in the full shift A^G.

It consists of:

  • a full configuration config : G → A in the full shift;
  • a finite subset support : Finset G of coordinates, called the support of p;
  • a proof condition that outside support, config takes the default value of A.

Intuitively, a pattern is a "partial configuration" specifying finitely many values of a configuration in G → A (the rest being default). Patterns are the basic building blocks used to define subshifts via forbidden configurations. Note that each pattern corresponds to a cylinder, which is the set of configurations which agree with this pattern on its support.

ctor SymbolicDynamics.FullShift.Pattern.mk E0 #

{A : Type u_1} →
  {G : Type u_2} →
    [inst : Inhabited A] →
      (config : G → A) →
        (support : Finset G) → (∀ g ∉ support, config g = default) → SymbolicDynamics.FullShift.Pattern A G

abbrev SymbolicDynamics.FullShift.Pattern.config E1 #

{A : Type u_1} → {G : Type u_2} → [inst : Inhabited A] → SymbolicDynamics.FullShift.Pattern A G → G → A

The full configuration in the full shift A^G.

abbrev SymbolicDynamics.FullShift.Pattern.support E1 #

{A : Type u_1} → {G : Type u_2} → [inst : Inhabited A] → SymbolicDynamics.FullShift.Pattern A G → Finset G

Finite support of the pattern.

theorem SymbolicDynamics.FullShift.Pattern.condition E1 #

∀ {A : Type u_1} {G : Type u_2} [inst : Inhabited A] (self : SymbolicDynamics.FullShift.Pattern A G),
  ∀ g ∉ self.support, self.config g = default

Outside the support, config takes the default value of A.

def SymbolicDynamics.FullShift.Pattern.mulOccursInAt E1 #

{A : Type u_1} →
  {G : Type u_2} → [inst : Inhabited A] → [Monoid G] → SymbolicDynamics.FullShift.Pattern A G → (G → A) → G → Prop

p.mulOccursInAt x g means that the finite pattern p appears in the configuration x at position g.

Formally: for every position h in the support of p, the value of the configuration at g * h coincides with the value of p.config at h.

Intuitively, if you shift the configuration x by g (using mulShift g), then on the support of p you exactly recover the pattern p. This is the basic notion of "pattern occurrence" used to define subshifts via forbidden patterns.

def SymbolicDynamics.FullShift.Pattern.occursInAt E1 #

{A : Type u_1} →
  {G : Type u_2} → [inst : Inhabited A] → [AddMonoid G] → SymbolicDynamics.FullShift.Pattern A G → (G → A) → G → Prop

p.occursInAt x g means that the finite pattern p appears in the configuration x at position g.

Formally: for every position h in the support of p, the value of the configuration at g + h coincides with the value of p.config at h.

Intuitively, if you shift the configuration x by g (using shift g), then on the support of p you exactly recover the pattern p. This is the basic notion of "pattern occurrence" used to define subshifts via forbidden patterns.

def SymbolicDynamics.FullShift.mulForbidden E1 #

{A : Type u_1} →
  {G : Type u_2} → [inst : Inhabited A] → [Monoid G] → Set (SymbolicDynamics.FullShift.Pattern A G) → Set (G → A)

mulForbidden F is the set of configurations that avoid every pattern in F.

Formally: x ∈ mulForbidden F if and only if for every pattern p ∈ F and every monoid element g : G, the pattern p does not occur in x at position g.

Intuitively, mulForbidden F is the shift space defined by declaring the finite set (or family) of patterns F to be forbidden. A configuration belongs to the subshift if and only it avoids all the forbidden patterns.

def SymbolicDynamics.FullShift.forbidden E1 #

{A : Type u_1} →
  {G : Type u_2} → [inst : Inhabited A] → [AddMonoid G] → Set (SymbolicDynamics.FullShift.Pattern A G) → Set (G → A)

forbidden F is the set of configurations that avoid every pattern in F.

Formally: x ∈ forbidden F if and only if for every pattern p ∈ F and every monoid element g : G, the pattern p does not occur in x at position g.

Intuitively, forbidden F is the shift space defined by declaring the finite set (or family) of patterns F to be forbidden. A configuration belongs to the subshift if and only it avoids all the forbidden patterns.

def SymbolicDynamics.FullShift.Pattern.mulShift E1 #

{A : Type u_1} → [inst : Inhabited A] → {G : Type u_2} → [Monoid G] → SymbolicDynamics.FullShift.Pattern A G → G → G → A

Translate a finite pattern p so that it occurs at the translate v, before completing into a configuration.

On input h : G, we proceed as follows:

  • if h lies in the left-translate of the support, i.e. h ∈ p.support.image (v * ·), choose (noncomputably) w ∈ p.support with v * w = h and return p.config w;
  • otherwise return default.

This definition does not assume left-cancellation; it only chooses a preimage. Uniqueness (and the usual equations such as Pattern.mulShift p v (v * w) = p.config w) require a left-cancellation hypothesis and are proved in separate lemmas.

def SymbolicDynamics.FullShift.Pattern.shift E1 #

{A : Type u_1} →
  [inst : Inhabited A] → {G : Type u_2} → [AddMonoid G] → SymbolicDynamics.FullShift.Pattern A G → G → G → A

Translate a finite pattern p so that it occurs at the translate v, before completing into a configuration.

On input h : G, we proceed as follows:

  • if h lies in the left-translate of the support, i.e. h ∈ p.support.image (v + ·), choose (noncomputably) w ∈ p.support with v + w = h and return p.config w;
  • otherwise return default.

This definition does not assume left-cancellation; it only chooses a preimage. Uniqueness (and the usual equations such as Pattern.shift p v (v + w) = p.config w) require a left-cancellation hypothesis and are proved in separate lemmas.

def SymbolicDynamics.FullShift.Pattern.fromConfig E1 #

{A : Type u_1} → [inst : Inhabited A] → {G : Type u_2} → (G → A) → Finset G → SymbolicDynamics.FullShift.Pattern A G

Extract the finite pattern given by restricting a configuration x : G → A to a finite subset U : Finset G.

The pattern has config g = x g for g ∈ U and config g = default outside U, with support U. In other words, Pattern.fromConfig x U is the partial configuration of x visible on the coordinates in U, padded with default elsewhere.

theorem SymbolicDynamics.FullShift.Pattern.mulShift_apply_mul_left_of_mem E1 #

∀ {A : Type u_1} [inst : Inhabited A] {G : Type u_2} [inst_1 : Monoid G] [IsLeftCancelMul G]
  (p : SymbolicDynamics.FullShift.Pattern A G) (v w : G), w ∈ p.support → p.mulShift v (v * w) = p.config w

On the translated support, p.mulShift v agrees with p.config at the preimage.

More precisely, if w ∈ p.support, then at the translated site v * w, the configuration p.mulShift v takes the value p.config w.

This uses [IsLeftCancelMul G] to identify the unique preimage of v * w under left-multiplication by v.

theorem SymbolicDynamics.FullShift.Pattern.shift_apply_add_left_of_mem E1 #

∀ {A : Type u_1} [inst : Inhabited A] {G : Type u_2} [inst_1 : AddMonoid G] [IsLeftCancelAdd G]
  (p : SymbolicDynamics.FullShift.Pattern A G) (v w : G), w ∈ p.support → p.shift v (v + w) = p.config w

On the translated support, p.shift v agrees with p.config at the preimage.

More precisely, if w ∈ p.support, then at the translated site v + w, the configuration p.shift v takes the value p.config w.

This uses [IsLeftCancelAdd G] to identify the unique preimage of v + w under left-translation by v.

theorem SymbolicDynamics.FullShift.Pattern.mulOccursInAt_mulShift E1 #

∀ {A : Type u_3} {G : Type u_4} [inst : Inhabited A] [inst_1 : Monoid G] (p : SymbolicDynamics.FullShift.Pattern A G)
  (x : G → A) (g h : G), p.mulOccursInAt (SymbolicDynamics.FullShift.mulShift g x) h ↔ p.mulOccursInAt x (g * h)

Shifting a configuration commutes with occurrences of a pattern.

Formally: a pattern p occurs in the shifted configuration mulShift h x at position g if and only if it occurs in the original configuration x at position g * h.

theorem SymbolicDynamics.FullShift.Pattern.occursInAt_shift E1 #

∀ {A : Type u_3} {G : Type u_4} [inst : Inhabited A] [inst_1 : AddMonoid G] (p : SymbolicDynamics.FullShift.Pattern A G)
  (x : G → A) (g h : G), p.occursInAt (SymbolicDynamics.FullShift.shift g x) h ↔ p.occursInAt x (g + h)

Shifting a configuration commutes with occurrences of a pattern.

Formally: a pattern p occurs in the shifted configuration shift h x at position g if and only if it occurs in the original configuration x at position g + h.

theorem SymbolicDynamics.FullShift.Pattern.mapsTo_mulShift_mulForbidden E1 #

∀ {A : Type u_3} {G : Type u_4} [inst : Inhabited A] [inst_1 : Monoid G]
  (F : Set (SymbolicDynamics.FullShift.Pattern A G)) (h : G),
  Set.MapsTo (SymbolicDynamics.FullShift.mulShift h) (SymbolicDynamics.FullShift.mulForbidden F)
    (SymbolicDynamics.FullShift.mulForbidden F)

Configurations that avoid a family F of patterns are stable under the shift.

Formally: if x avoids every p ∈ F at every position, then for any h : G, the shifted configuration mulShift h x also avoids every p ∈ F at every position.

theorem SymbolicDynamics.FullShift.Pattern.mapsTo_shift_forbidden E1 #

∀ {A : Type u_3} {G : Type u_4} [inst : Inhabited A] [inst_1 : AddMonoid G]
  (F : Set (SymbolicDynamics.FullShift.Pattern A G)) (h : G),
  Set.MapsTo (SymbolicDynamics.FullShift.shift h) (SymbolicDynamics.FullShift.forbidden F)
    (SymbolicDynamics.FullShift.forbidden F)

Configurations that avoid a family F of patterns are stable under the shift.

Formally: if x avoids every p ∈ F at every position, then for any h : G, the shifted configuration shift h x also avoids every p ∈ F at every position.

theorem SymbolicDynamics.FullShift.mulOccursInAt_eq_cylinder E1 #

∀ {A : Type u_1} [inst : Inhabited A] {G : Type u_2} [inst_1 : Monoid G] [IsLeftCancelMul G]
  (p : SymbolicDynamics.FullShift.Pattern A G) (g : G),
  {x | p.mulOccursInAt x g} =
    SymbolicDynamics.FullShift.cylinder (Finset.image (fun x ↦ g * x) p.support) (p.mulShift g)

We call occurrence set for pattern p and position g the set of configurations in which a pattern p occurs at position g.

This proves that it is exactly the cylinder corresponding to the pattern obtained by translating p by g.

Equivalently, p.mulOccursInAt x g iff on every translated site g * w (with w ∈ p.support) the configuration x agrees with the translated pattern Pattern.mulShift p g.

(This uses [IsLeftCancelMul G] to identify the preimage along left-multiplication by g.)

theorem SymbolicDynamics.FullShift.occursInAt_eq_cylinder E1 #

∀ {A : Type u_1} [inst : Inhabited A] {G : Type u_2} [inst_1 : AddMonoid G] [IsLeftCancelAdd G]
  (p : SymbolicDynamics.FullShift.Pattern A G) (g : G),
  {x | p.occursInAt x g} = SymbolicDynamics.FullShift.cylinder (Finset.image (fun x ↦ g + x) p.support) (p.shift g)

We call occurrence set for pattern p and position g the set of configurations in which a pattern p occurs at position g.

This proves that it is exactly the cylinder corresponding to the pattern obtained by translating p by g.

Equivalently, p.occursInAt x g iff on every translated site g + w (with w ∈ p.support) the configuration x agrees with the translated pattern Pattern.shift p g.

(This uses [IsLeftCancelMul G] to identify the preimage along left-multiplication by g.)

theorem SymbolicDynamics.FullShift.isOpen_mulOccursInAt E1 #

∀ {A : Type u_1} [inst : TopologicalSpace A] [inst_1 : Inhabited A] {G : Type u_2} [inst_2 : Monoid G]
  [IsLeftCancelMul G] [DiscreteTopology A] (p : SymbolicDynamics.FullShift.Pattern A G) (g : G),
  IsOpen {x | p.mulOccursInAt x g}

Occurrence sets are open.

theorem SymbolicDynamics.FullShift.isOpen_occursInAt E1 #

∀ {A : Type u_1} [inst : TopologicalSpace A] [inst_1 : Inhabited A] {G : Type u_2} [inst_2 : AddMonoid G]
  [IsLeftCancelAdd G] [DiscreteTopology A] (p : SymbolicDynamics.FullShift.Pattern A G) (g : G),
  IsOpen {x | p.occursInAt x g}

Occurrence sets are open.

theorem SymbolicDynamics.FullShift.isClosed_mulForbidden E1 #

∀ {A : Type u_1} [inst : TopologicalSpace A] [inst_1 : Inhabited A] {G : Type u_2} [inst_2 : Monoid G]
  [IsLeftCancelMul G] [DiscreteTopology A] (F : Set (SymbolicDynamics.FullShift.Pattern A G)),
  IsClosed (SymbolicDynamics.FullShift.mulForbidden F)

Avoiding a fixed family of patterns is a closed condition (in the product topology on G → A).

Since each occurrence set { x | p.mulOccursInAt x v } is open (when A is discrete), its complement { x | ¬ p.mulOccursInAt x v } is closed; forbidden F is the intersection of these closed sets over p ∈ F and v ∈ G.

theorem SymbolicDynamics.FullShift.isClosed_forbidden E1 #

∀ {A : Type u_1} [inst : TopologicalSpace A] [inst_1 : Inhabited A] {G : Type u_2} [inst_2 : AddMonoid G]
  [IsLeftCancelAdd G] [DiscreteTopology A] (F : Set (SymbolicDynamics.FullShift.Pattern A G)),
  IsClosed (SymbolicDynamics.FullShift.forbidden F)

Avoiding a fixed family of patterns is a closed condition (in the product topology on G → A).

Since each occurrence set { x | p.occursInAt x v } is open (when A is discrete), its complement { x | ¬ p.occursInAt x v } is closed; forbidden F is the intersection of these closed sets over p ∈ F and v ∈ G.

theorem SymbolicDynamics.FullShift.isClosed_mulOccursInAt E1 #

∀ {A : Type u_1} [inst : TopologicalSpace A] [inst_1 : Inhabited A] {G : Type u_2} [inst_2 : Monoid G]
  [IsLeftCancelMul G] [T1Space A] (p : SymbolicDynamics.FullShift.Pattern A G) (g : G),
  IsClosed {x | p.mulOccursInAt x g}

Occurrence sets are closed.

theorem SymbolicDynamics.FullShift.isClosed_occursInAt E1 #

∀ {A : Type u_1} [inst : TopologicalSpace A] [inst_1 : Inhabited A] {G : Type u_2} [inst_2 : AddMonoid G]
  [IsLeftCancelAdd G] [T1Space A] (p : SymbolicDynamics.FullShift.Pattern A G) (g : G), IsClosed {x | p.occursInAt x g}

Occurrence sets are closed.

def SymbolicDynamics.FullShift.MulSubshift.ofForbidden E1 #

{A : Type u_1} →
  [inst : TopologicalSpace A] →
    [inst_1 : Inhabited A] →
      {G : Type u_2} →
        [inst_2 : Monoid G] →
          [IsLeftCancelMul G] →
            [DiscreteTopology A] →
              Set (SymbolicDynamics.FullShift.Pattern A G) → SymbolicDynamics.FullShift.MulSubshift A G

The subshift defined by a family of forbidden patterns F.

This is a standard way to construct subshifts: MulSubshift.ofForbidden F consists of all configurations x : G → A in which no pattern p ∈ F occurs at any position.

Formally:

  • the carrier is forbidden F (configurations avoiding F),
  • it is closed because each occurrence set is open, and
  • it is shift-invariant since avoidance is preserved by shifts.

def SymbolicDynamics.FullShift.Subshift.ofForbidden E1 #

{A : Type u_1} →
  [inst : TopologicalSpace A] →
    [inst_1 : Inhabited A] →
      {G : Type u_2} →
        [inst_2 : AddMonoid G] →
          [IsLeftCancelAdd G] →
            [DiscreteTopology A] →
              Set (SymbolicDynamics.FullShift.Pattern A G) → SymbolicDynamics.FullShift.Subshift A G

The subshift defined by a family of forbidden patterns F.

This is a standard way to construct subshifts: Subshift.ofForbidden F consists of all configurations x : G → A in which no pattern p ∈ F occurs at any position.

Formally:

  • the carrier is forbidden F (configurations avoiding F),
  • it is closed because each occurrence set is open, and
  • it is shift-invariant since avoidance is preserved by shifts.

theorem SymbolicDynamics.FullShift.finite_setOfPred_pattern_support_eq E0 #

∀ {A : Type u_3} {G : Type u_4} [Finite A] [inst : Inhabited A] (U : Finset G), {p | p.support = U}.Finite

Patterns with support exactly U form a finite set.

def SymbolicDynamics.FullShift.LanguageOn E1 #

{A : Type u_1} →
  [inst : Inhabited A] → {G : Type u_2} → Set (G → A) → Finset G → Set (SymbolicDynamics.FullShift.Pattern A G)

The language of a set of configurations X on a finite shape U.

This is the set of all finite patterns obtained by restricting some configuration x ∈ X to U.

theorem SymbolicDynamics.FullShift.languageOn_mono E1 #

∀ {A : Type u_1} [inst : Inhabited A] {G : Type u_2} {X Y : Set (G → A)},
  X ⊆ Y → ∀ (U : Finset G), SymbolicDynamics.FullShift.LanguageOn X U ⊆ SymbolicDynamics.FullShift.LanguageOn Y U

Considering two sets of configurations X and Y such that X ⊆ Y, the language of X on (finite) shape U is included in the language of Y on shape U.

theorem SymbolicDynamics.FullShift.languageOn_union E1 #

∀ {A : Type u_1} [inst : Inhabited A] {G : Type u_2} {X Y : Set (G → A)} (U : Finset G),
  SymbolicDynamics.FullShift.LanguageOn (X ∪ Y) U =
    SymbolicDynamics.FullShift.LanguageOn X U ∪ SymbolicDynamics.FullShift.LanguageOn Y U

The language of a union of two sets of configurations on a finite shape U is the union of their languages on U.

theorem SymbolicDynamics.FullShift.languageOn_inter_subset E1 #

∀ {A : Type u_1} [inst : Inhabited A] {G : Type u_2} (X Y : Set (G → A)) (U : Finset G),
  SymbolicDynamics.FullShift.LanguageOn (X ∩ Y) U ⊆
    SymbolicDynamics.FullShift.LanguageOn X U ∩ SymbolicDynamics.FullShift.LanguageOn Y U

The language of an intersection is contained in the intersection of the languages. Equality does not hold in general: a pattern may arise from distinct configurations x ∈ X and y ∈ Y with no common configuration in X ∩ Y realising it.

def SymbolicDynamics.FullShift.MulSubshift.languageOn E1 #

{A : Type u_3} →
  {G : Type u_4} →
    [inst : TopologicalSpace A] →
      [inst_1 : Inhabited A] →
        [inst_2 : Monoid G] →
          SymbolicDynamics.FullShift.MulSubshift A G → Finset G → Set (SymbolicDynamics.FullShift.Pattern A G)

The language of a subshift Y on a finite shape U.

Deprecated aliases

NameNew nameSince
SymbolicDynamics.FullShift.finite_setOf_pattern_support_eqSymbolicDynamics.FullShift.finite_setOfPred_pattern_support_eq2026-07-09