[Question]
  [
*This is my first question here, so any suggestions in the comments would be appreciated! Thanks ;)*
# Introduction
One very common strategy for the [2048 game](https://gabrielecirulli.github.io/2048/) is *never ever swiping down*. This positions all the big numbers at the top, and the lower ones in the bottom. So, if you apply this strategy correctly, your board will always match the following pattern:
# The pattern to check for / Your task
Your submission should be either a full program or a function which returns a truthy value if the board can be described like this:
Going down each column of the board, the first number should be the highest of the column, the second number should be less than or equal to the first number, etc. A **good 2048-board** is defined as a board where the highest numbers are all on the top.
This is **code-golf**, so the shortest Code per language (in bytes) wins.
# I/O
The input can be taken in any appropriate way, for example an array of 4 arrays, each containing 4 numbers, or an array of 16 numbers. **In total, it will be always 16 numbers, representing the 4x4 board**
The output should be a truthy value of the input is a "good 2048-board", and a falsy value otherwise.
# Examples
Truthy:
```
|-------------------|
| 16 |    | 64 |  8 |
|-------------------|
|  8 |    | 32 |  8 |
|-------------------|
|  4 |    | 32 |  2 |
|-------------------|
|  2 |    |    |    |
|-------------------|
|-------------------|
| 16 | 128| 64 | 32 |
|-------------------|
|  8 | 128| 32 |  8 |
|-------------------|
|  4 | 16 |  8 |  2 |
|-------------------|
|  4 |    |    |    |
|-------------------|
```
Falsy:
```
|-------------------|
| 16 |    | 64 |  8 |
|-------------------|
|  8 |    | 32 | 16 |
|-------------------|
| 32 |    | 128|  2 |
|-------------------|
|  2 |    |    |    |
|-------------------|
|-------------------|
| 16 | 128| 64 | 32 |
|-------------------|
|  8 |  32|    |  8 |
|-------------------|
|  4 | 16 |  8 |  2 |
|-------------------|
|  4 |    |    |    |
|-------------------|
```
# Note
**Look at the 2nd falsy test case: When there is an empty value (or a 0) somewhere and even when it's followed by a value which is higher than the last non-zero number, this should be falsy, because the next value after the zero would be higher than the 0 itself, which makes it invalid.**
Good luck!
  
[Answer]
# [Haskell](https://www.haskell.org/), 21 bytes
```
all$scanr1 max>>=(==)
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P802MSdHpTg5Ma/IUCE3scLOzlbD1lbzf6JtdLShmY6FjomOSaxOtIEOGAJZIBEIy9gIKA1ixnIl4VZtAFKPqjo3MTNPwVahoCgzr0RBBWhrgUKaQnSiTlLsfwA "Haskell – Try It Online")
Takes a list of columns, with empty spaces as 0.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 4 bytes
```
€{íQ
```
[Try it online!](https://tio.run/##MzBNTDJM/f//UdOa6sNrA///j442NNOx0DHRMYrViQYiMxMdYyMgAjItgOJGsbEA "05AB1E – Try It Online")
Same as my other two answers. I promise this is my last one until others have answered :)
[Answer]
# [APL (Dyalog)](https://www.dyalog.com/), ~~7~~ 4 bytes
Takes 4-by-4 matrix, using 0 for blanks, as argument.
```
⊢≡⌊⍀
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///3z0/P@VR24RHPV2PehsedS581LUIIqjwqG8qUMJEweRR7xZDMwUDBTMTBQsgNFAwNgJSJhAGCBqAIBc2TYZGFiBtYA0gNlQnUMYCqM8Ej05U64ACJNtnDFKIaRsA "APL (Dyalog Unicode) – Try It Online")
`⌊⍀` is the vertical cumulative minimum
`≡` identical to
`⊢` the unmodified argument?
[Answer]
# R (+pryr), 23 bytes
```
pryr::f(all(diff(x))<1)
```
Which evaluates to the function
```
function (x) 
all(diff(x)) < 1
```
Which takes a matrix as input:
```
     [,1] [,2] [,3] [,4]
[1,]   16    0   64    8
[2,]    8    0   32    8
[3,]    4    0   32    2
[4,]    2    0    0    0
```
When given a matrix, `diff` automatically calculates the differences within rows (surprisingly. I didn't know of this feature until I tried it for this challenge).
```
     [,1] [,2] [,3] [,4]
[1,]   -8    0  -32    0
[2,]   -4    0    0   -6
[3,]   -2    0  -32   -2
```
None of these values can be 1 or higher in a good board, so we test for `<1` and see if `all` values of the matrix comply.
```
     [,1] [,2] [,3] [,4]
[1,] TRUE TRUE TRUE TRUE
[2,] TRUE TRUE TRUE TRUE
[3,] TRUE TRUE TRUE TRUE
[1] TRUE
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 4 bytes
```
Ṣ€U⁼
```
[Try it online!](https://tio.run/##y0rNyan8///hzkWPmtaEPmrc8////@hoQzMdCx0THaNYnWggMjPRMTYCIiDTAihuFBsLAA "Jelly – Try It Online")
Input as an array of columns. Works with arbitrary-sized grids.
[Answer]
# [Python 3](https://docs.python.org/3/), 42 bytes
```
lambda l:all(x==sorted(x)[::-1]for x in l)
```
[Try it online!](https://tio.run/##DchBCoAgEEDRq8xSYVqkEiF4EnNhmBRMGubCTm/CW3z@89UzJ9mj2Tr5ew8eSHsi1ox5c6lHYI1brafZxVygwZWAeH/KlSqLzNp5wRUVCod2WBRKMYxcxxfOcd5/ "Python 3 – Try It Online")
Same algorithm as my Jelly answer
[Answer]
# JavaScript, 37 bytes
```
x=>''+x==x.map(v=>v.sort((x,y)=>y-x))
```
Call it like this:
```
|-------------------|
| 16 |    | 64 |  8 |
|-------------------|
|  8 |    | 32 |  8 |
|-------------------|
|  4 |    | 32 |  2 |
|-------------------|
|  2 |    |    |    |
|-------------------|
f([[8,8,2,0],[64,32,32,0],[0,0,0,0],[16,8,4,2]])
```
Tested on Firefox, Chrome, JavaScript Shell, and, Node.js. 
[Answer]
# [C# (.NET Core)](https://www.microsoft.com/net/core/platform), 71 bytes
```
i=>{for(int n=3;++n<i.Length;)if(i[n]>i[n-4])return false;return true;}
```
[Try it online!](https://tio.run/##NY6xasNAEET7/YotJXw2sSyM4Cw1gVROlSKFUHE@r5wFec/cnWKM0LcrspLAsMObLWZsWFvnaeoDywU/HiHSVYOYK4WbsYQygO1MCHgbIEQT2eK34zO@G5YkHeCtF3tgiXWjTs51FcY7SXzkBZYTl9XQOp/Mb5Ryp1crOfDmSHKJXzrlNuFammo@67xJPcXeC7amC6T/IPqe9DhpWArw5Iw/Y4lC97qBAbZ7hS8K97nCQkGxwC5TOOfw9Bm32RxnCn7pKRg1vDoJrqPNp@dIRxZK/lcnS0eaahjHcfoB "C# (.NET Core) – Try It Online")
The BORING way. Expects input flattened into a linear array.
Alternatively the explicitly forbidden way:
```
i=>{for(int n=3;i[++n]<=i[n-4];);}
```
[Try it online!](https://tio.run/##XY3BCsIwEETv@xV7bDGCtkUKaQQ/wJPH0kOMURbspjRRKSHfXrXgRZjLY3gzxq@NG@388MQ3PE0@2F4C6976QRuLHMHctfc4RPBBBzL4dHTBoybO8ggHE8hxQxzabo/hZTlMVY1qJrWPVzdmnwZZlZLa1Yq7RlHL66qTuUyzhEXDs9PjBRWyfbUdRNjuBG4E7iqBtYB6gbL4g0JAscA3kCT8vrNlLpeQUprf "C# (.NET Core) – Try It Online")
Throws an IndexOutOfBoundsException to indicate true, ends normally to indicate false. I tried a version that included conversion from exception/no exception to true/false, but it ended up just as long as the regular version.
[Answer]
# JavaScript, ~~34~~, 32 bytes
```
v=>!v.some((x,i)=>i%4&&x>v[i-1])
```
Call by passing in a single array containing the first column, followed by the 2nd, 3rd, and 4th. 
Compares each number to the previous number except for the first number of each column and returns true if all are true.
## Test
```
f=v=>!v.some((x,i)=>i%4&&x>v[i-1])
f([16,8,4,2,0,0,0,0,64,32,32,0,8,8,2,0])
f([16,8,4,4,128,128,16,0,64,32,8,0,32,8,2,0])
f([16,8,32,2,0,0,0,0,64,32,128,0,8,16,2,0])
f([16,8,4,4,128,32,16,0,64,0,8,0,32,8,2,0])
```
Edit: saved 2 bytes thanks to tsh
[Answer]
# [Haskell](https://www.haskell.org/), 28 bytes
```
all$and.(zipWith(>=)=<<tail)
```
There's also
```
all$(==)=<<sort
```
with 15 bytes but it requires `import Data.List` when working with the Prelude only. Alternatively,
```
all$(==)=<<Data.List.sort
```
with 25 bytes works in GHCI.
[Answer]
# [Gaia](https://github.com/splcurran/Gaia), ~~3~~ 6 bytes
+3 bytes because apparently I didn't know how my language worked
```
ọ¦_ẏ⁇!
```
This is a function accepting a list of columns and leaving the result on the stack.
A few other 6 byte solutions exist including `0+¦o¦ẏ` and `ọ¦_ẏ¦ỵ`.
[Try it online!](https://tio.run/##S0/MTPz//@Hu3kPL4h/u6n/U2K74P/VR28T/0dGGZgoWCiYKJrEK0YZGFgrGRgpAEQMgz8xEwQAoBWICBS0UjIDMWAA "Gaia – Try It Online")
### Explanation
```
ọ¦      Deltas of each column
  _     Flatten
   ẏ⁇   Keep only positive numbers
     !  Negate (is it empty?)
```
[Answer]
# TI-BASIC, 25 bytes
Takes input as a 4x4 matrix in Ans.
```
For(R,1,3
*row+(-1,Ans,R+1,R
End
Ans=abs(Ans
```
# Explanation
```
For(R,1,3             Loop from row 1 to 3.
*row+(-1,Ans,R+1,R    Multiply row R+1 by -1 and add it to row R in-place.
                      Effectively, this subtracts row R+1 from row R.
End                   Now the first 3 rows contain the row differences,
                      and the 4th row is non-negative assuming valid input.
Ans=abs(Ans           Check whether every element in the matrix is equal to its
                      absolute value, or in other words, contains no negative values.
```
[Answer]
# [Haskell](https://www.haskell.org/), 41 bytes
```
f[x]=1>0
f(a:b:c)|a<b=1<0|1>0=f$b:c
all f
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/Py26ItbW0M6AK00j0SrJKlmzJtEmydbQxqAGKGibpgIU@p@bmJlnW1CUmVeikpiTo5AWHW1opmOhY6JjEqsTbaADhkAWSATCMjYCSoOYsf8B "Haskell – Try It Online")
Defines the point-free function `all f`, where `f` determines if a list is sorted.
[Answer]
# JavaScript (ES6), 42 bytes
Takes an array of columns; returns a (truthy) number or `false`.
```
a=>a.every(c=>c.reduce((r,n)=>r&&n<=r&&n))
```
---
# JavaScript (ES6), ~~54~~ 47 bytes
First attempt. Takes an array of columns; returns `true` or `false`.
```
a=>a.every(c=>c.slice(1).every((n,i)=>n<=c[i]))
```
[Answer]
# [MATL](https://github.com/lmendo/MATL), 4 bytes
```
SGX=
```
[Try it online!](https://tio.run/##y00syfn/P9g9wvb//@hoIx0DEIy1jjYB0sZGOkZApgWEaQFkGpoB2WYmQHYsAA "MATL – Try It Online")
Input as an array of rows, upside down.
```
S       % sort columns
GX=     % compare with input
        % true if arrays are numerically equal
        % (implicit) convert to string and display
```
[Answer]
# [Swift 4](https://swift.org/blog/swift-4-0-release-process/), ~~84~~  77 bytes
```
func f(l:[[Int]]){print(l.filter{$0.reversed()==$0.sorted()}.count==l.count)}
```
**[Try it online!](http://swift.sandbox.bluemix.net/#/repl/598032d30ad1c117edec888a)**
[Answer]
# Dyalog APL, ~~21~~ ~~19~~ 15 bytes
```
∧/{⍵≡⍵[⍒⍵]}¨↓⍉⎕
```
[Try it online!](http://tryapl.org/?a=%7B%u2227/%7B%u2375%u2261%u2375%5B%u2352%u2375%5D%7D%A8%u2193%u2349%u2375%7D4%204%u237416%200%2064%208%208%200%2032%208%204%200%2032%202%202%200%200%200&run) (modified so it will run in tryapl)
Takes input as a 2D array.
## How?
* `⎕` input
* `⍉` transpose
* `↓` 2D array => 1D vector of 1D vectors
* `{ ... }¨` apply this to each member (argument `⍵`):
	+ `⍵[⍒⍵]` `⍵` sorted descending
	+ `⍵≡` equality with `⍵`
* `∧/` whether every element is `1`.
[Answer]
# Clojure, 30 bytes
```
(partial every? #(apply >= %))
```
[try it online](https://repl.it/Jypi/1)
[Answer]
# [Japt](https://github.com/ETHproductions/japt), ~~7~~ 5 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
Takes input as a 2D array of columns. Empty cells are `0` or can be omitted if there are no other numbers in the column.
```
eUËnw
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=ZVXLbnc&input=W1sxNiw4LDQsMl0sWzAsMCwwLDBdLFs2NCwzMiwzMiwwXSxbOCw4LDJdXQ)
```
eUËnw     :Implicit input of 2D array U
e         :Test for equality with
 UË       :  Map U
   n      :    Sort each by
    w     :    Maximum
```
[Answer]
# Java 8, 69 bytes
```
b->{for(int[]c:b)for(int i=0,f=1;i<3;)if(c[i]<c[++i])f=0;return f>0;}
```
Well, as of this writing this beats the Swift solution, so there's that! Utterly straightforward. Input is an array of integer arrays, the inner arrays being columns of the board (upper squares first). Cast to `Function<int[][], Boolean>`.
[Answer]
# [MY](https://bitbucket.org/zacharyjtaylor/my-language/src/4b671194ff3f88262c0234b12e2bede1d55086b3/commands.txt?at=master&fileviewer=file-view-default), ~~66~~ ~~62~~ 20 bytes (noncompeting)
```
ω⍉ω⍉A6ǵ'ƒ⇹(E8ǵ'ƒ⇹(Π←
```
[Try it online!](https://tio.run/##y638//9856PeTjDhaHZ8q/qxSY/ad2q4WsCZ5xY8apvw////6GhDMx0DHTMTHYtYnWgLINPYCMw0gTCNgEwjIBMIY2MB)
The reason this is non competing is that I recently implemented `8E (≡)`, which is equivalent to APL `≡`.
## How?
* `ω⍉` The first command line argument transposed
* `ω⍉` The first command line argument transposed
* `A6ǵ'` push `chr(0x6A)` (`⍖` in the codepage, which sorts descending)
* `ƒ` as a function, rather than a string
* `⇹` push a function that maps a popped function over each argument
* `(` apply
* `E8ǵ'ƒ⇹(` the same thing, except with `chr(0x8E)`, which is the match command (`≡`).
* `Π` product
* `←` output with no newline
Yes, a lot of MY's symbols are exactly the same or similar to APL's. The explanation is that they came to mind when I wanted a 1-character command. (I don't know why I didn't use **T** for transpose)
[Answer]
# Mathematica, 27 bytes
`t=Thread;-t[Sort/@-t@#]==#&`
## Explanation:
* `Thread` is a weird general transpose-like operation that [happens to
take the transpose when given a matrix](https://codegolf.stackexchange.com/questions/12900/tips-for-golfing-in-mathematica#comment89659_12922).
* `t=Thread;` lets me use `t` twice instead of `Thread` twice to
save bytes.
* `Sort` sorts a list (in increasing order).
* `Sort\@` maps the `Sort` function to each element of a list individually; when applied to a matrix, it sorts the rows.
* `t@#` applies the transpose function to the input `#` of the main function.
* `-` takes the negative of all of the entries so that sorting the rows of the transposed matrix (the columns of the original) sorts them in the desired way.
* The outer `-t[...]` undoes the negative and the transpose, so all we really did was sort the columns largest-to-smallest.
* `==#` tests to see if this new column-sorted matrix is equal to the original input.
* `&` ends the anonymous function with input `#` we defined.
---
You can **try it online** in the [Wolfram Cloud sandbox](https://sandbox.open.wolframcloud.com/) by pasting code like the following and clicking Gear->"Evaluate cell" or hitting Shift+Enter or the numpad Enter:
```
t=Thread;-t[Sort/@-t@#]==#&@{{16,128,64,32},{8,32,0,8},{4,16,8,2},{4,0,0,0}}
```
Or for all test cases:
```
t=Thread;-t[Sort/@-t@#]==#&//Map[#,{{{16,0,64,8},{8,0,32,8},{4,0,32,2},{2,0,0,0}},{{16,128,64,32},{8,128,32,8},{4,16,8,2},{4,0,0,0}},{{16,0,64,8},{8,0,32,16},{32,0,128,2},{2,0,0,0}},{{16,128,64,32},{8,32,0,8},{4,16,8,2},{4,0,0,0}}}]&
```
]