File: Mathlib/Data/Stream/Defs.lean

full_name: Stream'
code: /-- A stream `Stream' α` is an infinite sequence of elements of `α`. -/
def Stream' (α : Type u) 
goal: Type u

full_name: Stream'.cons
code: /-- Prepend an element to a stream. -/
def cons (a : α) (s : Stream' α) : Stream' α
  
goal: Stream' α

full_name: Stream'.«_aux_Mathlib_Data_Stream_Defs___macroRules_Stream'_term_::__1»
code: scoped infixr:67 " :: " => cons
goal: Lean.Macro

full_name: Stream'._aux_Mathlib_Data_Stream_Defs___unexpand_Stream'_cons_1
code: scoped infixr:67 " :: " => cons
goal: Lean.PrettyPrinter.Unexpander

full_name: Stream'.get
code: /-- Get the `n`-th element of a stream. -/
def get (s : Stream' α) (n : ℕ) : α 
goal: α

full_name: Stream'.head
code: /-- Head of a stream: `Stream'.head s = Stream'.get s 0`. -/
abbrev head (s : Stream' α) : α 
goal: α

full_name: Stream'.tail
code: /-- Tail of a stream: `Stream'.tail (h :: t) = t`. -/
def tail (s : Stream' α) : Stream' α 
goal: Stream' α

full_name: Stream'.drop
code: /-- Drop first `n` elements of a stream. -/
def drop (n : ℕ) (s : Stream' α) : Stream' α 
goal: Stream' α

full_name: Stream'.All
code: /-- Proposition saying that all elements of a stream satisfy a predicate. -/
def All (p : α → Prop) (s : Stream' α) 
goal: Prop

full_name: Stream'.Any
code: /-- Proposition saying that at least one element of a stream satisfies a predicate. -/
def Any (p : α → Prop) (s : Stream' α) 
goal: Prop

full_name: Stream'.instMembership
code: /-- `a ∈ s` means that `a = Stream'.get n s` for some `n`. -/
instance : Membership α (Stream' α) 
goal: Membership α (Stream' α)

full_name: Stream'.map
code: /-- Apply a function `f` to all elements of a stream `s`. -/
def map (f : α → β) (s : Stream' α) : Stream' β 
goal: Stream' β

full_name: Stream'.zip
code: /-- Zip two streams using a binary operation:
`Stream'.get n (Stream'.zip f s₁ s₂) = f (Stream'.get s₁) (Stream'.get s₂)`. -/
def zip (f : α → β → δ) (s₁ : Stream' α) (s₂ : Stream' β) : Stream' δ 
goal: Stream' δ

full_name: Stream'.enum
code: /-- Enumerate a stream by tagging each element with its index. -/
def enum (s : Stream' α) : Stream' (ℕ × α) 
goal: Stream' (ℕ × α)

full_name: Stream'.const
code: /-- The constant stream: `Stream'.get n (Stream'.const a) = a`. -/
def const (a : α) : Stream' α 
goal: Stream' α

full_name: Stream'.iterate
code: /-- Iterates of a function as a stream. -/
def iterate (f : α → α) (a : α) : Stream' α
  
goal: Stream' α

full_name: Stream'.corec
code: def corec (f : α → β) (g : α → α) : α → Stream' β 
goal: α → Stream' β

full_name: Stream'.corecOn
code: def corecOn (a : α) (f : α → β) (g : α → α) : Stream' β 
goal: Stream' β

full_name: Stream'.corec'
code: def corec' (f : α → β × α) : α → Stream' β 
goal: α → Stream' β

full_name: Stream'.corecState
code: /-- Use a state monad to generate a stream through corecursion -/
def corecState {σ α} (cmd : StateM σ α) (s : σ) : Stream' α 
goal: Stream' α

full_name: Stream'.unfolds
code: abbrev unfolds (g : α → β) (f : α → α) (a : α) : Stream' β 
goal: Stream' β

full_name: Stream'.interleave
code: /-- Interleave two streams. -/
def interleave (s₁ s₂ : Stream' α) : Stream' α 
goal: Stream' α

full_name: Stream'._aux_Mathlib_Data_Stream_Defs___unexpand_Stream'_interleave_1
code: infixl:65 " ⋈ " => interleave
goal: Lean.PrettyPrinter.Unexpander

full_name: Stream'.«_aux_Mathlib_Data_Stream_Defs___macroRules_Stream'_term_⋈__1»
code: infixl:65 " ⋈ " => interleave
goal: Lean.Macro

full_name: Stream'.even
code: /-- Elements of a stream with even indices. -/
def even (s : Stream' α) : Stream' α 
goal: Stream' α

full_name: Stream'.odd
code: /-- Elements of a stream with odd indices. -/
def odd (s : Stream' α) : Stream' α 
goal: Stream' α

full_name: Stream'.appendStream'
code: /-- Append a stream to a list. -/
def appendStream' : List α → Stream' α → Stream' α
  
goal: List α → Stream' α → Stream' α

full_name: Stream'.«_aux_Mathlib_Data_Stream_Defs___macroRules_Stream'_term_++ₛ__1»
code: infixl:65 " ++ₛ " => appendStream'
goal: Lean.Macro

full_name: Stream'._aux_Mathlib_Data_Stream_Defs___unexpand_Stream'_appendStream'_1
code: infixl:65 " ++ₛ " => appendStream'
goal: Lean.PrettyPrinter.Unexpander

full_name: Stream'.take
code: /-- `take n s` returns a list of the `n` first elements of stream `s` -/
def take : ℕ → Stream' α → List α
  
goal: ℕ → Stream' α → List α

full_name: Stream'.cycleF
code: /-- An auxiliary definition for `Stream'.cycle` corecursive def -/
protected def cycleF : α × List α × α × List α → α
  
goal: α × List α × α × List α → α

full_name: Stream'.cycleG
code: /-- An auxiliary definition for `Stream'.cycle` corecursive def -/
protected def cycleG : α × List α × α × List α → α × List α × α × List α
  
goal: α × List α × α × List α → α × List α × α × List α

full_name: Stream'.cycle
code: /-- Interpret a nonempty list as a cyclic stream. -/
def cycle : ∀ l : List α, l ≠ [] → Stream' α
  
goal: l ≠ [] → Stream' α

full_name: Stream'.tails
code: /-- Tails of a stream, starting with `Stream'.tail s`. -/
def tails (s : Stream' α) : Stream' (Stream' α) 
goal: Stream' (Stream' α)

full_name: Stream'.initsCore
code: /-- An auxiliary definition for `Stream'.inits`. -/
def initsCore (l : List α) (s : Stream' α) : Stream' (List α) 
goal: Stream' (List α)

full_name: Stream'.inits
code: /-- Nonempty initial segments of a stream. -/
def inits (s : Stream' α) : Stream' (List α) 
goal: Stream' (List α)

full_name: Stream'.pure
code: /-- A constant stream, same as `Stream'.const`. -/
def pure (a : α) : Stream' α 
goal: Stream' α

full_name: Stream'.apply
code: /-- Given a stream of functions and a stream of values, apply `n`-th function to `n`-th value. -/
def apply (f : Stream' (α → β)) (s : Stream' α) : Stream' β 
goal: Stream' β

full_name: Stream'.«_aux_Mathlib_Data_Stream_Defs___macroRules_Stream'_term_⊛__1»
code: infixl:75 " ⊛ " => apply
goal: Lean.Macro

full_name: Stream'._aux_Mathlib_Data_Stream_Defs___unexpand_Stream'_apply_1
code: infixl:75 " ⊛ " => apply
goal: Lean.PrettyPrinter.Unexpander

full_name: Stream'.nats
code: /-- The stream of natural numbers: `Stream'.get n Stream'.nats = n`. -/
def nats : Stream' ℕ 
goal: Stream' ℕ