Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. (10 points) Let C be a set of coefficients closed under addition and multiplication such as the integers Z, the rational numbers Q, or
1. (10 points) Let C be a set of coefficients closed under addition and multiplication such as the integers Z, the rational numbers Q, or the real numbers R. A polynomial over C is a mathematical expression that is constructed from an indeterminant x and members of C by applying addition (+) and multiplication (*) operators. For example, x*((2 *)+3) is a polynomial over Z. Let P be the set of polynomials over some C. The value of a polynomial p E P at ce is the result of replacing the indeterminant x with c. For example, the value of x*((2 * x + 3) at 5 is 5* ((2 * 5) + 3) = 65. Let Poly be the inductive type defined by the following constructors: X: Poly. Coeff: Q Poly. Sum : Poly x Poly Poly. Prod : Poly Poly Poly. The members of Poly represent the polynomials over Q. Define val : Poly Q Q by structural recursion using pattern matching so that, for all p E Poly and q EQ, val(p, q) is the value of p at q. 1. (10 points) Let C be a set of coefficients closed under addition and multiplication such as the integers Z, the rational numbers Q, or the real numbers R. A polynomial over C is a mathematical expression that is constructed from an indeterminant x and members of C by applying addition (+) and multiplication (*) operators. For example, x*((2 *)+3) is a polynomial over Z. Let P be the set of polynomials over some C. The value of a polynomial p E P at ce is the result of replacing the indeterminant x with c. For example, the value of x*((2 * x + 3) at 5 is 5* ((2 * 5) + 3) = 65. Let Poly be the inductive type defined by the following constructors: X: Poly. Coeff: Q Poly. Sum : Poly x Poly Poly. Prod : Poly Poly Poly. The members of Poly represent the polynomials over Q. Define val : Poly Q Q by structural recursion using pattern matching so that, for all p E Poly and q EQ, val(p, q) is the value of p at
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started