Six-colour complementary-pair exclusion
Abstract
Barker’s generating function for complementary-pair exclusion on a two-row strip.
The colours are 0 through 5. Consecutive columns have all four possible bonds; there is no bond within a column. A bond forbids equal colours and complementary colours whose sum is five. The distinguished upper-left cell has colour zero. In row-major order every 2, 3 and 4 has an earlier 1, and every 3 has an earlier 2. The empty-strip coefficient is zero. OEIS A233175, revision 7, gives this NAME and labels the displayed generating function a conjecture of Colin Barker.
Definition 1.1 (Two seen-colour flags).
Seen = (Bool) \times (Bool)
Formalization. D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.Seen (✓ std3).
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
The first flag records whether colour one has occurred; the second records colour two.
Definition 1.2 (A column).
Col = (\operatorname{Fin}\left(2\right)) \to \operatorname{Fin}\left(6\right)
Formalization. D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.Col (✓ std3).
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
A column is an ordered function on the two row indices.
Definition 1.3 (The next colour).
\forall s: Seen, (\forall c: \operatorname{Fin}\left(6\right), ((\operatorname{allowed}\left(s, c\right)) \iff ((((c = 2) \lor ((c = 3) \lor (c = 4))) \implies (\operatorname{Prod.fst}\left(s\right) = true)) \land ((c = 3) \implies (\operatorname{Prod.snd}\left(s\right) = true)))))
Formalization. D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.allowed (✓ std3).
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
The two implications impose exactly the required earlier occurrences.
Definition 1.4 (Updating the flags).
\forall s: Seen, (\forall c: \operatorname{Fin}\left(6\right), (\operatorname{advance}\left(s, c\right) = (\operatorname{Prod.fst}\left(s\right) \operatorname{or} \operatorname{decide}\left(c = 1\right), \operatorname{Prod.snd}\left(s\right) \operatorname{or} \operatorname{decide}\left(c = 2\right))))
Formalization. D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.advance (✓ std3).
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
A flag changes to true when its colour occurs and otherwise retains its value.
Definition 1.5 (Scanning a word).
\begin{aligned}\forall s: Seen, (\forall f: (\operatorname{Fin}\left(0\right)) \to \operatorname{Fin}\left(6\right), ((\operatorname{good}\left(s, f\right)) \iff (True)))\\\forall n: Nat, (\forall s: Seen, (\forall f: (\operatorname{Fin}\left(n + 1\right)) \to \operatorname{Fin}\left(6\right), ((\operatorname{good}\left(s, f\right)) \iff ((\operatorname{allowed}\left(s, f\left(0\right)\right)) \land (\operatorname{good}\left(\operatorname{advance}\left(s, f\left(0\right)\right), \operatorname{Fin.tail}\left(f\right)\right))))))\end{aligned}
Formalization. D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.good (✓ std3).
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
The empty word is accepted. A nonempty word is accepted exactly when its first colour is allowed and its tail is accepted with the updated flags.
Definition 1.6 (Final flags of a word).
\begin{aligned}\forall s: Seen, (\forall f: (\operatorname{Fin}\left(0\right)) \to \operatorname{Fin}\left(6\right), (\operatorname{finish}\left(s, f\right) = s))\\\forall n: Nat, (\forall s: Seen, (\forall f: (\operatorname{Fin}\left(n + 1\right)) \to \operatorname{Fin}\left(6\right), (\operatorname{finish}\left(s, f\right) = \operatorname{finish}\left(\operatorname{advance}\left(s, f\left(0\right)\right), \operatorname{Fin.tail}\left(f\right)\right))))\end{aligned}
Formalization. D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.finish (✓ std3).
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
The empty word retains its initial flags. For a nonempty word the first colour updates the flags before the tail is scanned.
Theorem 1.7 (The first final flag).
\forall n: Nat, (\forall s: Seen, (\forall f: (\operatorname{Fin}\left(n\right)) \to \operatorname{Fin}\left(6\right), ((\operatorname{Prod.fst}\left(\operatorname{finish}\left(s, f\right)\right) = true) \iff ((\operatorname{Prod.fst}\left(s\right) = true) \lor (\exists i: \operatorname{Fin}\left(n\right), (f\left(i\right) = 1))))))
Proof. Machine-checked in Lean as D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.finish_fst (✓ std3). ∎
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
The first flag is true exactly when it was initially true or colour one occurs in the word.
Theorem 1.8 (The second final flag).
\forall n: Nat, (\forall s: Seen, (\forall f: (\operatorname{Fin}\left(n\right)) \to \operatorname{Fin}\left(6\right), ((\operatorname{Prod.snd}\left(\operatorname{finish}\left(s, f\right)\right) = true) \iff ((\operatorname{Prod.snd}\left(s\right) = true) \lor (\exists i: \operatorname{Fin}\left(n\right), (f\left(i\right) = 2))))))
Proof. Machine-checked in Lean as D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.finish_snd (✓ std3). ∎
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
The second flag is true exactly when it was initially true or colour two occurs in the word.
Theorem 1.9 (The earlier-occurrence criterion).
\forall n: Nat, (\forall s: Seen, (\forall f: (\operatorname{Fin}\left(n\right)) \to \operatorname{Fin}\left(6\right), ((\operatorname{good}\left(s, f\right)) \iff (\forall i: \operatorname{Fin}\left(n\right), ((((f\left(i\right) = 2) \lor ((f\left(i\right) = 3) \lor (f\left(i\right) = 4))) \implies ((\operatorname{Prod.fst}\left(s\right) = true) \lor (\exists j: \operatorname{Fin}\left(n\right), ((j < i) \land (f\left(j\right) = 1))))) \land ((f\left(i\right) = 3) \implies ((\operatorname{Prod.snd}\left(s\right) = true) \lor (\exists j: \operatorname{Fin}\left(n\right), ((j < i) \land (f\left(j\right) = 2))))))))))
Proof. Machine-checked in Lean as D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.good_iff (✓ std3). ∎
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
Acceptance says that every restricted colour has its required earlier occurrence, unless that colour was already recorded in the initial flags.
Definition 1.10 (The two boundary labels).
\forall c: Col, (\operatorname{pairs}\left(c\right) = (\operatorname{beta}\left(c\left(0\right)\right), \operatorname{beta}\left(c\left(1\right)\right)))
Formalization. D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.pairs (✓ std3).
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
Here beta is the frozen map D5.S3.Observer.Separation.BooleanRankThreeK4.beta : Fin 6 → Fin 3, beta = ![0,1,2,2,1,0], whose fibres {0,5}, {1,4} and {2,3} are the complementary pairs; a legal bond joins different fibres. Only these labels of the preceding column affect future bonds.
Theorem 1.11 (Pair-label characterization of bonds).
\forall c: Col, (\forall d: Col, ((\forall r: \operatorname{Fin}\left(2\right), (\forall s: \operatorname{Fin}\left(2\right), ((c\left(r\right) \neq d\left(s\right)) \land (\operatorname{val}\left(c\left(r\right)\right) + \operatorname{val}\left(d\left(s\right)\right) \neq 5)))) \iff (\forall r: \operatorname{Fin}\left(2\right), ((\operatorname{beta}\left(d\left(r\right)\right) \neq \operatorname{beta}\left(c\left(0\right)\right)) \land (\operatorname{beta}\left(d\left(r\right)\right) \neq \operatorname{beta}\left(c\left(1\right)\right))))))
Proof. Machine-checked in Lean as D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.edge_iff (✓ std3). ∎
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
Each of the four bonds is legal exactly when its endpoint colours have distinct complementary-pair labels.
Definition 1.12 (The literal filtered count).
\forall n: Nat, (\operatorname{a}\left(n\right) = \operatorname{Finset.card}\left(\operatorname{Finset.filter}\left(\lambda A: ((\operatorname{Fin}\left(2\right)) \times (\operatorname{Fin}\left(n\right))) \to \operatorname{Fin}\left(6\right) \mapsto ((\exists j: \operatorname{Fin}\left(n\right), ((\operatorname{val}\left(j\right) = 0) \land (A\left((0, j)\right) = 0))) \land ((\forall j: \operatorname{Fin}\left(n\right), ((\operatorname{val}\left(j\right) + 1 < n) \implies (\forall r: \operatorname{Fin}\left(2\right), (\forall s: \operatorname{Fin}\left(2\right), ((A\left((r, j)\right) \neq A\left((s, \operatorname{Fin.mk}\left(\operatorname{val}\left(j\right) + 1\right))\right)) \land (\operatorname{val}\left(A\left((r, j)\right)\right) + \operatorname{val}\left(A\left((s, \operatorname{Fin.mk}\left(\operatorname{val}\left(j\right) + 1\right))\right)\right) \neq 5)))))) \land (\forall p: (\operatorname{Fin}\left(2\right)) \times (\operatorname{Fin}\left(n\right)), ((((A\left(p\right) = 2) \lor ((A\left(p\right) = 3) \lor (A\left(p\right) = 4))) \implies (\exists q: (\operatorname{Fin}\left(2\right)) \times (\operatorname{Fin}\left(n\right)), ((\operatorname{val}\left(\operatorname{Prod.fst}\left(q\right)\right) \cdot n + \operatorname{val}\left(\operatorname{Prod.snd}\left(q\right)\right) < \operatorname{val}\left(\operatorname{Prod.fst}\left(p\right)\right) \cdot n + \operatorname{val}\left(\operatorname{Prod.snd}\left(p\right)\right)) \land (A\left(q\right) = 1)))) \land ((A\left(p\right) = 3) \implies (\exists q: (\operatorname{Fin}\left(2\right)) \times (\operatorname{Fin}\left(n\right)), ((\operatorname{val}\left(\operatorname{Prod.fst}\left(q\right)\right) \cdot n + \operatorname{val}\left(\operatorname{Prod.snd}\left(q\right)\right) < \operatorname{val}\left(\operatorname{Prod.fst}\left(p\right)\right) \cdot n + \operatorname{val}\left(\operatorname{Prod.snd}\left(p\right)\right)) \land (A\left(q\right) = 2)))))))), \operatorname{Finset.univ}\left(\right)\right)\right))
Formalization. D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.a (✓ std3).
Citation. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
The finite set contains all arrays on Fin 2 times Fin n, filtered by the displayed predicate. The rank r*n+j is the row-major order. The first-entry existential also makes a(0)=0.
Definition 1.13 (One-column continuation).
\forall w: (Seen) \to (Seen) \to (Seen) \to ((\operatorname{Fin}\left(3\right)) \times (\operatorname{Fin}\left(3\right))) \to Int, (\forall q: Seen, (\forall t: Seen, (\forall b: Seen, (\forall p: (\operatorname{Fin}\left(3\right)) \times (\operatorname{Fin}\left(3\right)), (\operatorname{step}\left(w, q, t, b, p\right) = \sum_{c: Col} ((\operatorname{if} ((\forall r: \operatorname{Fin}\left(2\right), ((\operatorname{beta}\left(c\left(r\right)\right) \neq \operatorname{Prod.fst}\left(p\right)) \land (\operatorname{beta}\left(c\left(r\right)\right) \neq \operatorname{Prod.snd}\left(p\right)))) \land ((\operatorname{allowed}\left(t, c\left(0\right)\right)) \land (\operatorname{allowed}\left(b, c\left(1\right)\right)))) \operatorname{then} w\left(q, \operatorname{advance}\left(t, c\left(0\right)\right), \operatorname{advance}\left(b, c\left(1\right)\right), \operatorname{pairs}\left(c\right)\right) \operatorname{else} 0)))))))
Formalization. D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.step (✓ std3).
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
The sum ranges over all thirty-six columns. Both new colours must avoid both preceding pair labels and satisfy their respective seen-colour flags.
Definition 1.14 (Continuation vectors).
\begin{aligned}\forall q: Seen, (\forall t: Seen, (\forall b: Seen, (\forall p: (\operatorname{Fin}\left(3\right)) \times (\operatorname{Fin}\left(3\right)), (\operatorname{v}\left(0, q, t, b, p\right) = (\operatorname{if} (t = q) \operatorname{then} 1 \operatorname{else} 0)))))\\\forall k: Nat, (\forall q: Seen, (\forall t: Seen, (\forall b: Seen, (\forall p: (\operatorname{Fin}\left(3\right)) \times (\operatorname{Fin}\left(3\right)), (\operatorname{v}\left(k + 1, q, t, b, p\right) = \operatorname{step}\left(\operatorname{v}\left(k\right), q, t, b, p\right))))))\end{aligned}
Formalization. D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.v (✓ std3).
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
The parameter q specifies the final top-row flags. The current flags are t and b. At length zero only t=q is required. A positive continuation appends one column.
Definition 1.15 (Closing the row-major boundary).
\forall w: (Seen) \to (Seen) \to (Seen) \to ((\operatorname{Fin}\left(3\right)) \times (\operatorname{Fin}\left(3\right))) \to Int, (\operatorname{total}\left(w\right) = \sum_{c: Col} (\sum_{q: Seen} ((\operatorname{if} ((c\left(0\right) = 0) \land (\operatorname{allowed}\left(q, c\left(1\right)\right))) \operatorname{then} w\left(q, (false, false), \operatorname{advance}\left(q, c\left(1\right)\right), \operatorname{pairs}\left(c\right)\right) \operatorname{else} 0))))
Formalization. D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.total (✓ std3).
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
The first top colour is zero. The final top flags q are also the initial bottom flags, since all top-row cells precede the bottom row. Summing over q selects the unique final top record.
Theorem 1.16 (A finite continuation identity).
(\forall q: Seen, (\forall t: Seen, (\forall b: Seen, (\forall p: (\operatorname{Fin}\left(3\right)) \times (\operatorname{Fin}\left(3\right)), (\operatorname{v}\left(7, q, t, b, p\right) = 16 \cdot \operatorname{v}\left(6, q, t, b, p\right) - 32 \cdot \operatorname{v}\left(5, q, t, b, p\right) - 320 \cdot \operatorname{v}\left(4, q, t, b, p\right) + 512 \cdot \operatorname{v}\left(3, q, t, b, p\right) + 2048 \cdot \operatorname{v}\left(2, q, t, b, p\right)))))) \land ((\operatorname{total}\left(\operatorname{v}\left(0\right)\right) = 3) \land ((\operatorname{total}\left(\operatorname{v}\left(1\right)\right) = 8) \land ((\operatorname{total}\left(\operatorname{v}\left(2\right)\right) = 80) \land ((\operatorname{total}\left(\operatorname{v}\left(3\right)\right) = 800) \land ((\operatorname{total}\left(\operatorname{v}\left(4\right)\right) = 8576) \land ((\operatorname{total}\left(\operatorname{v}\left(5\right)\right) = 92672) \land (\operatorname{total}\left(\operatorname{v}\left(6\right)\right) = 1009664)))))))
Proof. Machine-checked in Lean as D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.finite_certificate (✓ std3). ∎
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
The seven-step identity holds on all 576 states. The listed scalar values concern continuation lengths zero through six. Linearity propagates the identity to every continuation length.
Theorem 1.17 (Barker’s generating function).
\left(1 - 4 \cdot X\right) \cdot \left(1 - 8 \cdot X - 32 \cdot (X)^{2}\right) \cdot \operatorname{PowerSeries.mk}\left(\lambda n: Nat \mapsto (\operatorname{a}\left(n\right): Int)\right) = X \cdot \left(3 - 28 \cdot X - 16 \cdot (X)^{2} + 224 \cdot (X)^{3}\right) \operatorname{in} \operatorname{PowerSeries}\left(Int\right)
Proof. Machine-checked in Lean as D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.result (✓ std3). ∎
Resolves. Problems/hardin233175 (proved) by D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.result.
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
The literal filtered count equals total(v(n-1)) at every positive width, by decomposition into the first column and its tail. The seven-step identity has polynomial z^2*(z^3-12z^2+128)(z^2-4z-16). The listed initial values eliminate the extra factor for the scalar count and yield a(n)=12a(n-1)-128*a(n-3) for n at least five. Comparing every power-series coefficient gives the identity. The cast from natural counts to integers is taken before forming the series.
Definition 1.18 (Deciding the next-colour condition).
\forall s: \operatorname{D5}.\operatorname{S3}.\operatorname{Combinatorics}.\operatorname{TraceAvoidingArrays}.\operatorname{HardinA233175PairStrip}.\operatorname{Seen}, (\forall c: \operatorname{Fin}\left(6\right), ((\operatorname{D5}.\operatorname{S3}.\operatorname{Combinatorics}.\operatorname{TraceAvoidingArrays}.\operatorname{HardinA233175PairStrip}.\operatorname{instDecidableAllowed}\left(s, c\right): \operatorname{Decidable}\left((\operatorname{D5}.\operatorname{S3}.\operatorname{Combinatorics}.\operatorname{TraceAvoidingArrays}.\operatorname{HardinA233175PairStrip}.\operatorname{allowed}\left(s, c\right))\right)) = \operatorname{inferInstanceAs}\left((\operatorname{Decidable}\left(((((c = (2: \operatorname{Fin}\left(6\right))) \lor ((c = (3: \operatorname{Fin}\left(6\right))) \lor (c = (4: \operatorname{Fin}\left(6\right))))) \implies (\operatorname{Prod}.\operatorname{fst}\left(s\right) = \operatorname{Bool}.\operatorname{true})) \land ((c = (3: \operatorname{Fin}\left(6\right))) \implies (\operatorname{Prod}.\operatorname{snd}\left(s\right) = \operatorname{Bool}.\operatorname{true})))\right))\right)))
Formalization. D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.instDecidableAllowed (✓ std3).
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
The defining expression is inferInstanceAs for the two displayed implications. The colour numerals have type Fin 6.
Definition 1.19 (Row-major normalization).
\forall n: Nat, (\forall A: ((\operatorname{Fin}\left(2\right)) \times (\operatorname{Fin}\left(n\right))) \to \operatorname{Fin}\left(6\right), ((\operatorname{normal}\left(A\right)) \iff (\forall p: (\operatorname{Fin}\left(2\right)) \times (\operatorname{Fin}\left(n\right)), ((((A\left(p\right) = 2) \lor ((A\left(p\right) = 3) \lor (A\left(p\right) = 4))) \implies (\exists q: (\operatorname{Fin}\left(2\right)) \times (\operatorname{Fin}\left(n\right)), ((\operatorname{val}\left(\operatorname{Prod.fst}\left(q\right)\right) \cdot n + \operatorname{val}\left(\operatorname{Prod.snd}\left(q\right)\right) < \operatorname{val}\left(\operatorname{Prod.fst}\left(p\right)\right) \cdot n + \operatorname{val}\left(\operatorname{Prod.snd}\left(p\right)\right)) \land (A\left(q\right) = 1)))) \land ((A\left(p\right) = 3) \implies (\exists q: (\operatorname{Fin}\left(2\right)) \times (\operatorname{Fin}\left(n\right)), ((\operatorname{val}\left(\operatorname{Prod.fst}\left(q\right)\right) \cdot n + \operatorname{val}\left(\operatorname{Prod.snd}\left(q\right)\right) < \operatorname{val}\left(\operatorname{Prod.fst}\left(p\right)\right) \cdot n + \operatorname{val}\left(\operatorname{Prod.snd}\left(p\right)\right)) \land (A\left(q\right) = 2))))))))
Formalization. D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.normal (✓ std3).
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
Every colour two, three or four has an earlier colour one, and every colour three has an earlier colour two, in the row-major rank r*n+j.
Definition 1.20 (Deciding the normalization).
\forall n: \operatorname{Nat}, (\forall A: ((\operatorname{Fin}\left(2\right)) \times (\operatorname{Fin}\left(n\right))) \to \operatorname{Fin}\left(6\right), ((\operatorname{D5}.\operatorname{S3}.\operatorname{Combinatorics}.\operatorname{TraceAvoidingArrays}.\operatorname{HardinA233175PairStrip}.\operatorname{instDecidableNormal}\left(A\right): \operatorname{Decidable}\left((\operatorname{D5}.\operatorname{S3}.\operatorname{Combinatorics}.\operatorname{TraceAvoidingArrays}.\operatorname{HardinA233175PairStrip}.\operatorname{normal}\left(A\right))\right)) = \operatorname{inferInstanceAs}\left((\operatorname{Decidable}\left((\forall p: (\operatorname{Fin}\left(2\right)) \times (\operatorname{Fin}\left(n\right)), ((((A\left(p\right) = 2) \lor ((A\left(p\right) = 3) \lor (A\left(p\right) = 4))) \implies (\exists q: (\operatorname{Fin}\left(2\right)) \times (\operatorname{Fin}\left(n\right)), ((\operatorname{val}\left(\operatorname{Prod.fst}\left(q\right)\right) \cdot n + \operatorname{val}\left(\operatorname{Prod.snd}\left(q\right)\right) < \operatorname{val}\left(\operatorname{Prod.fst}\left(p\right)\right) \cdot n + \operatorname{val}\left(\operatorname{Prod.snd}\left(p\right)\right)) \land (A\left(q\right) = 1)))) \land ((A\left(p\right) = 3) \implies (\exists q: (\operatorname{Fin}\left(2\right)) \times (\operatorname{Fin}\left(n\right)), ((\operatorname{val}\left(\operatorname{Prod.fst}\left(q\right)\right) \cdot n + \operatorname{val}\left(\operatorname{Prod.snd}\left(q\right)\right) < \operatorname{val}\left(\operatorname{Prod.fst}\left(p\right)\right) \cdot n + \operatorname{val}\left(\operatorname{Prod.snd}\left(p\right)\right)) \land (A\left(q\right) = 2))))))\right))\right)))
Formalization. D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.instDecidableNormal (✓ std3).
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
The defining expression is inferInstanceAs for the displayed universally quantified conjunction of the two implications.
Definition 1.21 (Deciding a word scan).
\begin{aligned}\forall s: \operatorname{D5}.\operatorname{S3}.\operatorname{Combinatorics}.\operatorname{TraceAvoidingArrays}.\operatorname{HardinA233175PairStrip}.\operatorname{Seen}, (\forall f: (\operatorname{Fin}\left(0\right)) \to \operatorname{Fin}\left(6\right), ((\operatorname{D5}.\operatorname{S3}.\operatorname{Combinatorics}.\operatorname{TraceAvoidingArrays}.\operatorname{HardinA233175PairStrip}.\operatorname{instDecidableGood}\left(s, f\right): \operatorname{Decidable}\left((\operatorname{D5}.\operatorname{S3}.\operatorname{Combinatorics}.\operatorname{TraceAvoidingArrays}.\operatorname{HardinA233175PairStrip}.\operatorname{good}\left(s, f\right))\right)) = \operatorname{Decidable}.\operatorname{isTrue}\left(\operatorname{True}.\operatorname{intro}\right)))\\\forall n: \operatorname{Nat}, (\forall s: \operatorname{D5}.\operatorname{S3}.\operatorname{Combinatorics}.\operatorname{TraceAvoidingArrays}.\operatorname{HardinA233175PairStrip}.\operatorname{Seen}, (\forall f: (\operatorname{Fin}\left(n + 1\right)) \to \operatorname{Fin}\left(6\right), ((\operatorname{D5}.\operatorname{S3}.\operatorname{Combinatorics}.\operatorname{TraceAvoidingArrays}.\operatorname{HardinA233175PairStrip}.\operatorname{instDecidableGood}\left(s, f\right): \operatorname{Decidable}\left((\operatorname{D5}.\operatorname{S3}.\operatorname{Combinatorics}.\operatorname{TraceAvoidingArrays}.\operatorname{HardinA233175PairStrip}.\operatorname{good}\left(s, f\right))\right)) = \operatorname{instDecidableAnd}\left(\operatorname{D5}.\operatorname{S3}.\operatorname{Combinatorics}.\operatorname{TraceAvoidingArrays}.\operatorname{HardinA233175PairStrip}.\operatorname{instDecidableAllowed}\left(s, f\left((0: \operatorname{Fin}\left(n + 1\right))\right)\right), \operatorname{D5}.\operatorname{S3}.\operatorname{Combinatorics}.\operatorname{TraceAvoidingArrays}.\operatorname{HardinA233175PairStrip}.\operatorname{instDecidableGood}\left(\operatorname{D5}.\operatorname{S3}.\operatorname{Combinatorics}.\operatorname{TraceAvoidingArrays}.\operatorname{HardinA233175PairStrip}.\operatorname{advance}\left(s, f\left((0: \operatorname{Fin}\left(n + 1\right))\right)\right), \operatorname{Fin}.\operatorname{tail}\left(f\right)\right)\right))))\end{aligned}
Formalization. D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.instDecidableGood (✓ std3).
Source. Repository-derived.
Acknowledgement. R. H. Hardin; Colin Barker; OEIS Foundation Inc. (2013). OEIS A233175: six-colour complementary-pair exclusion on a two-row strip. URL: https://oeis.org/A233175.
Commentary.
These are the zero and successor equations of the defining induction on n. The empty word uses isTrue trivial. The successor combines the allowed decision with the recursive decision on Fin.tail and the advanced flags.
References
- Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.Col - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.Seen - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.a - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.advance - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.allowed - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.edge_iff - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.finish - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.finish_fst - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.finish_snd - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.finite_certificate - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.good - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.good_iff - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.instDecidableAllowed - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.instDecidableGood - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.instDecidableNormal - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.normal - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.pairs - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.result - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.step - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.total - Truth anchor:
D5/S3/Combinatorics/TraceAvoidingArrays/HardinA233175PairStrip.v - Dependency: D5/S3/Observer/Separation/BooleanRankThreeK4