Are the singular or plural predicates based on the principle of proximity? There is a book and two pens here there are two pencils and a book here. That's right, isn't it? Thank you

Are the singular or plural predicates based on the principle of proximity? There is a book and two pens here there are two pencils and a book here. That's right, isn't it? Thank you

Both of these are true
The principle of proximity is that the predicate changes according to the singular and plural of the nearest noun
If a book is singular, use is
Two pencils is a complex number