Documentation

Mutable.Mutable

Mutable #

opaque MutableAux (α : Type u) :
{ x : Type u // x = α }
def Mutable (α : Type u) :
Equations
Instances For
    @[extern lean_st_mk_ref]
    def Mutable.mk {α : Type u} (a : α) :
    Equations
    Instances For
      @[never_extract, extern lean_st_ref_get]
      def Mutable.get {α : Type u} (x : Mutable α) :
      α
      Equations
      Instances For
        @[never_extract, extern lean_Mutable_set]
        unsafe def Mutable.set {α : Type u} {β : Type v} (x : Mutable α) (a : α) (b : β) :
        β
        Equations
        Instances For
          @[simp]
          theorem Mutable.mk_get {α : Type u} (x : Mutable α) :
          mk x.get = x
          @[simp]
          theorem Mutable.get_mk {α : Type u} (x : α) :
          (mk x).get = x
          def Mutable.rec {α : Type u} {motive : Mutable αSort u_1} (h : (a : α) → motive (mk a)) (x : Mutable α) :
          motive x
          Equations
          Instances For
            theorem Mutable.ext {α : Type u} {x y : Mutable α} (get : x.get = y.get) :
            x = y
            theorem Mutable.ext_iff {α : Type u} {x y : Mutable α} :
            x = y x.get = y.get
            @[simp]
            theorem Mutable.mk_inj {α : Type u} {x y : α} :
            mk x = mk y x = y
            unsafe def Mutable.modifyUnsafe {α : Type u} (x : Mutable α) (f : αα) :
            α
            Equations
            Instances For
              @[reducible, inline]
              unsafe abbrev Mutable.modifyImpl {α : Type u} (x : Mutable α) (f : αα) (hf : ∀ (a : α), f a = a) :
              α
              Equations
              Instances For
                @[implemented_by Mutable.modifyImpl]
                def Mutable.modify {α : Type u} (x : Mutable α) (f : αα) (hf : ∀ (a : α), f a = a) :
                α
                Equations
                Instances For
                  unsafe def Mutable.getModifyUnsafe {α : Type u} {β : Type v} (x : Mutable α) (f : αβ × α) :
                  β
                  Equations
                  Instances For
                    @[reducible, inline]
                    unsafe abbrev Mutable.getModifyImpl {α : Type u} {β : Type v} (x : Mutable α) (f : αβ × α) (hgf : ∀ (a : α), (f a).snd = a) :
                    β
                    Equations
                    Instances For
                      @[implemented_by Mutable.getModifyImpl]
                      def Mutable.getModify {α : Type u} {β : Type v} (x : Mutable α) (f : αβ × α) (hgf : ∀ (a : α), (f a).snd = a) :
                      β
                      Equations
                      Instances For
                        @[simp]
                        theorem Mutable.getModify_mk {α : Type u} {β : Type v} {a : α} {f : αβ × α} {hgf : ∀ (a : α), (f a).snd = a} :
                        (mk a).getModify f hgf = (f a).fst