File: Mathlib/Tactic/FunProp/StateList.lean

full_name: Mathlib.Meta.FunProp.StateList.nil
code: /-- `StateList` is a List with a state associated to each element.
This is used instead of `List (α × σ)` as it is more efficient. -/
inductive StateList (σ α : Type u) where
  /-- .nil is the empty list. -/
  | nil : StateList σ α
  /-- If `a : α`, `s : σ` and `l : List α`, then `.cons a s l`, is the
  list with first element `a` with state `s` and `l` as the rest of the list. -/
  | cons : α → σ → StateList σ α → StateList σ α
goal: Mathlib.Meta.FunProp.StateList σ α

full_name: Mathlib.Meta.FunProp.StateList.cons
code: /-- `StateList` is a List with a state associated to each element.
This is used instead of `List (α × σ)` as it is more efficient. -/
inductive StateList (σ α : Type u) where
  /-- .nil is the empty list. -/
  | nil : StateList σ α
  /-- If `a : α`, `s : σ` and `l : List α`, then `.cons a s l`, is the
  list with first element `a` with state `s` and `l` as the rest of the list. -/
  | cons : α → σ → StateList σ α → StateList σ α
goal: α → σ → Mathlib.Meta.FunProp.StateList σ α → Mathlib.Meta.FunProp.StateList σ α

full_name: Mathlib.Meta.FunProp.StateList
code: /-- `StateList` is a List with a state associated to each element.
This is used instead of `List (α × σ)` as it is more efficient. -/
inductive StateList (σ α : Type u) where
  /-- .nil is the empty list. -/
  | nil : StateList σ α
  /-- If `a : α`, `s : σ` and `l : List α`, then `.cons a s l`, is the
  list with first element `a` with state `s` and `l` as the rest of the list. -/
  | cons : α → σ → StateList σ α → StateList σ α
goal: Type u

full_name: _private.Mathlib.Tactic.FunProp.StateList.0.Mathlib.Meta.FunProp.StateList.toList
code: private def toList : StateList σ α → List (α × σ)
  
goal: Mathlib.Meta.FunProp.StateList σ α → List (α × σ)

full_name: _private.Mathlib.Tactic.FunProp.StateList.0.Mathlib.Meta.FunProp.StateList.toList'
code: private def toList' : StateList σ α → List α
  
goal: Mathlib.Meta.FunProp.StateList σ α → List α

full_name: _private.Mathlib.Tactic.FunProp.StateList.0.Mathlib.Meta.FunProp.StateList.map
code: private def map (f : α → β) : StateList σ α → StateList σ β
  
goal: Mathlib.Meta.FunProp.StateList σ α → Mathlib.Meta.FunProp.StateList σ β

full_name: _private.Mathlib.Tactic.FunProp.StateList.0.Mathlib.Meta.FunProp.StateList.append
code: private def append : (xs ys : StateList σ α) → StateList σ α
  
goal: Mathlib.Meta.FunProp.StateList σ α

full_name: Mathlib.Meta.FunProp.StateList.instAppend
code: instance : Append (StateList σ α) 
goal: Append (Mathlib.Meta.FunProp.StateList σ α)

full_name: _private.Mathlib.Tactic.FunProp.StateList.0.Mathlib.Meta.FunProp.StateList.foldrM
code: @[specialize]
private def foldrM {m} [Monad m] : (f : α → σ → β → m β) → (init : β) → StateList σ α → m β
  
goal: Mathlib.Meta.FunProp.StateList σ α → m β

full_name: Mathlib.Meta.FunProp.StateListT
code: /-- The combined state and list monad transformer. -/
def StateListT (σ : Type u) (m : Type u → Type v) (α : Type u) : Type (max u v) 
goal: Type (max u v)

full_name: Mathlib.Meta.FunProp.StateListT.run
code: /-- Run `x` on a given state `s`, returning the list of values with corresponding states. -/
@[always_inline, inline]
def StateListT.run [Functor m] (x : StateListT σ m α) (s : σ) : m (List (α × σ)) 
goal: m (List (α × σ))

full_name: Mathlib.Meta.FunProp.StateListT.run'
code: /-- Run `x` on a given state `s`, returning the list of values. -/
@[always_inline, inline]
def StateListT.run' [Functor m] (x : StateListT σ m α) (s : σ) : m (List α) 
goal: m (List α)

full_name: Mathlib.Meta.FunProp.StateListM
code: /-- The combined state and list monad. -/
abbrev StateListM (σ α : Type u) : Type u 
goal: Type u

full_name: _private.Mathlib.Tactic.FunProp.StateList.0.Mathlib.Meta.FunProp.StateListT.pure
code: @[always_inline, inline]
private def pure (a : α) : StateListT σ m α 
goal: Mathlib.Meta.FunProp.StateListT σ m α

full_name: _private.Mathlib.Tactic.FunProp.StateList.0.Mathlib.Meta.FunProp.StateListT.bind
code: /-- Separately handling lists of length 1 is important to avoid a stack overflow. -/
@[always_inline, inline]
private def bind (x : StateListT σ m α) (f : α → StateListT σ m β) : StateListT σ m β 
goal: Mathlib.Meta.FunProp.StateListT σ m β

full_name: _private.Mathlib.Tactic.FunProp.StateList.0.Mathlib.Meta.FunProp.StateListT.map
code: @[always_inline, inline]
private def map (f : α → β) (x : StateListT σ m α) : StateListT σ m β 
goal: Mathlib.Meta.FunProp.StateListT σ m β

full_name: Mathlib.Meta.FunProp.StateListT.instMonad
code: @[always_inline]
instance : Monad (StateListT σ m) 
goal: Monad (Mathlib.Meta.FunProp.StateListT σ m)

full_name: _private.Mathlib.Tactic.FunProp.StateList.0.Mathlib.Meta.FunProp.StateListT.orElse
code: @[always_inline, inline]
private def orElse (x : StateListT σ m α) (y : Unit → StateListT σ m α) : StateListT σ m α 
goal: Mathlib.Meta.FunProp.StateListT σ m α

full_name: _private.Mathlib.Tactic.FunProp.StateList.0.Mathlib.Meta.FunProp.StateListT.failure
code: @[always_inline, inline]
private def failure : StateListT σ m α 
goal: Mathlib.Meta.FunProp.StateListT σ m α

full_name: Mathlib.Meta.FunProp.StateListT.instAlternative
code: instance : Alternative (StateListT σ m) 
goal: Alternative (Mathlib.Meta.FunProp.StateListT σ m)

full_name: Mathlib.Meta.FunProp.StateListT.get
code: /-- Return the state from `StateListT σ m`. -/
@[always_inline, inline]
protected def get : StateListT σ m σ 
goal: Mathlib.Meta.FunProp.StateListT σ m σ

full_name: Mathlib.Meta.FunProp.StateListT.set
code: /-- Set the state in `StateListT σ m`. -/
@[always_inline, inline]
protected def set : σ → StateListT σ m PUnit 
goal: σ → Mathlib.Meta.FunProp.StateListT σ m PUnit

full_name: Mathlib.Meta.FunProp.StateListT.modifyGet
code: /-- Modify and get the state in `StateListT σ m`. -/
@[always_inline, inline]
protected def modifyGet (f : σ → α × σ) : StateListT σ m α 
goal: Mathlib.Meta.FunProp.StateListT σ m α

full_name: Mathlib.Meta.FunProp.StateListT.lift
code: /-- Lift an action from `m α` to `StateListT σ m α`. -/
@[always_inline, inline]
protected def lift (t : m α) : StateListT σ m α 
goal: Mathlib.Meta.FunProp.StateListT σ m α

full_name: Mathlib.Meta.FunProp.StateListT.instMonadLift
code: instance : MonadLift m (StateListT σ m) 
goal: MonadLift m (Mathlib.Meta.FunProp.StateListT σ m)

full_name: Mathlib.Meta.FunProp.StateListT.instMonadFunctor
code: @[always_inline]
instance : MonadFunctor m (StateListT σ m) 
goal: MonadFunctor m (Mathlib.Meta.FunProp.StateListT σ m)

full_name: Mathlib.Meta.FunProp.StateListT.instMonadExceptOf
code: @[always_inline]
instance{ε} [MonadExceptOf ε m] : MonadExceptOf ε (StateListT σ m) 
goal: MonadExceptOf ε (Mathlib.Meta.FunProp.StateListT σ m)

full_name: Mathlib.Meta.FunProp.instMonadStateOfStateListT
code: instance : MonadStateOf σ (StateListT σ m) 
goal: MonadStateOf σ (Mathlib.Meta.FunProp.StateListT σ m)

full_name: Mathlib.Meta.FunProp.StateListT.monadControl
code: @[always_inline]
instance StateListT.monadControl : MonadControl m (StateListT σ m) 
goal: MonadControl m (Mathlib.Meta.FunProp.StateListT σ m)