The areas / V33. Data structures and computation
Mathlib.Data.List.Pi
16 declarations. Mathlib docs · Source
theorem List.Pi.nil.congr_simp E1 #
∀ {ι : Type u_1} (α : ι → Sort u_3) (i : ι) (a : i ∈ []), List.Pi.nil α i a = List.Pi.nil α i a
theorem List.Pi.cons.congr_simp E1 #
∀ {ι : Type u_1} {inst : DecidableEq ι} [inst_1 : DecidableEq ι] {α : ι → Sort u_2} (i : ι) (l : List ι) (a a_1 : α i),
a = a_1 →
∀ (f f_1 : (j : ι) → j ∈ l → α j),
f = f_1 → ∀ (j : ι) (a_2 : j ∈ i :: l), List.Pi.cons i l a f j a_2 = List.Pi.cons i l a_1 f_1 j a_2
def List.Pi.nil E1 #
{ι : Type u_1} → (α : ι → Sort u_3) → (i : ι) → i ∈ [] → α i
Given α : ι → Sort*, Pi.nil α is the trivial dependent function out of the empty list.
def List.Pi.head E1 #
{ι : Type u_1} → {α : ι → Sort u_2} → {i : ι} → {l : List ι} → ((j : ι) → j ∈ i :: l → α j) → α i
Given f a function whose domain is i :: l, get its value at i.
def List.Pi.tail E1 #
{ι : Type u_1} → {α : ι → Sort u_2} → {i : ι} → {l : List ι} → ((j : ι) → j ∈ i :: l → α j) → (j : ι) → j ∈ l → α j
Given f a function whose domain is i :: l, produce a function whose domain
is restricted to l.
def List.Pi.cons E1 #
{ι : Type u_1} →
[DecidableEq ι] →
{α : ι → Sort u_2} → (i : ι) → (l : List ι) → α i → ((j : ι) → j ∈ l → α j) → (j : ι) → j ∈ i :: l → α j
Given α : ι → Sort*, a list l and a term i, as well as a term a : α i and a
function f such that f j : α j for all j in l, Pi.cons a f is a function g such
that g k : α k for all k in i :: l.
theorem List.Pi.cons_def E0 #
∀ {ι : Type u_1} [inst : DecidableEq ι] {α : ι → Sort u_2} {i : ι} {l : List ι} (a : α i) (f : (j : ι) → j ∈ l → α j),
List.Pi.cons i l a f = fun j hj ↦ if h : j = i then ⋯ ▸ a else f j ⋯
theorem Multiset.Pi.cons_coe E0 #
∀ {ι : Type u_1} [inst : DecidableEq ι] {α : ι → Sort u_2} {i : ι} {l : List ι} (a : α i) (f : (j : ι) → j ∈ l → α j),
Multiset.Pi.cons (↑l) i a f = List.Pi.cons i l a f
theorem List.Pi.cons_eta E0 #
∀ {ι : Type u_1} [inst : DecidableEq ι] {α : ι → Sort u_2} {i : ι} {l : List ι} (f : (j : ι) → j ∈ i :: l → α j),
List.Pi.cons i l (List.Pi.head f) (List.Pi.tail f) = f
theorem List.Pi.cons_map E1 #
∀ {ι : Type u_1} [inst : DecidableEq ι] {α : ι → Sort u_2} {i : ι} {l : List ι} (a : α i) (f : (j : ι) → j ∈ l → α j)
{α' : ι → Sort u_3} (φ : ⦃j : ι⦄ → α j → α' j),
(List.Pi.cons i l (φ a) fun j hj ↦ φ (f j hj)) = fun j hj ↦ φ (List.Pi.cons i l a f j hj)
theorem List.Pi.forall_rel_cons_ext E1 #
∀ {ι : Type u_1} [inst : DecidableEq ι] {α : ι → Sort u_2} {i : ι} {l : List ι} {r : ⦃i : ι⦄ → α i → α i → Prop}
{a₁ a₂ : α i} {f₁ f₂ : (j : ι) → j ∈ l → α j},
r a₁ a₂ →
(∀ (i : ι) (hi : i ∈ l), r (f₁ i hi) (f₂ i hi)) →
∀ (j : ι) (hj : j ∈ i :: l), r (List.Pi.cons i l a₁ f₁ j hj) (List.Pi.cons i l a₂ f₂ j hj)
def List.pi E1 #
{ι : Type u_1} →
[DecidableEq ι] → {α : ι → Type u_2} → (l : List ι) → ((i : ι) → List (α i)) → List ((i : ι) → i ∈ l → α i)
pi xs f creates the list of functions g such that, for x ∈ xs, g x ∈ f x
theorem List.pi_nil E0 #
∀ {ι : Type u_1} [inst : DecidableEq ι] {α : ι → Type u_2} (t : (i : ι) → List (α i)), [].pi t = [List.Pi.nil α]
theorem List.pi_cons E0 #
∀ {ι : Type u_1} [inst : DecidableEq ι] {α : ι → Type u_2} (i : ι) (l : List ι) (t : (j : ι) → List (α j)),
(i :: l).pi t = List.flatMap (fun b ↦ List.map (List.Pi.cons i l b) (l.pi t)) (t i)
theorem Multiset.pi_coe E0 #
∀ {ι : Type u_1} [inst : DecidableEq ι] {α : ι → Type u_2} (l : List ι) (fs : (i : ι) → List (α i)),
((↑l).pi fun x ↦ ↑(fs x)) = ↑(l.pi fs)
theorem List.mem_pi E0 #
∀ {ι : Type u_1} [inst : DecidableEq ι] {α : ι → Type u_2} {l : List ι} (fs : (i : ι) → List (α i))
(f : (i : ι) → i ∈ l → α i), f ∈ l.pi fs ↔ ∀ (i : ι) (hi : i ∈ l), f i hi ∈ fs i