The areas / V33. Data structures and computation
Mathlib.Data.TypeVec
142 declarations. Mathlib docs · Source
theorem TypeVec.repeatEq.match_1.congr_eq_1 E1 #
∀ (motive : (x : ℕ) → TypeVec.{u_1} x → Sort u_2) (x : ℕ) (x_1 : TypeVec.{u_1} x)
(h_1 : (x : TypeVec.{u_1} 0) → motive 0 x) (h_2 : (n : ℕ) → (α : TypeVec.{u_1} n.succ) → motive n.succ α)
(x_2 : TypeVec.{u_1} 0),
x = 0 →
x_1 ≍ x_2 →
(match x, x_1 with
| 0, x => h_1 x
| n.succ, α => h_2 n α) ≍
h_1 x_2
theorem TypeVec.toSubtype'.match_1.congr_eq_1 E1 #
∀
(motive :
(n : ℕ) →
(α : TypeVec.{u_1} n) →
(p : (α.prod α).Arrow (TypeVec.repeat n Prop)) →
(x : Fin2 n) → { x_1 // TypeVec.ofRepeat (p x (TypeVec.prod.mk x x_1.1 x_1.2)) } → Sort u_2)
(n : ℕ) (α : TypeVec.{u_1} n) (p : (α.prod α).Arrow (TypeVec.repeat n Prop)) (x : Fin2 n)
(x_1 : { x_1 // TypeVec.ofRepeat (p x (TypeVec.prod.mk x x_1.1 x_1.2)) })
(h_1 :
(n : ℕ) →
(α : TypeVec.{u_1} (n + 1)) →
(p : (α.prod α).Arrow (TypeVec.repeat (n + 1) Prop)) →
(i : Fin2 n) →
(x : { x // TypeVec.ofRepeat (p i.fs (TypeVec.prod.mk i.fs x.1 x.2)) }) → motive (n + 1) α p i.fs x)
(h_2 :
(n : ℕ) →
(α : TypeVec.{u_1} (n + 1)) →
(p : (α.prod α).Arrow (TypeVec.repeat (n + 1) Prop)) →
(x : { x // TypeVec.ofRepeat (p Fin2.fz (TypeVec.prod.mk Fin2.fz x.1 x.2)) }) → motive (n + 1) α p Fin2.fz x)
(n_1 : ℕ) (α_1 : TypeVec.{u_1} (n_1 + 1)) (p_1 : (α_1.prod α_1).Arrow (TypeVec.repeat (n_1 + 1) Prop)) (i : Fin2 n_1)
(x_2 : { x // TypeVec.ofRepeat (p_1 i.fs (TypeVec.prod.mk i.fs x.1 x.2)) }),
n = n_1 + 1 →
α ≍ α_1 →
p ≍ p_1 →
x ≍ i.fs →
x_1 ≍ x_2 →
(match n, α, p, x, x_1 with
| .(n + 1), α, p, i.fs, x => h_1 n α p i x
| .(n + 1), α, p, Fin2.fz, x => h_2 n α p x) ≍
h_1 n_1 α_1 p_1 i x_2
theorem TypeVec.ofSubtype.match_1.congr_eq_2 E1 #
∀
(motive :
(n : ℕ) →
(α : TypeVec.{u_1} n) → (p : α.Arrow (TypeVec.repeat n Prop)) → (x : Fin2 n) → TypeVec.Subtype_ p x → Sort u_2)
(n : ℕ) (α : TypeVec.{u_1} n) (p : α.Arrow (TypeVec.repeat n Prop)) (x : Fin2 n) (x_1 : TypeVec.Subtype_ p x)
(h_1 :
(n : ℕ) →
(α : TypeVec.{u_1} (n + 1)) →
(p : α.Arrow (TypeVec.repeat (n + 1) Prop)) →
(i : Fin2 n) → (x : TypeVec.Subtype_ p i.fs) → motive (n + 1) α p i.fs x)
(h_2 :
(n : ℕ) →
(α : TypeVec.{u_1} (n + 1)) →
(p : α.Arrow (TypeVec.repeat (n + 1) Prop)) → (x : TypeVec.Subtype_ p Fin2.fz) → motive (n + 1) α p Fin2.fz x)
(n_1 : ℕ) (α_1 : TypeVec.{u_1} (n_1 + 1)) (p_1 : α_1.Arrow (TypeVec.repeat (n_1 + 1) Prop))
(x_2 : TypeVec.Subtype_ p_1 Fin2.fz),
n = n_1 + 1 →
α ≍ α_1 →
p ≍ p_1 →
x ≍ Fin2.fz →
x_1 ≍ x_2 →
(match n, α, p, x, x_1 with
| .(n + 1), α, p, i.fs, x => h_1 n α p i x
| .(n + 1), α, p, Fin2.fz, x => h_2 n α p x) ≍
h_2 n_1 α_1 p_1 x_2
theorem TypeVec.subtypeVal.match_1.congr_eq_1 E1 #
∀ (motive : (x : ℕ) → (x_1 : TypeVec.{u_1} x) → x_1.Arrow (TypeVec.repeat x Prop) → Fin2 x → Sort u_2) (x : ℕ)
(x_1 : TypeVec.{u_1} x) (x_2 : x_1.Arrow (TypeVec.repeat x Prop)) (x_3 : Fin2 x)
(h_1 :
(n : ℕ) →
(x : TypeVec.{u_1} n.succ) →
(x_4 : x.Arrow (TypeVec.repeat n.succ Prop)) → (i : Fin2 n) → motive n.succ x x_4 i.fs)
(h_2 :
(n : ℕ) → (x : TypeVec.{u_1} n.succ) → (x_4 : x.Arrow (TypeVec.repeat n.succ Prop)) → motive n.succ x x_4 Fin2.fz)
(n : ℕ) (x_4 : TypeVec.{u_1} n.succ) (x_5 : x_4.Arrow (TypeVec.repeat n.succ Prop)) (i : Fin2 n),
x = n.succ →
x_1 ≍ x_4 →
x_2 ≍ x_5 →
x_3 ≍ i.fs →
(match x, x_1, x_2, x_3 with
| n.succ, x, x_6, i.fs => h_1 n x x_6 i
| n.succ, x, x_6, Fin2.fz => h_2 n x x_6) ≍
h_1 n x_4 x_5 i
theorem TypeVec.diagSub.match_1.congr_eq_2 E1 #
∀ (motive : (n : ℕ) → (α : TypeVec.{u_1} n) → (x : Fin2 n) → α x → Sort u_2) (n : ℕ) (α : TypeVec.{u_1} n) (x : Fin2 n)
(x_1 : α x) (h_1 : (n : ℕ) → (α : TypeVec.{u_1} (n + 1)) → (a : Fin2 n) → (x : α a.fs) → motive (n + 1) α a.fs x)
(h_2 : (n : ℕ) → (α : TypeVec.{u_1} (n + 1)) → (x : α Fin2.fz) → motive (n + 1) α Fin2.fz x) (n_1 : ℕ)
(α_1 : TypeVec.{u_1} (n_1 + 1)) (x_2 : α_1 Fin2.fz),
n = n_1 + 1 →
α ≍ α_1 →
x ≍ Fin2.fz →
x_1 ≍ x_2 →
(match n, α, x, x_1 with
| .(n + 1), α, a.fs, x => h_1 n α a x
| .(n + 1), α, Fin2.fz, x => h_2 n α x) ≍
h_2 n_1 α_1 x_2
theorem TypeVec.diagSub.match_1.congr_eq_1 E1 #
∀ (motive : (n : ℕ) → (α : TypeVec.{u_1} n) → (x : Fin2 n) → α x → Sort u_2) (n : ℕ) (α : TypeVec.{u_1} n) (x : Fin2 n)
(x_1 : α x) (h_1 : (n : ℕ) → (α : TypeVec.{u_1} (n + 1)) → (a : Fin2 n) → (x : α a.fs) → motive (n + 1) α a.fs x)
(h_2 : (n : ℕ) → (α : TypeVec.{u_1} (n + 1)) → (x : α Fin2.fz) → motive (n + 1) α Fin2.fz x) (n_1 : ℕ)
(α_1 : TypeVec.{u_1} (n_1 + 1)) (a : Fin2 n_1) (x_2 : α_1 a.fs),
n = n_1 + 1 →
α ≍ α_1 →
x ≍ a.fs →
x_1 ≍ x_2 →
(match n, α, x, x_1 with
| .(n + 1), α, a.fs, x => h_1 n α a x
| .(n + 1), α, Fin2.fz, x => h_2 n α x) ≍
h_1 n_1 α_1 a x_2
theorem TypeVec.toSubtype'.match_1.congr_eq_2 E1 #
∀
(motive :
(n : ℕ) →
(α : TypeVec.{u_1} n) →
(p : (α.prod α).Arrow (TypeVec.repeat n Prop)) →
(x : Fin2 n) → { x_1 // TypeVec.ofRepeat (p x (TypeVec.prod.mk x x_1.1 x_1.2)) } → Sort u_2)
(n : ℕ) (α : TypeVec.{u_1} n) (p : (α.prod α).Arrow (TypeVec.repeat n Prop)) (x : Fin2 n)
(x_1 : { x_1 // TypeVec.ofRepeat (p x (TypeVec.prod.mk x x_1.1 x_1.2)) })
(h_1 :
(n : ℕ) →
(α : TypeVec.{u_1} (n + 1)) →
(p : (α.prod α).Arrow (TypeVec.repeat (n + 1) Prop)) →
(i : Fin2 n) →
(x : { x // TypeVec.ofRepeat (p i.fs (TypeVec.prod.mk i.fs x.1 x.2)) }) → motive (n + 1) α p i.fs x)
(h_2 :
(n : ℕ) →
(α : TypeVec.{u_1} (n + 1)) →
(p : (α.prod α).Arrow (TypeVec.repeat (n + 1) Prop)) →
(x : { x // TypeVec.ofRepeat (p Fin2.fz (TypeVec.prod.mk Fin2.fz x.1 x.2)) }) → motive (n + 1) α p Fin2.fz x)
(n_1 : ℕ) (α_1 : TypeVec.{u_1} (n_1 + 1)) (p_1 : (α_1.prod α_1).Arrow (TypeVec.repeat (n_1 + 1) Prop))
(x_2 : { x // TypeVec.ofRepeat (p_1 Fin2.fz (TypeVec.prod.mk Fin2.fz x.1 x.2)) }),
n = n_1 + 1 →
α ≍ α_1 →
p ≍ p_1 →
x ≍ Fin2.fz →
x_1 ≍ x_2 →
(match n, α, p, x, x_1 with
| .(n + 1), α, p, i.fs, x => h_1 n α p i x
| .(n + 1), α, p, Fin2.fz, x => h_2 n α p x) ≍
h_2 n_1 α_1 p_1 x_2
theorem TypeVec.const.match_1.congr_eq_2 E1 #
∀ (motive : (x : ℕ) → TypeVec.{u_1} x → Fin2 x → Sort u_2) (x : ℕ) (x_1 : TypeVec.{u_1} x) (x_2 : Fin2 x)
(h_1 : (n : ℕ) → (α : TypeVec.{u_1} n.succ) → (a : Fin2 n) → motive n.succ α a.fs)
(h_2 : (n : ℕ) → (x : TypeVec.{u_1} n.succ) → motive n.succ x Fin2.fz) (n : ℕ) (x_3 : TypeVec.{u_1} n.succ),
x = n.succ →
x_1 ≍ x_3 →
x_2 ≍ Fin2.fz →
(match x, x_1, x_2 with
| n.succ, α, a.fs => h_1 n α a
| n.succ, x, Fin2.fz => h_2 n x) ≍
h_2 n x_3
theorem TypeVec.toSubtype.match_1.congr_eq_1 E1 #
∀
(motive :
(x : ℕ) →
(x_1 : TypeVec.{u_1} x) →
(x_2 : x_1.Arrow (TypeVec.repeat x Prop)) →
(x_3 : Fin2 x) → { x_4 // TypeVec.ofRepeat (x_2 x_3 x_4) } → Sort u_2)
(x : ℕ) (x_1 : TypeVec.{u_1} x) (x_2 : x_1.Arrow (TypeVec.repeat x Prop)) (x_3 : Fin2 x)
(x_4 : { x_4 // TypeVec.ofRepeat (x_2 x_3 x_4) })
(h_1 :
(n : ℕ) →
(x : TypeVec.{u_1} n.succ) →
(p : x.Arrow (TypeVec.repeat n.succ Prop)) →
(i : Fin2 n) → (x_5 : { x // TypeVec.ofRepeat (p i.fs x) }) → motive n.succ x p i.fs x_5)
(h_2 :
(n : ℕ) →
(x : TypeVec.{u_1} n.succ) →
(x_5 : x.Arrow (TypeVec.repeat n.succ Prop)) →
(x_6 : { x // TypeVec.ofRepeat (x_5 Fin2.fz x) }) → motive n.succ x x_5 Fin2.fz x_6)
(n : ℕ) (x_5 : TypeVec.{u_1} n.succ) (p : x_5.Arrow (TypeVec.repeat n.succ Prop)) (i : Fin2 n)
(x_6 : { x // TypeVec.ofRepeat (p i.fs x) }),
x = n.succ →
x_1 ≍ x_5 →
x_2 ≍ p →
x_3 ≍ i.fs →
x_4 ≍ x_6 →
(match x, x_1, x_2, x_3, x_4 with
| n.succ, x, p, i.fs, x_7 => h_1 n x p i x_7
| n.succ, x, x_7, Fin2.fz, x_8 => h_2 n x x_7 x_8) ≍
h_1 n x_5 p i x_6
theorem TypeVec.prod.fst.match_1.congr_eq_2 E1 #
∀ (motive : (x : ℕ) → TypeVec.{u_1} x → TypeVec.{u_1} x → Fin2 x → Sort u_2) (x : ℕ) (x_1 x_2 : TypeVec.{u_1} x)
(x_3 : Fin2 x) (h_1 : (n : ℕ) → (α β : TypeVec.{u_1} n.succ) → (i : Fin2 n) → motive n.succ α β i.fs)
(h_2 : (n : ℕ) → (x x_4 : TypeVec.{u_1} n.succ) → motive n.succ x x_4 Fin2.fz) (n : ℕ)
(x_4 x_5 : TypeVec.{u_1} n.succ),
x = n.succ →
x_1 ≍ x_4 →
x_2 ≍ x_5 →
x_3 ≍ Fin2.fz →
(match x, x_1, x_2, x_3 with
| n.succ, α, β, i.fs => h_1 n α β i
| n.succ, x, x_6, Fin2.fz => h_2 n x x_6) ≍
h_2 n x_4 x_5
theorem TypeVec.prod.diag.match_1.congr_eq_2 E1 #
∀ (motive : (x : ℕ) → (x_1 : TypeVec.{u_1} x) → (x : Fin2 x) → x_1 x → Sort u_2) (x : ℕ) (x_1 : TypeVec.{u_1} x)
(x_2 : Fin2 x) (x_3 : x_1 x_2)
(h_1 : (n : ℕ) → (α : TypeVec.{u_1} n.succ) → (a : Fin2 n) → (x : α a.fs) → motive n.succ α a.fs x)
(h_2 : (n : ℕ) → (x : TypeVec.{u_1} n.succ) → (x_4 : x Fin2.fz) → motive n.succ x Fin2.fz x_4) (n : ℕ)
(x_4 : TypeVec.{u_1} n.succ) (x_5 : x_4 Fin2.fz),
x = n.succ →
x_1 ≍ x_4 →
x_2 ≍ Fin2.fz →
x_3 ≍ x_5 →
(match x, x_1, x_2, x_3 with
| n.succ, α, a.fs, x => h_1 n α a x
| n.succ, x, Fin2.fz, x_6 => h_2 n x x_6) ≍
h_2 n x_4 x_5
theorem TypeVec.toSubtype.match_1.congr_eq_2 E1 #
∀
(motive :
(x : ℕ) →
(x_1 : TypeVec.{u_1} x) →
(x_2 : x_1.Arrow (TypeVec.repeat x Prop)) →
(x_3 : Fin2 x) → { x_4 // TypeVec.ofRepeat (x_2 x_3 x_4) } → Sort u_2)
(x : ℕ) (x_1 : TypeVec.{u_1} x) (x_2 : x_1.Arrow (TypeVec.repeat x Prop)) (x_3 : Fin2 x)
(x_4 : { x_4 // TypeVec.ofRepeat (x_2 x_3 x_4) })
(h_1 :
(n : ℕ) →
(x : TypeVec.{u_1} n.succ) →
(p : x.Arrow (TypeVec.repeat n.succ Prop)) →
(i : Fin2 n) → (x_5 : { x // TypeVec.ofRepeat (p i.fs x) }) → motive n.succ x p i.fs x_5)
(h_2 :
(n : ℕ) →
(x : TypeVec.{u_1} n.succ) →
(x_5 : x.Arrow (TypeVec.repeat n.succ Prop)) →
(x_6 : { x // TypeVec.ofRepeat (x_5 Fin2.fz x) }) → motive n.succ x x_5 Fin2.fz x_6)
(n : ℕ) (x_5 : TypeVec.{u_1} n.succ) (x_6 : x_5.Arrow (TypeVec.repeat n.succ Prop))
(x_7 : { x // TypeVec.ofRepeat (x_6 Fin2.fz x) }),
x = n.succ →
x_1 ≍ x_5 →
x_2 ≍ x_6 →
x_3 ≍ Fin2.fz →
x_4 ≍ x_7 →
(match x, x_1, x_2, x_3, x_4 with
| n.succ, x, p, i.fs, x_8 => h_1 n x p i x_8
| n.succ, x, x_8, Fin2.fz, x_9 => h_2 n x x_8 x_9) ≍
h_2 n x_5 x_6 x_7
theorem TypeVec.prod.fst.match_1.congr_eq_1 E1 #
∀ (motive : (x : ℕ) → TypeVec.{u_1} x → TypeVec.{u_1} x → Fin2 x → Sort u_2) (x : ℕ) (x_1 x_2 : TypeVec.{u_1} x)
(x_3 : Fin2 x) (h_1 : (n : ℕ) → (α β : TypeVec.{u_1} n.succ) → (i : Fin2 n) → motive n.succ α β i.fs)
(h_2 : (n : ℕ) → (x x_4 : TypeVec.{u_1} n.succ) → motive n.succ x x_4 Fin2.fz) (n : ℕ) (α β : TypeVec.{u_1} n.succ)
(i : Fin2 n),
x = n.succ →
x_1 ≍ α →
x_2 ≍ β →
x_3 ≍ i.fs →
(match x, x_1, x_2, x_3 with
| n.succ, α, β, i.fs => h_1 n α β i
| n.succ, x, x_4, Fin2.fz => h_2 n x x_4) ≍
h_1 n α β i
theorem TypeVec.const.match_1.congr_eq_1 E1 #
∀ (motive : (x : ℕ) → TypeVec.{u_1} x → Fin2 x → Sort u_2) (x : ℕ) (x_1 : TypeVec.{u_1} x) (x_2 : Fin2 x)
(h_1 : (n : ℕ) → (α : TypeVec.{u_1} n.succ) → (a : Fin2 n) → motive n.succ α a.fs)
(h_2 : (n : ℕ) → (x : TypeVec.{u_1} n.succ) → motive n.succ x Fin2.fz) (n : ℕ) (α : TypeVec.{u_1} n.succ)
(a : Fin2 n),
x = n.succ →
x_1 ≍ α →
x_2 ≍ a.fs →
(match x, x_1, x_2 with
| n.succ, α, a.fs => h_1 n α a
| n.succ, x, Fin2.fz => h_2 n x) ≍
h_1 n α a
theorem TypeVec.ofSubtype.match_1.congr_eq_1 E1 #
∀
(motive :
(n : ℕ) →
(α : TypeVec.{u_1} n) → (p : α.Arrow (TypeVec.repeat n Prop)) → (x : Fin2 n) → TypeVec.Subtype_ p x → Sort u_2)
(n : ℕ) (α : TypeVec.{u_1} n) (p : α.Arrow (TypeVec.repeat n Prop)) (x : Fin2 n) (x_1 : TypeVec.Subtype_ p x)
(h_1 :
(n : ℕ) →
(α : TypeVec.{u_1} (n + 1)) →
(p : α.Arrow (TypeVec.repeat (n + 1) Prop)) →
(i : Fin2 n) → (x : TypeVec.Subtype_ p i.fs) → motive (n + 1) α p i.fs x)
(h_2 :
(n : ℕ) →
(α : TypeVec.{u_1} (n + 1)) →
(p : α.Arrow (TypeVec.repeat (n + 1) Prop)) → (x : TypeVec.Subtype_ p Fin2.fz) → motive (n + 1) α p Fin2.fz x)
(n_1 : ℕ) (α_1 : TypeVec.{u_1} (n_1 + 1)) (p_1 : α_1.Arrow (TypeVec.repeat (n_1 + 1) Prop)) (i : Fin2 n_1)
(x_2 : TypeVec.Subtype_ p_1 i.fs),
n = n_1 + 1 →
α ≍ α_1 →
p ≍ p_1 →
x ≍ i.fs →
x_1 ≍ x_2 →
(match n, α, p, x, x_1 with
| .(n + 1), α, p, i.fs, x => h_1 n α p i x
| .(n + 1), α, p, Fin2.fz, x => h_2 n α p x) ≍
h_1 n_1 α_1 p_1 i x_2
theorem TypeVec.repeatEq.match_1.congr_eq_2 E1 #
∀ (motive : (x : ℕ) → TypeVec.{u_1} x → Sort u_2) (x : ℕ) (x_1 : TypeVec.{u_1} x)
(h_1 : (x : TypeVec.{u_1} 0) → motive 0 x) (h_2 : (n : ℕ) → (α : TypeVec.{u_1} n.succ) → motive n.succ α) (n : ℕ)
(α : TypeVec.{u_1} n.succ),
x = n.succ →
x_1 ≍ α →
(match x, x_1 with
| 0, x => h_1 x
| n.succ, α => h_2 n α) ≍
h_2 n α
theorem TypeVec.prod.diag.match_1.congr_eq_1 E1 #
∀ (motive : (x : ℕ) → (x_1 : TypeVec.{u_1} x) → (x : Fin2 x) → x_1 x → Sort u_2) (x : ℕ) (x_1 : TypeVec.{u_1} x)
(x_2 : Fin2 x) (x_3 : x_1 x_2)
(h_1 : (n : ℕ) → (α : TypeVec.{u_1} n.succ) → (a : Fin2 n) → (x : α a.fs) → motive n.succ α a.fs x)
(h_2 : (n : ℕ) → (x : TypeVec.{u_1} n.succ) → (x_4 : x Fin2.fz) → motive n.succ x Fin2.fz x_4) (n : ℕ)
(α : TypeVec.{u_1} n.succ) (a : Fin2 n) (x_4 : α a.fs),
x = n.succ →
x_1 ≍ α →
x_2 ≍ a.fs →
x_3 ≍ x_4 →
(match x, x_1, x_2, x_3 with
| n.succ, α, a.fs, x => h_1 n α a x
| n.succ, x, Fin2.fz, x_5 => h_2 n x x_5) ≍
h_1 n α a x_4
theorem TypeVec.subtypeVal.match_1.congr_eq_2 E1 #
∀ (motive : (x : ℕ) → (x_1 : TypeVec.{u_1} x) → x_1.Arrow (TypeVec.repeat x Prop) → Fin2 x → Sort u_2) (x : ℕ)
(x_1 : TypeVec.{u_1} x) (x_2 : x_1.Arrow (TypeVec.repeat x Prop)) (x_3 : Fin2 x)
(h_1 :
(n : ℕ) →
(x : TypeVec.{u_1} n.succ) →
(x_4 : x.Arrow (TypeVec.repeat n.succ Prop)) → (i : Fin2 n) → motive n.succ x x_4 i.fs)
(h_2 :
(n : ℕ) → (x : TypeVec.{u_1} n.succ) → (x_4 : x.Arrow (TypeVec.repeat n.succ Prop)) → motive n.succ x x_4 Fin2.fz)
(n : ℕ) (x_4 : TypeVec.{u_1} n.succ) (x_5 : x_4.Arrow (TypeVec.repeat n.succ Prop)),
x = n.succ →
x_1 ≍ x_4 →
x_2 ≍ x_5 →
x_3 ≍ Fin2.fz →
(match x, x_1, x_2, x_3 with
| n.succ, x, x_6, i.fs => h_1 n x x_6 i
| n.succ, x, x_6, Fin2.fz => h_2 n x x_6) ≍
h_2 n x_4 x_5
def TypeVec E1 #
ℕ → Type (u_1 + 1)
n-tuples of types, as a category
instance instInhabitedTypeVec E0 #
{n : ℕ} → Inhabited (TypeVec.{u} n)
def TypeVec.Arrow E1 #
{n : ℕ} → TypeVec.{u} n → TypeVec.{v} n → Type (max u v)
arrow in the category of TypeVec
def MvFunctor.«term_⟹_» E1 #
Lean.TrailingParserDescr
arrow in the category of TypeVec
theorem TypeVec.Arrow.ext E1 #
∀ {n : ℕ} {α : TypeVec.{u} n} {β : TypeVec.{v} n} (f g : α.Arrow β), (∀ (i : Fin2 n), f i = g i) → f = g
Extensionality for arrows
theorem TypeVec.Arrow.ext_iff E0 #
∀ {n : ℕ} {α : TypeVec.{u} n} {β : TypeVec.{v} n} {f g : α.Arrow β}, f = g ↔ ∀ (i : Fin2 n), f i = g i
instance TypeVec.Arrow.inhabited E0 #
{n : ℕ} → (α : TypeVec.{u_1} n) → (β : TypeVec.{u_2} n) → [(i : Fin2 n) → Inhabited (β i)] → Inhabited (α.Arrow β)
def TypeVec.id E1 #
{n : ℕ} → {α : TypeVec.{u_1} n} → α.Arrow α
identity of arrow composition
def TypeVec.comp E1 #
{n : ℕ} → {α : TypeVec.{u} n} → {β : TypeVec.{v} n} → {γ : TypeVec.{w} n} → β.Arrow γ → α.Arrow β → α.Arrow γ
arrow composition in the category of TypeVec
def MvFunctor.«term_⊚_» E1 #
Lean.TrailingParserDescr
arrow composition in the category of TypeVec
theorem TypeVec.id_comp E0 #
∀ {n : ℕ} {α : TypeVec.{u} n} {β : TypeVec.{v} n} (f : α.Arrow β), TypeVec.comp TypeVec.id f = f
theorem TypeVec.comp_id E0 #
∀ {n : ℕ} {α : TypeVec.{u} n} {β : TypeVec.{v} n} (f : α.Arrow β), TypeVec.comp f TypeVec.id = f
theorem TypeVec.comp_assoc E1 #
∀ {n : ℕ} {α : TypeVec.{u} n} {β : TypeVec.{v} n} {γ : TypeVec.{w} n} {δ : TypeVec.{x} n} (h : γ.Arrow δ)
(g : β.Arrow γ) (f : α.Arrow β), TypeVec.comp (TypeVec.comp h g) f = TypeVec.comp h (TypeVec.comp g f)
def TypeVec.append1 E1 #
{n : ℕ} → TypeVec.{u_1} n → Type u_1 → TypeVec.{u_1} (n + 1)
Support for extending a TypeVec by one element.
def TypeVec.«term_:::_» E1 #
Lean.TrailingParserDescr
Support for extending a TypeVec by one element.
def TypeVec.drop E1 #
{n : ℕ} → TypeVec.{u} (n + 1) → TypeVec.{u} n
retain only a n-length prefix of the argument
def TypeVec.last E1 #
{n : ℕ} → TypeVec.{u} (n + 1) → Type u
take the last value of a (n+1)-length vector
instance TypeVec.last.inhabited E0 #
{n : ℕ} → (α : TypeVec.{u_1} (n + 1)) → [Inhabited (α Fin2.fz)] → Inhabited α.last
theorem TypeVec.drop_append1 E1 #
∀ {n : ℕ} {α : TypeVec.{u_1} n} {β : Type u_1} {i : Fin2 n}, (α ::: β).drop i = α i
theorem TypeVec.drop_append1' E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} n} {β : Type u_1}, (α ::: β).drop = α
theorem TypeVec.last_append1 E1 #
∀ {n : ℕ} {α : TypeVec.{u_1} n} {β : Type u_1}, (α ::: β).last = β
theorem TypeVec.append1_drop_last E0 #
∀ {n : ℕ} (α : TypeVec.{u_1} (n + 1)), α.drop ::: α.last = α
def TypeVec.append1Cases E1 #
{n : ℕ} →
{C : TypeVec.{u_1} (n + 1) → Sort u} →
((α : TypeVec.{u_1} n) → (β : Type u_1) → C (α ::: β)) → (γ : TypeVec.{u_1} (n + 1)) → C γ
cases on (n+1)-length vectors
theorem TypeVec.append1_cases_append1 E0 #
∀ {n : ℕ} {C : TypeVec.{u_1} (n + 1) → Sort u} (H : (α : TypeVec.{u_1} n) → (β : Type u_1) → C (α ::: β))
(α : TypeVec.{u_1} n) (β : Type u_1), TypeVec.append1Cases H (α ::: β) = H α β
def TypeVec.splitFun E1 #
{n : ℕ} →
{α : TypeVec.{u_1} (n + 1)} → {α' : TypeVec.{u_2} (n + 1)} → α.drop.Arrow α'.drop → (α.last → α'.last) → α.Arrow α'
append an arrow and a function for arbitrary source and target type vectors
def TypeVec.appendFun E1 #
{n : ℕ} →
{α : TypeVec.{u_1} n} →
{α' : TypeVec.{u_2} n} → {β : Type u_1} → {β' : Type u_2} → α.Arrow α' → (β → β') → (α ::: β).Arrow (α' ::: β')
Append an arrow and a function as well as their respective source and target types / type vectors.
def TypeVec.«term_:::__1» E1 #
Lean.TrailingParserDescr
Append an arrow and a function as well as their respective source and target types / type vectors.
def TypeVec.dropFun E1 #
{n : ℕ} → {α : TypeVec.{u_1} (n + 1)} → {β : TypeVec.{u_2} (n + 1)} → α.Arrow β → α.drop.Arrow β.drop
split off the prefix of an arrow
def TypeVec.lastFun E1 #
{n : ℕ} → {α : TypeVec.{u_1} (n + 1)} → {β : TypeVec.{u_2} (n + 1)} → α.Arrow β → α.last → β.last
split off the last function of an arrow
def TypeVec.nilFun E1 #
{α : TypeVec.{u_1} 0} → {β : TypeVec.{u_2} 0} → α.Arrow β
arrow in the category of 0-length vectors
theorem TypeVec.dropFun_splitFun E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} (n + 1)} {α' : TypeVec.{u_2} (n + 1)} (f : α.drop.Arrow α'.drop) (g : α.last → α'.last),
TypeVec.dropFun (TypeVec.splitFun f g) = f
def TypeVec.Arrow.mp E1 #
{n : ℕ} → {α β : TypeVec.{u_1} n} → α = β → α.Arrow β
turn an equality into an arrow
def TypeVec.Arrow.mpr E1 #
{n : ℕ} → {α β : TypeVec.{u_1} n} → α = β → β.Arrow α
turn an equality into an arrow, with reverse direction
def TypeVec.toAppend1DropLast E1 #
{n : ℕ} → {α : TypeVec.{u_1} (n + 1)} → α.Arrow (α.drop ::: α.last)
decompose a vector into its prefix appended with its last element
def TypeVec.fromAppend1DropLast E1 #
{n : ℕ} → {α : TypeVec.{u_1} (n + 1)} → (α.drop ::: α.last).Arrow α
stitch two bits of a vector back together
theorem TypeVec.lastFun_splitFun E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} (n + 1)} {α' : TypeVec.{u_2} (n + 1)} (f : α.drop.Arrow α'.drop) (g : α.last → α'.last),
TypeVec.lastFun (TypeVec.splitFun f g) = g
theorem TypeVec.dropFun_appendFun E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} n} {α' : TypeVec.{u_2} n} {β : Type u_1} {β' : Type u_2} (f : α.Arrow α') (g : β → β'),
TypeVec.dropFun (f ::: g) = f
theorem TypeVec.lastFun_appendFun E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} n} {α' : TypeVec.{u_2} n} {β : Type u_1} {β' : Type u_2} (f : α.Arrow α') (g : β → β'),
TypeVec.lastFun (f ::: g) = g
theorem TypeVec.split_dropFun_lastFun E1 #
∀ {n : ℕ} {α : TypeVec.{u_1} (n + 1)} {α' : TypeVec.{u_2} (n + 1)} (f : α.Arrow α'),
TypeVec.splitFun (TypeVec.dropFun f) (TypeVec.lastFun f) = f
theorem TypeVec.splitFun_inj E1 #
∀ {n : ℕ} {α : TypeVec.{u_1} (n + 1)} {α' : TypeVec.{u_2} (n + 1)} {f f' : α.drop.Arrow α'.drop}
{g g' : α.last → α'.last}, TypeVec.splitFun f g = TypeVec.splitFun f' g' → f = f' ∧ g = g'
theorem TypeVec.appendFun_inj E1 #
∀ {n : ℕ} {α : TypeVec.{u_1} n} {α' : TypeVec.{u_2} n} {β : Type u_1} {β' : Type u_2} {f f' : α.Arrow α'}
{g g' : β → β'}, (f ::: g) = (f' ::: g') → f = f' ∧ g = g'
theorem TypeVec.splitFun_comp E1 #
∀ {n : ℕ} {α₀ : TypeVec.{u_1} (n + 1)} {α₁ : TypeVec.{u_2} (n + 1)} {α₂ : TypeVec.{u_3} (n + 1)}
(f₀ : α₀.drop.Arrow α₁.drop) (f₁ : α₁.drop.Arrow α₂.drop) (g₀ : α₀.last → α₁.last) (g₁ : α₁.last → α₂.last),
TypeVec.splitFun (TypeVec.comp f₁ f₀) (g₁ ∘ g₀) = TypeVec.comp (TypeVec.splitFun f₁ g₁) (TypeVec.splitFun f₀ g₀)
theorem TypeVec.appendFun_comp_splitFun E1 #
∀ {n : ℕ} {α : TypeVec.{u_1} n} {γ : TypeVec.{u_2} n} {β : Type u_1} {δ : Type u_2} {ε : TypeVec.{u_3} (n + 1)}
(f₀ : ε.drop.Arrow α) (f₁ : α.Arrow γ) (g₀ : ε.last → β) (g₁ : β → δ),
TypeVec.comp (f₁ ::: g₁) (TypeVec.splitFun f₀ g₀) = TypeVec.splitFun (TypeVec.comp f₁ f₀) (g₁ ∘ g₀)
theorem TypeVec.appendFun_comp E1 #
∀ {n : ℕ} {α₀ : TypeVec.{u_1} n} {α₁ : TypeVec.{u_2} n} {α₂ : TypeVec.{u_3} n} {β₀ : Type u_1} {β₁ : Type u_2}
{β₂ : Type u_3} (f₀ : α₀.Arrow α₁) (f₁ : α₁.Arrow α₂) (g₀ : β₀ → β₁) (g₁ : β₁ → β₂),
(TypeVec.comp f₁ f₀ ::: g₁ ∘ g₀) = TypeVec.comp (f₁ ::: g₁) (f₀ ::: g₀)
theorem TypeVec.appendFun_comp' E1 #
∀ {n : ℕ} {α₀ : TypeVec.{u_1} n} {α₁ : TypeVec.{u_2} n} {α₂ : TypeVec.{u_3} n} {β₀ : Type u_1} {β₁ : Type u_2}
{β₂ : Type u_3} (f₀ : α₀.Arrow α₁) (f₁ : α₁.Arrow α₂) (g₀ : β₀ → β₁) (g₁ : β₁ → β₂),
TypeVec.comp (f₁ ::: g₁) (f₀ ::: g₀) = (TypeVec.comp f₁ f₀ ::: g₁ ∘ g₀)
theorem TypeVec.nilFun_comp E1 #
∀ {α₀ : TypeVec.{u_1} 0} (f₀ : α₀.Arrow Fin2.elim0), TypeVec.comp TypeVec.nilFun f₀ = f₀
theorem TypeVec.appendFun_comp_id E1 #
∀ {n : ℕ} {α : TypeVec.{u} n} {β₀ β₁ β₂ : Type u} (g₀ : β₀ → β₁) (g₁ : β₁ → β₂),
(TypeVec.id ::: g₁ ∘ g₀) = TypeVec.comp (TypeVec.id ::: g₁) (TypeVec.id ::: g₀)
theorem TypeVec.dropFun_comp E0 #
∀ {n : ℕ} {α₀ : TypeVec.{u_1} (n + 1)} {α₁ : TypeVec.{u_2} (n + 1)} {α₂ : TypeVec.{u_3} (n + 1)} (f₀ : α₀.Arrow α₁)
(f₁ : α₁.Arrow α₂), TypeVec.dropFun (TypeVec.comp f₁ f₀) = TypeVec.comp (TypeVec.dropFun f₁) (TypeVec.dropFun f₀)
theorem TypeVec.lastFun_comp E0 #
∀ {n : ℕ} {α₀ : TypeVec.{u_1} (n + 1)} {α₁ : TypeVec.{u_2} (n + 1)} {α₂ : TypeVec.{u_3} (n + 1)} (f₀ : α₀.Arrow α₁)
(f₁ : α₁.Arrow α₂), TypeVec.lastFun (TypeVec.comp f₁ f₀) = TypeVec.lastFun f₁ ∘ TypeVec.lastFun f₀
theorem TypeVec.appendFun_aux E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} n} {α' : TypeVec.{u_2} n} {β : Type u_1} {β' : Type u_2} (f : (α ::: β).Arrow (α' ::: β')),
(TypeVec.dropFun f ::: TypeVec.lastFun f) = f
theorem TypeVec.appendFun_id_id E1 #
∀ {n : ℕ} {α : TypeVec.{u_1} n} {β : Type u_1}, (TypeVec.id ::: id) = TypeVec.id
instance TypeVec.subsingleton0 E0 #
Subsingleton (TypeVec.{u_1} 0)
def TypeVec.casesNil E1 #
{β : TypeVec.{u_2} 0 → Sort u_1} → β Fin2.elim0 → (v : TypeVec.{u_2} 0) → β v
cases distinction for 0-length type vector
def TypeVec.casesCons E1 #
(n : ℕ) →
{β : TypeVec.{u_2} (n + 1) → Sort u_1} →
((t : Type u_2) → (v : TypeVec.{u_2} n) → β (v ::: t)) → (v : TypeVec.{u_2} (n + 1)) → β v
cases distinction for (n+1)-length type vector
theorem TypeVec.casesNil_append1 E1 #
∀ {β : TypeVec.{u_2} 0 → Sort u_1} (f : β Fin2.elim0), TypeVec.casesNil f Fin2.elim0 = f
theorem TypeVec.casesCons_append1 E1 #
∀ (n : ℕ) {β : TypeVec.{u_2} (n + 1) → Sort u_1} (f : (t : Type u_2) → (v : TypeVec.{u_2} n) → β (v ::: t))
(v : TypeVec.{u_2} n) (α : Type u_2), TypeVec.casesCons n f (v ::: α) = f α v
def TypeVec.typevecCasesNil₃ E1 #
{β : (v : TypeVec.{u_2} 0) → (v' : TypeVec.{u_3} 0) → v.Arrow v' → Sort u_1} →
β Fin2.elim0 Fin2.elim0 TypeVec.nilFun →
(v : TypeVec.{u_2} 0) → (v' : TypeVec.{u_3} 0) → (fs : v.Arrow v') → β v v' fs
cases distinction for an arrow in the category of 0-length type vectors
def TypeVec.typevecCasesCons₃ E1 #
(n : ℕ) →
{β : (v : TypeVec.{u_2} (n + 1)) → (v' : TypeVec.{u_3} (n + 1)) → v.Arrow v' → Sort u_1} →
((t : Type u_2) →
(t' : Type u_3) →
(f : t → t') →
(v : TypeVec.{u_2} n) → (v' : TypeVec.{u_3} n) → (fs : v.Arrow v') → β (v ::: t) (v' ::: t') (fs ::: f)) →
(v : TypeVec.{u_2} (n + 1)) → (v' : TypeVec.{u_3} (n + 1)) → (fs : v.Arrow v') → β v v' fs
cases distinction for an arrow in the category of (n+1)-length type vectors
def TypeVec.typevecCasesNil₂ E1 #
{β : TypeVec.Arrow Fin2.elim0 Fin2.elim0 → Sort u_1} →
β TypeVec.nilFun → (f : TypeVec.Arrow Fin2.elim0 Fin2.elim0) → β f
specialized cases distinction for an arrow in the category of 0-length type vectors
def TypeVec.typevecCasesCons₂ E1 #
(n : ℕ) →
(t : Type u_1) →
(t' : Type u_2) →
(v : TypeVec.{u_1} n) →
(v' : TypeVec.{u_2} n) →
{β : (v ::: t).Arrow (v' ::: t') → Sort u_3} →
((f : t → t') → (fs : v.Arrow v') → β (fs ::: f)) → (fs : (v ::: t).Arrow (v' ::: t')) → β fs
specialized cases distinction for an arrow in the category of (n+1)-length type vectors
theorem TypeVec.typevecCasesNil₂_appendFun E1 #
∀ {β : TypeVec.Arrow Fin2.elim0 Fin2.elim0 → Sort u_1} (f : β TypeVec.nilFun),
TypeVec.typevecCasesNil₂ f TypeVec.nilFun = f
theorem TypeVec.typevecCasesCons₂_appendFun E1 #
∀ (n : ℕ) (t : Type u_1) (t' : Type u_2) (v : TypeVec.{u_1} n) (v' : TypeVec.{u_2} n)
{β : (v ::: t).Arrow (v' ::: t') → Sort u_3} (F : (f : t → t') → (fs : v.Arrow v') → β (fs ::: f)) (f : t → t')
(fs : v.Arrow v'), TypeVec.typevecCasesCons₂ n t t' v v' F (fs ::: f) = F f fs
def TypeVec.PredLast E1 #
{n : ℕ} → (α : TypeVec.{u_1} n) → {β : Type u_1} → (β → Prop) → ⦃i : Fin2 (n + 1)⦄ → (α ::: β) i → Prop
PredLast α p x predicates p of the last element of x : α.append1 β.
def TypeVec.RelLast E1 #
{n : ℕ} → (α : TypeVec.{u} n) → {β γ : Type u} → (β → γ → Prop) → ⦃i : Fin2 (n + 1)⦄ → (α ::: β) i → (α ::: γ) i → Prop
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.
def TypeVec.repeat E1 #
(n : ℕ) → Type u → TypeVec.{u} n
repeat n t is a n-length type vector that contains n occurrences of t
def TypeVec.prod E1 #
{n : ℕ} → TypeVec.{u} n → TypeVec.{u} n → TypeVec.{u} n
prod α β is the pointwise product of the components of α and β
def MvFunctor.«term_⊗_» E1 #
Lean.TrailingParserDescr
prod α β is the pointwise product of the components of α and β
def TypeVec.const E1 #
{β : Type u_1} → β → {n : ℕ} → (α : TypeVec.{u_2} n) → α.Arrow (TypeVec.repeat n β)
const x α is an arrow that ignores its source and constructs a TypeVec that
contains nothing but x
def TypeVec.repeatEq E1 #
{n : ℕ} → (α : TypeVec.{u_1} n) → (α.prod α).Arrow (TypeVec.repeat n Prop)
vector of equality on a product of vectors
theorem TypeVec.const_append1 E1 #
∀ {β : Type u_1} {γ : Type u_2} (x : γ) {n : ℕ} (α : TypeVec.{u_1} n),
TypeVec.const x (α ::: β) = (TypeVec.const x α ::: fun x_1 ↦ x)
theorem TypeVec.id_eq_nilFun E1 #
∀ {α : TypeVec.{u_1} 0}, TypeVec.id = TypeVec.nilFun
theorem TypeVec.const_nil E1 #
∀ {β : Type u_1} (x : β) (α : TypeVec.{u_2} 0), TypeVec.const x α = TypeVec.nilFun
theorem TypeVec.repeat_eq_append1 E1 #
∀ {β : Type u_1} {n : ℕ} (α : TypeVec.{u_1} n), (α ::: β).repeatEq = TypeVec.splitFun α.repeatEq (Function.uncurry Eq)
theorem TypeVec.repeat_eq_nil E1 #
∀ (α : TypeVec.{u_1} 0), α.repeatEq = TypeVec.nilFun
def TypeVec.PredLast' E1 #
{n : ℕ} → (α : TypeVec.{u_1} n) → {β : Type u_1} → (β → Prop) → (α ::: β).Arrow (TypeVec.repeat (n + 1) Prop)
predicate on a type vector to constrain only the last object
def TypeVec.RelLast' E1 #
{n : ℕ} →
(α : TypeVec.{u_1} n) →
{β : Type u_1} → (β → β → Prop) → ((α ::: β).prod (α ::: β)).Arrow (TypeVec.repeat (n + 1) Prop)
predicate on the product of two type vectors to constrain only their last object
def TypeVec.Curry E1 #
{n : ℕ} → (TypeVec.{u} (n + 1) → Type u_1) → Type u → TypeVec.{u} n → Type u_1
given F : TypeVec.{u} (n+1) → Type u, curry F : Type u → TypeVec.{u} → Type u,
i.e. its first argument can be fed in separately from the rest of the vector of arguments
instance TypeVec.Curry.inhabited E0 #
{n : ℕ} →
(F : TypeVec.{u} (n + 1) → Type u_1) →
(α : Type u) → (β : TypeVec.{u} n) → [I : Inhabited (F (β ::: α))] → Inhabited (TypeVec.Curry F α β)
def TypeVec.dropRepeat E1 #
(α : Type u_1) → {n : ℕ} → (TypeVec.repeat n.succ α).drop.Arrow (TypeVec.repeat n α)
arrow to remove one element of a repeat vector
def TypeVec.ofRepeat E1 #
{α : Type u_1} → {n : ℕ} → {i : Fin2 n} → TypeVec.repeat n α i → α
projection for a repeat vector
theorem TypeVec.const_iff_true E1 #
∀ {n : ℕ} {α : TypeVec.{u_1} n} {i : Fin2 n} {x : α i} {p : Prop}, TypeVec.ofRepeat (TypeVec.const p α i x) ↔ p
def TypeVec.prod.fst E1 #
{n : ℕ} → {α β : TypeVec.{u} n} → (α.prod β).Arrow α
left projection of a prod vector
def TypeVec.prod.snd E1 #
{n : ℕ} → {α β : TypeVec.{u} n} → (α.prod β).Arrow β
right projection of a prod vector
def TypeVec.prod.diag E1 #
{n : ℕ} → {α : TypeVec.{u} n} → α.Arrow (α.prod α)
introduce a product where both components are the same
def TypeVec.prod.mk E1 #
{n : ℕ} → {α β : TypeVec.{u} n} → (i : Fin2 n) → α i → β i → α.prod β i
constructor for prod
theorem TypeVec.prod_fst_mk E0 #
∀ {n : ℕ} {α β : TypeVec.{u_1} n} (i : Fin2 n) (a : α i) (b : β i), TypeVec.prod.fst i (TypeVec.prod.mk i a b) = a
theorem TypeVec.prod_snd_mk E0 #
∀ {n : ℕ} {α β : TypeVec.{u_1} n} (i : Fin2 n) (a : α i) (b : β i), TypeVec.prod.snd i (TypeVec.prod.mk i a b) = b
def TypeVec.prod.map E1 #
{n : ℕ} → {α α' β β' : TypeVec.{u} n} → α.Arrow β → α'.Arrow β' → (α.prod α').Arrow (β.prod β')
prod is functorial
def MvFunctor.«term_⊗'_» E1 #
Lean.TrailingParserDescr
prod is functorial
theorem TypeVec.fst_prod_mk E0 #
∀ {n : ℕ} {α α' β β' : TypeVec.{u_1} n} (f : α.Arrow β) (g : α'.Arrow β'),
TypeVec.comp TypeVec.prod.fst (TypeVec.prod.map f g) = TypeVec.comp f TypeVec.prod.fst
theorem TypeVec.snd_prod_mk E0 #
∀ {n : ℕ} {α α' β β' : TypeVec.{u_1} n} (f : α.Arrow β) (g : α'.Arrow β'),
TypeVec.comp TypeVec.prod.snd (TypeVec.prod.map f g) = TypeVec.comp g TypeVec.prod.snd
theorem TypeVec.fst_diag E1 #
∀ {n : ℕ} {α : TypeVec.{u_1} n}, TypeVec.comp TypeVec.prod.fst TypeVec.prod.diag = TypeVec.id
theorem TypeVec.snd_diag E1 #
∀ {n : ℕ} {α : TypeVec.{u_1} n}, TypeVec.comp TypeVec.prod.snd TypeVec.prod.diag = TypeVec.id
theorem TypeVec.repeatEq_iff_eq E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} n} {i : Fin2 n} {x y : α i},
TypeVec.ofRepeat (α.repeatEq i (TypeVec.prod.mk i x y)) ↔ x = y
def TypeVec.Subtype_ E1 #
{n : ℕ} → {α : TypeVec.{u} n} → α.Arrow (TypeVec.repeat n Prop) → TypeVec.{u} n
given a predicate vector p over vector α, Subtype_ p is the type of vectors
that contain an α that satisfies p
def TypeVec.subtypeVal E1 #
{n : ℕ} → {α : TypeVec.{u} n} → (p : α.Arrow (TypeVec.repeat n Prop)) → (TypeVec.Subtype_ p).Arrow α
projection on Subtype_
def TypeVec.toSubtype E1 #
{n : ℕ} →
{α : TypeVec.{u} n} →
(p : α.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
def TypeVec.ofSubtype E1 #
{n : ℕ} →
{α : TypeVec.{u} n} →
(p : α.Arrow (TypeVec.repeat n Prop)) → (TypeVec.Subtype_ p).Arrow 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
def TypeVec.toSubtype' E1 #
{n : ℕ} →
{α : TypeVec.{u} n} →
(p : (α.prod α).Arrow (TypeVec.repeat n Prop)) →
TypeVec.Arrow (fun i ↦ { x // TypeVec.ofRepeat (p i (TypeVec.prod.mk i x.1 x.2)) }) (TypeVec.Subtype_ p)
similar to toSubtype adapted to relations (i.e. predicate on product)
def TypeVec.ofSubtype' E1 #
{n : ℕ} →
{α : TypeVec.{u} n} →
(p : (α.prod α).Arrow (TypeVec.repeat n Prop)) →
(TypeVec.Subtype_ p).Arrow fun i ↦ { x // TypeVec.ofRepeat (p i (TypeVec.prod.mk i x.1 x.2)) }
similar to of_subtype adapted to relations (i.e. predicate on product)
def TypeVec.diagSub E1 #
{n : ℕ} → {α : TypeVec.{u} n} → α.Arrow (TypeVec.Subtype_ α.repeatEq)
similar to diag but the target vector is a Subtype_
guaranteeing the equality of the components
theorem TypeVec.subtypeVal_nil E1 #
∀ {α : TypeVec.{u} 0} (ps : α.Arrow (TypeVec.repeat 0 Prop)), TypeVec.subtypeVal ps = TypeVec.nilFun
theorem TypeVec.diag_sub_val E0 #
∀ {n : ℕ} {α : TypeVec.{u} n}, TypeVec.comp (TypeVec.subtypeVal α.repeatEq) TypeVec.diagSub = TypeVec.prod.diag
theorem TypeVec.prod_id E1 #
∀ {n : ℕ} {α β : TypeVec.{u} n}, TypeVec.prod.map TypeVec.id TypeVec.id = TypeVec.id
theorem TypeVec.append_prod_appendFun E1 #
∀ {n : ℕ} {α α' β β' : TypeVec.{u} n} {φ φ' ψ ψ' : Type u} {f₀ : α.Arrow α'} {g₀ : β.Arrow β'} {f₁ : φ → φ'}
{g₁ : ψ → ψ'}, (TypeVec.prod.map f₀ g₀ ::: Prod.map f₁ g₁) = TypeVec.prod.map (f₀ ::: f₁) (g₀ ::: g₁)
theorem TypeVec.dropFun_diag E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} (n + 1)}, TypeVec.dropFun TypeVec.prod.diag = TypeVec.prod.diag
theorem TypeVec.dropFun_subtypeVal E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} (n + 1)} (p : α.Arrow (TypeVec.repeat (n + 1) Prop)),
TypeVec.dropFun (TypeVec.subtypeVal p) = TypeVec.subtypeVal (TypeVec.dropFun p)
theorem TypeVec.lastFun_subtypeVal E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} (n + 1)} (p : α.Arrow (TypeVec.repeat (n + 1) Prop)),
TypeVec.lastFun (TypeVec.subtypeVal p) = Subtype.val
theorem TypeVec.dropFun_toSubtype E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} (n + 1)} (p : α.Arrow (TypeVec.repeat (n + 1) Prop)),
TypeVec.dropFun (TypeVec.toSubtype p) = TypeVec.toSubtype fun i ↦ p i.fs
theorem TypeVec.lastFun_toSubtype E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} (n + 1)} (p : α.Arrow (TypeVec.repeat (n + 1) Prop)),
TypeVec.lastFun (TypeVec.toSubtype p) = id
theorem TypeVec.dropFun_of_subtype E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} (n + 1)} (p : α.Arrow (TypeVec.repeat (n + 1) Prop)),
TypeVec.dropFun (TypeVec.ofSubtype p) = TypeVec.ofSubtype (TypeVec.dropFun p)
theorem TypeVec.lastFun_of_subtype E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} (n + 1)} (p : α.Arrow (TypeVec.repeat (n + 1) Prop)),
TypeVec.lastFun (TypeVec.ofSubtype p) = id
theorem TypeVec.dropFun_RelLast' E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} n} {β : Type u_1} (R : β → β → Prop), TypeVec.dropFun (α.RelLast' R) = α.repeatEq
theorem TypeVec.dropFun_prod E0 #
∀ {n : ℕ} {α α' β β' : TypeVec.{u_1} (n + 1)} (f : α.Arrow β) (f' : α'.Arrow β'),
TypeVec.dropFun (TypeVec.prod.map f f') = TypeVec.prod.map (TypeVec.dropFun f) (TypeVec.dropFun f')
theorem TypeVec.lastFun_prod E0 #
∀ {n : ℕ} {α α' β β' : TypeVec.{u_1} (n + 1)} (f : α.Arrow β) (f' : α'.Arrow β'),
TypeVec.lastFun (TypeVec.prod.map f f') = Prod.map (TypeVec.lastFun f) (TypeVec.lastFun f')
theorem TypeVec.dropFun_from_append1_drop_last E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} (n + 1)}, TypeVec.dropFun TypeVec.fromAppend1DropLast = TypeVec.id
theorem TypeVec.lastFun_from_append1_drop_last E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} (n + 1)}, TypeVec.lastFun TypeVec.fromAppend1DropLast = id
theorem TypeVec.dropFun_id E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} (n + 1)}, TypeVec.dropFun TypeVec.id = TypeVec.id
theorem TypeVec.prod_map_id E0 #
∀ {n : ℕ} {α β : TypeVec.{u_1} n}, TypeVec.prod.map TypeVec.id TypeVec.id = TypeVec.id
theorem TypeVec.toSubtype_of_subtype E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} n} (p : α.Arrow (TypeVec.repeat n Prop)),
TypeVec.comp (TypeVec.toSubtype p) (TypeVec.ofSubtype p) = TypeVec.id
theorem TypeVec.subtypeVal_toSubtype E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} n} (p : α.Arrow (TypeVec.repeat n Prop)),
TypeVec.comp (TypeVec.subtypeVal p) (TypeVec.toSubtype p) = fun x ↦ Subtype.val
theorem TypeVec.toSubtype_of_subtype_assoc E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} n} {β : TypeVec.{u_2} n} (p : α.Arrow (TypeVec.repeat n Prop))
(f : β.Arrow (TypeVec.Subtype_ p)), TypeVec.comp (TypeVec.toSubtype p) (TypeVec.comp (TypeVec.ofSubtype p) f) = f
theorem TypeVec.toSubtype'_of_subtype' E0 #
∀ {n : ℕ} {α : TypeVec.{u_1} n} (r : (α.prod α).Arrow (TypeVec.repeat n Prop)),
TypeVec.comp (TypeVec.toSubtype' r) (TypeVec.ofSubtype' r) = TypeVec.id
theorem TypeVec.subtypeVal_toSubtype' E1 #
∀ {n : ℕ} {α : TypeVec.{u_1} n} (r : (α.prod α).Arrow (TypeVec.repeat n Prop)),
TypeVec.comp (TypeVec.subtypeVal r) (TypeVec.toSubtype' r) = fun i x ↦ TypeVec.prod.mk i (↑x).1 (↑x).2