Index of theproofnetwork/open-problems@860a535/Prove2Me/Definitions/Def_QED_E206.lean
qedmarket’s copy of theproofnetwork/open-problems@860a535, 30 Nov 2026original source ↗
/-From Prove2Me, definition `QED_E206` (https://prove2.me/definitions/6f70a0b5-ce44-4bf3-ac96-64bc6b3069ed). Apache-2.0 per Prove2Me's terms.-/import Mathlib /-! QED-E206: Is strong shift equivalence of nonnegative integer matrices decidable?Call two square matrices A and B with nonnegative integer entries elementarily equivalent if A = RS and B = SR forsome rectangular nonnegative integer matrices R and S, and strongly shift equivalent if they are linked by a finitechain of such moves. By Williams' 1973 theorem this is exactly when two shifts of finite type are topologicallyconjugate. Is there an algorithm that decides, given A and B, whether they are strongly shift equivalent?Informal statement: For $A\in\mathbb Z_{\ge0}^{m\times m}$, $B\in\mathbb Z_{\ge0}^{n\times n}$ ($m,n\ge1$) write$A\approx B$ if there are $R\in\mathbb Z_{\ge0}^{m\times n}$, $S\in\mathbb Z_{\ge0}^{n\times m}$ with $A=RS$,$B=SR$; let $\sim_{SSE}$ be the equivalence relation generated by $\approx$ on square matrices of all positivesizes. Determine whether $\{(A,B):A\sim_{SSE}B\}$ is a computable set (it is computably enumerable).Formalization notes: A square matrix of size m+1 (m : ℕ) is an element of `SqMat = Σ m, Matrix (Fin (m+1))(Fin (m+1)) ℕ`; sizes are ≥ 1 as in the literature (0 × 0 matrices are excluded so that zero matrices are notartificially linked through the empty matrix). `Elem A B` is the elementary move A = RS, B = SR with R, Srectangular over ℕ. SSE is the reflexive–transitive closure of the symmetric closure of `Elem`, i.e. theequivalence relation generated by it. Inputs are codes (m, l) : ℕ × List ℕ, decoded as the (m+1) × (m+1) matrixwhose (i, j) entry is the (i(m+1)+j)-th element of l (0 if l is too short; extra entries are ignored). Decoding iscomputable and surjective, so decidability of SSE on codes is decidability of SSE on matrices. "Computable set" isMathlib's `ComputablePred` on the Primcodable type of code pairs. `Claim` = SSE over ℤ₊ is decidable;`¬Claim` = it is undecidable.-/namespace OpenProblems.QEDE206 noncomputable section /-- Square nonnegative integer matrices of all positive sizes. -/abbrev SqMat : Type := Σ m : ℕ, Matrix (Fin (m + 1)) (Fin (m + 1)) ℕ /-- Elementary strong shift equivalence: A = RS and B = SR. -/def Elem (A B : SqMat) : Prop := ∃ R : Matrix (Fin (A.1 + 1)) (Fin (B.1 + 1)) ℕ, ∃ S : Matrix (Fin (B.1 + 1)) (Fin (A.1 + 1)) ℕ, A.2 = R * S ∧ B.2 = S * R /-- Strong shift equivalence: the equivalence relation generated by `Elem`. -/def SSE (A B : SqMat) : Prop := Relation.ReflTransGen (fun X Y : SqMat => Elem X Y ∨ Elem Y X) A B /-- Decode (m, l) as the (m+1)×(m+1) matrix with row-major entries from l (missing entries 0). -/def decode (c : ℕ × List ℕ) : SqMat := ⟨c.1, Matrix.of fun i j : Fin (c.1 + 1) => c.2.getD (i.val * (c.1 + 1) + j.val) 0⟩ def Claim : Prop := ComputablePred (fun p : (ℕ × List ℕ) × (ℕ × List ℕ) => SSE (decode p.1) (decode p.2)) end end OpenProblems.QEDE206