The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V31. Set theory

Mathlib.SetTheory.Descriptive.Tree

31 declarations. Mathlib docs · Source

def Descriptive.tree E1 #

(A : Type u_1) → CompleteSublattice (Set (List A))

A tree is a set of finite sequences, implemented as List A, that is stable under taking prefixes. For the definition we use the equivalent property x ++ [a] ∈ T → x ∈ T, which is more convenient to check. We define tree A as a complete sublattice of Set (List A), which coerces to the type of trees on A.

theorem Descriptive.coe_def E0 #

∀ (A : Type u_1) (self : ↥(Descriptive.tree A)), ↑self = ↑self

instance Descriptive.instSetLikeSubtypeSetListMemCompleteSublatticeTree E0 #

(A : Type u_1) → SetLike (↥(Descriptive.tree A)) (List A)

theorem Descriptive.Tree.mem_of_append E0 #

∀ {A : Type u_1} {T : ↥(Descriptive.tree A)} {x y : List A}, x ++ y ∈ T → x ∈ T

theorem Descriptive.Tree.mem_of_prefix E0 #

∀ {A : Type u_1} {T : ↥(Descriptive.tree A)} {x y : List A}, x <+: y → y ∈ T → x ∈ T

instance Descriptive.Tree.instTransListSubtypeSetMemCompleteSublatticeTreeIsPrefix E0 #

{A : Type u_1} → Trans List.IsPrefix (fun x T ↦ x ∈ T) fun x T ↦ x ∈ T

theorem Descriptive.Tree.singleton_mem E1 #

∀ {A : Type u_1} (T : ↥(Descriptive.tree A)) {a : A} {x : List A}, a :: x ∈ T → [a] ∈ T

theorem Descriptive.Tree.tree_eq_bot E0 #

∀ {A : Type u_1} {T : ↥(Descriptive.tree A)}, T = ⊥ ↔ [] ∉ T

theorem Descriptive.Tree.take_mem E1 #

∀ {A : Type u_1} {T : ↥(Descriptive.tree A)} {n : ℕ} (x : ↥T), List.take n ↑x ∈ T

def Descriptive.Tree.take E1 #

{A : Type u_1} → {T : ↥(Descriptive.tree A)} → ℕ → ↥T → ↥T

A variant of List.take internally to a tree

theorem Descriptive.Tree.take_coe E0 #

∀ {A : Type u_1} {T : ↥(Descriptive.tree A)} (n : ℕ) (x : ↥T), ↑(Descriptive.Tree.take n x) = List.take n ↑x

theorem Descriptive.Tree.take_take E0 #

∀ {A : Type u_1} {T : ↥(Descriptive.tree A)} (m n : ℕ) (x : ↥T),
  Descriptive.Tree.take m (Descriptive.Tree.take n x) = Descriptive.Tree.take (min m n) x

theorem Descriptive.Tree.take_eq_take E0 #

∀ {A : Type u_1} {T : ↥(Descriptive.tree A)} {x : ↥T} {m n : ℕ},
  Descriptive.Tree.take m x = Descriptive.Tree.take n x ↔ min m (↑x).length = min n (↑x).length

def Descriptive.Tree.subAt E1 #

{A : Type u_1} → ↥(Descriptive.tree A) → List A → ↥(Descriptive.tree A)

The residual tree obtained by regarding the node x as new root

theorem Descriptive.Tree.mem_subAt E0 #

∀ {A : Type u_1} (T : ↥(Descriptive.tree A)) (x y : List A), y ∈ Descriptive.Tree.subAt T x ↔ x ++ y ∈ T

theorem Descriptive.Tree.subAt_nil E0 #

∀ {A : Type u_1} (T : ↥(Descriptive.tree A)), Descriptive.Tree.subAt T [] = T

theorem Descriptive.Tree.subAt_append E0 #

∀ {A : Type u_1} (T : ↥(Descriptive.tree A)) (x y : List A),
  Descriptive.Tree.subAt (Descriptive.Tree.subAt T x) y = Descriptive.Tree.subAt T (x ++ y)

theorem Descriptive.Tree.subAt_mono E1 #

∀ {A : Type u_1} {S : ↥(Descriptive.tree A)} (T : ↥(Descriptive.tree A)) (x : List A),
  S ≤ T → Descriptive.Tree.subAt S x ≤ Descriptive.Tree.subAt T x

def Descriptive.Tree.drop E1 #

{A : Type u_1} →
  (T : ↥(Descriptive.tree A)) → (n : ℕ) → (x : ↥T) → ↥(Descriptive.Tree.subAt T ↑(Descriptive.Tree.take n x))

A variant of List.drop that takes values in subAt

theorem Descriptive.Tree.drop_coe E0 #

∀ {A : Type u_1} (T : ↥(Descriptive.tree A)) (n : ℕ) (x : ↥T), ↑(Descriptive.Tree.drop T n x) = List.drop n ↑x

def Descriptive.Tree.pullSub E1 #

{A : Type u_1} → ↥(Descriptive.tree A) → List A → ↥(Descriptive.tree A)

Adjoint of subAt, given by pasting x before the root of T. Explicitly, elements are prefixes of x or x with an element of T appended

theorem Descriptive.Tree.mem_pullSub_short E0 #

∀ {A : Type u_1} {T : ↥(Descriptive.tree A)} {x y : List A},
  y.length ≤ x.length → (y ∈ Descriptive.Tree.pullSub T x ↔ y <+: x ∧ [] ∈ T)

theorem Descriptive.Tree.mem_pullSub_long E0 #

∀ {A : Type u_1} {T : ↥(Descriptive.tree A)} {x y : List A},
  x.length ≤ y.length → (y ∈ Descriptive.Tree.pullSub T x ↔ ∃ z ∈ T, y = x ++ z)

theorem Descriptive.Tree.mem_pullSub_append E0 #

∀ {A : Type u_1} {T : ↥(Descriptive.tree A)} {x y : List A}, x ++ y ∈ Descriptive.Tree.pullSub T x ↔ y ∈ T

theorem Descriptive.Tree.mem_pullSub_self E0 #

∀ {A : Type u_1} {T : ↥(Descriptive.tree A)} {x : List A}, x ∈ Descriptive.Tree.pullSub T x ↔ [] ∈ T

theorem Descriptive.Tree.pullSub_subAt E1 #

∀ {A : Type u_1} (T : ↥(Descriptive.tree A)) (x : List A), Descriptive.Tree.pullSub (Descriptive.Tree.subAt T x) x ≤ T

theorem Descriptive.Tree.subAt_pullSub E0 #

∀ {A : Type u_1} (T : ↥(Descriptive.tree A)) (x : List A), Descriptive.Tree.subAt (Descriptive.Tree.pullSub T x) x = T

theorem Descriptive.Tree.pullSub_mono E1 #

∀ {A : Type u_1} {S : ↥(Descriptive.tree A)} (T : ↥(Descriptive.tree A)),
  S ≤ T → ∀ (x : List A), Descriptive.Tree.pullSub S x ≤ Descriptive.Tree.pullSub T x

theorem Descriptive.Tree.pullSub_adjunction E1 #

∀ {A : Type u_1} (S T : ↥(Descriptive.tree A)) (x : List A),
  Descriptive.Tree.pullSub S x ≤ T ↔ S ≤ Descriptive.Tree.subAt T x

theorem Descriptive.Tree.pullSub_nil E0 #

∀ {A : Type u_1} (T : ↥(Descriptive.tree A)), Descriptive.Tree.pullSub T [] = T

theorem Descriptive.Tree.pullSub_append E0 #

∀ {A : Type u_1} (T : ↥(Descriptive.tree A)) (x y : List A),
  Descriptive.Tree.pullSub (Descriptive.Tree.pullSub T y) x = Descriptive.Tree.pullSub T (x ++ y)