PCP characterization of a string-constraint family

AbbreviationAlphabet for the PCP encoding#✓fully proved

The alphabet for the PCP encoding: dominoes (as index letters) and plain letters.

abbrev BlockSym (α : Type*) := Post.Domino α ⊕ α
Uses 1 · Used by 12

AbbreviationDomino as an index letter#✓fully proved

A domino as an index letter.

abbrev dominoLetter (d : Post.Domino α) : BlockSym α := Sum.inl d
Uses 2 · Used by 1

DefinitionTop morphism of the PCP encoding#✓fully proved

The top morphism: a domino letter maps to its top word as plain letters; plain letters map to [] (they never occur in an index word).

def topFun : BlockSym α → List (BlockSym α)
  | Sum.inl d => d.1.map Sum.inr
  | Sum.inr _ => []
Uses 2 · Used by 3

DefinitionBottom morphism of the PCP encoding#✓fully proved

The bottom morphism.

def botFun : BlockSym α → List (BlockSym α)
  | Sum.inl d => d.2.map Sum.inr
  | Sum.inr _ => []
Uses 2 · Used by 3

DefinitionRegular language of domino index words#✓fully proved

The regular language of index words: concatenations of domino letters.

def dominoRegex (P : List (Post.Domino α)) : RegularExpression (BlockSym α) :=
  RegularExpression.star ((P.map fun d => RegularExpression.char (Sum.inl d)).sum)
Uses 2 · Used by 4

DefinitionPCP encoding as a one-variable string constraint#✓fully proved

The PCP encoding as a string constraint over one variable.

def pcpConstraint (P : List (Post.Domino α)) : Formula (BlockSym α) (Fin 1) :=
  Formula.and
    (Formula.atom (Atom.mem (Term.var 0) (EncodedRegex.flatten (dominoRegex P))))
    (Formula.and
      (Formula.atom (Atom.eq (Term.hom topFun (Term.var 0))
        (Term.hom botFun (Term.var 0))))
      (Formula.atom (Atom.lenGe (Term.var 0) 1)))
Uses 10 · Used by 1

DefinitionDomino named by a one-letter block#✓fully proved

The domino named by a one-letter block; junk ([], []) otherwise.

def blockDomino (b : List (BlockSym α)) : Post.Domino α :=
  match b with
  | [Sum.inl d] => d
  | _ => ([], [])
Uses 2 · Used by 1

TheoremMembership in a sum of regular expressions#✓fully proved

Membership in a sum of regular expressions.

theorem mem_sum_matches {rs : List (RegularExpression α)} {w : List α} :
    w ∈ (rs.sum).matches' ↔ ∃ r ∈ rs, w ∈ r.matches'
Used by 1

TheoremMembership in the domino index-word language#✓fully proved

Membership in the index-word language: the word is a concatenation of domino letters.

theorem mem_dominoRegex {P : List (Post.Domino α)} {w : List (BlockSym α)} :
    w ∈ (dominoRegex P).matches' ↔
      ∃ bs : List (List (BlockSym α)), w = bs.flatten ∧
        ∀ b ∈ bs, ∃ d ∈ P, b = [Sum.inl d]
Uses 4 · Used by 1

TheoremMembership atom of the PCP encoding checks index words#✓fully proved

The membership atom of the encoding checks index-word membership.

theorem sat_mem_dominoRegex {σ : Fin 1 → List (BlockSym α)}
    {P : List (Post.Domino α)} :
    SatAtom σ (Atom.mem (Term.var 0) (EncodedRegex.flatten (dominoRegex P))) ↔
      σ 0 ∈ (dominoRegex P).matches'
Uses 10 · Used by 1

TheoremTop morphism applied to an index word#✓fully proved

The top morphism applied to an index word.

theorem flatMap_topFun {w : List (BlockSym α)} {s : List (Post.Domino α)}
    (hw : w = s.map Sum.inl) : w.flatMap topFun = (Post.top s).map Sum.inr
Uses 4 · Used by 1

TheoremBottom morphism applied to an index word#✓fully proved

The bottom morphism applied to an index word.

theorem flatMap_botFun {w : List (BlockSym α)} {s : List (Post.Domino α)}
    (hw : w = s.map Sum.inl) : w.flatMap botFun = (Post.bottom s).map Sum.inr
Uses 4 · Used by 1

TheoremFlattening a list of one-letter blocks#✓fully proved

Flattening a list of one-letter blocks.

theorem map_inl_flatten (s : List (Post.Domino α)) :
    s.map dominoLetter = (s.map (fun d => [dominoLetter d])).flatten
Uses 3 · Used by 1

TheoremPCP is characterized by string-constraint satisfiability:#✓fully proved

For each PCP instance P, PCP P holds iff the encoding constraint is satisfiable. This is a semantic characterization, not a computable reduction to a formula-indexed satisfiability predicate (see the module header).

theorem pcp_iff_stringSat (P : List (Post.Domino α)) :
    Post.PCP P ↔ ∃ σ : Fin 1 → List (BlockSym α), Sat σ (pcpConstraint P)
Uses 24
14 fully proved

The dependency explorer needs JavaScript and its graph data.

Download the complete graph data.