File: Mathlib/Data/List/Pi.lean

full_name: List.Pi.nil
code: /-- Given `α : ι → Sort*`, `Pi.nil α` is the trivial dependent function out of the empty list. -/
def nil (α : ι → Sort*) : (∀ i ∈ ([] : List ι), α i) 
goal: i ∈ [] → α i

full_name: List.Pi.head
code: /-- Given `f` a function whose domain is `i :: l`, get its value at `i`.  -/
def head (f : ∀ j ∈ i :: l, α j) : α i 
goal: α i

full_name: List.Pi.tail
code: /-- Given `f` a function whose domain is `i :: l`, produce a function whose domain
is restricted to `l`.  -/
def tail (f : ∀ j ∈ i :: l, α j) : ∀ j ∈ l, α j 
goal: j ∈ l → α j

full_name: List.Pi.cons
code: /-- 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`. -/
def cons (a : α i) (f : ∀ j ∈ l, α j) : ∀ j ∈ i :: l, α j 
goal: j ∈ i :: l → α j

full_name: List.Pi.cons_def
code: lemma cons_def (a : α i) (f : ∀ j ∈ l, α j) : cons _ _ a f =
    fun j hj ↦ if h : j = i then h.symm.rec a else f j <| (mem_cons.1 hj).resolve_left h 
goal: List.Pi.cons i l a f = fun j hj => if h : j = i then ⋯ ▸ a else f j ⋯

full_name: Multiset.Pi.cons_coe
code: @[simp] lemma _root_.Multiset.Pi.cons_coe {l : List ι} (a : α i) (f : ∀ j ∈ l, α j) :
    Multiset.Pi.cons l _ a f = cons _ _ a f 
goal: Multiset.Pi.cons (↑l) i a f = List.Pi.cons i l a f

full_name: List.Pi.cons_eta
code: @[simp] lemma cons_eta (f : ∀ j ∈ i :: l, α j) :
    cons _ _ (head f) (tail f) = f 
goal: List.Pi.cons i l (List.Pi.head f) (List.Pi.tail f) = f

full_name: List.Pi.cons_map
code: lemma cons_map (a : α i) (f : ∀ j ∈ l, α j)
    {α' : ι → Sort*} (φ : ∀ ⦃j⦄, α j → α' j) :
    cons _ _ (φ a) (fun j hj ↦ φ (f j hj)) = (fun j hj ↦ φ ((cons _ _ a f) j hj)) 
goal: (List.Pi.cons i l (φ a) fun j hj => φ (f j hj)) = fun j hj => φ (List.Pi.cons i l a f j hj)

full_name: List.Pi.forall_rel_cons_ext
code: lemma forall_rel_cons_ext {r : ∀ ⦃i⦄, α i → α i → Prop} {a₁ a₂ : α i} {f₁ f₂ : ∀ j ∈ l, α j}
    (ha : r a₁ a₂) (hf : ∀ (i : ι) (hi : i ∈ l), r (f₁ i hi) (f₂ i hi)) :
    ∀ j hj, r (cons _ _ a₁ f₁ j hj) (cons _ _ a₂ f₂ j hj) 
goal: r (List.Pi.cons i l a₁ f₁ j hj) (List.Pi.cons i l a₂ f₂ j hj)

full_name: List.pi
code: /-- `pi xs f` creates the list of functions `g` such that, for `x ∈ xs`, `g x ∈ f x` -/
def pi : ∀ l : List ι, (∀ i, List (α i)) → List (∀ i, i ∈ l → α i)
  
goal: ((i : ι) → List (α i)) → List ((i : ι) → i ∈ l → α i)

full_name: List.pi_nil
code: @[simp] lemma pi_nil (t : ∀ i, List (α i)) :
    pi [] t = [Pi.nil α] 
goal: [].pi t = [List.Pi.nil α]

full_name: List.pi_cons
code: @[simp] lemma pi_cons (i : ι) (l : List ι) (t : ∀ j, List (α j)) :
    pi (i :: l) t = ((t i).bind fun b ↦ (pi l t).map <| Pi.cons _ _ b) 
goal: (i :: l).pi t = (t i).bind fun b => List.map (List.Pi.cons i l b) (l.pi t)

full_name: Multiset.pi_coe
code: lemma _root_.Multiset.pi_coe (l : List ι) (fs : ∀ i, List (α i)) :
    (l : Multiset ι).pi (fs ·) = (↑(pi l fs) : Multiset (∀ i ∈ l, α i)) 
goal: ((↑l).pi fun x => ↑(fs x)) = ↑(l.pi fs)

full_name: List.mem_pi
code: lemma mem_pi {l : List ι} (fs : ∀ i, List (α i)) :
    ∀ f : ∀ i ∈ l, α i, (f ∈ pi l fs) ↔ (∀ i (hi : i ∈ l), f i hi ∈ fs i) 
goal: f ∈ l.pi fs ↔ ∀ (i : ι) (hi : i ∈ l), f i hi ∈ fs i