Documentation

Init.Data.Int.Linear

Helper definitions and theorems for constructing linear arithmetic proofs.

@[reducible, inline]
Equations
Instances For
    @[reducible, inline]
    Equations
    Instances For
      @[inline]
      Equations
      Instances For
        Instances For
          @[inline]
          noncomputable abbrev Int.Internal.Linear.Expr.denote_k (ctx : Context) (e : Expr) :

          Expr.denote for kernel reduction. Theorems that take user hypotheses state them with Expr.denote_k, so that the kernel unfolds Expr.rec instead of Expr.denote's brecOn. It is an abbrev so that the kernel's lazy delta reduction unfolds it before the user's terms.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            Instances For
              noncomputable def Int.Internal.Linear.Poly.beq' (p₁ : Poly) :
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                @[simp]
                theorem Int.Internal.Linear.Poly.beq'_eq (p₁ p₂ : Poly) :
                (p₁.beq' p₂ = true) = (p₁ = p₂)
                @[inline]
                noncomputable abbrev Int.Internal.Linear.Poly.denote'.go (ctx : Context) (p : Poly) :
                Int → Int
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  @[inline]
                  noncomputable abbrev Int.Internal.Linear.Poly.denote' (ctx : Context) (p : Poly) :

                  Similar to Poly.denote, but produces a denotation better for simp +arith. Remark: we used to convert Poly back into Expr to achieve that.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    @[simp]
                    theorem Int.Internal.Linear.Poly.denote'_go_eq_denote (ctx : Context) (p : Poly) (r : Int) :
                    denote'.go ctx p r = denote ctx p + r
                    theorem Int.Internal.Linear.Poly.denote'_add (ctx : Context) (a : Int) (x : Var) (p : Poly) :
                    denote' ctx (add a x p) = a * Var.denote ctx x + denote ctx p
                    noncomputable def Int.Internal.Linear.Poly.addConst_k (p : Poly) (k : Int) :
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      Equations
                      Instances For

                        Normalizes the given polynomial by fusing monomial and constants.

                        Equations
                        Instances For
                          def Int.Internal.Linear.Poly.combine' (fuel : Nat) (p₁ p₂ : Poly) :
                          Equations
                          Instances For
                            @[reducible, inline]
                            Equations
                            Instances For

                              Converts the given expression into a polynomial.

                              Equations
                              Instances For

                                Converts the given expression into a polynomial, and then normalizes it.

                                Equations
                                Instances For

                                  Kernel-reduction variants of Poly.insert, Poly.norm, Expr.toPoly' and Expr.norm, written with recursors and Int.beq', for use in certificates. The kernel evaluates them 2-3x faster than the versions defined by structural recursion.

                                  noncomputable def Int.Internal.Linear.Poly.insert_k (k : Int) (v : Var) (p : Poly) :
                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    @[simp]
                                    noncomputable def Int.Internal.Linear.Poly.norm_k (p : Poly) :
                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      noncomputable def Int.Internal.Linear.Expr.toPoly'_k.go :
                                      Expr → Int → Poly → Poly
                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        noncomputable def Int.Internal.Linear.Expr.norm_k (e : Expr) :
                                        Equations
                                        Instances For

                                          Returns the ceiling of the division a / b. That is, the result is equivalent to ⌈a / b⌉. Examples:

                                          • cdiv 7 3 returns 3
                                          • cdiv (-7) 3 returns -2.
                                          Equations
                                          Instances For

                                            Returns the ceiling-compatible remainder of the division a / b. This function ensures that the remainder is consistent with cdiv, meaning:

                                            a = b * cdiv a b + cmod a b
                                            

                                            See theorem cdiv_add_cmod. We also have

                                            -b < cmod a b ≤ 0
                                            
                                            Equations
                                            Instances For
                                              theorem Int.Internal.Linear.cmod_gt_of_pos (a : Int) {b : Int} (h : 0 < b) :
                                              cmod a b > -b
                                              theorem Int.Internal.Linear.cmod_nonpos (a : Int) {b : Int} (h : b ≠ 0) :
                                              cmod a b ≤ 0

                                              Returns the constant of the given linear polynomial.

                                              Equations
                                              Instances For

                                                p.div k divides all coefficients of the polynomial p by k, but rounds up the constant using cdiv. Notes:

                                                • We only use this function with ks that divides all coefficients.
                                                • We use cdiv for the constant to implement the inequality tightening rule.
                                                Equations
                                                Instances For

                                                  Returns true if k divides all coefficients of the given linear polynomial.

                                                  Equations
                                                  Instances For
                                                    noncomputable def Int.Internal.Linear.cdiv_k (a b : Int) :

                                                    cdiv for kernel reduction.

                                                    Equations
                                                    Instances For
                                                      @[simp]
                                                      noncomputable def Int.Internal.Linear.cmod_k (a b : Int) :

                                                      cmod for kernel reduction.

                                                      Equations
                                                      Instances For
                                                        @[simp]

                                                        Poly.getConst for kernel reduction.

                                                        Equations
                                                        Instances For
                                                          noncomputable def Int.Internal.Linear.Poly.div_k (k : Int) (p : Poly) :

                                                          Poly.div for kernel reduction.

                                                          Equations
                                                          • One or more equations did not get rendered due to their size.
                                                          Instances For
                                                            @[simp]
                                                            noncomputable def Int.Internal.Linear.Poly.divCoeffs_k (k : Int) (p : Poly) :

                                                            Poly.divCoeffs for kernel reduction.

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

                                                              p.mul k multiplies all coefficients and constant of the polynomial p by k.

                                                              Equations
                                                              Instances For
                                                                Equations
                                                                Instances For
                                                                  noncomputable def Int.Internal.Linear.Poly.mul_k (p : Poly) (k : Int) :
                                                                  Equations
                                                                  • One or more equations did not get rendered due to their size.
                                                                  Instances For
                                                                    @[simp]
                                                                    noncomputable def Int.Internal.Linear.Poly.combine_mul_s (a b : Int) (p₁ : Poly) :

                                                                    a * p₁ + b * p₂ for kernel reduction: merges the two polynomials by structural recursion on p₁ and, for each monomial of p₁, on p₂. Unlike combine', it needs no fuel.

                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For
                                                                      noncomputable def Int.Internal.Linear.Poly.combine_mul_k (a b : Int) (p₁ p₂ : Poly) :
                                                                      Equations
                                                                      Instances For
                                                                        @[simp]
                                                                        theorem Int.Internal.Linear.Poly.denote_mul (ctx : Context) (p : Poly) (k : Int) :
                                                                        denote ctx (p.mul k) = k * denote ctx p
                                                                        theorem Int.Internal.Linear.Poly.denote_addConst (ctx : Context) (p : Poly) (k : Int) :
                                                                        denote ctx (p.addConst k) = denote ctx p + k
                                                                        theorem Int.Internal.Linear.Poly.denote_insert (ctx : Context) (k : Int) (v : Var) (p : Poly) :
                                                                        denote ctx (insert k v p) = denote ctx p + k * Var.denote ctx v
                                                                        theorem Int.Internal.Linear.Poly.denote_append (ctx : Context) (p₁ p₂ : Poly) :
                                                                        denote ctx (p₁.append p₂) = denote ctx p₁ + denote ctx p₂
                                                                        theorem Int.Internal.Linear.Poly.denote_combine' (ctx : Context) (fuel : Nat) (p₁ p₂ : Poly) :
                                                                        denote ctx (combine' fuel p₁ p₂) = denote ctx p₁ + denote ctx p₂
                                                                        theorem Int.Internal.Linear.Poly.denote_combine (ctx : Context) (p₁ p₂ : Poly) :
                                                                        denote ctx (p₁.combine p₂) = denote ctx p₁ + denote ctx p₂
                                                                        theorem Int.Internal.Linear.Poly.denote_combine_mul_s (ctx : Context) (a b : Int) (p₁ p₂ : Poly) :
                                                                        denote ctx (combine_mul_s a b p₁ p₂) = a * denote ctx p₁ + b * denote ctx p₂
                                                                        theorem Int.Internal.Linear.Poly.denote_combine_mul_k (ctx : Context) (a b : Int) (p₁ p₂ : Poly) :
                                                                        denote ctx (combine_mul_k a b p₁ p₂) = a * denote ctx p₁ + b * denote ctx p₂
                                                                        theorem Int.Internal.Linear.sub_fold (a b : Int) :
                                                                        a.sub b = a - b
                                                                        theorem Int.Internal.Linear.Expr.denote_toPoly'_go {k : Int} {p : Poly} (ctx : Context) (e : Expr) :
                                                                        Poly.denote ctx (toPoly'.go k e p) = k * denote ctx e + Poly.denote ctx p
                                                                        theorem Int.Internal.Linear.Expr.eq_of_norm_eq (ctx : Context) (e : Expr) (p : Poly) (h : e.norm.beq' p = true) :
                                                                        denote ctx e = Poly.denote' ctx p
                                                                        noncomputable def Int.Internal.Linear.norm_eq_cert (lhs rhs : Expr) (p : Poly) :
                                                                        Equations
                                                                        Instances For
                                                                          theorem Int.Internal.Linear.norm_eq (ctx : Context) (lhs rhs : Expr) (p : Poly) (h : norm_eq_cert lhs rhs p = true) :
                                                                          (Expr.denote ctx lhs = Expr.denote ctx rhs) = (Poly.denote' ctx p = 0)
                                                                          theorem Int.Internal.Linear.norm_le (ctx : Context) (lhs rhs : Expr) (p : Poly) (h : norm_eq_cert lhs rhs p = true) :
                                                                          (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = (Poly.denote' ctx p ≤ 0)
                                                                          theorem Int.Internal.Linear.norm_eq_var (ctx : Context) (lhs rhs : Expr) (x y : Var) (h : norm_eq_var_cert lhs rhs x y = true) :
                                                                          (Expr.denote ctx lhs = Expr.denote ctx rhs) = (Var.denote ctx x = Var.denote ctx y)
                                                                          theorem Int.Internal.Linear.norm_eq_var_const (ctx : Context) (lhs rhs : Expr) (x : Var) (k : Int) (h : norm_eq_var_const_cert lhs rhs x k = true) :
                                                                          (Expr.denote ctx lhs = Expr.denote ctx rhs) = (Var.denote ctx x = k)
                                                                          theorem Int.Internal.Linear.norm_eq_coeff' (ctx : Context) (p p' : Poly) (k : Int) :
                                                                          p = p'.mul k → k > 0 → (Poly.denote ctx p = 0 ↔ Poly.denote ctx p' = 0)
                                                                          noncomputable def Int.Internal.Linear.norm_eq_coeff_cert (lhs rhs : Expr) (p : Poly) (k : Int) :
                                                                          Equations
                                                                          Instances For
                                                                            theorem Int.Internal.Linear.norm_eq_coeff (ctx : Context) (lhs rhs : Expr) (p : Poly) (k : Int) :
                                                                            norm_eq_coeff_cert lhs rhs p k = true → (Expr.denote ctx lhs = Expr.denote ctx rhs) = (Poly.denote' ctx p = 0)
                                                                            theorem Int.Internal.Linear.norm_le_coeff (ctx : Context) (lhs rhs : Expr) (p : Poly) (k : Int) :
                                                                            norm_eq_coeff_cert lhs rhs p k = true → (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = (Poly.denote' ctx p ≤ 0)
                                                                            noncomputable def Int.Internal.Linear.norm_le_coeff_tight_cert (lhs rhs : Expr) (p : Poly) (k : Int) :
                                                                            Equations
                                                                            • One or more equations did not get rendered due to their size.
                                                                            Instances For
                                                                              theorem Int.Internal.Linear.norm_le_coeff_tight (ctx : Context) (lhs rhs : Expr) (p : Poly) (k : Int) :
                                                                              norm_le_coeff_tight_cert lhs rhs p k = true → (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = (Poly.denote' ctx p ≤ 0)
                                                                              Equations
                                                                              Instances For
                                                                                theorem Int.Internal.Linear.eq_eq_false (ctx : Context) (lhs rhs : Expr) :
                                                                                (lhs.sub rhs).norm.isUnsatEq_k = true → (Expr.denote ctx lhs = Expr.denote ctx rhs) = False
                                                                                theorem Int.Internal.Linear.eq_eq_true (ctx : Context) (lhs rhs : Expr) :
                                                                                (lhs.sub rhs).norm.isValidEq = true → (Expr.denote ctx lhs = Expr.denote ctx rhs) = True
                                                                                theorem Int.Internal.Linear.le_eq_false (ctx : Context) (lhs rhs : Expr) :
                                                                                (lhs.sub rhs).norm.isUnsatLe = true → (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = False
                                                                                theorem Int.Internal.Linear.le_eq_true (ctx : Context) (lhs rhs : Expr) :
                                                                                (lhs.sub rhs).norm.isValidLe = true → (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = True
                                                                                noncomputable def Int.Internal.Linear.unsatEqDivCoeffCert (lhs rhs : Expr) (k : Int) :
                                                                                Equations
                                                                                • One or more equations did not get rendered due to their size.
                                                                                Instances For
                                                                                  theorem Int.Internal.Linear.eq_eq_false_of_divCoeff (ctx : Context) (lhs rhs : Expr) (k : Int) :
                                                                                  unsatEqDivCoeffCert lhs rhs k = true → (Expr.denote ctx lhs = Expr.denote ctx rhs) = False
                                                                                  noncomputable def Int.Internal.Linear.Poly.gcdCoeffs_k (p : Poly) (k : Int) :

                                                                                  Poly.gcdCoeffs for kernel reduction.

                                                                                  Equations
                                                                                  • One or more equations did not get rendered due to their size.
                                                                                  Instances For
                                                                                    noncomputable def Int.Internal.Linear.Poly.isUnsatDvd_k (k : Int) (p : Poly) :

                                                                                    Poly.isUnsatDvd for kernel reduction.

                                                                                    Equations
                                                                                    Instances For
                                                                                      theorem Int.Internal.Linear.norm_dvd (ctx : Context) (k : Int) (e : Expr) (p : Poly) :
                                                                                      e.norm_k.beq' p = true → (k ∣ Expr.denote ctx e) = (k ∣ Poly.denote' ctx p)
                                                                                      noncomputable def Int.Internal.Linear.dvd_coeff_cert (k₁ : Int) (p₁ : Poly) (k₂ : Int) (p₂ : Poly) (k : Int) :
                                                                                      Equations
                                                                                      Instances For
                                                                                        noncomputable def Int.Internal.Linear.norm_dvd_gcd_cert (k₁ : Int) (e₁ : Expr) (k₂ : Int) (p₂ : Poly) (k : Int) :
                                                                                        Equations
                                                                                        Instances For
                                                                                          theorem Int.Internal.Linear.norm_dvd_gcd (ctx : Context) (k₁ : Int) (e₁ : Expr) (k₂ : Int) (p₂ : Poly) (g : Int) :
                                                                                          norm_dvd_gcd_cert k₁ e₁ k₂ p₂ g = true → (k₁ ∣ Expr.denote ctx e₁) = (k₂ ∣ Poly.denote' ctx p₂)
                                                                                          theorem Int.Internal.Linear.dvd_coeff (ctx : Context) (k₁ : Int) (p₁ : Poly) (k₂ : Int) (p₂ : Poly) (g : Int) :
                                                                                          dvd_coeff_cert k₁ p₁ k₂ p₂ g = true → k₁ ∣ Poly.denote' ctx p₁ → k₂ ∣ Poly.denote' ctx p₂
                                                                                          noncomputable def Int.Internal.Linear.dvd_elim_cert (k₁ : Int) (p₁ : Poly) (k₂ : Int) (p₂ : Poly) :
                                                                                          Equations
                                                                                          • One or more equations did not get rendered due to their size.
                                                                                          Instances For
                                                                                            theorem Int.Internal.Linear.dvd_elim (ctx : Context) (k₁ : Int) (p₁ : Poly) (k₂ : Int) (p₂ : Poly) :
                                                                                            dvd_elim_cert k₁ p₁ k₂ p₂ = true → k₁ ∣ Poly.denote' ctx p₁ → k₂ ∣ Poly.denote' ctx p₂
                                                                                            noncomputable def Int.Internal.Linear.dvd_solve_combine_cert (d₁ : Int) (p₁ : Poly) (d₂ : Int) (p₂ : Poly) (d : Int) (p : Poly) (g α β : Int) :
                                                                                            Equations
                                                                                            • One or more equations did not get rendered due to their size.
                                                                                            Instances For
                                                                                              theorem Int.Internal.Linear.dvd_solve_combine (ctx : Context) (d₁ : Int) (p₁ : Poly) (d₂ : Int) (p₂ : Poly) (d : Int) (p : Poly) (g α β : Int) :
                                                                                              dvd_solve_combine_cert d₁ p₁ d₂ p₂ d p g α β = true → d₁ ∣ Poly.denote' ctx p₁ → d₂ ∣ Poly.denote' ctx p₂ → d ∣ Poly.denote' ctx p
                                                                                              noncomputable def Int.Internal.Linear.dvd_solve_elim_cert (d₁ : Int) (p₁ : Poly) (d₂ : Int) (p₂ : Poly) (d : Int) (p : Poly) :
                                                                                              Equations
                                                                                              • One or more equations did not get rendered due to their size.
                                                                                              Instances For
                                                                                                theorem Int.Internal.Linear.dvd_solve_elim (ctx : Context) (d₁ : Int) (p₁ : Poly) (d₂ : Int) (p₂ : Poly) (d : Int) (p : Poly) :
                                                                                                dvd_solve_elim_cert d₁ p₁ d₂ p₂ d p = true → d₁ ∣ Poly.denote' ctx p₁ → d₂ ∣ Poly.denote' ctx p₂ → d ∣ Poly.denote' ctx p
                                                                                                theorem Int.Internal.Linear.dvd_norm (ctx : Context) (d : Int) (p₁ p₂ : Poly) :
                                                                                                p₁.norm_k.beq' p₂ = true → d ∣ Poly.denote' ctx p₁ → d ∣ Poly.denote' ctx p₂

                                                                                                Reduces every coefficient of p, including the constant, modulo m using balanced residues, and drops the monomials whose coefficient becomes zero.

                                                                                                Equations
                                                                                                Instances For
                                                                                                  noncomputable def Int.Internal.Linear.Poly.bmodCoeffs_k (m : Nat) (p : Poly) :
                                                                                                  Equations
                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                  Instances For
                                                                                                    noncomputable def Int.Internal.Linear.dvd_bmod_coeffs_cert (d : Int) (p₁ p₂ : Poly) (a : Int) :
                                                                                                    Equations
                                                                                                    Instances For
                                                                                                      theorem Int.Internal.Linear.dvd_bmod_coeffs (ctx : Context) (d : Int) (p₁ p₂ : Poly) (a : Int) :
                                                                                                      dvd_bmod_coeffs_cert d p₁ p₂ a = true → d ∣ Poly.denote' ctx p₁ → d ∣ Poly.denote' ctx p₂

                                                                                                      d ∣ p₁ implies d ∣ a * p₁, and the coefficients of the latter can be reduced modulo d. The solver uses a = 1, or the inverse of the leading coefficient of p₁ modulo d when it is coprime to d, so that p₂ is equivalent to p₁ and its leading coefficient is ±1.

                                                                                                      theorem Int.Internal.Linear.dvd_of_eq_zero (ctx : Context) (d : Int) (p : Poly) :
                                                                                                      Poly.denote' ctx p = 0 → d ∣ Poly.denote' ctx p
                                                                                                      noncomputable def Int.Internal.Linear.eq_of_dvd_ediv_cert (d : Int) (e : Expr) (p p' : Poly) (x : Var) :
                                                                                                      Equations
                                                                                                      Instances For
                                                                                                        theorem Int.Internal.Linear.eq_of_dvd_ediv (ctx : Context) (d : Int) (e : Expr) (p p' : Poly) (x : Var) (hx : Var.denote ctx x = Expr.denote_k ctx e / d) :
                                                                                                        eq_of_dvd_ediv_cert d e p p' x = true → d ∣ Poly.denote' ctx p → Poly.denote' ctx p' = 0

                                                                                                        Omega-style elimination step: given d ∣ p and a variable x denoting e / d where e normalizes to p, we have p - d*x = 0.

                                                                                                        theorem Int.Internal.Linear.le_norm (ctx : Context) (p₁ p₂ : Poly) (h : p₁.norm_k.beq' p₂ = true) :
                                                                                                        Poly.denote' ctx p₁ ≤ 0 → Poly.denote' ctx p₂ ≤ 0
                                                                                                        theorem Int.Internal.Linear.le_norm_rfl (ctx : Context) (p₁ p₂ : Poly) (h : p₂ = p₁.norm_k) :
                                                                                                        Poly.denote' ctx p₁ ≤ 0 → Poly.denote' ctx p₂ ≤ 0
                                                                                                        noncomputable def Int.Internal.Linear.le_coeff_cert (p₁ p₂ : Poly) (k : Int) :
                                                                                                        Equations
                                                                                                        Instances For
                                                                                                          theorem Int.Internal.Linear.le_coeff (ctx : Context) (p₁ p₂ : Poly) (k : Int) :
                                                                                                          le_coeff_cert p₁ p₂ k = true → Poly.denote' ctx p₁ ≤ 0 → Poly.denote' ctx p₂ ≤ 0
                                                                                                          noncomputable def Int.Internal.Linear.le_neg_cert (p₁ p₂ : Poly) :
                                                                                                          Equations
                                                                                                          Instances For
                                                                                                            theorem Int.Internal.Linear.le_neg (ctx : Context) (p₁ p₂ : Poly) :
                                                                                                            le_neg_cert p₁ p₂ = true → ¬Poly.denote' ctx p₁ ≤ 0 → Poly.denote' ctx p₂ ≤ 0
                                                                                                            noncomputable def Int.Internal.Linear.le_weaken_cert (p₁ p₂ : Poly) (k : Int) :

                                                                                                            p₁ is p₂ + k with 0 ≤ k, and hence p₂ ≤ p₁.

                                                                                                            Equations
                                                                                                            Instances For
                                                                                                              theorem Int.Internal.Linear.le_weaken (ctx : Context) (p₁ p₂ : Poly) (k : Int) :
                                                                                                              le_weaken_cert p₁ p₂ k = true → Poly.denote' ctx p₁ ≤ 0 → Poly.denote' ctx p₂ ≤ 0
                                                                                                              theorem Int.Internal.Linear.eq_le_weaken (ctx : Context) (p₁ p₂ : Poly) (k : Int) :
                                                                                                              le_weaken_cert p₁ p₂ k = true → Poly.denote' ctx p₁ = 0 → Poly.denote' ctx p₂ ≤ 0
                                                                                                              theorem Int.Internal.Linear.eq_le_weaken_neg (ctx : Context) (p₁ p₂ : Poly) (k : Int) :
                                                                                                              le_weaken_cert (p₁.mul_k (-1)) p₂ k = true → Poly.denote' ctx p₁ = 0 → Poly.denote' ctx p₂ ≤ 0

                                                                                                              Poly.leadCoeff for kernel reduction.

                                                                                                              Equations
                                                                                                              Instances For
                                                                                                                noncomputable def Int.Internal.Linear.le_combine_cert (p₁ p₂ p₃ : Poly) :
                                                                                                                Equations
                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                Instances For
                                                                                                                  theorem Int.Internal.Linear.le_combine (ctx : Context) (p₁ p₂ p₃ : Poly) :
                                                                                                                  le_combine_cert p₁ p₂ p₃ = true → Poly.denote' ctx p₁ ≤ 0 → Poly.denote' ctx p₂ ≤ 0 → Poly.denote' ctx p₃ ≤ 0
                                                                                                                  theorem Int.Internal.Linear.le_combine_rfl (ctx : Context) (p₁ p₂ p₃ : Poly) (h : p₃ = Poly.combine_mul_k (ofNat p₂.leadCoeff_k.natAbs_k) (ofNat p₁.leadCoeff_k.natAbs_k) p₁ p₂) :
                                                                                                                  Poly.denote' ctx p₁ ≤ 0 → Poly.denote' ctx p₂ ≤ 0 → Poly.denote' ctx p₃ ≤ 0
                                                                                                                  theorem Int.Internal.Linear.le_combine_coeff_rfl (ctx : Context) (p₁ p₂ p p₃ : Poly) (k : Int) (h₁ : p = Poly.combine_mul_k (ofNat p₂.leadCoeff_k.natAbs_k) (ofNat p₁.leadCoeff_k.natAbs_k) p₁ p₂) (h₂ : (Int.blt' 0 k && Poly.divCoeffs_k k p) = true) (h₃ : p₃ = Poly.div_k k p) :
                                                                                                                  Poly.denote' ctx p₁ ≤ 0 → Poly.denote' ctx p₂ ≤ 0 → Poly.denote' ctx p₃ ≤ 0

                                                                                                                  Poly.isUnsatLe for kernel reduction.

                                                                                                                  Equations
                                                                                                                  Instances For
                                                                                                                    theorem Int.Internal.Linear.eq_norm (ctx : Context) (p₁ p₂ : Poly) (h : p₁.norm_k.beq' p₂ = true) :
                                                                                                                    Poly.denote' ctx p₁ = 0 → Poly.denote' ctx p₂ = 0
                                                                                                                    theorem Int.Internal.Linear.eq_norm_rfl (ctx : Context) (p₁ p₂ : Poly) (h : p₂ = p₁.norm_k) :
                                                                                                                    Poly.denote' ctx p₁ = 0 → Poly.denote' ctx p₂ = 0
                                                                                                                    noncomputable def Int.Internal.Linear.eq_coeff_cert (p p' : Poly) (k : Int) :
                                                                                                                    Equations
                                                                                                                    Instances For
                                                                                                                      theorem Int.Internal.Linear.eq_coeff (ctx : Context) (p p' : Poly) (k : Int) :
                                                                                                                      eq_coeff_cert p p' k = true → Poly.denote' ctx p = 0 → Poly.denote' ctx p' = 0
                                                                                                                      Equations
                                                                                                                      Instances For
                                                                                                                        noncomputable def Int.Internal.Linear.Poly.coeff_k (p : Poly) (x : Var) :
                                                                                                                        Equations
                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                        Instances For
                                                                                                                          noncomputable def Int.Internal.Linear.eq_dvd_subst_cert (x : Var) (p₁ : Poly) (d₂ : Int) (p₂ : Poly) (d₃ : Int) (p₃ : Poly) :
                                                                                                                          Equations
                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                          Instances For
                                                                                                                            theorem Int.Internal.Linear.eq_dvd_subst (ctx : Context) (x : Var) (p₁ : Poly) (d₂ : Int) (p₂ : Poly) (d₃ : Int) (p₃ : Poly) :
                                                                                                                            eq_dvd_subst_cert x p₁ d₂ p₂ d₃ p₃ = true → Poly.denote' ctx p₁ = 0 → d₂ ∣ Poly.denote' ctx p₂ → d₃ ∣ Poly.denote' ctx p₃
                                                                                                                            noncomputable def Int.Internal.Linear.eq_eq_subst'_cert (a b : Int) (p₁ p₂ p₃ : Poly) :
                                                                                                                            Equations
                                                                                                                            Instances For
                                                                                                                              theorem Int.Internal.Linear.eq_eq_subst' (ctx : Context) (a b : Int) (p₁ p₂ p₃ : Poly) :
                                                                                                                              eq_eq_subst'_cert a b p₁ p₂ p₃ = true → Poly.denote' ctx p₁ = 0 → Poly.denote' ctx p₂ = 0 → Poly.denote' ctx p₃ = 0
                                                                                                                              theorem Int.Internal.Linear.eq_eq_subst'_rfl (ctx : Context) (a b : Int) (p₁ p₂ p₃ : Poly) (h : p₃ = Poly.combine_mul_k b a.neg_k p₁ p₂) :
                                                                                                                              Poly.denote' ctx p₁ = 0 → Poly.denote' ctx p₂ = 0 → Poly.denote' ctx p₃ = 0
                                                                                                                              noncomputable def Int.Internal.Linear.eq_le_subst_nonneg_cert (x : Var) (p₁ p₂ p₃ : Poly) :
                                                                                                                              Equations
                                                                                                                              Instances For
                                                                                                                                theorem Int.Internal.Linear.eq_le_subst_nonneg (ctx : Context) (x : Var) (p₁ p₂ p₃ : Poly) :
                                                                                                                                eq_le_subst_nonneg_cert x p₁ p₂ p₃ = true → Poly.denote' ctx p₁ = 0 → Poly.denote' ctx p₂ ≤ 0 → Poly.denote' ctx p₃ ≤ 0
                                                                                                                                theorem Int.Internal.Linear.eq_le_subst_nonneg_rfl (ctx : Context) (x : Var) (p₁ p₂ p₃ : Poly) (h₁ : Int.ble' 0 (p₁.coeff_k x) = true) (h₂ : p₃ = Poly.combine_mul_k (p₁.coeff_k x) (p₂.coeff_k x).neg_k p₂ p₁) :
                                                                                                                                Poly.denote' ctx p₁ = 0 → Poly.denote' ctx p₂ ≤ 0 → Poly.denote' ctx p₃ ≤ 0
                                                                                                                                noncomputable def Int.Internal.Linear.eq_le_subst_nonpos_cert (x : Var) (p₁ p₂ p₃ : Poly) :
                                                                                                                                Equations
                                                                                                                                Instances For
                                                                                                                                  theorem Int.Internal.Linear.eq_le_subst_nonpos (ctx : Context) (x : Var) (p₁ p₂ p₃ : Poly) :
                                                                                                                                  eq_le_subst_nonpos_cert x p₁ p₂ p₃ = true → Poly.denote' ctx p₁ = 0 → Poly.denote' ctx p₂ ≤ 0 → Poly.denote' ctx p₃ ≤ 0
                                                                                                                                  theorem Int.Internal.Linear.eq_le_subst_nonpos_rfl (ctx : Context) (x : Var) (p₁ p₂ p₃ : Poly) (h₁ : (p₁.coeff_k x).ble' 0 = true) (h₂ : p₃ = Poly.combine_mul_k (p₂.coeff_k x) (p₁.coeff_k x).neg_k p₁ p₂) :
                                                                                                                                  Poly.denote' ctx p₁ = 0 → Poly.denote' ctx p₂ ≤ 0 → Poly.denote' ctx p₃ ≤ 0
                                                                                                                                  noncomputable def Int.Internal.Linear.eq_of_core_cert (p₁ p₂ p₃ : Poly) :
                                                                                                                                  Equations
                                                                                                                                  Instances For
                                                                                                                                    theorem Int.Internal.Linear.eq_of_core (ctx : Context) (p₁ p₂ p₃ : Poly) :
                                                                                                                                    eq_of_core_cert p₁ p₂ p₃ = true → Poly.denote' ctx p₁ = Poly.denote' ctx p₂ → Poly.denote' ctx p₃ = 0
                                                                                                                                    theorem Int.Internal.Linear.eq_of_core_rfl (ctx : Context) (p₁ p₂ p₃ : Poly) (h : p₃ = Poly.combine_mul_k 1 (-1) p₁ p₂) :
                                                                                                                                    Poly.denote' ctx p₁ = Poly.denote' ctx p₂ → Poly.denote' ctx p₃ = 0
                                                                                                                                    Equations
                                                                                                                                    Instances For
                                                                                                                                      theorem Int.Internal.Linear.diseq_norm (ctx : Context) (p₁ p₂ : Poly) (h : p₁.norm_k.beq' p₂ = true) :
                                                                                                                                      Poly.denote' ctx p₁ ≠ 0 → Poly.denote' ctx p₂ ≠ 0
                                                                                                                                      theorem Int.Internal.Linear.diseq_norm_rfl (ctx : Context) (p₁ p₂ : Poly) (h : p₂ = p₁.norm_k) :
                                                                                                                                      Poly.denote' ctx p₁ ≠ 0 → Poly.denote' ctx p₂ ≠ 0
                                                                                                                                      theorem Int.Internal.Linear.diseq_coeff (ctx : Context) (p p' : Poly) (k : Int) :
                                                                                                                                      eq_coeff_cert p p' k = true → Poly.denote' ctx p ≠ 0 → Poly.denote' ctx p' ≠ 0
                                                                                                                                      theorem Int.Internal.Linear.diseq_neg (ctx : Context) (p p' : Poly) :
                                                                                                                                      p'.beq' (p.mul_k (-1)) = true → Poly.denote' ctx p ≠ 0 → Poly.denote' ctx p' ≠ 0
                                                                                                                                      noncomputable def Int.Internal.Linear.diseq_eq_subst_cert (x : Var) (p₁ p₂ p₃ : Poly) :
                                                                                                                                      Equations
                                                                                                                                      Instances For
                                                                                                                                        theorem Int.Internal.Linear.eq_diseq_subst (ctx : Context) (x : Var) (p₁ p₂ p₃ : Poly) :
                                                                                                                                        diseq_eq_subst_cert x p₁ p₂ p₃ = true → Poly.denote' ctx p₁ = 0 → Poly.denote' ctx p₂ ≠ 0 → Poly.denote' ctx p₃ ≠ 0
                                                                                                                                        theorem Int.Internal.Linear.eq_diseq_subst_rfl (ctx : Context) (x : Var) (p₁ p₂ p₃ : Poly) (h₁ : (p₁.coeff_k x).bneZero_k = true) (h₂ : p₃ = Poly.combine_mul_k (p₂.coeff_k x) (p₁.coeff_k x).neg_k p₁ p₂) :
                                                                                                                                        Poly.denote' ctx p₁ = 0 → Poly.denote' ctx p₂ ≠ 0 → Poly.denote' ctx p₃ ≠ 0
                                                                                                                                        theorem Int.Internal.Linear.diseq_of_core (ctx : Context) (p₁ p₂ p₃ : Poly) :
                                                                                                                                        eq_of_core_cert p₁ p₂ p₃ = true → Poly.denote' ctx p₁ ≠ Poly.denote' ctx p₂ → Poly.denote' ctx p₃ ≠ 0
                                                                                                                                        noncomputable def Int.Internal.Linear.eq_of_le_ge_cert (p₁ p₂ : Poly) :
                                                                                                                                        Equations
                                                                                                                                        Instances For
                                                                                                                                          theorem Int.Internal.Linear.eq_of_le_ge (ctx : Context) (p₁ p₂ : Poly) :
                                                                                                                                          eq_of_le_ge_cert p₁ p₂ = true → Poly.denote' ctx p₁ ≤ 0 → Poly.denote' ctx p₂ ≤ 0 → Poly.denote' ctx p₁ = 0
                                                                                                                                          noncomputable def Int.Internal.Linear.le_of_le_diseq_cert (p₁ p₂ p₃ : Poly) :
                                                                                                                                          Equations
                                                                                                                                          Instances For
                                                                                                                                            theorem Int.Internal.Linear.le_of_le_diseq (ctx : Context) (p₁ p₂ p₃ : Poly) :
                                                                                                                                            le_of_le_diseq_cert p₁ p₂ p₃ = true → Poly.denote' ctx p₁ ≤ 0 → Poly.denote' ctx p₂ ≠ 0 → Poly.denote' ctx p₃ ≤ 0
                                                                                                                                            noncomputable def Int.Internal.Linear.diseq_split_cert (p₁ p₂ p₃ : Poly) :
                                                                                                                                            Equations
                                                                                                                                            Instances For
                                                                                                                                              theorem Int.Internal.Linear.diseq_split (ctx : Context) (p₁ p₂ p₃ : Poly) :
                                                                                                                                              diseq_split_cert p₁ p₂ p₃ = true → Poly.denote' ctx p₁ ≠ 0 → Poly.denote' ctx p₂ ≤ 0 ∨ Poly.denote' ctx p₃ ≤ 0
                                                                                                                                              theorem Int.Internal.Linear.diseq_split_resolve (ctx : Context) (p₁ p₂ p₃ : Poly) :
                                                                                                                                              diseq_split_cert p₁ p₂ p₃ = true → Poly.denote' ctx p₁ ≠ 0 → ¬Poly.denote' ctx p₂ ≤ 0 → Poly.denote' ctx p₃ ≤ 0
                                                                                                                                              theorem Int.Internal.Linear.orOver_one {p : Nat → Prop} :
                                                                                                                                              OrOver 1 p → p 0
                                                                                                                                              theorem Int.Internal.Linear.orOver_resolve {n : Nat} {p : Nat → Prop} :
                                                                                                                                              OrOver (n + 1) p → ¬p n → OrOver n p
                                                                                                                                              noncomputable def Int.Internal.Linear.cooper_dvd_left_cert (p₁ p₂ p₃ : Poly) (d : Int) (n : Nat) :
                                                                                                                                              Equations
                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                              Instances For
                                                                                                                                                Equations
                                                                                                                                                Instances For
                                                                                                                                                  noncomputable def Int.Internal.Linear.Poly.tail_k (p : Poly) :

                                                                                                                                                  Poly.tail for kernel reduction.

                                                                                                                                                  Equations
                                                                                                                                                  Instances For
                                                                                                                                                    def Int.Internal.Linear.cooper_dvd_left_split (ctx : Context) (p₁ p₂ p₃ : Poly) (d : Int) (k : Nat) :
                                                                                                                                                    Equations
                                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                                    Instances For
                                                                                                                                                      theorem Int.Internal.Linear.cooper_dvd_left (ctx : Context) (p₁ p₂ p₃ : Poly) (d : Int) (n : Nat) :
                                                                                                                                                      cooper_dvd_left_cert p₁ p₂ p₃ d n = true → Poly.denote' ctx p₁ ≤ 0 → Poly.denote' ctx p₂ ≤ 0 → d ∣ Poly.denote' ctx p₃ → OrOver n (cooper_dvd_left_split ctx p₁ p₂ p₃ d)
                                                                                                                                                      noncomputable def Int.Internal.Linear.cooper_dvd_left_split_ineq_cert (p₁ p₂ : Poly) (k b : Int) (p' : Poly) :
                                                                                                                                                      Equations
                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                      Instances For
                                                                                                                                                        theorem Int.Internal.Linear.cooper_dvd_left_split_ineq (ctx : Context) (p₁ p₂ p₃ : Poly) (d : Int) (k : Nat) (b : Int) (p' : Poly) :
                                                                                                                                                        cooper_dvd_left_split ctx p₁ p₂ p₃ d k → cooper_dvd_left_split_ineq_cert p₁ p₂ (↑k) b p' = true → Poly.denote' ctx p' ≤ 0
                                                                                                                                                        theorem Int.Internal.Linear.cooper_dvd_left_split_dvd1 (ctx : Context) (p₁ p₂ p₃ : Poly) (d : Int) (k : Nat) (a : Int) (p' : Poly) :
                                                                                                                                                        cooper_dvd_left_split ctx p₁ p₂ p₃ d k → cooper_dvd_left_split_dvd1_cert p₁ p' a ↑k = true → a ∣ Poly.denote' ctx p'
                                                                                                                                                        noncomputable def Int.Internal.Linear.cooper_dvd_left_split_dvd2_cert (p₁ p₃ : Poly) (d : Int) (k : Nat) (d' : Int) (p' : Poly) :
                                                                                                                                                        Equations
                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                        Instances For
                                                                                                                                                          theorem Int.Internal.Linear.cooper_dvd_left_split_dvd2 (ctx : Context) (p₁ p₂ p₃ : Poly) (d : Int) (k : Nat) (d' : Int) (p' : Poly) :
                                                                                                                                                          cooper_dvd_left_split ctx p₁ p₂ p₃ d k → cooper_dvd_left_split_dvd2_cert p₁ p₃ d k d' p' = true → d' ∣ Poly.denote' ctx p'
                                                                                                                                                          noncomputable def Int.Internal.Linear.cooper_left_cert (p₁ p₂ : Poly) (n : Nat) :
                                                                                                                                                          Equations
                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                          Instances For
                                                                                                                                                            def Int.Internal.Linear.cooper_left_split (ctx : Context) (p₁ p₂ : Poly) (k : Nat) :
                                                                                                                                                            Equations
                                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                                            Instances For
                                                                                                                                                              theorem Int.Internal.Linear.cooper_left (ctx : Context) (p₁ p₂ : Poly) (n : Nat) :
                                                                                                                                                              cooper_left_cert p₁ p₂ n = true → Poly.denote' ctx p₁ ≤ 0 → Poly.denote' ctx p₂ ≤ 0 → OrOver n (cooper_left_split ctx p₁ p₂)
                                                                                                                                                              noncomputable def Int.Internal.Linear.cooper_left_split_ineq_cert (p₁ p₂ : Poly) (k b : Int) (p' : Poly) :
                                                                                                                                                              Equations
                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                              Instances For
                                                                                                                                                                theorem Int.Internal.Linear.cooper_left_split_ineq (ctx : Context) (p₁ p₂ : Poly) (k : Nat) (b : Int) (p' : Poly) :
                                                                                                                                                                cooper_left_split ctx p₁ p₂ k → cooper_left_split_ineq_cert p₁ p₂ (↑k) b p' = true → Poly.denote' ctx p' ≤ 0
                                                                                                                                                                noncomputable def Int.Internal.Linear.cooper_left_split_dvd_cert (p₁ p' : Poly) (a k : Int) :
                                                                                                                                                                Equations
                                                                                                                                                                Instances For
                                                                                                                                                                  theorem Int.Internal.Linear.cooper_left_split_dvd (ctx : Context) (p₁ p₂ : Poly) (k : Nat) (a : Int) (p' : Poly) :
                                                                                                                                                                  cooper_left_split ctx p₁ p₂ k → cooper_left_split_dvd_cert p₁ p' a ↑k = true → a ∣ Poly.denote' ctx p'
                                                                                                                                                                  noncomputable def Int.Internal.Linear.cooper_dvd_right_cert (p₁ p₂ p₃ : Poly) (d : Int) (n : Nat) :
                                                                                                                                                                  Equations
                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                  Instances For
                                                                                                                                                                    def Int.Internal.Linear.cooper_dvd_right_split (ctx : Context) (p₁ p₂ p₃ : Poly) (d : Int) (k : Nat) :
                                                                                                                                                                    Equations
                                                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                                                    Instances For
                                                                                                                                                                      theorem Int.Internal.Linear.cooper_dvd_right (ctx : Context) (p₁ p₂ p₃ : Poly) (d : Int) (n : Nat) :
                                                                                                                                                                      cooper_dvd_right_cert p₁ p₂ p₃ d n = true → Poly.denote' ctx p₁ ≤ 0 → Poly.denote' ctx p₂ ≤ 0 → d ∣ Poly.denote' ctx p₃ → OrOver n (cooper_dvd_right_split ctx p₁ p₂ p₃ d)
                                                                                                                                                                      noncomputable def Int.Internal.Linear.cooper_dvd_right_split_ineq_cert (p₁ p₂ : Poly) (k a : Int) (p' : Poly) :
                                                                                                                                                                      Equations
                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                      Instances For
                                                                                                                                                                        theorem Int.Internal.Linear.cooper_dvd_right_split_ineq (ctx : Context) (p₁ p₂ p₃ : Poly) (d : Int) (k : Nat) (a : Int) (p' : Poly) :
                                                                                                                                                                        cooper_dvd_right_split ctx p₁ p₂ p₃ d k → cooper_dvd_right_split_ineq_cert p₁ p₂ (↑k) a p' = true → Poly.denote' ctx p' ≤ 0
                                                                                                                                                                        theorem Int.Internal.Linear.cooper_dvd_right_split_dvd1 (ctx : Context) (p₁ p₂ p₃ : Poly) (d : Int) (k : Nat) (b : Int) (p' : Poly) :
                                                                                                                                                                        cooper_dvd_right_split ctx p₁ p₂ p₃ d k → cooper_dvd_right_split_dvd1_cert p₂ p' b ↑k = true → b ∣ Poly.denote' ctx p'
                                                                                                                                                                        noncomputable def Int.Internal.Linear.cooper_dvd_right_split_dvd2_cert (p₂ p₃ : Poly) (d : Int) (k : Nat) (d' : Int) (p' : Poly) :
                                                                                                                                                                        Equations
                                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                                        Instances For
                                                                                                                                                                          theorem Int.Internal.Linear.cooper_dvd_right_split_dvd2 (ctx : Context) (p₁ p₂ p₃ : Poly) (d : Int) (k : Nat) (d' : Int) (p' : Poly) :
                                                                                                                                                                          cooper_dvd_right_split ctx p₁ p₂ p₃ d k → cooper_dvd_right_split_dvd2_cert p₂ p₃ d k d' p' = true → d' ∣ Poly.denote' ctx p'
                                                                                                                                                                          noncomputable def Int.Internal.Linear.cooper_right_cert (p₁ p₂ : Poly) (n : Nat) :
                                                                                                                                                                          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
                                                                                                                                                                              theorem Int.Internal.Linear.cooper_right (ctx : Context) (p₁ p₂ : Poly) (n : Nat) :
                                                                                                                                                                              cooper_right_cert p₁ p₂ n = true → Poly.denote' ctx p₁ ≤ 0 → Poly.denote' ctx p₂ ≤ 0 → OrOver n (cooper_right_split ctx p₁ p₂)
                                                                                                                                                                              noncomputable def Int.Internal.Linear.cooper_right_split_ineq_cert (p₁ p₂ : Poly) (k a : Int) (p' : Poly) :
                                                                                                                                                                              Equations
                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                              Instances For
                                                                                                                                                                                theorem Int.Internal.Linear.cooper_right_split_ineq (ctx : Context) (p₁ p₂ : Poly) (k : Nat) (a : Int) (p' : Poly) :
                                                                                                                                                                                cooper_right_split ctx p₁ p₂ k → cooper_right_split_ineq_cert p₁ p₂ (↑k) a p' = true → Poly.denote' ctx p' ≤ 0
                                                                                                                                                                                noncomputable def Int.Internal.Linear.cooper_right_split_dvd_cert (p₂ p' : Poly) (b k : Int) :
                                                                                                                                                                                Equations
                                                                                                                                                                                Instances For
                                                                                                                                                                                  theorem Int.Internal.Linear.cooper_right_split_dvd (ctx : Context) (p₁ p₂ : Poly) (k : Nat) (b : Int) (p' : Poly) :
                                                                                                                                                                                  cooper_right_split ctx p₁ p₂ k → cooper_right_split_dvd_cert p₂ p' b ↑k = true → b ∣ Poly.denote' ctx p'
                                                                                                                                                                                  @[reducible, inline]
                                                                                                                                                                                  abbrev Int.Internal.Linear.Poly.casesOnAdd (p : Poly) (k : Int → Var → Poly → Bool) :
                                                                                                                                                                                  Equations
                                                                                                                                                                                  Instances For
                                                                                                                                                                                    @[reducible, inline]
                                                                                                                                                                                    Equations
                                                                                                                                                                                    Instances For
                                                                                                                                                                                      noncomputable def Int.Internal.Linear.cooper_unsat_cert (p₁ p₂ p₃ : Poly) (d α β : Int) :
                                                                                                                                                                                      Equations
                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                      Instances For
                                                                                                                                                                                        theorem Int.Internal.Linear.cooper_unsat (ctx : Context) (p₁ p₂ p₃ : Poly) (d α β : Int) :
                                                                                                                                                                                        cooper_unsat_cert p₁ p₂ p₃ d α β = true → Poly.denote' ctx p₁ ≤ 0 → Poly.denote' ctx p₂ ≤ 0 → d ∣ Poly.denote' ctx p₃ → False
                                                                                                                                                                                        theorem Int.Internal.Linear.ediv_emod (x y : Int) :
                                                                                                                                                                                        -1 * x + y * (x / y) + x % y = 0
                                                                                                                                                                                        theorem Int.Internal.Linear.emod_nonneg (x y : Int) :
                                                                                                                                                                                        y.bneZero_k = true → -1 * (x % y) ≤ 0
                                                                                                                                                                                        theorem Int.Internal.Linear.emod_le (x y n : Int) :
                                                                                                                                                                                        emod_le_cert y n = true → x % y + n ≤ 0
                                                                                                                                                                                        noncomputable def Int.Internal.Linear.dvd_le_tight_mod_cert (d : Int) (p₁ p₂ p₃ : Poly) (t g : Int) :

                                                                                                                                                                                        Certificate for dvd_le_tight_mod: g is a positive divisor of d, p₂ - t*p₁ has all its variable coefficients divisible by g, and p₃ is p₂ with its constant increased by the distance from p₂ - t*p₁ to the next multiple of g below it.

                                                                                                                                                                                        Equations
                                                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                                                        Instances For
                                                                                                                                                                                          theorem Int.Internal.Linear.dvd_le_tight_mod (ctx : Context) (d : Int) (p₁ p₂ p₃ : Poly) (t g : Int) :
                                                                                                                                                                                          dvd_le_tight_mod_cert d p₁ p₂ p₃ t g = true → d ∣ Poly.denote' ctx p₁ → Poly.denote' ctx p₂ ≤ 0 → Poly.denote' ctx p₃ ≤ 0

                                                                                                                                                                                          Given d ∣ p₁ and p₂ ≤ 0, if p₂ ≡ c (mod g) for a divisor g of d (witnessed by p₂ - t*p₁ having variable coefficients divisible by g), then p₂ is at most the largest value ≤ 0 congruent to c modulo g. Generalizes dvd_le_tight, which is the case t = ±1, g = d, p₂ - t*p₁ constant.

                                                                                                                                                                                          theorem Int.Internal.Linear.le_norm_expr (ctx : Context) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                                                          norm_eq_cert lhs rhs p = true → Expr.denote_k ctx lhs ≤ Expr.denote_k ctx rhs → Poly.denote' ctx p ≤ 0
                                                                                                                                                                                          theorem Int.Internal.Linear.le_norm_expr_rfl (ctx : Context) (lhs rhs : Expr) (p : Poly) (h : p = (lhs.sub rhs).norm_k) :
                                                                                                                                                                                          Expr.denote_k ctx lhs ≤ Expr.denote_k ctx rhs → Poly.denote' ctx p ≤ 0
                                                                                                                                                                                          noncomputable def Int.Internal.Linear.not_le_norm_expr_cert (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                                                          Equations
                                                                                                                                                                                          Instances For
                                                                                                                                                                                            theorem Int.Internal.Linear.not_le_norm_expr (ctx : Context) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                                                            not_le_norm_expr_cert lhs rhs p = true → ¬Expr.denote_k ctx lhs ≤ Expr.denote_k ctx rhs → Poly.denote' ctx p ≤ 0
                                                                                                                                                                                            theorem Int.Internal.Linear.dvd_norm_expr (ctx : Context) (d : Int) (e : Expr) (p : Poly) :
                                                                                                                                                                                            p.beq' e.norm_k = true → d ∣ Expr.denote_k ctx e → d ∣ Poly.denote' ctx p
                                                                                                                                                                                            theorem Int.Internal.Linear.eq_norm_expr (ctx : Context) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                                                            norm_eq_cert lhs rhs p = true → Expr.denote_k ctx lhs = Expr.denote_k ctx rhs → Poly.denote' ctx p = 0
                                                                                                                                                                                            theorem Int.Internal.Linear.eq_norm_expr_rfl (ctx : Context) (lhs rhs : Expr) (p : Poly) (h : p = (lhs.sub rhs).norm_k) :
                                                                                                                                                                                            Expr.denote_k ctx lhs = Expr.denote_k ctx rhs → Poly.denote' ctx p = 0
                                                                                                                                                                                            theorem Int.Internal.Linear.not_eq_norm_expr (ctx : Context) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                                                            norm_eq_cert lhs rhs p = true → ¬Expr.denote_k ctx lhs = Expr.denote_k ctx rhs → ¬Poly.denote' ctx p = 0
                                                                                                                                                                                            theorem Int.Internal.Linear.of_not_dvd (a b : Int) :
                                                                                                                                                                                            a.bneZero_k = true → ¬a ∣ b → b % a > 0
                                                                                                                                                                                            noncomputable def Int.Internal.Linear.eq_def_cert (x : Var) (xPoly p : Poly) :
                                                                                                                                                                                            Equations
                                                                                                                                                                                            Instances For
                                                                                                                                                                                              theorem Int.Internal.Linear.eq_def (ctx : Context) (x : Var) (xPoly p : Poly) :
                                                                                                                                                                                              eq_def_cert x xPoly p = true → Var.denote ctx x = Poly.denote' ctx xPoly → Poly.denote' ctx p = 0
                                                                                                                                                                                              theorem Int.Internal.Linear.eq_def_rfl (ctx : Context) (x : Var) (xPoly p : Poly) (h : p = Poly.add (-1) x xPoly) :
                                                                                                                                                                                              Var.denote ctx x = Poly.denote' ctx xPoly → Poly.denote' ctx p = 0
                                                                                                                                                                                              theorem Int.Internal.Linear.eq_def_norm (ctx : Context) (x : Var) (xPoly xPoly' p : Poly) :
                                                                                                                                                                                              eq_def_cert x xPoly' p = true → Var.denote ctx x = Poly.denote' ctx xPoly → Poly.denote' ctx xPoly = Poly.denote' ctx xPoly' → Poly.denote' ctx p = 0
                                                                                                                                                                                              noncomputable def Int.Internal.Linear.eq_def'_cert (x : Var) (e : Expr) (p : Poly) :
                                                                                                                                                                                              Equations
                                                                                                                                                                                              Instances For
                                                                                                                                                                                                theorem Int.Internal.Linear.eq_def' (ctx : Context) (x : Var) (e : Expr) (p : Poly) :
                                                                                                                                                                                                eq_def'_cert x e p = true → Var.denote ctx x = Expr.denote_k ctx e → Poly.denote' ctx p = 0
                                                                                                                                                                                                theorem Int.Internal.Linear.eq_def'_rfl (ctx : Context) (x : Var) (e : Expr) (p : Poly) (h : p = Poly.add (-1) x e.norm_k) :
                                                                                                                                                                                                Var.denote ctx x = Expr.denote_k ctx e → Poly.denote' ctx p = 0
                                                                                                                                                                                                noncomputable def Int.Internal.Linear.eq_def'_norm_cert (x : Var) (e : Expr) (ePoly ePoly' p : Poly) :
                                                                                                                                                                                                Equations
                                                                                                                                                                                                Instances For
                                                                                                                                                                                                  theorem Int.Internal.Linear.eq_def'_norm (ctx : Context) (x : Var) (e : Expr) (ePoly ePoly' p : Poly) :
                                                                                                                                                                                                  eq_def'_norm_cert x e ePoly ePoly' p = true → Var.denote ctx x = Expr.denote_k ctx e → Poly.denote' ctx ePoly = Poly.denote' ctx ePoly' → Poly.denote' ctx p = 0
                                                                                                                                                                                                  theorem Int.Internal.Linear.eq_norm_poly (ctx : Context) (p p' : Poly) :
                                                                                                                                                                                                  Poly.denote' ctx p = Poly.denote' ctx p' → Poly.denote' ctx p = 0 → Poly.denote' ctx p' = 0
                                                                                                                                                                                                  theorem Int.Internal.Linear.le_norm_poly (ctx : Context) (p p' : Poly) :
                                                                                                                                                                                                  Poly.denote' ctx p = Poly.denote' ctx p' → Poly.denote' ctx p ≤ 0 → Poly.denote' ctx p' ≤ 0
                                                                                                                                                                                                  theorem Int.Internal.Linear.diseq_norm_poly (ctx : Context) (p p' : Poly) :
                                                                                                                                                                                                  Poly.denote' ctx p = Poly.denote' ctx p' → Poly.denote' ctx p ≠ 0 → Poly.denote' ctx p' ≠ 0
                                                                                                                                                                                                  theorem Int.Internal.Linear.dvd_norm_poly (ctx : Context) (d : Int) (p p' : Poly) :
                                                                                                                                                                                                  Poly.denote' ctx p = Poly.denote' ctx p' → d ∣ Poly.denote' ctx p → d ∣ Poly.denote' ctx p'
                                                                                                                                                                                                  theorem Int.Internal.Linear.natCast_sub (x y : Nat) :
                                                                                                                                                                                                  ↑(x - y) = if ↑y + -1 * ↑x ≤ 0 then ↑x + -1 * ↑y else 0

                                                                                                                                                                                                  Helper theorem for linearizing nonlinear terms

                                                                                                                                                                                                  noncomputable def Int.Internal.Linear.var_eq_cert (x : Var) (k : Int) (p : Poly) :
                                                                                                                                                                                                  Equations
                                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                    theorem Int.Internal.Linear.var_eq (ctx : Context) (x : Var) (k : Int) (p : Poly) :
                                                                                                                                                                                                    var_eq_cert x k p = true → Poly.denote' ctx p = 0 → Var.denote ctx x = k
                                                                                                                                                                                                    theorem Int.Internal.Linear.of_var_eq_mul (ctx : Context) (x : Var) (k : Int) (y : Var) (p : Poly) :
                                                                                                                                                                                                    of_var_eq_mul_cert x k y p = true → Var.denote ctx x = k * Var.denote ctx y → Poly.denote' ctx p = 0
                                                                                                                                                                                                    theorem Int.Internal.Linear.of_var_eq_var (ctx : Context) (x y : Var) (p : Poly) :
                                                                                                                                                                                                    of_var_eq_var_cert x y p = true → Var.denote ctx x = Var.denote ctx y → Poly.denote' ctx p = 0
                                                                                                                                                                                                    theorem Int.Internal.Linear.of_var_eq (ctx : Context) (x : Var) (k : Int) (p : Poly) :
                                                                                                                                                                                                    of_var_eq_cert x k p = true → Var.denote ctx x = k → Poly.denote' ctx p = 0
                                                                                                                                                                                                    theorem Int.Internal.Linear.mul_eq_kk (a b k₁ k₂ k : Int) (h₁ : a = k₁) (h₂ : b = k₂) (h₃ : (k₁.mul_k k₂).beq' k = true) :
                                                                                                                                                                                                    a * b = k
                                                                                                                                                                                                    theorem Int.Internal.Linear.mul_eq_kkx (a b k₁ k₂ c k : Int) (h₁ : a = k₁) (h₂ : b = k₂ * c) (h₃ : (k₁.mul_k k₂).beq' k = true) :
                                                                                                                                                                                                    a * b = k * c
                                                                                                                                                                                                    theorem Int.Internal.Linear.mul_eq_kxk (a b k₁ c k₂ k : Int) (h₁ : a = k₁ * c) (h₂ : b = k₂) (h₃ : (k₁.mul_k k₂).beq' k = true) :
                                                                                                                                                                                                    a * b = k * c
                                                                                                                                                                                                    theorem Int.Internal.Linear.mul_eq_zero_left (a b : Int) (h : a = 0) :
                                                                                                                                                                                                    a * b = 0
                                                                                                                                                                                                    theorem Int.Internal.Linear.mul_eq_zero_right (a b : Int) (h : b = 0) :
                                                                                                                                                                                                    a * b = 0
                                                                                                                                                                                                    theorem Int.Internal.Linear.div_eq (a b k : Int) (h : b = k) :
                                                                                                                                                                                                    a / b = a / k
                                                                                                                                                                                                    theorem Int.Internal.Linear.mod_eq (a b k : Int) (h : b = k) :
                                                                                                                                                                                                    a % b = a % k
                                                                                                                                                                                                    theorem Int.Internal.Linear.div_eq' (a b b' k : Int) (h₁ : b = b') (h₂ : k.beq' (a.ediv_k b') = true) :
                                                                                                                                                                                                    a / b = k
                                                                                                                                                                                                    theorem Int.Internal.Linear.mod_eq' (a b b' k : Int) (h₁ : b = b') (h₂ : k.beq' (a.emod_k b') = true) :
                                                                                                                                                                                                    a % b = k
                                                                                                                                                                                                    theorem Int.Internal.Linear.pow_eq (a : Int) (b : Nat) (a' b' k : Int) (h₁ : a = a') (h₂ : ↑b = b') (h₃ : k.beq' (a'.pow_k b'.toNat_k) = true) :
                                                                                                                                                                                                    a ^ b = k

                                                                                                                                                                                                    Poly.isValidEq for kernel reduction.

                                                                                                                                                                                                    Equations
                                                                                                                                                                                                    Instances For

                                                                                                                                                                                                      Poly.isValidLe for kernel reduction.

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

                                                                                                                                                                                                        Variants of the theorems used by simp +arith that state the user's terms with Expr.denote_k, so that the kernel matches them by unfolding Expr.rec instead of Expr.denote's brecOn.

                                                                                                                                                                                                        theorem Int.Internal.Linear.eq_eq_false_k (ctx : Context) (lhs rhs : Expr) (h : (lhs.sub rhs).norm_k.isUnsatEq_k = true) :
                                                                                                                                                                                                        (Expr.denote_k ctx lhs = Expr.denote_k ctx rhs) = False
                                                                                                                                                                                                        theorem Int.Internal.Linear.eq_eq_true_k (ctx : Context) (lhs rhs : Expr) (h : (lhs.sub rhs).norm_k.isValidEq_k = true) :
                                                                                                                                                                                                        (Expr.denote_k ctx lhs = Expr.denote_k ctx rhs) = True
                                                                                                                                                                                                        theorem Int.Internal.Linear.norm_eq_var_k (ctx : Context) (lhs rhs : Expr) (x y : Var) (h : norm_eq_var_cert lhs rhs x y = true) :
                                                                                                                                                                                                        (Expr.denote_k ctx lhs = Expr.denote_k ctx rhs) = (Var.denote ctx x = Var.denote ctx y)
                                                                                                                                                                                                        theorem Int.Internal.Linear.norm_eq_var_const_k (ctx : Context) (lhs rhs : Expr) (x : Var) (k : Int) (h : norm_eq_var_const_cert lhs rhs x k = true) :
                                                                                                                                                                                                        (Expr.denote_k ctx lhs = Expr.denote_k ctx rhs) = (Var.denote ctx x = k)
                                                                                                                                                                                                        theorem Int.Internal.Linear.norm_eq_k (ctx : Context) (lhs rhs : Expr) (p : Poly) (h : norm_eq_cert lhs rhs p = true) :
                                                                                                                                                                                                        (Expr.denote_k ctx lhs = Expr.denote_k ctx rhs) = (Poly.denote' ctx p = 0)
                                                                                                                                                                                                        theorem Int.Internal.Linear.norm_eq_coeff_k (ctx : Context) (lhs rhs : Expr) (p : Poly) (k : Int) (h : norm_eq_coeff_cert lhs rhs p k = true) :
                                                                                                                                                                                                        (Expr.denote_k ctx lhs = Expr.denote_k ctx rhs) = (Poly.denote' ctx p = 0)
                                                                                                                                                                                                        theorem Int.Internal.Linear.le_eq_false_k (ctx : Context) (lhs rhs : Expr) (h : (lhs.sub rhs).norm_k.isUnsatLe_k = true) :
                                                                                                                                                                                                        theorem Int.Internal.Linear.le_eq_true_k (ctx : Context) (lhs rhs : Expr) (h : (lhs.sub rhs).norm_k.isValidLe_k = true) :
                                                                                                                                                                                                        theorem Int.Internal.Linear.norm_le_k (ctx : Context) (lhs rhs : Expr) (p : Poly) (h : norm_eq_cert lhs rhs p = true) :
                                                                                                                                                                                                        (Expr.denote_k ctx lhs ≤ Expr.denote_k ctx rhs) = (Poly.denote' ctx p ≤ 0)
                                                                                                                                                                                                        theorem Int.Internal.Linear.norm_le_coeff_tight_k (ctx : Context) (lhs rhs : Expr) (p : Poly) (k : Int) (h : norm_le_coeff_tight_cert lhs rhs p k = true) :
                                                                                                                                                                                                        (Expr.denote_k ctx lhs ≤ Expr.denote_k ctx rhs) = (Poly.denote' ctx p ≤ 0)
                                                                                                                                                                                                        theorem Int.Internal.Linear.norm_le_coeff_k (ctx : Context) (lhs rhs : Expr) (p : Poly) (k : Int) (h : norm_eq_coeff_cert lhs rhs p k = true) :
                                                                                                                                                                                                        (Expr.denote_k ctx lhs ≤ Expr.denote_k ctx rhs) = (Poly.denote' ctx p ≤ 0)
                                                                                                                                                                                                        theorem Int.Internal.Linear.norm_dvd_k (ctx : Context) (k : Int) (e : Expr) (p : Poly) (h : e.norm_k.beq' p = true) :
                                                                                                                                                                                                        (k ∣ Expr.denote_k ctx e) = (k ∣ Poly.denote' ctx p)
                                                                                                                                                                                                        theorem Int.Internal.Linear.norm_dvd_gcd_k (ctx : Context) (k₁ : Int) (e₁ : Expr) (k₂ : Int) (p₂ : Poly) (g : Int) (h : norm_dvd_gcd_cert k₁ e₁ k₂ p₂ g = true) :
                                                                                                                                                                                                        (k₁ ∣ Expr.denote_k ctx e₁) = (k₂ ∣ Poly.denote' ctx p₂)

                                                                                                                                                                                                        Variants for normal forms written as expressions, as Sym.simp's arithmetic normalizer renders them: the kernel normalizes both sides.

                                                                                                                                                                                                        theorem Int.Internal.Linear.eq_norm_expr_k (ctx : Context) (lhs rhs lhs' rhs' : Expr) (h : (lhs.sub rhs).norm_k.beq' (lhs'.sub rhs').norm_k = true) :
                                                                                                                                                                                                        (Expr.denote_k ctx lhs = Expr.denote_k ctx rhs) = (Expr.denote_k ctx lhs' = Expr.denote_k ctx rhs')
                                                                                                                                                                                                        theorem Int.Internal.Linear.le_norm_expr_k (ctx : Context) (lhs rhs lhs' rhs' : Expr) (h : (lhs.sub rhs).norm_k.beq' (lhs'.sub rhs').norm_k = true) :
                                                                                                                                                                                                        (Expr.denote_k ctx lhs ≤ Expr.denote_k ctx rhs) = (Expr.denote_k ctx lhs' ≤ Expr.denote_k ctx rhs')
                                                                                                                                                                                                        theorem Int.Internal.Linear.lt_norm_expr_k (ctx : Context) (lhs rhs lhs' rhs' : Expr) (h : (lhs.sub rhs).norm_k.beq' (lhs'.sub rhs').norm_k = true) :
                                                                                                                                                                                                        (Expr.denote_k ctx lhs < Expr.denote_k ctx rhs) = (Expr.denote_k ctx lhs' < Expr.denote_k ctx rhs')
                                                                                                                                                                                                        theorem Int.not_le_eq (a b : Int) :
                                                                                                                                                                                                        (¬a ≤ b) = (b + 1 ≤ a)
                                                                                                                                                                                                        theorem Int.not_ge_eq (a b : Int) :
                                                                                                                                                                                                        (¬a ≥ b) = (a + 1 ≤ b)
                                                                                                                                                                                                        theorem Int.not_lt_eq (a b : Int) :
                                                                                                                                                                                                        (¬a < b) = (b ≤ a)
                                                                                                                                                                                                        theorem Int.not_gt_eq (a b : Int) :
                                                                                                                                                                                                        (¬a > b) = (a ≤ b)