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
    instance Aesop.EMap.instForMProdExpr {m : TypeType u_1} [Monad m] {α : Type u_2} :
    ForM m (EMap α) (Lean.Expr × α)
    Equations
    • One or more equations did not get rendered due to their size.
    instance Aesop.EMap.instForInProdExpr {m : TypeType u_1} [Monad m] {α : Type u_2} :
    ForIn m (EMap α) (Lean.Expr × α)
    Equations
    • One or more equations did not get rendered due to their size.
    def Aesop.EMap.foldlM {m : TypeType u_1} [Monad m] {σ : Type} {α : Type u_2} (init : σ) (f : σLean.Exprαm σ) (map : EMap α) :
    m σ
    Equations
    • One or more equations did not get rendered due to their size.
    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
        • One or more equations did not get rendered due to their size.
        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
              • One or more equations did not get rendered due to their size.
              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
                      • One or more equations did not get rendered due to their size.
                      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
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            def Aesop.EMap.map {α β : Type} (f : Lean.Exprαβ) (map : EMap α) :
                            EMap β
                            Equations
                            Instances For