Documentation

ProofWidgets.Util

Sends #[a, b, c] to `(term| $a ++ $b ++ $c)

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    def ProofWidgets.Util.foldInlsM {α β : Type u_1} {m : Type u_1 → Type u_2} [Monad m] (arr : Array (α β)) (f : Array αm β) :
    m (Array β)

    Collapse adjacent inl (_ : α)s into a β using f. For example, #[.inl a₁, .inl a₂, .inr b, .inl a₃] ↦ #[← f #[a₁, a₂], b, ← f #[a₃]].

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Delaborate the elements of a list literal separately, calling elem on each.

      Equations
      Instances For

        Delaborate the elements of an array literal separately, calling elem on each.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          A copy of Delaborator.annotateTermInfo for other syntactic categories.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            A copy of Delaborator.withAnnotateTermInfo for other syntactic categories.

            Equations
            Instances For
              class MonadSaveCtx (m : TypeType) (n : outParam (TypeType)) :

              Certain monad transformers such as ReaderT and StateT/StateRefT provide additional context (read-only) and state (mutable). MonadSaveCtx m n means that m is a stack of contexts/states on top of n. It provides a way to suspend an m-action by saving the "current" value of this stack.

              For example, m = Lean.MetaM is a stack of contexts and states on top of n = EIO Lean.Exception. Thus we have saveCtxM : Lean.MetaM α → Lean.MetaM (EIO Lean.Exception α).

              • saveCtxM {α : Type} : m αm (n α)

                Transform an action x : m α into an action m (n α) that

                • saves the current context/state of m; and
                • returns an action y : n α that would use the saved context/state if run. Note that because y no longer has access to m's state, any StateT changes that it makes when you run it later will be discarded.
              Instances
                @[implicit_reducible]
                instance instMonadSaveCtx {m : TypeType} [Monad m] :
                Equations
                @[implicit_reducible]
                instance instMonadSaveCtxReaderT {m n : TypeType} [MonadSaveCtx m n] {ρ : Type} :
                Equations
                @[implicit_reducible]
                instance instMonadSaveCtxStateT {m n : TypeType} [Monad m] [MonadSaveCtx m n] {σ : Type} :
                Equations
                @[implicit_reducible]
                instance instMonadSaveCtxStateRefT'OfMonadLiftTST {m n : TypeType} [Monad m] [MonadSaveCtx m n] {ω σ : Type} [MonadLiftT (ST ω) m] :
                Equations
                @[implicit_reducible]
                Equations
                @[implicit_reducible]
                Equations