Let n≥2 be a natural number. Define
X={(a1,a2,⋯,an)∣ak∈{0,1,2,⋯,k},k=1,2,⋯,n}.
For any two elements s=(s1,s2,⋯,sn)∈X and t=(t1,t2,⋯,tn)∈X, define
s∨t=(max{s1,t1},max{s2,t2},⋯,max{sn,tn})
and
s∧t=(min{s1,t1},min{s2,t2},⋯,min{sn,tn}).
We aim to find the largest possible size of a proper subset A of X such that for any s,t∈A, one has s∨t∈A and s∧t∈A.
Consider some A with ∣A∣>(n+1)!−(n−1)!. Call a=(a1,a2,⋯,an)∈X interesting if ak=0 for at most one k. Let xk be the interesting element of X whose kth entry equals k. We refer to the xi's as elementary. Note that if A contains all interesting elements of X, then A contains all elements of X, because an arbitrary element (a1,a2,⋯,an)∈X can be written as
(a1,0,⋯,0)∨(0,a2,0,⋯,0)∨⋯∨(0,⋯,0,an),
where the operations are performed in any order. We will in fact prove the stronger statement that if A contains all elementary elements of X, then A contains all elements of X.
We need the following preliminary result:
Lemma: Fix some 0≤j≤n. Then for each k≥max{1,j}, there is an element a=(a1,a2,⋯,an)∈A with ak=j.
Proof: Suppose that A does not contain such an element. Then there are at most k choices for the kth entry of an element of A. Hence,
∣A∣≤(n+1)!(k+1k)≤(n+1)!(n+1n)=(n+1)!−n!,
which contradicts our assumption on ∣A∣. ■
Now, suppose that A contains all elementary elements of X. We will show that A contains all interesting elements of X (and consequently all elements of X). Take some interesting a=(a1,a2,⋯,an)∈X with possibly ak=0. By the lemma, there exists some b=(b1,b2,⋯,bn)∈A with bk=ak. It follows that a=b∨xk∈A, as desired.
Therefore, as A is a proper subset of X, it follows that A cannot contain all elementary elements. So suppose that xk∈A for some 0≤k≤n. We will find (n−1)! elements of X that do not belong to A, thus contradicting our assumption on ∣A∣.
Denote B={a=(a1,a2,⋯,an)∈A:ak=k}. Since xk∈B, it follows that for some j=k, we have aj=0 for all a∈B. This is because if there were an element with aj=0 for each j, we could repeatedly apply the ∨ operation on said elements to obtain xk, which is impossible. Hence, there are at most j choices for the jth entry of an element in B. It follows that for any a=(a1,a2,⋯,an)∈X with ak=k and aj=0, we have a∈B and therefore a∈A. But there are evidently
(j+1)(k+1)(n+1)!≥n(n+1)(n+1)!=(n−1)!
elements a of this form. Thus, we have found (n−1)! elements of X that do not belong to A, as needed.
It remains to provide an equality case. Inspired by the above reasoning, we let A contain all elements of X except those of the form (a1,a2,⋯,an) with an=n and an−1=0. It is easy to check that this construction works, because no element of X whose final two entries are 0,n can be obtained by applying the ∨ or ∧ operation to two elements of A. This completes the proof. □
The answer is: (n+1)!−(n−1)!.