Documentation

Init.Data.Nat.Linear

Helper definitions and theorems for constructing linear arithmetic proofs.

@[reducible, inline]
Equations
Instances For
    @[reducible, inline]
    Equations
    Instances For

      When encoding polynomials. We use fixedVar for encoding numerals. The denotation of fixedVar is always 1.

      Instances For
        @[reducible, inline]
        Instances For
          Equations
          Instances For
            Equations
            Instances For
              Equations
              Instances For
                Equations
                Instances For
                  Equations
                  Instances For
                    Instances For
                      Equations
                      Instances For
                        Equations
                        Instances For
                          Equations
                          Instances For
                            Equations
                            Instances For
                              Equations
                              Instances For
                                Equations
                                • e.toNormPoly = e.toPoly.norm
                                Instances For
                                  Equations
                                  Instances For
                                    Equations
                                    • c₁.combine c₂ = match (c₁.lhs.combine c₂.lhs).cancel (c₁.rhs.combine c₂.rhs) with | (lhs, rhs) => { eq := c₁.eq && c₂.eq, lhs := lhs, rhs := rhs }
                                    Instances For
                                      Equations
                                      Instances For
                                        Equations
                                        • c.isUnsat = bif c.eq then c.lhs.isZero && c.rhs.isNonZero || c.lhs.isNonZero && c.rhs.isZero else c.lhs.isNonZero && c.rhs.isZero
                                        Instances For
                                          Equations
                                          • c.isValid = bif c.eq then c.lhs.isZero && c.rhs.isZero else c.lhs.isZero
                                          Instances For
                                            Equations
                                            • c.toPoly = { eq := c.eq, lhs := c.lhs.toPoly, rhs := c.rhs.toPoly }
                                            Instances For
                                              Equations
                                              • c.toNormPoly = match c.lhs.toNormPoly.cancel c.rhs.toNormPoly with | (lhs, rhs) => { eq := c.eq, lhs := lhs, rhs := rhs }
                                              Instances For
                                                @[reducible, inline]
                                                Instances For
                                                  theorem Nat.Linear.Poly.denote_eq_cancelAux (ctx : Nat.Linear.Context) (fuel : Nat) (m₁ m₂ r₁ r₂ : Nat.Linear.Poly) (h : Nat.Linear.Poly.denote_eq ctx (List.reverse r₁ ++ m₁, List.reverse r₂ ++ m₂)) :
                                                  theorem Nat.Linear.Poly.of_denote_eq_cancelAux (ctx : Nat.Linear.Context) (fuel : Nat) (m₁ m₂ r₁ r₂ : Nat.Linear.Poly) (h : Nat.Linear.Poly.denote_eq ctx (Nat.Linear.Poly.cancelAux fuel m₁ m₂ r₁ r₂)) :
                                                  theorem Nat.Linear.Poly.denote_eq_cancel {ctx : Nat.Linear.Context} {m₁ m₂ : Nat.Linear.Poly} (h : Nat.Linear.Poly.denote_eq ctx (m₁, m₂)) :
                                                  Nat.Linear.Poly.denote_eq ctx (m₁.cancel m₂)
                                                  theorem Nat.Linear.Poly.denote_le_cancelAux (ctx : Nat.Linear.Context) (fuel : Nat) (m₁ m₂ r₁ r₂ : Nat.Linear.Poly) (h : Nat.Linear.Poly.denote_le ctx (List.reverse r₁ ++ m₁, List.reverse r₂ ++ m₂)) :
                                                  theorem Nat.Linear.Poly.of_denote_le_cancelAux (ctx : Nat.Linear.Context) (fuel : Nat) (m₁ m₂ r₁ r₂ : Nat.Linear.Poly) (h : Nat.Linear.Poly.denote_le ctx (Nat.Linear.Poly.cancelAux fuel m₁ m₂ r₁ r₂)) :
                                                  theorem Nat.Linear.Poly.denote_le_cancel {ctx : Nat.Linear.Context} {m₁ m₂ : Nat.Linear.Poly} (h : Nat.Linear.Poly.denote_le ctx (m₁, m₂)) :
                                                  Nat.Linear.Poly.denote_le ctx (m₁.cancel m₂)
                                                  theorem Nat.Linear.Expr.of_cancel_eq (ctx : Nat.Linear.Context) (a b c d : Nat.Linear.Expr) (h : a.toNormPoly.cancel b.toNormPoly = (c.toPoly, d.toPoly)) :
                                                  theorem Nat.Linear.Expr.of_cancel_le (ctx : Nat.Linear.Context) (a b c d : Nat.Linear.Expr) (h : a.toNormPoly.cancel b.toNormPoly = (c.toPoly, d.toPoly)) :
                                                  theorem Nat.Linear.Expr.of_cancel_lt (ctx : Nat.Linear.Context) (a b c d : Nat.Linear.Expr) (h : a.inc.toNormPoly.cancel b.toNormPoly = (c.inc.toPoly, d.toPoly)) :
                                                  theorem Nat.Linear.ExprCnstr.toPoly_norm_eq (c : Nat.Linear.ExprCnstr) :
                                                  c.toPoly.norm = c.toNormPoly
                                                  def Nat.elimOffset {α : Sort u} (a b k : Nat) (h₁ : a + k = b + k) (h₂ : a = bα) :
                                                  α
                                                  Instances For