# Is there notation for the logical and/or of lots of items?

You can add lots of things together using summation notation $$\sum_{n=1}^5 n = 15$$

Is there a similar operator for logical "and" and "or"?

I considered $$\exists$$/$$\forall$$, but that doesn't allow me to easily specify how to determine the answer in some cases.

• Please edit the question to show us several sample usages for the notation you are looking for. What are the operands (the things being andored)? – Ethan Bolker Nov 20 '20 at 21:29
• $\bigwedge f_i$ is the conjunction of the formulas $f_i$, $\bigvee f_i$ is the disjunction. – symplectomorphic Nov 20 '20 at 21:29
• What's a case where quantifiers don't work? – Acccumulation Nov 21 '20 at 5:49
• @Acccumulation Might not be what the OP was thinking of, but quantifiers don't exist in propositional logic and yet you might still want to take an extended conjunction or disjunction. – dbmag9 Nov 21 '20 at 9:55
• @Acccumulation I was expressing an algorithm in which one of many recursive calls had to return true. I could have used $\exists$ and written out the fact that you should use a for loop, but it felt cleaner to just use the notation suggested in the accepted answer and have the implementation implied. – jpear1 Nov 23 '20 at 7:57

Use \bigvee and \bigwedge , $$\bigvee_{i=1}^{100} X_i$$ and $$\bigwedge_{i \in I} X_i \text{,}$$ respectively.
Interestingly, you can quite easily use a statement like $$(\forall i\in I)(\exists a_i\in A_i)$$ to get repeated "there exist" statements and similarly you could use $$(\forall i\in I)(\forall a_i \in A_i)$$ to get repeated "for all" statements. You would just need to define the set $$I$$ and the sets $$A_i$$. Note that each $$a_i$$ is not necessarily unique, and in the second statement, $$a_i$$ is unique only when $$|A_i|=1$$.
• @ComFreek Oh, sorry, I haven't read too many papers so am not sure what the standard is. I was taught to use parenthesis around the quantifiers for clarity/neatness. I'm sure there is a better notation than what I use; however if $X(a_i)$ was a proposition dependent on $a_i$ I would write the first expression as $(\forall i\in I)(\exists a_i\in A_i) X(a_i)$. What form is typical/what form would you use? – RyanK Nov 21 '20 at 17:53
• Just for reference, this is the notation used in the textbook for the foundations of math class (proof writing class) that I took, "A Transition To Advanced Mathematics" by Smith, Eggen and Andre (seventh edition). They even use parenthesis around the property itself, for instance on page 22, "'For every rational number there is a larger integer' may be symbolzed by ... $(\forall x\in \mathbb{Q})(\exists z\in \mathbb{Z})(z>x)$." – RyanK Nov 21 '20 at 18:04
• Interesting, never saw that notation at length. In TCS, I usually encounter $\forall x \in \mathbb{Q}.\;\ldots$ or $\forall x \colon \mathbb{Q}.\;\ldots$. This also resembles the notation $\lambda x\colon\mathbb{Q}.\;\ldots$ from lambda calculus. The convention is that the quantifier's body extends as far to the right as possible. A similar convention must be present in your notation, too: $(\forall \in \mathbb{Q})(\exists z\in\mathbb{Z}(z > x)$ only makes sense if the second and third parenthesized terms bind together first. – ComFreek Nov 22 '20 at 8:34
You mentioned in a comment that this came up in an algorithmic context. In programming terms, the general expression for this is reduce(operation, iterable) (of course, this implies that you're dealing with an associative binary operator; reduce(mean, iterable) isn't going to get the mean of the iterable), e.g. reduce(or, (f(_) for _ in range(k))). There's also any(f(_) for _ in range(k)). Those are the Python syntax, but if you're doing psuedo code, this should be clear even to CS people who aren't familiar with Python. In mathematical logic terms, it would be $$\exists n:f(n)$$.