Chvátal–Sankoff constant
AbbreviationBinary strings#✓fully proved
For a natural number \(n\), a binary string of length \(n\) is a function from \(\{0, 1, \dots, n - 1\}\) to \(\{\mathrm{false}, \mathrm{true}\}\), that is, a sequence of \(n\) bits listed in order.
Used by 15
AbbreviationPairs of binary strings#✓fully proved
For a natural number \(n\), a pair of binary strings of length \(n\) is an ordered pair \((x, y)\) of binary strings \(x\) and \(y\), each of length \(n\). These pairs form the finite sample space over which expected longest common subsequence lengths are taken.
abbrev BinaryStringPair (n : ℕ) := BinaryString n × BinaryString n
abbrev BinaryString (n : ℕ) := Fin n → Bool
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:53
Uses 1 · Used by 6
DefinitionCommon subsequence#✓fully proved
For binary strings \(x\) and \(y\) of length \(n\), a finite sequence of bits \(z\) is a common subsequence of \(x\) and \(y\) if \(z\) is obtained both from \(x\) and from \(y\) by deleting some (possibly no) entries and keeping the remaining entries in order.
Repeated symbols are kept with their multiplicities.
def IsCommonSubsequence {n : ℕ} (z : List Bool)
(x y : BinaryString n) : Prop :=
z.Sublist (List.ofFn x) ∧ z.Sublist (List.ofFn y)
abbrev BinaryString (n : ℕ) := Fin n → Bool
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:53
Uses 1 · Used by 6
DefinitionLengths of common subsequences#✓fully proved
For binary strings \(x\) and \(y\) of length \(n\), the set of natural numbers \(k\) such that some binary list of length \(k\) is a common subsequence of \(x\) and \(y\).
def commonSubsequenceLengths {n : ℕ} (x y : BinaryString n) : Set ℕ :=
{k | ∃ z : List Bool, IsCommonSubsequence z x y ∧ z.length = k}
abbrev BinaryString (n : ℕ) := Fin n → Bool
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:53
def IsCommonSubsequence {n : ℕ} (z : List Bool)
(x y : BinaryString n) : Prop :=
z.Sublist (List.ofFn x) ∧ z.Sublist (List.ofFn y)
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:61
DefinitionLength of a longest common subsequence#✓fully proved
For binary strings \(x\) and \(y\) of length \(n\), \(\mathrm{LCS}(x, y)\) is the length returned by the dynamic-programming algorithm for the longest common subsequence, applied to \(x\) and \(y\) read as lists of bits.
This value is the greatest length of a common subsequence of \(x\) and \(y\).
def lcsLength {n : ℕ} (x y : BinaryString n) : ℕ :=
(Cslib.Algorithms.Lean.longestCommonSubsequence
(List.ofFn x) (List.ofFn y)).ret.1
abbrev BinaryString (n : ℕ) := Fin n → Bool
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:53
def longestCommonSubsequence {α : Type u} [BEq α] (xs ys : List α) :
TimeM Nat (Nat × List α) :=
let Row (n : Nat) : Type u :=
ULift.{u} (Subtype (fun row : Array Nat => row.size = n + 1))
let rec @[reducible] buildRow (x : α) (ys : Array α) (up : Row ys.size) :
(j : Nat) → j ≤ ys.size → TimeM Nat (Row j)
| 0, _ => pure ⟨⟨#[0], by simp⟩⟩
| j + 1, hj => do
let row ← buildRow x ys up j (by omega)
TimeM.tick 1
let value := if x == ys[j] then
up.down.1[j]'(by rw [up.down.2]; omega) + 1
⋯
CSLibExt/Algorithms/Lean/DynamicProgramming/LongestCommonSubsequence.lean:100
Uses 2 · Used by 9
TheoremThe LCS length is the maximum common-subsequence length#✓fully proved
For binary strings \(x\) and \(y\) of length \(n\), let \(\mathrm{LCS}(x, y)\) be the length returned by the dynamic-programming algorithm for the longest common subsequence on \(x\) and \(y\). Then some common subsequence of \(x\) and \(y\) has length \(\mathrm{LCS}(x, y)\), and every common subsequence of \(x\) and \(y\) has length at most \(\mathrm{LCS}(x, y)\).
theorem lcsLength_isGreatest {n : ℕ} (x y : BinaryString n) :
IsGreatest (commonSubsequenceLengths x y) (lcsLength x y)
abbrev BinaryString (n : ℕ) := Fin n → Bool
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:53
def commonSubsequenceLengths {n : ℕ} (x y : BinaryString n) : Set ℕ :=
{k | ∃ z : List Bool, IsCommonSubsequence z x y ∧ z.length = k}
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:66
def lcsLength {n : ℕ} (x y : BinaryString n) : ℕ :=
(Cslib.Algorithms.Lean.longestCommonSubsequence
(List.ofFn x) (List.ofFn y)).ret.1
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:71
Uses 6 · Used by 3
TheoremExistence of a longest common subsequence#✓fully proved
For binary strings \(x\) and \(y\) of length \(n\), there is a binary list \(z\) that is a common subsequence of \(x\) and \(y\), whose length equals the LCS length of \(x\) and \(y\), and such that every common subsequence \(w\) of \(x\) and \(y\) has length at most the length of \(z\).
theorem exists_longestCommonSubsequence {n : ℕ} (x y : BinaryString n) :
∃ z : List Bool,
IsCommonSubsequence z x y ∧ z.length = lcsLength x y ∧
∀ w : List Bool, IsCommonSubsequence w x y → w.length ≤ z.length
abbrev BinaryString (n : ℕ) := Fin n → Bool
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:53
def IsCommonSubsequence {n : ℕ} (z : List Bool)
(x y : BinaryString n) : Prop :=
z.Sublist (List.ofFn x) ∧ z.Sublist (List.ofFn y)
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:61
def lcsLength {n : ℕ} (x y : BinaryString n) : ℕ :=
(Cslib.Algorithms.Lean.longestCommonSubsequence
(List.ofFn x) (List.ofFn y)).ret.1
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:71
Uses 5 · Used by 1
TheoremThe LCS length is at most the string length#✓fully proved
For binary strings \(x\) and \(y\) of length \(n\), the length \(\mathrm{LCS}(x, y)\) of a longest common subsequence satisfies \(\mathrm{LCS}(x, y) \le n\).
theorem lcsLength_le {n : ℕ} (x y : BinaryString n) : lcsLength x y ≤ n
abbrev BinaryString (n : ℕ) := Fin n → Bool
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:53
def lcsLength {n : ℕ} (x y : BinaryString n) : ℕ :=
(Cslib.Algorithms.Lean.longestCommonSubsequence
(List.ofFn x) (List.ofFn y)).ret.1
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:71
Uses 4 · Used by 2
TheoremThe LCS length as a bounded maximum#✓fully proved
For binary strings \(x\) and \(y\) of length \(n\), the length \(\mathrm{LCS}(x, y)\) of a longest common subsequence equals the largest \(k \le n\) such that \(x\) and \(y\) have a common subsequence of length \(k\) (such \(k\) exist, since the empty sequence is a common subsequence).
theorem lcsLength_eq_findGreatest {n : ℕ} (x y : BinaryString n) :
lcsLength x y =
(by
classical
exact Nat.findGreatest (fun k => k ∈ commonSubsequenceLengths x y) n)
abbrev BinaryString (n : ℕ) := Fin n → Bool
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:53
def lcsLength {n : ℕ} (x y : BinaryString n) : ℕ :=
(Cslib.Algorithms.Lean.longestCommonSubsequence
(List.ofFn x) (List.ofFn y)).ret.1
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:71
DefinitionThe finite set of pairs of binary strings#✓fully proved
For a natural number \(n\), this is the finite set of all ordered pairs \((x, y)\) of binary strings \(x\) and \(y\) of length \(n\).
def uniformBinaryStringPairs (n : ℕ) : Finset (BinaryStringPair n) :=
Finset.univ
abbrev BinaryStringPair (n : ℕ) := BinaryString n × BinaryString n
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:57
Uses 2 · Used by 3
DefinitionExpected length of a longest common subsequence#✓fully proved
For \(n \in \mathbb{N}\), the expected LCS length \(E_n\) is the average of \(\mathrm{LCS}(x, y)\), the length of a longest common subsequence of \(x\) and \(y\), over all ordered pairs \((x, y)\) of binary strings of length \(n\): it is the sum of \(\mathrm{LCS}(x, y)\) over these pairs divided by their number \(4^n\). Equivalently, \(E_n\) is the expectation of \(\mathrm{LCS}(x, y)\) for two independent uniformly random binary strings \(x\), \(y\) of length \(n\).
def expectedLCSLength (n : ℕ) : ℝ :=
(∑ pair ∈ uniformBinaryStringPairs n,
(lcsLength pair.1 pair.2 : ℝ)) /
(Fintype.card (BinaryStringPair n) : ℝ)
def uniformBinaryStringPairs (n : ℕ) : Finset (BinaryStringPair n) :=
Finset.univ
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:125
def lcsLength {n : ℕ} (x y : BinaryString n) : ℕ :=
(Cslib.Algorithms.Lean.longestCommonSubsequence
(List.ofFn x) (List.ofFn y)).ret.1
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:71
abbrev BinaryStringPair (n : ℕ) := BinaryString n × BinaryString n
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:57
Uses 4 · Used by 6
TheoremExpected LCS length is nonnegative#✓fully proved
For every \(n\), the expected length of a longest common subsequence of two independent uniformly random binary strings of length \(n\) is at least \(0\).
theorem expectedLCSLength_nonneg (n : ℕ) : 0 ≤ expectedLCSLength n
def expectedLCSLength (n : ℕ) : ℝ :=
(∑ pair ∈ uniformBinaryStringPairs n,
(lcsLength pair.1 pair.2 : ℝ)) /
(Fintype.card (BinaryStringPair n) : ℝ)
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:130
Uses 5 · Used by 1
TheoremExpected LCS length is at most the string length#✓fully proved
For every \(n\), the expected length of a longest common subsequence of two independent uniformly random binary strings of length \(n\) is at most \(n\).
theorem expectedLCSLength_le (n : ℕ) : expectedLCSLength n ≤ n
def expectedLCSLength (n : ℕ) : ℝ :=
(∑ pair ∈ uniformBinaryStringPairs n,
(lcsLength pair.1 pair.2 : ℝ)) /
(Fintype.card (BinaryStringPair n) : ℝ)
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:130
Uses 6 · Used by 2
DefinitionNormalized expected LCS length#✓fully proved
For \(n \ge 1\), the normalized expected LCS length at \(n\) is \(E_n / n\), where \(E_n\) is the expected length of a longest common subsequence of two independent uniformly random binary strings of length \(n\). At \(n = 0\) it is defined to be \(0\).
def normalizedExpectedLCS (n : ℕ) : ℝ :=
if n = 0 then 0 else expectedLCSLength n / (n : ℝ)
def expectedLCSLength (n : ℕ) : ℝ :=
(∑ pair ∈ uniformBinaryStringPairs n,
(lcsLength pair.1 pair.2 : ℝ)) /
(Fintype.card (BinaryStringPair n) : ℝ)
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:130
Uses 1 · Used by 6
TheoremNormalized expected LCS lengths lie in \((0,1)\)#✓fully proved
For every natural number \(n\), the normalized expected LCS length at \(n\) (the expected length of a longest common subsequence of two independent uniformly random binary strings of length \(n\), divided by \(n\), and \(0\) for \(n = 0\)) lies in the closed interval \([0,1]\).
theorem normalizedExpectedLCS_mem_Icc (n : ℕ) :
normalizedExpectedLCS n ∈ Set.Icc (0 : ℝ) 1
def normalizedExpectedLCS (n : ℕ) : ℝ :=
if n = 0 then 0 else expectedLCSLength n / (n : ℝ)
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:160
Uses 4 · Used by 1
DefinitionBinary Chvátal–Sankoff constant#✓fully proved
Let \(L_n\) be the length of a longest common subsequence of two independent uniformly random binary strings of length \(n\). The binary Chvátal–Sankoff constant is the real number \(\liminf_{n \to \infty} \mathbb{E}[L_n]/n\).
For every \(n \ge 1\) the quotient \(\mathbb{E}[L_n]/n\) lies in \([0, 1]\), so this limit inferior is finite. By the theorem of Chvátal and Sankoff the sequence converges, so the constant equals the ordinary limit \(\lim_{n \to \infty} \mathbb{E}[L_n]/n\); defining it as a limit inferior avoids choosing an arbitrary value before convergence is known.
noncomputable def binaryChvatalSankoffConstant : ℝ :=
Filter.liminf normalizedExpectedLCS Filter.atTop
def normalizedExpectedLCS (n : ℕ) : ℝ :=
if n = 0 then 0 else expectedLCSLength n / (n : ℝ)
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:160
Uses 1 · Used by 2
AbbreviationCatalogue notation for the binary Chvátal–Sankoff constant#✓fully proved
Let \(L_n\) be the length of a longest common subsequence of two independent uniformly random binary strings of length \(n\). The notation \(C_{31a}\) stands for the binary Chvátal–Sankoff constant \(\liminf_{n \to \infty} \mathbb{E}[L_n]/n\).
noncomputable abbrev C31a : ℝ :=
binaryChvatalSankoffConstant
noncomputable def binaryChvatalSankoffConstant : ℝ :=
Filter.liminf normalizedExpectedLCS Filter.atTop
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:179
Uses 1 · Used by 12
DefinitionStatement of the Chvátal–Sankoff limit theorem#✓fully proved
Let \(L_n\) be the length of a longest common subsequence of two independent uniformly random binary strings of length \(n\). This proposition asserts that the sequence \(\mathbb{E}[L_n]/n\) converges to a real number as \(n \to \infty\). Chvátal and Sankoff proved that it holds.
def chvatalSankoffLimitExists : Prop :=
∃ c : ℝ, Filter.Tendsto normalizedExpectedLCS Filter.atTop (nhds c)
def normalizedExpectedLCS (n : ℕ) : ℝ :=
if n = 0 then 0 else expectedLCSLength n / (n : ℝ)
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:160
TheoremTrivial bounds for the binary Chvátal–Sankoff constant#✓fully proved
Let \(L_n\) be the length of a longest common subsequence of two independent uniformly random binary strings of length \(n\), and let \(C_{31a} = \liminf_{n \to \infty} \mathbb{E}[L_n]/n\) be the binary Chvátal–Sankoff constant. Then \(0 \le C_{31a} \le 1\).
DefinitionTrivial upper bound for the binary Chvátal–Sankoff constant#✓fully proved
Let \(C_{31a}\) be the binary Chvátal–Sankoff constant: the limit inferior as \(n \to \infty\) of \(E_n / n\), where \(E_n\) is the expected length of a longest common subsequence of two independent uniformly random binary strings of length \(n\). This is the proposition \(C_{31a} \le 1\).
def trivialUpperBound : Prop :=
C31a ≤ 1
noncomputable abbrev C31a : ℝ :=
binaryChvatalSankoffConstant
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:183
Uses 1 · Used by 1
DefinitionStatement of the Dančík–Paterson upper bound#✓fully proved
The proposition that the binary Chvátal–Sankoff constant \(\gamma\) satisfies \(\gamma \le 0.837623\). Here \(\gamma\) is the limit inferior, as \(n \to \infty\), of \(\mathbb{E}[L_n]/n\), where \(L_n\) is the length of a longest common subsequence of two independent uniformly random binary strings of length \(n\).
def dancikPatersonUpperBound : Prop :=
C31a ≤ (837623 : ℝ) / 1000000
noncomputable abbrev C31a : ℝ :=
binaryChvatalSankoffConstant
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:183
Uses 1 · Used by 1
DefinitionStatement of Lueker's upper bound#✓fully proved
The proposition that the binary Chvátal–Sankoff constant \(C_{31a}\) is at most \(0.826280\).
def luekerUpperBound : Prop :=
C31a ≤ (826280 : ℝ) / 1000000
noncomputable abbrev C31a : ℝ :=
binaryChvatalSankoffConstant
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:183
Uses 1 · Used by 1
DefinitionStatement of the trivial lower bound#✓fully proved
The proposition that the binary Chvátal–Sankoff constant \(C_{31a}\) satisfies \(0 \le C_{31a}\).
def trivialLowerBound : Prop :=
0 ≤ C31a
noncomputable abbrev C31a : ℝ :=
binaryChvatalSankoffConstant
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:183
Uses 1 · Used by 1
DefinitionStatement of the Chvátal–Sankoff positivity bound#✓fully proved
The proposition that the binary Chvátal–Sankoff constant \(\gamma\) is strictly positive, \(0 < \gamma\). Here \(\gamma\) is the limit inferior, as \(n \to \infty\), of \(\mathbb{E}[L_n]/n\), where \(L_n\) is the length of a longest common subsequence of two independent uniformly random binary strings of length \(n\).
def chvatalSankoffStrictPositive : Prop :=
0 < C31a
noncomputable abbrev C31a : ℝ :=
binaryChvatalSankoffConstant
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:183
Uses 1 · Used by 1
DefinitionStatement of Dančík's lower bound#✓fully proved
The proposition that the binary Chvátal–Sankoff constant \(\gamma\) satisfies \(0.773911 \le \gamma\). Here \(\gamma\) is the limit inferior, as \(n \to \infty\), of \(\mathbb{E}[L_n]/n\), where \(L_n\) is the length of a longest common subsequence of two independent uniformly random binary strings of length \(n\).
def dancikLowerBound : Prop :=
(773911 : ℝ) / 1000000 ≤ C31a
noncomputable abbrev C31a : ℝ :=
binaryChvatalSankoffConstant
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:183
Uses 1 · Used by 1
DefinitionStatement of Lueker's lower bound#✓fully proved
The proposition that the binary Chvátal–Sankoff constant \(C_{31a}\) is at least \(0.788071\).
def luekerLowerBound : Prop :=
(788071 : ℝ) / 1000000 ≤ C31a
noncomputable abbrev C31a : ℝ :=
binaryChvatalSankoffConstant
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:183
Uses 1 · Used by 1
DefinitionStatement of the Heineman et al. lower bound#✓fully proved
For each \(n\), let \(E_n\) be the expected length of a longest common subsequence of two independent uniformly random binary strings of length \(n\), and let \(C\), the binary Chvátal–Sankoff constant, be the limit inferior of \(E_n / n\) as \(n \to \infty\). This is the proposition \(0.792665992 \le C\).
Heineman et al. obtained this computer-assisted bound; the decimal is an exact rational endpoint.
def heinemanLowerBound : Prop :=
(792665992 : ℝ) / 1000000000 ≤ C31a
noncomputable abbrev C31a : ℝ :=
binaryChvatalSankoffConstant
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:183
Uses 1 · Used by 1
DefinitionStatement of the reported 2026 lower bound \(0.79970\)#✓fully proved
The proposition that the binary Chvátal–Sankoff constant \(C_{31a}\) is at least \(0.79970\).
This bound was reported in 2026 as AI and computer assisted and has not been verified.
def sourceReportedUnverified2026LowerBound : Prop :=
(79970 : ℝ) / 100000 ≤ C31a
noncomputable abbrev C31a : ℝ :=
binaryChvatalSankoffConstant
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:183
Uses 1
DefinitionConcatenation of binary string pairs#✓fully proved
For natural numbers \(m\) and \(n\), sending a pair \((x_1, y_1)\) of binary strings of length \(m\) together with a pair \((x_2, y_2)\) of binary strings of length \(n\) to the pair \((x_1 x_2, y_1 y_2)\) of concatenations is a bijection from the product of the set of pairs of length-\(m\) binary strings and the set of pairs of length-\(n\) binary strings onto the set of pairs of binary strings of length \(m + n\). Its inverse splits each string of length \(m + n\) into its first \(m\) and its last \(n\) symbols.
MathlibExt.Combinatorics.BinaryChvatalSankoffWanted.appendBinaryStringPairEquiv · 18 lines
def appendBinaryStringPairEquiv (m n : ℕ) :
BinaryStringPair m × BinaryStringPair n ≃ BinaryStringPair (m + n) where
toFun pair :=
((Fin.appendEquiv m n) (pair.1.1, pair.2.1),
(Fin.appendEquiv m n) (pair.1.2, pair.2.2))
invFun pair :=
((((Fin.appendEquiv m n).symm pair.1).1,
((Fin.appendEquiv m n).symm pair.2).1),
(((Fin.appendEquiv m n).symm pair.1).2,
((Fin.appendEquiv m n).symm pair.2).2))
left_inv pair := by
rcases pair with ⟨⟨x₁, y₁⟩, ⟨x₂, y₂⟩⟩
simp
right_inv pair := by
rcases pair with ⟨x, y⟩
apply Prod.ext
· exact (Fin.appendEquiv m n).apply_symm_apply x
· exact (Fin.appendEquiv m n).apply_symm_apply y
abbrev BinaryStringPair (n : ℕ) := BinaryString n × BinaryString n
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:57
Sources
- uniform independent binary-string model; concatenation identifies two independent pairs with a pair of the combined length.
Uses 2 · Used by 1
TheoremSuperadditivity of the LCS length under concatenation#✓fully proved
Write \(\mathrm{LCS}(x, y)\) for the length of a longest common subsequence of binary strings \(x\) and \(y\) of equal length. Let \(x_1, y_1\) be binary strings of length \(m\) and \(x_2, y_2\) binary strings of length \(n\), and write \(x_1x_2\) and \(y_1y_2\) for the concatenated strings of length \(m + n\). Then \(\mathrm{LCS}(x_1, y_1) + \mathrm{LCS}(x_2, y_2) \le \mathrm{LCS}(x_1x_2, y_1y_2)\).
theorem lcsLength_append_le {m n : ℕ}
(x₁ y₁ : BinaryString m) (x₂ y₂ : BinaryString n) :
lcsLength x₁ y₁ + lcsLength x₂ y₂ ≤
lcsLength (Fin.append x₁ x₂) (Fin.append y₁ y₂)
abbrev BinaryString (n : ℕ) := Fin n → Bool
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:53
def lcsLength {n : ℕ} (x y : BinaryString n) : ℕ :=
(Cslib.Algorithms.Lean.longestCommonSubsequence
(List.ofFn x) (List.ofFn y)).ret.1
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:71
Sources
- common subsequences concatenate without changing their order.
Uses 5 · Used by 1
TheoremAny limit of the normalized expected LCS lengths is the binary Chvátal–Sankoff constant#✓fully proved
If the normalized expected LCS lengths converge to some real number as \(n \to \infty\), then they converge to the binary Chvátal–Sankoff constant \(C_{31a}\), which is defined as their limit inferior.
theorem tendsto_binaryChvatalSankoffConstant
(h : chvatalSankoffLimitExists) :
Filter.Tendsto normalizedExpectedLCS Filter.atTop
(nhds binaryChvatalSankoffConstant)
def chvatalSankoffLimitExists : Prop :=
∃ c : ℝ, Filter.Tendsto normalizedExpectedLCS Filter.atTop (nhds c)
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:188
def normalizedExpectedLCS (n : ℕ) : ℝ :=
if n = 0 then 0 else expectedLCSLength n / (n : ℝ)
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:160
noncomputable def binaryChvatalSankoffConstant : ℝ :=
Filter.liminf normalizedExpectedLCS Filter.atTop
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:179
Uses 3
TheoremSuperadditivity implies the binary LCS limit exists#✓fully proved
For each natural number \(n\), let \(E_n\) be the expected length of a longest common subsequence of two independent uniformly random binary strings of length \(n\). If \(E_m + E_n \le E_{m+n}\) for all natural numbers \(m\) and \(n\), then the sequence \((E_n / n)_{n \ge 1}\) converges to a real number as \(n \to \infty\).
The proof applies Fekete's lemma.
theorem chvatalSankoffLimitExists_of_superadditive
(h : ∀ m n : ℕ,
expectedLCSLength m + expectedLCSLength n ≤ expectedLCSLength (m + n)) :
chvatalSankoffLimitExists
def expectedLCSLength (n : ℕ) : ℝ :=
(∑ pair ∈ uniformBinaryStringPairs n,
(lcsLength pair.1 pair.2 : ℝ)) /
(Fintype.card (BinaryStringPair n) : ℝ)
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:130
def chvatalSankoffLimitExists : Prop :=
∃ c : ℝ, Filter.Tendsto normalizedExpectedLCS Filter.atTop (nhds c)
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:188
Uses 4 · Used by 1
TheoremThe binary Chvátal–Sankoff constant is nonnegative#✓fully proved
The binary Chvátal–Sankoff constant \(C_{31a}\) satisfies \(0 \le C_{31a}\).
theorem trivialLowerBound_holds : trivialLowerBound
def trivialLowerBound : Prop :=
0 ≤ C31a
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:218
TheoremThe binary Chvátal–Sankoff constant is at most one#✓fully proved
The binary Chvátal–Sankoff constant \(C_{31a}\) satisfies \(C_{31a} \le 1\).
theorem trivialUpperBound_holds : trivialUpperBound
def trivialUpperBound : Prop :=
C31a ≤ 1
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:206
TheoremSuperadditivity of the expected LCS length#✓fully proved
Let \(E_n\) be the expected length of a longest common subsequence of two independent uniformly random binary strings of length \(n\). Then for all natural numbers \(m\) and \(n\), \(E_m + E_n \le E_{m+n}\).
theorem expectedLCSLength_superadditive :
∀ m n : ℕ,
expectedLCSLength m + expectedLCSLength n ≤ expectedLCSLength (m + n)
def expectedLCSLength (n : ℕ) : ℝ :=
(∑ pair ∈ uniformBinaryStringPairs n,
(lcsLength pair.1 pair.2 : ℝ)) /
(Fintype.card (BinaryStringPair n) : ℝ)
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:130
Sources
- adapted from the verified gpt-5.6-sol proof in task T292145496.
Uses 6 · Used by 1
TheoremChvátal–Sankoff theorem: the binary LCS limit exists#✓fully proved
Let \(L_n\) be the length of a longest common subsequence of two independent uniformly random binary strings of length \(n\). Then the sequence \(\mathbb{E}[L_n]/n\) converges to a real number as \(n \to \infty\).
theorem chvatalSankoffLimitExists_holds : chvatalSankoffLimitExists
def chvatalSankoffLimitExists : Prop :=
∃ c : ℝ, Filter.Tendsto normalizedExpectedLCS Filter.atTop (nhds c)
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:188
Uses 3
TheoremDančík–Paterson upper bound for the binary Chvátal–Sankoff constant#●ready to prove
The binary Chvátal–Sankoff constant \(\gamma\) satisfies \(\gamma \le 0.837623\), where \(\gamma\) is the limit inferior, as \(n \to \infty\), of \(\mathbb{E}[L_n]/n\) and \(L_n\) is the length of a longest common subsequence of two independent uniformly random binary strings of length \(n\).
theorem_wanted dancikPatersonUpperBound_wanted : dancikPatersonUpperBound
def dancikPatersonUpperBound : Prop :=
C31a ≤ (837623 : ℝ) / 1000000
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:210
Sources
- Dančík--Paterson (1995), catalogue upper bound
0.837623.
Uses 1
TheoremLueker's upper bound for the binary Chvátal–Sankoff constant#●ready to prove
The binary Chvátal–Sankoff constant \(C_{31a}\) is at most \(0.826280\).
theorem_wanted luekerUpperBound_wanted : luekerUpperBound
def luekerUpperBound : Prop :=
C31a ≤ (826280 : ℝ) / 1000000
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:214
Sources
- Lueker (2009), catalogue computer-assisted upper bound
0.826280.
Uses 1
TheoremThe binary Chvátal–Sankoff constant is positive#●ready to prove
Let \(L_n\) be the length of a longest common subsequence of two independent uniformly random binary strings of length \(n\). The binary Chvátal–Sankoff constant \(C_{31a} = \liminf_{n \to \infty} \mathbb{E}[L_n]/n\) satisfies \(C_{31a} > 0\).
theorem_wanted chvatalSankoffStrictPositive_wanted : chvatalSankoffStrictPositive
def chvatalSankoffStrictPositive : Prop :=
0 < C31a
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:222
Sources
- Chvátal--Sankoff (1975), catalogue strict lower bound
> 0.
Uses 1
TheoremDančík's lower bound for the binary Chvátal–Sankoff constant#●ready to prove
The binary Chvátal–Sankoff constant \(\gamma\) satisfies \(0.773911 \le \gamma\), where \(\gamma\) is the limit inferior, as \(n \to \infty\), of \(\mathbb{E}[L_n]/n\) and \(L_n\) is the length of a longest common subsequence of two independent uniformly random binary strings of length \(n\).
theorem_wanted dancikLowerBound_wanted : dancikLowerBound
def dancikLowerBound : Prop :=
(773911 : ℝ) / 1000000 ≤ C31a
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:226
Sources
- Dančík (1994), catalogue computer-assisted lower bound
0.773911.
Uses 1
TheoremLueker's lower bound for the binary Chvátal–Sankoff constant#●ready to prove
For each \(n\), let \(E_n\) be the expected length of a longest common subsequence of two independent uniformly random binary strings of length \(n\), and let \(C\), the binary Chvátal–Sankoff constant, be the limit inferior of \(E_n / n\) as \(n \to \infty\). Then \(0.788071 \le C\).
theorem_wanted luekerLowerBound_wanted : luekerLowerBound
def luekerLowerBound : Prop :=
(788071 : ℝ) / 1000000 ≤ C31a
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:230
Sources
- Lueker (2009), catalogue computer-assisted lower bound
0.788071.
Uses 1
TheoremHeineman et al. lower bound for the binary Chvátal–Sankoff constant#●ready to prove
For each \(n\), let \(E_n\) be the expected length of a longest common subsequence of two independent uniformly random binary strings of length \(n\), and let \(C\), the binary Chvátal–Sankoff constant, be the limit inferior of \(E_n / n\) as \(n \to \infty\). Then \(0.792665992 \le C\).
theorem_wanted heinemanLowerBound_wanted : heinemanLowerBound
def heinemanLowerBound : Prop :=
(792665992 : ℝ) / 1000000000 ≤ C31a
WantedExt/Combinatorics/BinaryChvatalSankoffWanted.lean:234
Sources
- Heineman et al., arXiv:2407.10925v1 (2024), catalogue computer-assisted lower bound
0.792665992.
Uses 1
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.