Documentation

Aesop.EMap

structure Aesop.EMap (α : Type u_1) :
Type u_1

A map whose keys are expressions. Keys are identified up to defeq. We use reducible transparency and treat metavariables as rigid (i.e., unassignable).

  • The mappings stored in the map. Defeq expressions are identified, so for each equivalence class of defeq expressions we only store one representative. Missing values indicate expressions that were removed from the map.

  • An index for rep. For each expression e at index i in rep, idx.getMatch returns a list of indexes containing i. This is used as a pre-filter during lookups/insertions/modifications to reduce the number of defeq comparisons.

Instances For
    Instances For
      @[implicit_reducible]
      instance Aesop.instInhabitedEMap {a✝ : Type u_1} :
      def Aesop.EMap.empty {α : Type u_1} :
      EMap α
      Instances For
        @[implicit_reducible]
        @[implicit_reducible]
        instance Aesop.EMap.instForMProdExpr {m : TypeType u_1} [Monad m] {α : Type u_2} :
        ForM m (EMap α) (Lean.Expr × α)
        @[implicit_reducible]
        instance Aesop.EMap.instForInProdExpr {m : TypeType u_1} [Monad m] {α : Type u_2} :
        ForIn m (EMap α) (Lean.Expr × α)
        def Aesop.EMap.foldlM {m : TypeType u_1} [Monad m] {σ : Type} {α : Type u_2} (init : σ) (f : σLean.Exprαm σ) (map : EMap α) :
        m σ
        Instances For
          def Aesop.EMap.foldl {σ : Type} {α : Type u_1} (init : σ) (f : σLean.Exprασ) (map : EMap α) :
          σ
          Instances For
            @[specialize #[]]
            def Aesop.EMap.alterM {m : TypeType u_1} [Monad m] [MonadLiftT Lean.MetaM m] {α β : Type} (e : Lean.Expr) (f : αm (Option α × β)) (map : EMap α) :
            m (EMap α × Option β)
            Instances For
              def Aesop.EMap.alter {α β : Type} (e : Lean.Expr) (f : αOption α × β) (map : EMap α) :
              Instances For
                @[specialize #[]]
                def Aesop.EMap.insertNew {m : TypeType u_1} [Monad m] [MonadLiftT Lean.MetaM m] {α : Type} (e : Lean.Expr) (a : α) (map : EMap α) :
                m (EMap α)
                Instances For
                  @[specialize #[]]
                  def Aesop.EMap.insertWithM {m : TypeType u_1} [Monad m] [MonadLiftT Lean.MetaM m] {α : Type} (e : Lean.Expr) (f : Option αm α) (map : EMap α) :
                  m (EMap α × Option α × α)
                  Instances For
                    def Aesop.EMap.insertWith {α : Type} (e : Lean.Expr) (f : Option αα) (map : EMap α) :
                    Instances For
                      def Aesop.EMap.insert {α : Type} (e : Lean.Expr) (a : α) (map : EMap α) :
                      Instances For
                        def Aesop.EMap.singleton {m : TypeType u_1} [Monad m] [MonadLiftT Lean.MetaM m] {α : Type} (e : Lean.Expr) (a : α) :
                        m (EMap α)
                        Instances For
                          Instances For
                            def Aesop.EMap.find? {α : Type} (e : Lean.Expr) (map : EMap α) :
                            Instances For
                              @[specialize #[]]
                              def Aesop.EMap.mapM {m : TypeType u_1} [Monad m] {α β : Type} (f : Lean.Exprαm β) (map : EMap α) :
                              m (EMap β)
                              Instances For
                                def Aesop.EMap.map {α β : Type} (f : Lean.Exprαβ) (map : EMap α) :
                                EMap β
                                Instances For