Documentation

CslibFrontier.Computability.Languages.Slice

Slices of Boolean combinations of languages and encoded problems #

The slices of the empty and the full language (as 0 or ⊥, and ⊤), of complements, unions and intersections, together with the slice indicator Language.encodesMember for problems with an injective encoding enc : α ↪ List β.

Main definitions #

Main results #

@[simp]
theorem Language.slice_zero {α : Type u_1} {n : ℕ} {x : Fin n → α} :
slice 0 n x = false

The slices of the empty language 0 are false everywhere.

@[simp]
theorem Language.slice_bot {α : Type u_1} {n : ℕ} {x : Fin n → α} :

The slices of the empty language ⊥ are false everywhere.

@[simp]
theorem Language.slice_top {α : Type u_1} {n : ℕ} {x : Fin n → α} :

The slices of the full language ⊤ are true everywhere.

@[simp]
theorem Language.slice_compl {α : Type u_1} {L : Language α} {n : ℕ} {x : Fin n → α} :
Lᶜ.slice n x = !L.slice n x

The slice of a complement is the negation of the slice.

@[simp]
theorem Language.slice_sup {α : Type u_1} {L M : Language α} {n : ℕ} {x : Fin n → α} :
(L ⊔ M).slice n x = (L.slice n x || M.slice n x)

The slice of a union is the disjunction of the slices.

@[simp]
theorem Language.slice_inf {α : Type u_1} {L M : Language α} {n : ℕ} {x : Fin n → α} :
(L ⊓ M).slice n x = (L.slice n x && M.slice n x)

The slice of an intersection is the conjunction of the slices.

def Language.encodes {α : Type u_1} {β : Type u_2} (enc : α ↪ List β) (n : ℕ) :
Set (Fin n → β)

The words of length n that encode an instance under enc.

noncomputable def Language.encodesMember {α : Type u_1} {β : Type u_2} (enc : α ↪ List β) (A : Set α) (n : ℕ) :
(Fin n → β) → Bool

Whether the word x : Fin n → β encodes a member of A under enc.

theorem Language.encodesMember_eq_true_iff {α : Type u_1} {β : Type u_2} {n : ℕ} {enc : α ↪ List β} {A : Set α} {x : Fin n → β} {a : α} (ha : enc a = List.ofFn x) :
encodesMember enc A n x = true ↔ a ∈ A

On a word x encoding a, encodesMember enc A n x is true iff a ∈ A.

theorem Language.mem_iff_of_slice_eq_encodesMember {α : Type u_1} {β : Type u_2} {enc : α ↪ List β} {A : Set α} {L : Language β} (h : ∀ (n : ℕ), ∀ x ∈ encodes enc n, L.slice n x = encodesMember enc A n x) (a : α) :
a ∈ A ↔ enc a ∈ L

A language agreeing with encodesMember enc A on encoded words contains exactly the encodings of the members of A.