Documentation

Lean.Meta.Tactic.Grind.Homo

Extension backing the @[grind homo] attribute.

Returns the homomorphism rules tagged with the [grind hom] attribute.

Instances For

    Extension collecting the homomorphism source types: the head constants F of the types τ = F … for which a [grind hom] rule translates Eq τ. The engine marks terms of these types as solver terms so that the E-graph reports their equalities and disequalities (see SolverExtension.markTerm).

    Returns the head constants of the homomorphism source types.

    Instances For

      Ensures a [grind hom] theorem can be applied by Sym.simp without a discharger. Instance-implicit parameters are synthesized during rewriting and need not be determined by the left-hand side. Every other parameter must be inferable from the left-hand side: it must occur in the left-hand side itself (as in (BitVec.cast h a).toNat = a.toNat, where h is instantiated by matching), or in the type of a parameter that does (such parameters are assigned by type unification). A propositional hypothesis failing this test makes the rule conditional: it would have to be discharged when the rule is applied, so the rule would never fire. Any other parameter failing the test cannot be instantiated at all (e.g. it occurs only in the right-hand side).

      Instances For

        Validates and registers a [grind hom] theorem, recording the source type of =-injection rules. See validateHomoTheorem.

        Instances For

          A theorem tagged with the [grind hom_pred] attribute.

          • declName : Name

            Name of the theorem.

          • arity : Nat

            Number of explicit parameters. The theorem is instantiated with the trailing arity arguments of the triggering application.

          Instances For
            @[reducible, inline]

            Map from trigger head symbol to the [grind hom_pred] theorems it activates.

            Instances For

              Extension backing the @[grind homo_pred] attribute.

              Returns the homomorphism predicates tagged with the [grind hom_pred] attribute.

              Instances For

                Validates and registers a [grind hom_pred] theorem. The conclusion of the theorem must contain an application whose trailing arguments are exactly the theorem's explicit parameters. The head symbol of this application is the trigger for the theorem.

                Instances For

                  Returns the instances of the [grind hom_pred] theorems triggered by e. Each instance is a pair (proof, prop) where proof : prop. A registered theorem whose trigger matches e's head symbol is instantiated with e's trailing arguments; instantiations that fail to elaborate (e.g. because the argument types do not match) are discarded.

                  Instances For