Zulip Chat Archive
Stream: new members
Topic: evaluating polynomials
Ralf Stephan (Jul 06 2024 at 17:18):
Is it possible to evaluate a multivariate polynomial with coefficients in ZZ
at QQ
(i.e., substitute something from QQ
in the variables)? My attempt:
import Mathlib
set_option autoImplicit false
open MvPolynomial
example (k n : ℕ) (a : Fin 3 → ℚ) (ha : a = fun (i : Fin 3) ↦ (1 : ℚ) / i) :
∃ P : MvPolynomial (Fin 3) ℤ, eval a P = 0 := by sorry
application type mismatch
(eval a) P
argument
P
has type
MvPolynomial (Fin 3) ℤ : Type
but is expected to have type
MvPolynomial (Fin 3) ℚ : Type
Ruben Van de Velde (Jul 06 2024 at 17:24):
Does MvPolynomial have aeval?
Ralf Stephan (Jul 06 2024 at 17:25):
Yes, and I ignored it.
Ralf Stephan (Jul 06 2024 at 17:27):
I will add something to the preamble of Algebra/MvPolynomial/Basic
.
Ralf Stephan (Jul 06 2024 at 17:28):
Thanks!
Last updated: May 02 2025 at 03:31 UTC