Intro to Rings, Fields, Polynomials: Hardware Modeling by Modulo Arithmetic

Similar documents
Galois Fields and Hardware Design

Chapter 4 Finite Fields

Commutative Rings and Fields

Projection of Varieties and Elimination Ideals

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:

COMPUTER ARITHMETIC. 13/05/2010 cryptography - math background pp. 1 / 162

Chapter 4 Mathematics of Cryptography

Mathematical Foundations of Cryptography

Introduction to Information Security

Handout - Algebra Review

Introduction to Cryptology. Lecture 19

The p-adic Numbers. Akhil Mathew

1. Algebra 1.5. Polynomial Rings

Section 18 Rings and fields

RINGS: SUMMARY OF MATERIAL

Polynomials, Ideals, and Gröbner Bases

Basic Concepts in Number Theory and Finite Fields

SEVENTH EDITION and EXPANDED SEVENTH EDITION

MATH 433 Applied Algebra Lecture 22: Semigroups. Rings.

LECTURE NOTES IN CRYPTOGRAPHY

MATH 115, SUMMER 2012 LECTURE 12

1. Group Theory Permutations.

Computer Algebra for Computer Engineers

Finite Fields. Mike Reiter

Properties of Real Numbers

Foundations of Cryptography

1/30: Polynomials over Z/n.

Algebra Review 2. 1 Fields. A field is an extension of the concept of a group.

Section III.6. Factorization in Polynomial Rings

Fields in Cryptography. Çetin Kaya Koç Winter / 30

Part IV. Rings and Fields

Polynomials over UFD s

Lecture 7.4: Divisibility and factorization

Finite Fields. SOLUTIONS Network Coding - Prof. Frank H.P. Fitzek

Lecture 6: Finite Fields

Algebra Review. Instructor: Laszlo Babai Notes by Vincent Lucarelli and the instructor. June 15, 2001

Practice problems for first midterm, Spring 98

The p-adic Numbers. Akhil Mathew. 4 May Math 155, Professor Alan Candiotti

Lecture 4 February 5

Error Correction Review

Solutions I.N. Herstein- Second Edition

Basic elements of number theory

Basic elements of number theory

Congruences and Residue Class Rings

Chapter 14: Divisibility and factorization

1 Rings 1 RINGS 1. Theorem 1.1 (Substitution Principle). Let ϕ : R R be a ring homomorphism

8 Appendix: Polynomial Rings

6]. (10) (i) Determine the units in the rings Z[i] and Z[ 10]. If n is a squarefree

Fault Tolerance & Reliability CDA Chapter 2 Cyclic Polynomial Codes

MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES

Rings If R is a commutative ring, a zero divisor is a nonzero element x such that xy = 0 for some nonzero element y R.

Computations/Applications

Lecture 6: Finite Fields (PART 3) PART 3: Polynomial Arithmetic. Theoretical Underpinnings of Modern Cryptography

ECEN 5022 Cryptography

University of Rochester Topology Seminar. Doug Ravenel

CSIR - Algebra Problems

Moreover this binary operation satisfies the following properties

Math 3 Variable Manipulation Part 3 Polynomials A

A Generalization of Wilson s Theorem

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2

Discrete Mathematics. CS204: Spring, Jong C. Park Computer Science Department KAIST

Page Points Possible Points. Total 200

P-adic numbers. Rich Schwartz. October 24, 2014

Coding Theory ( Mathematical Background I)

Outline. We will now investigate the structure of this important set.

Part IX. Factorization

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S.

Gröbner Bases & their Computation

LECTURE 5, FRIDAY

Chapter 2. Boolean Algebra and Logic Gates

Finite fields: some applications Michel Waldschmidt 1

EFFICIENT GRÖBNER BASIS REDUCTIONS FOR FORMAL VERIFICATION OF GALOIS FIELD ARITHMETIC CIRCUITS

ALGEBRA QUALIFYING EXAM SPRING 2012

Information Theory. Lecture 7

XOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure.

Groups, Rings, and Finite Fields. Andreas Klappenecker. September 12, 2002

Public-key Cryptography: Theory and Practice

Unit 3 Factors & Products

Calcul d indice et courbes algébriques : de meilleures récoltes

Revisiting Finite Field Multiplication Using Dickson Bases

Lecture 11 - Basic Number Theory.

where c R and the content of f is one. 1

Math 120 HW 9 Solutions

Chapter 5. Modular arithmetic. 5.1 The modular ring

MATH 3030, Abstract Algebra FALL 2012 Toby Kenney Midyear Examination Friday 7th December: 7:00-10:00 PM

Lecture 3.1: Public Key Cryptography I

Factorization in Polynomial Rings

D-MATH Algebra I HS18 Prof. Rahul Pandharipande. Solution 6. Unique Factorization Domains

Math Lecture 18 Notes

ALGEBRA II: RINGS AND MODULES OVER LITTLE RINGS.

Great Theoretical Ideas in Computer Science

Logic Synthesis and Verification

Algebra Ph.D. Entrance Exam Fall 2009 September 3, 2009

Section VI.33. Finite Fields

Problem 1. Characterizing Dedekind domains (64 points)

Math 280 Modern Algebra Assignment 3 Solutions

Finite Fields. Saravanan Vijayakumaran Department of Electrical Engineering Indian Institute of Technology Bombay

NOTES ON FINITE FIELDS

Galois fields/1. (M3) There is an element 1 (not equal to 0) such that a 1 = a for all a.

Transcription:

Intro to Rings, Fields, Polynomials: Hardware Modeling by Modulo Arithmetic Priyank Kalla Associate Professor Electrical and Computer Engineering, University of Utah kalla@ece.utah.edu http://www.ece.utah.edu/~kalla Lectures: Sept. 11, 2017 onwards

Agenda for Today Wish to build a polynomial algebra model for hardware Modulo arithmetic model is versatile: can represent both bit-level and word-level constraints To build the algebraic/modulo arithmetic model: Rings, Fields, Modulo arithmetic Polynomials, Polynomial functions, Polynomial Rings Finite fields F p, F p k and F 2 k Later on, we will study Ideals, Varieties, and Gröbner Bases Decision procedures in verification Lectures: Sept. 11, 2017 onwards 2 /

Motivation for Algebraic Computation Modeling for bit-precise algebraic computation Arithmetic RTLs: functions over k-bit-vectors k-bit-vector integers (mod 2 k ) = Z 2 k k-bit-vector Galois (Finite) field F 2 k For many of these applications SAT/SMT fail miserably! Computer Algebra and Algebraic Geometry + SAT/SMT Model: Circuits as polynomial functions f : Z 2 k Z 2 k, f : F 2 k F 2 k Lectures: Sept. 11, 2017 onwards 3 /

Ring algebra All we need is an algebraic object where we can add, multiply, divide. These objects are Rings and Fields. Lectures: Sept. 11, 2017 onwards 4 /

Groups, (G,0,+) An Abelian group is a set G and a binary operation + satisfying: Closure: For every a,b G,a+b G. Associativity: For every a,b,c G,a+(b +c) = (a+b)+c. Commutativity: For every a,b G,a+b = b +a. Identity: There is an identity element 0 G such that for all a G;a+0 = a. Inverse: If a G, then there is an element a 1 G such that a+a 1 = 0. Example: The set of Integers Z or Z n with + operation. Lectures: Sept. 11, 2017 onwards 5 /

Rings (R,0,1,+, ) A Commutative ring with unity is a set R and two binary operations + and, as well as two distinguished elements 0,1 R such that, R is an Abelian group with respect to addition with additive identity element 0, and the following properties are satisfied: Multiplicative Closure: For every a,b R, a b R. Multiplicative Associativity: For every a, b, c R, a (b c) = (a b) c. Multiplicative Commutativity: For every a,b R, a b = b a. Multiplicative Identity: There is an identity element 1 R such that for all a R, a 1 = a. Distributivity: For every a,b,c R, a (b +c) = a b +a c holds for all a,b,c R. Example: The set of Integers Z or Z n with +, operations. Lectures: Sept. 11, 2017 onwards 6 /

Rings Examples of rings: R,Q,C,Z Z n = {0,1,...,n 1} where +, computed +, (mod n) Modulo arithmetic: (a+b) (mod n) = (a (mod n)+b (mod n)) (mod n) (a b) (mod n) = (a (mod n) b (mod n)) (mod n) a (mod n) = (n a) (mod n) Arithmetic k-bit vectors arithmetic over Z 2 k For k = 1, Z 2 B Lectures: Sept. 11, 2017 onwards 7 /

Rings Examples of rings: R,Q,C,Z Z n = {0,1,...,n 1} where +, computed +, (mod n) Modulo arithmetic: (a+b) (mod n) = (a (mod n)+b (mod n)) (mod n) (a b) (mod n) = (a (mod n) b (mod n)) (mod n) a (mod n) = (n a) (mod n) Arithmetic k-bit vectors arithmetic over Z 2 k For k = 1, Z 2 B But, what about division? Lectures: Sept. 11, 2017 onwards 7 /

How to define division? Over Q, can you divide 2 3 by 4 5? Lectures: Sept. 11, 2017 onwards 8 /

How to define division? Over Q, can you divide 2 3 by 4 5? Over C, can you divide a+ib c+id? Lectures: Sept. 11, 2017 onwards 8 /

How to define division? Over Q, can you divide 2 3 by 4 5? Over C, can you divide a+ib c+id? Over Z, can you divide 3 4? Lectures: Sept. 11, 2017 onwards 8 /

How to define division? Over Q, can you divide 2 3 by 4 5? Over C, can you divide a+ib c+id? Over Z, can you divide 3 4? Over Z (mod 8), can you divide 3 4? Lectures: Sept. 11, 2017 onwards 8 /

How to define division? Over Q, can you divide 2 3 by 4 5? Over C, can you divide a+ib c+id? Over Z, can you divide 3 4? Over Z (mod 8), can you divide 3 4? Over Z (mod 7), can you divide 3 4? Lectures: Sept. 11, 2017 onwards 8 /

How to define division? Over Q, can you divide 2 3 by 4 5? Over C, can you divide a+ib c+id? Over Z, can you divide 3 4? Over Z (mod 8), can you divide 3 4? Over Z (mod 7), can you divide 3 4? Lectures: Sept. 11, 2017 onwards 8 /

How to define division? Over Q, can you divide 2 3 by 4 5? Over C, can you divide a+ib c+id? Over Z, can you divide 3 4? Over Z (mod 8), can you divide 3 4? Over Z (mod 7), can you divide 3 4? Division is multiplication by a (multiplicative) inverse! Lectures: Sept. 11, 2017 onwards 8 /

How to define division? Over Q, can you divide 2 3 by 4 5? Over C, can you divide a+ib c+id? Over Z, can you divide 3 4? Over Z (mod 8), can you divide 3 4? Over Z (mod 7), can you divide 3 4? Division is multiplication by a (multiplicative) inverse! Division For an element a in a ring R, a b = a b 1. Here, b 1 R s.t. b b 1 = 1. Lectures: Sept. 11, 2017 onwards 8 /

Multiplicative Inverses Over Q: if b = 2 3, b 1 = 3 2? Lectures: Sept. 11, 2017 onwards 9 /

Multiplicative Inverses Over Q: if b = 2 3, b 1 = 3 2? Over Z: if b = 4, b 1 =? Lectures: Sept. 11, 2017 onwards 9 /

Multiplicative Inverses Over Q: if b = 2 3, b 1 = 3 2? Over Z: if b = 4, b 1 =? Over rings: inverses may not exist Lectures: Sept. 11, 2017 onwards 9 /

Multiplicative Inverses Over Q: if b = 2 3, b 1 = 3 2? Over Z: if b = 4, b 1 =? Over rings: inverses may not exist Over Z 8 : if b = 3,b 1 =? Lectures: Sept. 11, 2017 onwards 9 /

Multiplicative Inverses Over Q: if b = 2 3, b 1 = 3 2? Over Z: if b = 4, b 1 =? Over rings: inverses may not exist Over Z 8 : if b = 3,b 1 =? Over Z 8 : if b = 6,b 1 =? Lectures: Sept. 11, 2017 onwards 9 /

Multiplicative Inverses Over Q: if b = 2 3, b 1 = 3 2? Over Z: if b = 4, b 1 =? Over rings: inverses may not exist Over Z 8 : if b = 3,b 1 =? Over Z 8 : if b = 6,b 1 =? Over Z 7 : if b = 6,b 1 =? Lectures: Sept. 11, 2017 onwards 9 /

Fields Field (F,0,1,+, ) A field F is a commutative ring with unity, where every element in F, except 0, has a multiplicative inverse: a (F {0}), â F such that a â = 1. Lectures: Sept. 11, 2017 onwards 10 /

Fields Field (F,0,1,+, ) A field F is a commutative ring with unity, where every element in F, except 0, has a multiplicative inverse: a (F {0}), â F such that a â = 1. A field is called a finite field or Galois field when F has a finite number of elements. Lectures: Sept. 11, 2017 onwards 10 /

Fields Field (F,0,1,+, ) A field F is a commutative ring with unity, where every element in F, except 0, has a multiplicative inverse: a (F {0}), â F such that a â = 1. A field is called a finite field or Galois field when F has a finite number of elements. The set Z p = Z (mod p) = {0,1,...,p 1} is a finite field, when p is a prime integer. Lectures: Sept. 11, 2017 onwards 10 /

Fields Field (F,0,1,+, ) A field F is a commutative ring with unity, where every element in F, except 0, has a multiplicative inverse: a (F {0}), â F such that a â = 1. A field is called a finite field or Galois field when F has a finite number of elements. The set Z p = Z (mod p) = {0,1,...,p 1} is a finite field, when p is a prime integer. Z n,n p is a ring but not a field. So, Z 2 k is not a field, as even numbers in Z 2 k have no inverses. Lectures: Sept. 11, 2017 onwards 10 /

Fields Field (F,0,1,+, ) A field F is a commutative ring with unity, where every element in F, except 0, has a multiplicative inverse: a (F {0}), â F such that a â = 1. A field is called a finite field or Galois field when F has a finite number of elements. The set Z p = Z (mod p) = {0,1,...,p 1} is a finite field, when p is a prime integer. Z n,n p is a ring but not a field. So, Z 2 k is not a field, as even numbers in Z 2 k have no inverses. Z 2 F 2 B {0,1} Lectures: Sept. 11, 2017 onwards 10 /

B is arithmetic (mod 2) Boolean AND-OR-NOT can be mapped to +, (mod 2) Lectures: Sept. 11, 2017 onwards 11 /

B is arithmetic (mod 2) B F 2 : Boolean AND-OR-NOT can be mapped to +, (mod 2) a a+1 (mod 2) a b a+b +a b (mod 2) a b a b (mod 2) a b a+b (mod 2) (1) where a,b F 2 = {0,1}. Lectures: Sept. 11, 2017 onwards 11 /

B is arithmetic (mod 2) B F 2 : Boolean AND-OR-NOT can be mapped to +, (mod 2) a a+1 (mod 2) a b a+b +a b (mod 2) a b a b (mod 2) a b a+b (mod 2) (1) where a,b F 2 = {0,1}. In Z 2 F 2, 1 = +1 (mod 2) Lectures: Sept. 11, 2017 onwards 11 /

Hardware Model in Z 2 Figure: = AND, = XOR. f 1 : s 0 +a 0 b 0 ; f 2 : s 1 +a 0 b 1, f 3 : s 2 +a 1 b 0 ; f 4 : s 3 +a 1 b 1, f 5 : r 0 +s 1 +s 2 ; f 6 : z 0 +s 0 +s 3, f 7 : z 1 +r 0 +s 3 Lectures: Sept. 11, 2017 onwards 12 /

Finite Fields Z p : field of p elements, p = 2, 3, 5, 7,..., 163,... Lectures: Sept. 11, 2017 onwards 13 /

Finite Fields Z p : field of p elements, p = 2, 3, 5, 7,..., 163,... Is there a field of 4 elements F 4? Lectures: Sept. 11, 2017 onwards 13 /

Finite Fields Z p : field of p elements, p = 2, 3, 5, 7,..., 163,... Is there a field of 4 elements F 4? Yes, we can have fields of p k elements F p k Lectures: Sept. 11, 2017 onwards 13 /

Finite Fields Z p : field of p elements, p = 2, 3, 5, 7,..., 163,... Is there a field of 4 elements F 4? Yes, we can have fields of p k elements F p k These are called extension fields, we will study them later Lectures: Sept. 11, 2017 onwards 13 /

Finite Fields Z p : field of p elements, p = 2, 3, 5, 7,..., 163,... Is there a field of 4 elements F 4? Yes, we can have fields of p k elements F p k These are called extension fields, we will study them later In fact, we are interested in F 2 k (k-bit vector arithmetic) Lectures: Sept. 11, 2017 onwards 13 /

Finite Fields Z p : field of p elements, p = 2, 3, 5, 7,..., 163,... Is there a field of 4 elements F 4? Yes, we can have fields of p k elements F p k These are called extension fields, we will study them later In fact, we are interested in F 2 k (k-bit vector arithmetic) Fields are unique factorization domains (UFDs) Lectures: Sept. 11, 2017 onwards 13 /

Finite Fields Z p : field of p elements, p = 2, 3, 5, 7,..., 163,... Is there a field of 4 elements F 4? Yes, we can have fields of p k elements F p k These are called extension fields, we will study them later In fact, we are interested in F 2 k (k-bit vector arithmetic) Fields are unique factorization domains (UFDs) Lectures: Sept. 11, 2017 onwards 13 /

Finite Fields Z p : field of p elements, p = 2, 3, 5, 7,..., 163,... Is there a field of 4 elements F 4? Yes, we can have fields of p k elements F p k These are called extension fields, we will study them later In fact, we are interested in F 2 k (k-bit vector arithmetic) Fields are unique factorization domains (UFDs) Fermat s Little Theorem x F p, x p x = 0 Lectures: Sept. 11, 2017 onwards 13 /

Zero Divisors Zero Divisors (ZD) For a,b R,a,b 0,a b = 0. Then a,b are zero divisors of each other. Z n,n p has zero divisors. What about Z p? Integral Domains Any set (ring) with no zero divisors: Z,R,Q,C,Z p,f 2 k. What about Z 2 k? Relationships Commutative Rings Integral Domains (no ZD) Unique Factorization Domains Fields For Hardware: Our interests non-ufd Rings (Z 2 k) and Fields F 2 k Lectures: Sept. 11, 2017 onwards 14 /

Verification Problems and UFDs In 3-bit arithmetic Z 8 : (x 2 +6x) (mod 8) Lectures: Sept. 11, 2017 onwards 15 /

Verification Problems and UFDs In 3-bit arithmetic Z 8 : (x 2 +6x) (mod 8) Factorize according to its roots: x(x +6) Lectures: Sept. 11, 2017 onwards 15 /

Verification Problems and UFDs In 3-bit arithmetic Z 8 : (x 2 +6x) (mod 8) Factorize according to its roots: x(x +6) What about (x +2)(x +4)? Lectures: Sept. 11, 2017 onwards 15 /

Verification Problems and UFDs In 3-bit arithmetic Z 8 : (x 2 +6x) (mod 8) Factorize according to its roots: x(x +6) What about (x +2)(x +4)? Degree 2 polynomial has more roots than the degree? Roots x = 0,2,4,6? Lectures: Sept. 11, 2017 onwards 15 /

Verification Problems and UFDs In 3-bit arithmetic Z 8 : (x 2 +6x) (mod 8) Factorize according to its roots: x(x +6) What about (x +2)(x +4)? Degree 2 polynomial has more roots than the degree? Roots x = 0,2,4,6? Z 8 = non-ufd Lectures: Sept. 11, 2017 onwards 15 /

Verification Problems and UFDs In 3-bit arithmetic Z 8 : (x 2 +6x) (mod 8) Factorize according to its roots: x(x +6) What about (x +2)(x +4)? Degree 2 polynomial has more roots than the degree? Roots x = 0,2,4,6? Z 8 = non-ufd Cannot use factorization to prove equivalence over non-ufds. Lectures: Sept. 11, 2017 onwards 15 /

Consolidating the results so far... Over fields Z p,f 2 k,r,q,c We can add, multiply, divide No zero-divisors, can uniquely factorize a polynomial according to its roots Rings Z: integral domains, unique factorization, but no inverses Over Rings Z n,n p; e.g. n = 2 k Presence of zero divisors non-ufds, polynomial can have more zeros than its degree Cannot perform division Lectures: Sept. 11, 2017 onwards 16 /

Polynomials Let x 1,...,x d be variables Monomial is a power product: X = x α 1 1 x α 2 2 xα d d, α i Z 0 Polynomial: finite sum of terms f = c 1 X 1 +c 2 X 2 + +c t X t, where X i are monomials and c i are coefficients f = x 55 not a polynomial! The terms of f have to be ordered: X 1 > X 2 > > X t Term ordering for univariate polynomials is based on the degree: e.g. f = 3x 53 +99x 3 +4 Multi-variate term-ordering is a lot more involved and we ll study it shortly Lectures: Sept. 11, 2017 onwards 17 /

For symbolic computation: Polynomial Rings Let F be a field (any field: R,Q,C,Z p ) Lectures: Sept. 11, 2017 onwards 18 /

For symbolic computation: Polynomial Rings Let F be a field (any field: R,Q,C,Z p ) Then, R = F[x] denotes the set (ring) of all univariate polynomials in x (including constants), with coefficients in F Lectures: Sept. 11, 2017 onwards 18 /

For symbolic computation: Polynomial Rings Let F be a field (any field: R,Q,C,Z p ) Then, R = F[x] denotes the set (ring) of all univariate polynomials in x (including constants), with coefficients in F Examples: Let R = Q[x], then x R,(x 99 + 2 3 x57 ) R and so on Lectures: Sept. 11, 2017 onwards 18 /

For symbolic computation: Polynomial Rings Let F be a field (any field: R,Q,C,Z p ) Then, R = F[x] denotes the set (ring) of all univariate polynomials in x (including constants), with coefficients in F Examples: Let R = Q[x], then x R,(x 99 + 2 3 x57 ) R and so on Is F[x] really a ring or a field? Lectures: Sept. 11, 2017 onwards 18 /

For symbolic computation: Polynomial Rings Let F be a field (any field: R,Q,C,Z p ) Then, R = F[x] denotes the set (ring) of all univariate polynomials in x (including constants), with coefficients in F Examples: Let R = Q[x], then x R,(x 99 + 2 3 x57 ) R and so on Is F[x] really a ring or a field? Does every non-zero element in F[x] have an inverse? Lectures: Sept. 11, 2017 onwards 18 /

For symbolic computation: Polynomial Rings Let F be a field (any field: R,Q,C,Z p ) Then, R = F[x] denotes the set (ring) of all univariate polynomials in x (including constants), with coefficients in F Examples: Let R = Q[x], then x R,(x 99 + 2 3 x57 ) R and so on Is F[x] really a ring or a field? Does every non-zero element in F[x] have an inverse? Let f = 3 2 (x2 ) Q[x], What is f 1? Lectures: Sept. 11, 2017 onwards 18 /

For symbolic computation: Polynomial Rings Let F be a field (any field: R,Q,C,Z p ) Then, R = F[x] denotes the set (ring) of all univariate polynomials in x (including constants), with coefficients in F Examples: Let R = Q[x], then x R,(x 99 + 2 3 x57 ) R and so on Is F[x] really a ring or a field? Does every non-zero element in F[x] have an inverse? Let f = 3 2 (x2 ) Q[x], What is f 1? F[x 1,x 2,...,x d ] denotes the set (ring) of all multi-variate polynomials in x 1,...,x d Lectures: Sept. 11, 2017 onwards 18 /

For symbolic computation: Polynomial Rings Let F be a field (any field: R,Q,C,Z p ) Then, R = F[x] denotes the set (ring) of all univariate polynomials in x (including constants), with coefficients in F Examples: Let R = Q[x], then x R,(x 99 + 2 3 x57 ) R and so on Is F[x] really a ring or a field? Does every non-zero element in F[x] have an inverse? Let f = 3 2 (x2 ) Q[x], What is f 1? F[x 1,x 2,...,x d ] denotes the set (ring) of all multi-variate polynomials in x 1,...,x d R need not have coefficients over a field. E.g., Z 2 k[x 1,...,x d ]: polynomial ring with coefficients in Z 2 k Lectures: Sept. 11, 2017 onwards 18 /

For symbolic computation: Polynomial Rings Let F be a field (any field: R,Q,C,Z p ) Then, R = F[x] denotes the set (ring) of all univariate polynomials in x (including constants), with coefficients in F Examples: Let R = Q[x], then x R,(x 99 + 2 3 x57 ) R and so on Is F[x] really a ring or a field? Does every non-zero element in F[x] have an inverse? Let f = 3 2 (x2 ) Q[x], What is f 1? F[x 1,x 2,...,x d ] denotes the set (ring) of all multi-variate polynomials in x 1,...,x d R need not have coefficients over a field. E.g., Z 2 k[x 1,...,x d ]: polynomial ring with coefficients in Z 2 k R[x 1,...,x d ] is a finite or infinite set? Lectures: Sept. 11, 2017 onwards 18 /

For symbolic computation: Polynomial Rings Let F be a field (any field: R,Q,C,Z p ) Then, R = F[x] denotes the set (ring) of all univariate polynomials in x (including constants), with coefficients in F Examples: Let R = Q[x], then x R,(x 99 + 2 3 x57 ) R and so on Is F[x] really a ring or a field? Does every non-zero element in F[x] have an inverse? Let f = 3 2 (x2 ) Q[x], What is f 1? F[x 1,x 2,...,x d ] denotes the set (ring) of all multi-variate polynomials in x 1,...,x d R need not have coefficients over a field. E.g., Z 2 k[x 1,...,x d ]: polynomial ring with coefficients in Z 2 k R[x 1,...,x d ] is a finite or infinite set? Z 2 k[x 1,...,x d ] is a finite or infinite set? (It s a loaded question) Lectures: Sept. 11, 2017 onwards 18 /

Operations in Polynomial Rings add, mult polynomials, just like you did in high-school Reduce coefficients modulo the coefficient field/ring Consider: f 1,f 2 Z 4 [x,y] f 1 = 3x +2y; f 2 = 2x +2y f 1 +f 2 = x; f 1 f 2 = 2x 2 +2xy Reduce coefficients in Z 4, i.e. (mod 4) Solve f 1 = f 2 = 0, Solutions (x,y) should be in Z 4 Lectures: Sept. 11, 2017 onwards 19 /

Operations in Polynomial Rings add, mult polynomials, just like you did in high-school Reduce coefficients modulo the coefficient field/ring Consider: f 1,f 2 Z 4 [x,y] f 1 = 3x +2y; f 2 = 2x +2y f 1 +f 2 = x; f 1 f 2 = 2x 2 +2xy Reduce coefficients in Z 4, i.e. (mod 4) Solve f 1 = f 2 = 0, Solutions (x,y) should be in Z 4 Solutions (x,y) = {(0,0),(0,2)} Z 4 Z 4 Lectures: Sept. 11, 2017 onwards 19 /

Operations in Polynomial Rings add, mult polynomials, just like you did in high-school Reduce coefficients modulo the coefficient field/ring Consider: f 1,f 2 Z 4 [x,y] f 1 = 3x +2y; f 2 = 2x +2y f 1 +f 2 = x; f 1 f 2 = 2x 2 +2xy Reduce coefficients in Z 4, i.e. (mod 4) Solve f 1 = f 2 = 0, Solutions (x,y) should be in Z 4 Solutions (x,y) = {(0,0),(0,2)} Z 4 Z 4 Finding solutions to a system of polynomial equations is not easy, solutions also have be found within the ring or field, e.g. Z 4 in our case. That s why we use symbolic reasoning instead of numeric computation Lectures: Sept. 11, 2017 onwards 19 /

Polynomial Functions (Polyfunctions) A function is a map f : A B; where A,B are the domain and co-domain, respectively. Ex: f : R R is a function over Reals; and f : Z 2 k Z 2 k is a function over the finite integer ring Z 2 k PolyFunction Given a function f : A B, does there exist a (canonical) polynomial F that describes f? If so, f is a polynomial function. Over finite fields every function f : F p k F p k is a polynomial function. It is possible to interpolate a polynomial F from f. Not every f : Z n Z n,n p, is a polynomial function. Example1: f : Z 4 Z 4,f(0) = 0;f(1) = 1;f(2) = 0;f(3) = 1; then F = x 2 (mod 4) Example2: f : Z 4 Z 4,f(0) = 0;f(1) = 0;f(2) = 1;f(3) = 1; No polynomial F (mod 4) represents f Lectures: Sept. 11, 2017 onwards 20 /

Zero Polynomials and Zero Functions Over Z 4 [x], F 1 = 2x 2,F 2 = 2x F 1 F 2 = 2x 2 2x = 0 ( x Z 4 ) F 1 F 2 and F 1 F 2 0 (zero function) Need a unique, canonical representation of F over Z 2 k,f 2 k Equivalently, need a unique, canonical representation of the zero function Over Z 2 k[x], we ll study canonical representations of zero functions later in the course Over Galois fields Z p : x p = x (mod p) or x p x = 0 (mod p) Zero functions in Z p [x] A polynomial F Z p [x] represents the zero function F (mod x p x) = 0, i.e. x p x divides F. In Z p [x], to prove F 1 F 2 (F 1 F 2 ) (mod x p x) = 0. Lectures: Sept. 11, 2017 onwards 21 /

Zero Functions over Infinite Fields Over infinite fields, life is much easier: Let F be an infinite field, and F F[x 1,...,x d ]. Then: F = 0 f : F n F is the zero function Circuits are functions over Z 2 k,f 2 k. Need algorithms to test if multi-variate polynomials F(x 1,...,x d ) Z 2 k[x 1,...,x d ] or in F 2 k[x 1,...,x d ] are zero functions. Hardware verification is a hard problem! Lectures: Sept. 11, 2017 onwards /