Documentation

Mathlib.Data.TypeVec

Tuples of types, and their categorical structure. #

Features #

Also, support functions for operating with n-tuples of types, such as:

Since e.g. append1 α.drop α.last is propositionally equal to α but not definitionally equal to it, we need support functions and lemmas to mediate between constructions.

def TypeVec (n : ) :
Type (u_1+1)

n-tuples of types, as a category

Equations
Equations
  • instInhabitedTypeVec = { default := fun x => PUnit }
def TypeVec.Arrow {n : } (α : TypeVec n) (β : TypeVec n) :
Type (maxu_1u_2)

arrow in the category of TypeVec

Equations
theorem TypeVec.Arrow.ext {n : } {α : TypeVec n} {β : TypeVec n} (f : TypeVec.Arrow α β) (g : TypeVec.Arrow α β) :
(∀ (i : Fin2 n), f i = g i) → f = g

Extensionality for arrows

instance TypeVec.Arrow.inhabited {n : } (α : TypeVec n) (β : TypeVec n) [inst : (i : Fin2 n) → Inhabited (β i)] :
Equations
def TypeVec.id {n : } {α : TypeVec n} :

identity of arrow composition

Equations
def TypeVec.comp {n : } {α : TypeVec n} {β : TypeVec n} {γ : TypeVec n} (g : TypeVec.Arrow β γ) (f : TypeVec.Arrow α β) :

arrow composition in the category of TypeVec

Equations
@[simp]
theorem TypeVec.id_comp {n : } {α : TypeVec n} {β : TypeVec n} (f : TypeVec.Arrow α β) :
TypeVec.comp TypeVec.id f = f
@[simp]
theorem TypeVec.comp_id {n : } {α : TypeVec n} {β : TypeVec n} (f : TypeVec.Arrow α β) :
TypeVec.comp f TypeVec.id = f
theorem TypeVec.comp_assoc {n : } {α : TypeVec n} {β : TypeVec n} {γ : TypeVec n} {δ : TypeVec n} (h : TypeVec.Arrow γ δ) (g : TypeVec.Arrow β γ) (f : TypeVec.Arrow α β) :
def TypeVec.append1 {n : } (α : TypeVec n) (β : Type u_1) :
TypeVec (n + 1)

Support for extending a TypeVec by one element.

Equations
def TypeVec.drop {n : } (α : TypeVec (n + 1)) :

retain only a n-length prefix of the argument

Equations
def TypeVec.last {n : } (α : TypeVec (n + 1)) :

take the last value of a (n+1)-length vector

Equations
instance TypeVec.last.inhabited {n : } (α : TypeVec (n + 1)) [inst : Inhabited (α Fin2.fz)] :
Equations
theorem TypeVec.drop_append1 {n : } {α : TypeVec n} {β : Type u_1} {i : Fin2 n} :
TypeVec.drop (α ::: β) i = α i
@[simp]
theorem TypeVec.drop_append1' {n : } {α : TypeVec n} {β : Type u_1} :
TypeVec.drop (α ::: β) = α
theorem TypeVec.last_append1 {n : } {α : TypeVec n} {β : Type u_1} :
TypeVec.last (α ::: β) = β
@[simp]
theorem TypeVec.append1_drop_last {n : } (α : TypeVec (n + 1)) :
def TypeVec.append1Cases {n : } {C : TypeVec (n + 1)Sort u} (H : (α : TypeVec n) → (β : Type u_1) → C (α ::: β)) (γ : TypeVec (n + 1)) :
C γ

cases on (n+1)-length vectors

Equations
@[simp]
theorem TypeVec.append1_cases_append1 {n : } {C : TypeVec (n + 1)Sort u} (H : (α : TypeVec n) → (β : Type u_1) → C (α ::: β)) (α : TypeVec n) (β : Type u_1) :
TypeVec.append1Cases H (α ::: β) = H α β
def TypeVec.splitFun {n : } {α : TypeVec (n + 1)} {α' : TypeVec (n + 1)} (f : TypeVec.Arrow (TypeVec.drop α) (TypeVec.drop α')) (g : TypeVec.last αTypeVec.last α') :

append an arrow and a function for arbitrary source and target type vectors

Equations
def TypeVec.appendFun {n : } {α : TypeVec n} {α' : TypeVec n} {β : Type u_1} {β' : Type u_2} (f : TypeVec.Arrow α α') (g : ββ') :
TypeVec.Arrow (α ::: β) (α' ::: β')

append an arrow and a function as well as their respective source and target types / typevecs

Equations

append an arrow and a function as well as their respective source and target types / typevecs

Equations
def TypeVec.dropFun {n : } {α : TypeVec (n + 1)} {β : TypeVec (n + 1)} (f : TypeVec.Arrow α β) :

split off the prefix of an arrow

Equations
def TypeVec.lastFun {n : } {α : TypeVec (n + 1)} {β : TypeVec (n + 1)} (f : TypeVec.Arrow α β) :

split off the last function of an arrow

Equations
def TypeVec.nilFun {α : TypeVec 0} {β : TypeVec 0} :

arrow in the category of 0-length vectors

Equations
theorem TypeVec.eq_of_drop_last_eq {n : } {α : TypeVec (n + 1)} {β : TypeVec (n + 1)} {f : TypeVec.Arrow α β} {g : TypeVec.Arrow α β} (h₀ : TypeVec.dropFun f = TypeVec.dropFun g) (h₁ : TypeVec.lastFun f = TypeVec.lastFun g) :
f = g
@[simp]
theorem TypeVec.dropFun_splitFun {n : } {α : TypeVec (n + 1)} {α' : TypeVec (n + 1)} (f : TypeVec.Arrow (TypeVec.drop α) (TypeVec.drop α')) (g : TypeVec.last αTypeVec.last α') :
def TypeVec.Arrow.mp {n : } {α : TypeVec n} {β : TypeVec n} (h : α = β) :

turn an equality into an arrow

Equations
def TypeVec.Arrow.mpr {n : } {α : TypeVec n} {β : TypeVec n} (h : α = β) :

turn an equality into an arrow, with reverse direction

Equations

decompose a vector into its prefix appended with its last element

Equations

stitch two bits of a vector back together

Equations
@[simp]
theorem TypeVec.lastFun_splitFun {n : } {α : TypeVec (n + 1)} {α' : TypeVec (n + 1)} (f : TypeVec.Arrow (TypeVec.drop α) (TypeVec.drop α')) (g : TypeVec.last αTypeVec.last α') :
@[simp]
theorem TypeVec.dropFun_appendFun {n : } {α : TypeVec n} {α' : TypeVec n} {β : Type u_1} {β' : Type u_2} (f : TypeVec.Arrow α α') (g : ββ') :
@[simp]
theorem TypeVec.lastFun_appendFun {n : } {α : TypeVec n} {α' : TypeVec n} {β : Type u_1} {β' : Type u_2} (f : TypeVec.Arrow α α') (g : ββ') :
theorem TypeVec.splitFun_inj {n : } {α : TypeVec (n + 1)} {α' : TypeVec (n + 1)} {f : TypeVec.Arrow (TypeVec.drop α) (TypeVec.drop α')} {f' : TypeVec.Arrow (TypeVec.drop α) (TypeVec.drop α')} {g : TypeVec.last αTypeVec.last α'} {g' : TypeVec.last αTypeVec.last α'} (H : TypeVec.splitFun f g = TypeVec.splitFun f' g') :
f = f' g = g'
theorem TypeVec.appendFun_inj {n : } {α : TypeVec n} {α' : TypeVec n} {β : Type u_1} {β' : Type u_2} {f : TypeVec.Arrow α α'} {f' : TypeVec.Arrow α α'} {g : ββ'} {g' : ββ'} :
(f ::: g) = (f' ::: g')f = f' g = g'
theorem TypeVec.splitFun_comp {n : } {α₀ : TypeVec (n + 1)} {α₁ : TypeVec (n + 1)} {α₂ : TypeVec (n + 1)} (f₀ : TypeVec.Arrow (TypeVec.drop α₀) (TypeVec.drop α₁)) (f₁ : TypeVec.Arrow (TypeVec.drop α₁) (TypeVec.drop α₂)) (g₀ : TypeVec.last α₀TypeVec.last α₁) (g₁ : TypeVec.last α₁TypeVec.last α₂) :
TypeVec.splitFun (TypeVec.comp f₁ f₀) (g₁ g₀) = TypeVec.comp (TypeVec.splitFun f₁ g₁) (TypeVec.splitFun f₀ g₀)
theorem TypeVec.appendFun_comp_splitFun {n : } {α : TypeVec n} {γ : TypeVec n} {β : Type u_1} {δ : Type u_2} {ε : TypeVec (n + 1)} (f₀ : TypeVec.Arrow (TypeVec.drop ε) α) (f₁ : TypeVec.Arrow α γ) (g₀ : TypeVec.last εβ) (g₁ : βδ) :
TypeVec.comp (f₁ ::: g₁) (TypeVec.splitFun f₀ g₀) = TypeVec.splitFun (TypeVec.comp f₁ f₀) (g₁ g₀)
theorem TypeVec.appendFun_comp {n : } {α₀ : TypeVec n} {α₁ : TypeVec n} {α₂ : TypeVec n} {β₀ : Type u_1} {β₁ : Type u_2} {β₂ : Type u_3} (f₀ : TypeVec.Arrow α₀ α₁) (f₁ : TypeVec.Arrow α₁ α₂) (g₀ : β₀β₁) (g₁ : β₁β₂) :
(TypeVec.comp f₁ f₀ ::: g₁ g₀) = TypeVec.comp (f₁ ::: g₁) (f₀ ::: g₀)
theorem TypeVec.appendFun_comp' {n : } {α₀ : TypeVec n} {α₁ : TypeVec n} {α₂ : TypeVec n} {β₀ : Type u_1} {β₁ : Type u_2} {β₂ : Type u_3} (f₀ : TypeVec.Arrow α₀ α₁) (f₁ : TypeVec.Arrow α₁ α₂) (g₀ : β₀β₁) (g₁ : β₁β₂) :
TypeVec.comp (f₁ ::: g₁) (f₀ ::: g₀) = (TypeVec.comp f₁ f₀ ::: g₁ g₀)
theorem TypeVec.nilFun_comp {α₀ : TypeVec 0} (f₀ : TypeVec.Arrow α₀ Fin2.elim0) :
TypeVec.comp TypeVec.nilFun f₀ = f₀
theorem TypeVec.appendFun_comp_id {n : } {α : TypeVec n} {β₀ : Type u_1} {β₁ : Type u_1} {β₂ : Type u_1} (g₀ : β₀β₁) (g₁ : β₁β₂) :
(TypeVec.id ::: g₁ g₀) = TypeVec.comp (TypeVec.id ::: g₁) (TypeVec.id ::: g₀)
@[simp]
theorem TypeVec.dropFun_comp {n : } {α₀ : TypeVec (n + 1)} {α₁ : TypeVec (n + 1)} {α₂ : TypeVec (n + 1)} (f₀ : TypeVec.Arrow α₀ α₁) (f₁ : TypeVec.Arrow α₁ α₂) :
@[simp]
theorem TypeVec.lastFun_comp {n : } {α₀ : TypeVec (n + 1)} {α₁ : TypeVec (n + 1)} {α₂ : TypeVec (n + 1)} (f₀ : TypeVec.Arrow α₀ α₁) (f₁ : TypeVec.Arrow α₁ α₂) :
theorem TypeVec.appendFun_aux {n : } {α : TypeVec n} {α' : TypeVec n} {β : Type u_1} {β' : Type u_2} (f : TypeVec.Arrow (α ::: β) (α' ::: β')) :
theorem TypeVec.appendFun_id_id {n : } {α : TypeVec n} {β : Type u_1} :
(TypeVec.id ::: id) = TypeVec.id
def TypeVec.casesNil {β : TypeVec 0Sort u_2} (f : β Fin2.elim0) (v : TypeVec 0) :
β v

cases distinction for 0-length type vector

Equations
def TypeVec.casesCons (n : ) {β : TypeVec (n + 1)Sort u_2} (f : (t : Type u_1) → (v : TypeVec n) → β (v ::: t)) (v : TypeVec (n + 1)) :
β v

cases distinction for (n+1)-length type vector

Equations
theorem TypeVec.casesNil_append1 {β : TypeVec 0Sort u_2} (f : β Fin2.elim0) :
TypeVec.casesNil f Fin2.elim0 = f
theorem TypeVec.casesCons_append1 (n : ) {β : TypeVec (n + 1)Sort u_2} (f : (t : Type u_1) → (v : TypeVec n) → β (v ::: t)) (v : TypeVec n) (α : Type u_1) :
TypeVec.casesCons n f (v ::: α) = f α v
def TypeVec.typevecCasesNil₃ {β : (v : TypeVec 0) → (v' : TypeVec 0) → TypeVec.Arrow v v'Sort u_3} (f : β Fin2.elim0 Fin2.elim0 TypeVec.nilFun) (v : TypeVec 0) (v' : TypeVec 0) (fs : TypeVec.Arrow v v') :
β v v' fs

cases distinction for an arrow in the category of 0-length type vectors

Equations
def TypeVec.typevecCasesCons₃ (n : ) {β : (v : TypeVec (n + 1)) → (v' : TypeVec (n + 1)) → TypeVec.Arrow v v'Sort u_3} (F : (t : Type u_1) → (t' : Type u_2) → (f : tt') → (v : TypeVec n) → (v' : TypeVec n) → (fs : TypeVec.Arrow v v') → β (v ::: t) (v' ::: t') (fs ::: f)) (v : TypeVec (n + 1)) (v' : TypeVec (n + 1)) (fs : TypeVec.Arrow v v') :
β v v' fs

cases distinction for an arrow in the category of (n+1)-length type vectors

Equations
  • One or more equations did not get rendered due to their size.
def TypeVec.typevecCasesNil₂ {β : TypeVec.Arrow Fin2.elim0 Fin2.elim0Sort u_3} (f : β TypeVec.nilFun) (f : TypeVec.Arrow Fin2.elim0 Fin2.elim0) :
β f

specialized cases distinction for an arrow in the category of 0-length type vectors

Equations
def TypeVec.typevecCasesCons₂ (n : ) (t : Type u_1) (t' : Type u_2) (v : TypeVec n) (v' : TypeVec n) {β : TypeVec.Arrow (v ::: t) (v' ::: t')Sort u_3} (F : (f : tt') → (fs : TypeVec.Arrow v v') → β (fs ::: f)) (fs : TypeVec.Arrow (v ::: t) (v' ::: t')) :
β fs

specialized cases distinction for an arrow in the category of (n+1)-length type vectors

Equations
theorem TypeVec.typevecCasesNil₂_appendFun {β : TypeVec.Arrow Fin2.elim0 Fin2.elim0Sort u_3} (f : β TypeVec.nilFun) :
TypeVec.typevecCasesNil₂ f TypeVec.nilFun = f
theorem TypeVec.typevecCasesCons₂_appendFun (n : ) (t : Type u_1) (t' : Type u_2) (v : TypeVec n) (v' : TypeVec n) {β : TypeVec.Arrow (v ::: t) (v' ::: t')Sort u_3} (F : (f : tt') → (fs : TypeVec.Arrow v v') → β (fs ::: f)) (f : tt') (fs : TypeVec.Arrow v v') :
TypeVec.typevecCasesCons₂ n t t' v v' F (fs ::: f) = F f fs
def TypeVec.PredLast {n : } (α : TypeVec n) {β : Type u_1} (p : βProp) ⦃i : Fin2 (n + 1) :
(α ::: β) iProp

PredLast α p x predicates p of the last element of x : α.append1 β.

Equations
def TypeVec.RelLast {n : } (α : TypeVec n) {β : Type u_1} {γ : Type u_1} (r : βγProp) ⦃i : Fin2 (n + 1) :
(α ::: β) i(α ::: γ) iProp

RelLast α r x y says that p the last elements of x y : α.append1 β are related by r and all the other elements are equal.

Equations
def TypeVec.repeat (n : ) :
Type u_1 → TypeVec n

repeat n t is a n-length type vector that contains n occurences of t

Equations
def TypeVec.prod {n : } :
TypeVec nTypeVec nTypeVec n

prod α β is the pointwise product of the components of α and β

Equations

prod α β is the pointwise product of the components of α and β

Equations
def TypeVec.const {β : Type u_1} (x : β) {n : } (α : TypeVec n) :

const x α is an arrow that ignores its source and constructs a TypeVec that contains nothing but x

Equations

vector of equality on a product of vectors

Equations
theorem TypeVec.const_append1 {β : Type u_1} {γ : Type u_2} (x : γ) {n : } (α : TypeVec n) :
TypeVec.const x (α ::: β) = (TypeVec.const x α ::: fun x => x)
theorem TypeVec.eq_nilFun {α : TypeVec 0} {β : TypeVec 0} (f : TypeVec.Arrow α β) :
f = TypeVec.nilFun
theorem TypeVec.id_eq_nilFun {α : TypeVec 0} :
TypeVec.id = TypeVec.nilFun
theorem TypeVec.const_nil {β : Type u_1} (x : β) (α : TypeVec 0) :
TypeVec.const x α = TypeVec.nilFun
theorem TypeVec.repeat_eq_nil (α : TypeVec 0) :
TypeVec.repeatEq α = TypeVec.nilFun
def TypeVec.PredLast' {n : } (α : TypeVec n) {β : Type u_1} (p : βProp) :

predicate on a type vector to constrain only the last object

Equations
def TypeVec.RelLast' {n : } (α : TypeVec n) {β : Type u_1} (p : ββProp) :

predicate on the product of two type vectors to constrain only their last object

Equations
def TypeVec.Curry {n : } (F : TypeVec (n + 1)Type u_1) (α : Type u) (β : TypeVec n) :
Type u_1

given F : TypeVec.{u} (n+1) → Type u→ Type u, curry F : Type u → TypeVec.{u} → Type u→ TypeVec.{u} → Type u→ Type u, i.e. its first argument can be fed in separately from the rest of the vector of arguments

Equations
instance TypeVec.Curry.inhabited {n : } (F : TypeVec (n + 1)Type u_1) (α : Type u) (β : TypeVec n) [I : Inhabited (F (β ::: α))] :
Equations

arrow to remove one element of a repeat vector

Equations
def TypeVec.ofRepeat {α : Type u_1} {n : } {i : Fin2 n} :
TypeVec.repeat n α iα

projection for a repeat vector

Equations
  • TypeVec.ofRepeat = fun a => a
  • TypeVec.ofRepeat = TypeVec.ofRepeat
theorem TypeVec.const_iff_true {n : } {α : TypeVec n} {i : Fin2 n} {x : α i} {p : Prop} :
def TypeVec.prod.fst {n : } {α : TypeVec n} {β : TypeVec n} :

left projection of a prod vector

Equations
def TypeVec.prod.snd {n : } {α : TypeVec n} {β : TypeVec n} :

right projection of a prod vector

Equations
def TypeVec.prod.diag {n : } {α : TypeVec n} :

introduce a product where both components are the same

Equations
def TypeVec.prod.mk {n : } {α : TypeVec n} {β : TypeVec n} (i : Fin2 n) :
α iβ iTypeVec.prod α β i

constructor for prod

Equations
@[simp]
theorem TypeVec.prod_fst_mk {n : } {α : TypeVec n} {β : TypeVec n} (i : Fin2 n) (a : α i) (b : β i) :
@[simp]
theorem TypeVec.prod_snd_mk {n : } {α : TypeVec n} {β : TypeVec n} (i : Fin2 n) (a : α i) (b : β i) :
def TypeVec.prod.map {n : } {α : TypeVec n} {α' : TypeVec n} {β : TypeVec n} {β' : TypeVec n} :
TypeVec.Arrow α βTypeVec.Arrow α' β'TypeVec.Arrow (TypeVec.prod α α') (TypeVec.prod β β')

prod is functorial

Equations
theorem TypeVec.fst_prod_mk {n : } {α : TypeVec n} {α' : TypeVec n} {β : TypeVec n} {β' : TypeVec n} (f : TypeVec.Arrow α β) (g : TypeVec.Arrow α' β') :
TypeVec.comp TypeVec.prod.fst (TypeVec.prod.map f g) = TypeVec.comp f TypeVec.prod.fst
theorem TypeVec.snd_prod_mk {n : } {α : TypeVec n} {α' : TypeVec n} {β : TypeVec n} {β' : TypeVec n} (f : TypeVec.Arrow α β) (g : TypeVec.Arrow α' β') :
TypeVec.comp TypeVec.prod.snd (TypeVec.prod.map f g) = TypeVec.comp g TypeVec.prod.snd
theorem TypeVec.fst_diag {n : } {α : TypeVec n} :
TypeVec.comp TypeVec.prod.fst TypeVec.prod.diag = TypeVec.id
theorem TypeVec.snd_diag {n : } {α : TypeVec n} :
TypeVec.comp TypeVec.prod.snd TypeVec.prod.diag = TypeVec.id
theorem TypeVec.repeatEq_iff_eq {n : } {α : TypeVec n} {i : Fin2 n} {x : α i} {y : α i} :

given a predicate vector p over vector α, Subtype_ p is the type of vectors that contain an α that satisfies p

Equations
def TypeVec.toSubtype {n : } {α : TypeVec n} (p : TypeVec.Arrow α (TypeVec.repeat n Prop)) :
TypeVec.Arrow (fun i => { x // TypeVec.ofRepeat (p i x) }) (TypeVec.Subtype_ p)

arrow that rearranges the type of Subtype_ to turn a subtype of vector into a vector of subtypes

Equations
def TypeVec.ofSubtype {n : } {α : TypeVec n} (p : TypeVec.Arrow α (TypeVec.repeat n Prop)) :
TypeVec.Arrow (TypeVec.Subtype_ p) fun i => { x // TypeVec.ofRepeat (p i x) }

arrow that rearranges the type of Subtype_ to turn a vector of subtypes into a subtype of vector

Equations
def TypeVec.toSubtype' {n : } {α : TypeVec n} (p : TypeVec.Arrow (TypeVec.prod α α) (TypeVec.repeat n Prop)) :
TypeVec.Arrow (fun i => { x // TypeVec.ofRepeat (p i (TypeVec.prod.mk i x.fst x.snd)) }) (TypeVec.Subtype_ p)

similar to toSubtype adapted to relations (i.e. predicate on product)

Equations
def TypeVec.ofSubtype' {n : } {α : TypeVec n} (p : TypeVec.Arrow (TypeVec.prod α α) (TypeVec.repeat n Prop)) :
TypeVec.Arrow (TypeVec.Subtype_ p) fun i => { x // TypeVec.ofRepeat (p i (TypeVec.prod.mk i x.fst x.snd)) }

similar to of_subtype adapted to relations (i.e. predicate on product)

Equations

similar to diag but the target vector is a Subtype_ guaranteeing the equality of the components

Equations
theorem TypeVec.diag_sub_val {n : } {α : TypeVec n} :
TypeVec.comp (TypeVec.subtypeVal (TypeVec.repeatEq α)) TypeVec.diagSub = TypeVec.prod.diag
theorem TypeVec.prod_id {n : } {α : TypeVec n} {β : TypeVec n} :
TypeVec.prod.map TypeVec.id TypeVec.id = TypeVec.id
theorem TypeVec.append_prod_appendFun {n : } {α : TypeVec n} {α' : TypeVec n} {β : TypeVec n} {β' : TypeVec n} {φ : Type u} {φ' : Type u} {ψ : Type u} {ψ' : Type u} {f₀ : TypeVec.Arrow α α'} {g₀ : TypeVec.Arrow β β'} {f₁ : φφ'} {g₁ : ψψ'} :
(TypeVec.prod.map f₀ g₀ ::: Prod.map f₁ g₁) = TypeVec.prod.map (f₀ ::: f₁) (g₀ ::: g₁)
@[simp]
theorem TypeVec.dropFun_diag {n : } {α : TypeVec (n + 1)} :
TypeVec.dropFun TypeVec.prod.diag = TypeVec.prod.diag
@[simp]
theorem TypeVec.lastFun_subtypeVal {n : } {α : TypeVec (n + 1)} (p : TypeVec.Arrow α (TypeVec.repeat (n + 1) Prop)) :
@[simp]
theorem TypeVec.dropFun_RelLast' {n : } {α : TypeVec n} {β : Type u_1} (R : ββProp) :
@[simp]
theorem TypeVec.dropFun_prod {n : } {α : TypeVec (n + 1)} {α' : TypeVec (n + 1)} {β : TypeVec (n + 1)} {β' : TypeVec (n + 1)} (f : TypeVec.Arrow α β) (f' : TypeVec.Arrow α' β') :
@[simp]
theorem TypeVec.lastFun_prod {n : } {α : TypeVec (n + 1)} {α' : TypeVec (n + 1)} {β : TypeVec (n + 1)} {β' : TypeVec (n + 1)} (f : TypeVec.Arrow α β) (f' : TypeVec.Arrow α' β') :
@[simp]
theorem TypeVec.dropFun_from_append1_drop_last {n : } {α : TypeVec (n + 1)} :
TypeVec.dropFun TypeVec.fromAppend1DropLast = TypeVec.id
@[simp]
theorem TypeVec.lastFun_from_append1_drop_last {n : } {α : TypeVec (n + 1)} :
TypeVec.lastFun TypeVec.fromAppend1DropLast = id
@[simp]
theorem TypeVec.dropFun_id {n : } {α : TypeVec (n + 1)} :
TypeVec.dropFun TypeVec.id = TypeVec.id
@[simp]
theorem TypeVec.prod_map_id {n : } {α : TypeVec n} {β : TypeVec n} :
TypeVec.prod.map TypeVec.id TypeVec.id = TypeVec.id
@[simp]
theorem TypeVec.subtypeVal_diagSub {n : } {α : TypeVec n} :
TypeVec.comp (TypeVec.subtypeVal (TypeVec.repeatEq α)) TypeVec.diagSub = TypeVec.prod.diag