Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

Closure and potential tests for paired finite-state runs

Abstract

Closure and potential tests for paired finite-state runs

Definition 1.1 (rawMember).

Formalization. D5/S1/Words/Palindromes/FridPrefix/ProductChecker.rawMember (✓ std3).

Source. Repository-derived.

Commentary.

Membership uses exactly the grouped lists, with an empty array and empty list as defaults.

Definition 1.2 (coreMember).

Formalization. D5/S1/Words/Palindromes/FridPrefix/ProductChecker.coreMember (✓ std3).

Source. Repository-derived.

Commentary.

The bit at second rank state s is tested in the mask for endpoint q and first rank state p.

Definition 1.3 (potential).

Formalization. D5/S1/Words/Palindromes/FridPrefix/ProductChecker.potential (✓ std3).

Source. Repository-derived.

Commentary.

mod is natural remainder; shiftRight is the natural bit shift. The remainder is cast to Int before subtracting 2. All missing arrays use the zero default.

Definition 1.4 (movesCheck).

Formalization. D5/S1/Words/Palindromes/FridPrefix/ProductChecker.movesCheck (✓ std3).

Source. Repository-derived.

Commentary.

The expression is the Boolean conjunction of moves.size=17 and, for every q in range(17), both list-inclusion tests between moves[q]! and movesFrom(q,width). Inclusion tests use all and contains, so order and multiplicity are ignored.

Definition 1.5 (isAccept).

Formalization. D5/S1/Words/Palindromes/FridPrefix/ProductChecker.isAccept (✓ std3).

Source. Repository-derived.

Commentary.

The endpoint accept states are exactly 3, 9 and 11.

Definition 1.6 (rowCheck).

Formalization. D5/S1/Words/Palindromes/FridPrefix/ProductChecker.rowCheck (✓ std3).

Source. Repository-derived.

Commentary.

The expression is the literal Boolean test in Lean. If q accepts, it requires coreMember(q,p,s) and U(q,p,s)<=1. For every (x,y,t) in moves[q]!, let p1=transitions[p][x], s1=transitions[s][y], and gain=weights[s][y]-weights[p][x], using getD defaults 0. It requires rawMember(t,p1,s1). If coreMember(t,p1,s1), it additionally requires coreMember(q,p,s) and U(q,p,s)+gain<=U(t,p1,s1). Otherwise that last test is true.

Definition 1.7 (groupCheck).

Formalization. D5/S1/Words/Palindromes/FridPrefix/ProductChecker.groupCheck (✓ std3).

Source. Repository-derived.

Commentary.

Each endpoint-state block checks every listed reachable pair of rank states. all returns a Boolean conjunction over a list. The seventeen blocks are proved by kernel reduction.

References

  • Truth anchor: D5/S1/Words/Palindromes/FridPrefix/ProductChecker.coreMember
  • Truth anchor: D5/S1/Words/Palindromes/FridPrefix/ProductChecker.groupCheck
  • Truth anchor: D5/S1/Words/Palindromes/FridPrefix/ProductChecker.isAccept
  • Truth anchor: D5/S1/Words/Palindromes/FridPrefix/ProductChecker.movesCheck
  • Truth anchor: D5/S1/Words/Palindromes/FridPrefix/ProductChecker.potential
  • Truth anchor: D5/S1/Words/Palindromes/FridPrefix/ProductChecker.rawMember
  • Truth anchor: D5/S1/Words/Palindromes/FridPrefix/ProductChecker.rowCheck
  • Dependency: D5/S1/Words/Palindromes/FridPrefix/EndpointAutomaton
  • Dependency: D5/S1/Words/Palindromes/FridPrefix/RankAutomata