You can find the statement here.

Let 𝑓(𝑖,𝑗)=π΄π‘–βˆ¨π‘—βˆ’π΄π‘–βˆ’π΄π‘—+π΄π‘–βˆ§π‘—. Then, we just want to find a pair (𝑖,𝑗) such that 𝑓(𝑖,𝑗)>0.

First, let’s consider a different definition for 𝑓(𝑖,𝑗) that makes this problem considerably easier to solve: 𝑓(𝑖,𝑗)=π΄π‘–βˆ’π΄π‘—. Indeed, for this choice of 𝑓, it suffices to only check adjacent pairs, that is, (𝑖,𝑖+1) and (𝑖,π‘–βˆ’1). The reason for this is that if 𝑗>𝑖+1, we can decompose 𝑓(𝑖,𝑗) as 𝑓(𝑖,𝑖+1)+𝑓(𝑖+1,𝑖+2)+…+𝑓(π‘—βˆ’1,𝑗). Similar for 𝑗<π‘–βˆ’1. In other words, the set of pairs (𝑖,𝑖+1) and (𝑖,π‘–βˆ’1) form a basis for all possible pairs 𝑓(𝑖,𝑗). Therefore:

  1. If all basis elements have value ≀0, no combination of them can have value ≀0.
  2. Otherwise, one of them has value >0, so we just need to find which one it is.

Now, we can apply a transformation to our original definition of 𝑓 that makes the existence of such a basis more obvious. First, find the (unique) array 𝐡𝑖 such that

𝐴𝑖=βˆ‘π‘—βŠ‚π‘–π΅π‘—

Then, we see that

𝑓(𝑖,𝑗)=βˆ‘π‘˜βŠ‚(π‘–βˆ¨π‘—)π‘˜βŠ„π‘–π‘˜βŠ„π‘—π΅π‘˜

Or, if we let π‘₯=π‘–βˆ§π‘—,𝑦=π‘–βˆ’π‘₯,𝑧=π‘—βˆ’π‘₯, then we must pick a non-empty subset of both 𝑦 and 𝑧 to be in π‘˜, as well as a potentially empty subset of π‘₯.

For instance, let π‘₯={1},𝑦={2,3},𝑧={4,5}. Then, some possible choices for π‘˜ are:

  • {2,3,4}
  • {1,2,5}
  • {1,2,3,5}

However, π‘˜={1,2,3} is not allowed because π‘˜ has no intersection with 𝑧.

Let the set of all possible π‘˜ be denoted as 𝑆(π‘₯,𝑦,𝑧). For instance, the valid π‘˜ listed above would be members of 𝑆({1},{2,3},{4,5}). Then, note that we can actually break this into the union of the following smaller sets:

  • 𝑆({1},{2},{4})
  • 𝑆({1,2},{3},{4})
  • 𝑆({1,4},{2},{5})
  • 𝑆({1,2,4},{3},{5})

Essentially, we are casing on the last elements of both 𝑦 and 𝑧. Therefore, the set of configurations with |𝑦|=|𝑧|=1 form a basis for all configurations, so we only have to check these for a total complexity of π’ͺ(2𝑛⋅𝑛2).