Documentation

Mutable.Mutable

Mutable #

structure Mutable (α : Type u) :
  • __mk__ :: (
    • __get__ : α
  • )
Instances For
    @[extern lean_mk_Mutable]
    def Mutable.mk {α : Type u} (a : α) :
    Equations
    Instances For
      @[extern lean_Mutable_get]
      def Mutable.get {α : Type u} (a : Mutable α) :
      α
      Equations
      Instances For
        theorem Mutable.ext {α : Type u} {x : Mutable α} {y : Mutable α} (get : x.get = y.get) :
        x = y
        theorem Mutable.ext_iff {α : Type u} {x : Mutable α} {y : Mutable α} :
        x = y x.get = y.get
        @[simp]
        theorem Mutable.mk_eq_mk {α : Type u} {x : α} {y : α} :
        @[extern lean_Mutable_modify]
        unsafe def Mutable.getModifyUnsafe {α : Type u} (x : Mutable α) (f : αα) :
        α
        Instances For
          @[reducible, inline]
          unsafe abbrev Mutable.getModifyImpl {α : Type u} (x : Mutable α) (f : αα) (hf : ∀ (a : α), f a = a) :
          α
          Instances For
            @[implemented_by Mutable.getModifyImpl]
            def Mutable.getModify {α : Type u} (x : Mutable α) (f : αα) (hf : ∀ (a : α), f a = a) :
            α
            Equations
            • x.getModify f hf = f x.get
            Instances For
              @[extern lean_Mutable_modify2]
              unsafe def Mutable.getModify₂Unsafe {α : Type u} {β : Type v} (x : Mutable α) (f : αβ × α) :
              β
              Instances For
                @[reducible, inline]
                unsafe abbrev Mutable.getModify₂Impl {α : Type u} {β : Type v} (x : Mutable α) (f : αβ × α) (hgf : ∀ (a : α), (f a).snd = a) :
                β
                Instances For
                  @[implemented_by Mutable.getModify₂Impl]
                  def Mutable.getModify₂ {α : Type u} {β : Type v} (x : Mutable α) (f : αβ × α) (hgf : ∀ (a : α), (f a).snd = a) :
                  β
                  Equations
                  • x.getModify₂ f hgf = (f x.get).fst
                  Instances For