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