Documentation

Lean.Meta.Sym.Arith.Insts

Helpers for synthesizing the optional instances attached to a classified ring: IsCharP, PowIdentity, and NoNatZeroDivisors.

The IsCharP instance of a semiring, if any, and its characteristic when it is a numeral.

  • inst? : Option (Expr × Nat)

    The IsCharP type semiringInst n instance together with the evaluated n, if n is a numeral.

  • symbolic : Bool

    true if an IsCharP instance exists but its characteristic is not a numeral, e.g. 2 ^ w for BitVec w.

Instances For
    def Lean.Meta.Sym.Arith.getCharInfo (u : Level) (type semiringInst : Expr) :

    Returns the IsCharP type semiringInst n instance together with the evaluated n. See CharInfo.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Lean.Meta.Sym.Arith.getIsCharInst? (u : Level) (type semiringInst : Expr) :

      Returns the IsCharP type semiringInst n instance together with the evaluated n, if n is a numeral.

      Equations
      Instances For

        Returns the PowIdentity instance, the CommSemiring instance it was synthesized against, and the evaluated exponent p.

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

          Returns the NoNatZeroDivisors instance for type, synthesizing the NatModule premise first.

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

            Order instances. Each returns none (with a debug issue) when synthInstance? fails.

            def Lean.Meta.Sym.Arith.mkLawfulOrderLTInst? (u : Level) (type : Expr) (ltInst? leInst? : Option Expr) :
            Equations
            Instances For
              Equations
              Instances For
                Equations
                Instances For
                  Equations
                  Instances For
                    Equations
                    Instances For