AFTD Auto-Formalizing Theoretical Domains

bpe_partial_merge

def

The relation between input and output strings obtained by replacing an arbitrary subset of pairwise nonoverlapping occurrences of the given pair by the given symbol.

Statement

def bpe_partial_merge (a b z : ℕ) : List ℕ → List ℕ → Prop
Source
Definitions for OP-1288, following arXiv:2611.08671, Section 2.
Verified
10 Nov 2026
Axioms
none listed
Used by 4

Lean source view module on GitHub

def bpe_partial_merge (a b z : ℕ) : List ℕ → List ℕ → Prop
  | [], t => t = []
  | [x], t => t = [x]
  | x :: y :: xs, t =>
      (∃ out, t = x :: out ∧ bpe_partial_merge a b z (y :: xs) out) ∨
      (x = a ∧ y = b ∧ ∃ out, t = z :: out ∧ bpe_partial_merge a b z xs out)
See it in the graphDiscuss this resultChallenge it