AFTD Auto-Formalizing Theoretical Domains

Cslib.Algorithms.Lean.TimeM.pure

defimported Lean

Lifts a pure value into a TimeM computation with zero time cost. Prefer to use pure instead of TimeM.pure.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
protected def Cslib.Algorithms.Lean.TimeM.pure [Zero T] {α} (a : α) : TimeM T α
Defined in
CSLib, `Cslib.Algorithms.Lean.TimeM.pure`
Lean proof
By Sorrachai Yingchareonthawornhcai, Eric Wieser, from github.com/leanprover/cslib at 3951377e5a3f (Copyright (c) 2025 Sorrachai Yingchareonthawornhcai. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.33.0.
Verified
08 Oct 2026
Axioms
none listed
Built on 1
  • Cslib.Algorithms.Lean.TimeMA monad for tracking time complexity of computations. TimeM T α represents a computation that returns a value of type α and…
Used by 1

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
/-- Lifts a pure value into a `TimeM` computation with zero time cost. Prefer to use `pure` instead of `TimeM.pure`. -/
protected def Cslib.Algorithms.Lean.TimeM.pure [Zero T] {α} (a : α) : TimeM T α :=
  ⟨a, 0⟩
See it in the graphDiscuss this resultChallenge it