Documentation

Lean.Meta.Tactic.Grind.Arith.CommRing.Util

@[inline]
Equations
  • One or more equations did not get rendered due to their size.
Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        • ringId : Nat
        • checkCoeffDvd : Bool

          If checkCoeffDvd is true, then when using a polynomial k*m - p to simplify .. + k'*m*m_2 + ..., the substitution is performed IF

          • k divides k', OR
          • Ring implements NoNatZeroDivisors.

          We need this check when simplifying disequalities. In this case, if we perform the simplification anyway, we may end up with a proof that k * q = 0, but we cannot deduce q = 0 since the ring does not implement NoNatZeroDivisors See comment at PolyDerivation.

        Instances For
          • getRing : m Ring
          • modifyRing : (RingRing)m Unit
          • canonExpr : Exprm Expr

            Helper function for removing dependency on GoalM. In RingM and SemiringM, this is just sharedCommon (← canon e) When printing counterexamples, we are at MetaM, and this is just the identity function.

          • synthInstance? : Exprm (Option Expr)

            Helper function for removing dependency on GoalM. During search we want to track the instances synthesized by grind, and this is Grind.synthInstance.

          Instances
            @[always_inline]
            Equations
            • One or more equations did not get rendered due to their size.
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[reducible, inline]

              We don't want to keep carrying the RingId around.

              Equations
              Instances For
                @[reducible, inline]
                abbrev Lean.Meta.Grind.Arith.CommRing.RingM.run {α : Type} (ringId : Nat) (x : RingM α) :
                Equations
                Instances For
                  @[reducible, inline]
                  Equations
                  Instances For
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      Equations
                      • One or more equations did not get rendered due to their size.
                      @[reducible, inline]
                      abbrev Lean.Meta.Grind.Arith.CommRing.SemiringM.run {α : Type} (semiringId : Nat) (x : SemiringM α) :
                      Equations
                      Instances For
                        @[reducible, inline]
                        Equations
                        Instances For
                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              Equations
                              • One or more equations did not get rendered due to their size.
                              @[inline]
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                @[reducible, inline]
                                Equations
                                Instances For
                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For

                                      Returns some c if the current ring has a nonzero characteristic c.

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

                                        Returns some (charInst, c) if the current ring has a nonzero characteristic c.

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

                                          Returns true if the current ring satisfies the property

                                          ∀ (k : Nat) (a : α), k ≠ 0 → OfNat.ofNat (α := α) k * a = 0 → a = 0
                                          
                                          Equations
                                          Instances For

                                            Returns true if the current ring has a IsCharP instance.

                                            Equations
                                            Instances For

                                              Returns the pair (charInst, c). If the ring does not have a IsCharP instance, then throws internal error.

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