Documentation

Aesop.Index.Forward

Index for forward rules.

  • tree : Lean.Meta.DiscrTree (ForwardRule × PremiseIndex)

    Maps expressions T to all tuples (r, i) where r : ForwardRule, i : PremiseIndex and the i-th argument of the type of r.expr (counting from zero) likely unifies with T.

  • nameToRule : Lean.PHashMap RuleName ForwardRule

    Indexes the forward rules contained in tree by name.

  • constRules : Lean.PHashSet ForwardRule

    Constant forward rules, i.e. forward rules that have no premises and no rule pattern.

Instances For
    Equations
    Instances For
      @[implicit_reducible]
      Equations
      def Aesop.ForwardIndex.trace (traceOpt : TraceOption) (idx : ForwardIndex) :
      Lean.CoreM Unit

      Trace the rules contained in idx if traceOpt is enabled.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Merge two indices.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Insert a forward rule into the ForwardIndex.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            def Aesop.ForwardIndex.get (idx : ForwardIndex) (e : Lean.Expr) :
            Lean.MetaM (Array (ForwardRule × PremiseIndex))

            Get the forward rules whose maximal premises likely unify with e. Each returned pair (r, i) contains a rule r and the index i of the premise of r that likely unifies with e.

            Equations
            Instances For

              Get the forward rule with the given rule name.

              Equations
              Instances For

                Get forward rule matches for the constant forward rules (i.e., those with no premises and no rule pattern). Accordingly, the returned matches contain no hypotheses.

                Equations
                Instances For