Documentation

CslibFrontier.Foundations.Data.List.StairRefinement

Common refinement of two factorisations of a word #

Two sequences of words have the same concatenation if and only if there is a matrix of words with staircase support (Stair) whose rows concatenate to the first sequence and whose columns concatenate to the second (IsRef); moreover the matrix is unique.

From VP ≠ VNP over every field [Ant26], module Nc.Tape.Refine.

Main definitions #

Main results #

def List.StairRefinement.cat {Γ : Type u_1} {K : ℕ} (A : Fin K → List Γ) :
List Γ

Concatenation of a Fin K-indexed sequence of words.

theorem List.StairRefinement.cat_succ {Γ : Type u_1} {K : ℕ} (A : Fin (K + 1) → List Γ) :
cat A = A 0 ++ cat fun (i : Fin K) => A i.succ
theorem List.StairRefinement.cat_eq_nil {Γ : Type u_1} {K : ℕ} {A : Fin K → List Γ} :
cat A = [] ↔ ∀ (i : Fin K), A i = []
theorem List.StairRefinement.cat_eq_cons {Γ : Type u_1} {K : ℕ} {A : Fin K → List Γ} {a : Γ} {W : List Γ} (h : cat A = a :: W) :
∃ (i : Fin K) (l : List Γ), (∀ j < i, A j = []) ∧ A i = a :: l ∧ cat (Function.update A i l) = W
theorem List.StairRefinement.cat_of_cons {Γ : Type u_1} {K : ℕ} {A : Fin K → List Γ} {a : Γ} {i : Fin K} {l : List Γ} (h1 : ∀ j < i, A j = []) (h2 : A i = a :: l) :
cat A = a :: cat (Function.update A i l)
def List.StairRefinement.Stair {Γ : Type u_1} {K : ℕ} (X : Fin K → Fin K → List Γ) :

Staircase support condition on a matrix of words.

Instances For
    structure List.StairRefinement.IsRef {Γ : Type u_1} {K : ℕ} (A B : Fin K → List Γ) (X : Fin K → Fin K → List Γ) :

    X is a common refinement of A (rows) and B (columns).

    • stair : Stair X

      Non-empty entries form a weakly increasing staircase.

    • row (a : Fin K) : cat (X a) = A a

      Each row a concatenates to A a.

    • col (b : Fin K) : (cat fun (a : Fin K) => X a b) = B b

      Each column b concatenates to B b.

    theorem List.StairRefinement.IsRef.cat_eq {Γ : Type u_1} {K : ℕ} {A B : Fin K → List Γ} {X : Fin K → Fin K → List Γ} (h : IsRef A B X) :
    cat A = cat B
    theorem List.StairRefinement.IsRef.unique {Γ : Type u_1} {K : ℕ} {A B : Fin K → List Γ} {X Y : Fin K → Fin K → List Γ} (h : IsRef A B X) (h' : IsRef A B Y) :
    X = Y
    theorem List.StairRefinement.IsRef.exists {Γ : Type u_1} {K : ℕ} {A B : Fin K → List Γ} (h : cat A = cat B) :
    ∃ (X : Fin K → Fin K → List Γ), IsRef A B X
    theorem List.StairRefinement.cat_add {Γ : Type u_1} {K K' : ℕ} (X : Fin (K + K') → List Γ) :
    cat X = (cat fun (κ : Fin K) => X (Fin.castAdd K' κ)) ++ cat fun (κ : Fin K') => X (Fin.natAdd K κ)

    The concatenation of K + K' words is that of the first K and then of the last K'.

    theorem List.StairRefinement.sum_length_cat {Γ : Type u_1} {K : ℕ} (X : Fin K → List Γ) :
    ∑ b : Fin K, (X b).length = (cat X).length

    The length of a concatenation is the sum of the lengths.

    theorem List.StairRefinement.length_le_cat {Γ : Type u_1} {K : ℕ} (X : Fin K → List Γ) (b : Fin K) :
    (X b).length ≤ (cat X).length

    Every word of a sequence is at most as long as the concatenation.

    @[instance_reducible]
    instance List.StairRefinement.instDecidableStair {Γ : Type u_1} {K : ℕ} (X : Fin K → Fin K → List Γ) :

    Staircase support is decidable.