text:
How many numbers can we make?
You are given a non-empty list of positive integers. Your task is to figure out how many distinct numbers can be obtained by applying the following algorithm:

Remove either the first or the last item from the list and initialize N to the corresponding value.
Remove either the first or the last item from the list. Let's call its value v.
Update N to either N + v or N * v.
If the list is empty, stop here and return N. Otherwise, resume at step 2.

This is code-golf.
Detailed example
Let's say that the input is:
[ 1, 5, 2, 3 ]

We can do, for instance:
[ 1, 5, 2, 3 ]  - choose 3      ==> n = 3
[ 1, 5, 2 ]     - multiply by 2 ==> n = 6
[ 1, 5 ]        - add 1         ==> n = 7
[ 5 ]           - multiply by 5 ==> n = 35
[]              - done

That's the only way of getting 35. But there are many different ways of getting, say, 11:
1 +5 +2 +3
3 +2 +1 +5
3 *2 +5 *1
etc.

All in all, we can generate 19 distinct numbers with this list. Only one example solution is given below for each of them.
10 : 3 +2 +5 *1  |  16 : 3 *1 +5 *2  |  22 : 3 +1 *5 +2  |  31 : 3 *2 *5 +1
11 : 3 *2 +5 *1  |  17 : 3 *1 *5 +2  |  24 : 1 +5 +2 *3  |  35 : 3 *2 +1 *5
12 : 3 *2 +5 +1  |  18 : 3 +1 +5 *2  |  25 : 3 +2 *5 *1  |  36 : 1 +5 *3 *2
13 : 3 +1 *2 +5  |  20 : 1 +5 *3 +2  |  26 : 3 +2 *5 +1  |  40 : 3 +1 *2 *5
15 : 1 +5 *2 +3  |  21 : 1 *5 +2 *3  |  30 : 3 *2 *5 *1  |

So, the expected answer for this input is 19.
Below are two examples of invalid solutions:
32 : 5 *3 +1 *2  -> 5 can't be chosen at the beginning
32 : 3 *5 +1 *2  -> 5 can't be chosen after 3

Test cases
[ 7 ]                    -> 1
[ 1, 1 ]                 -> 2
[ 2, 2 ]                 -> 1
[ 1, 2, 3 ]              -> 5
[ 7, 77, 777 ]           -> 8
[ 1, 5, 2, 3 ]           -> 19
[ 2, 2, 11, 2, 2 ]       -> 16
[ 2, 2, 2, 2, 11 ]       -> 24
[ 21, 5, 19, 10, 8 ]     -> 96
[ 7, 7, 7, 7, 7, 7 ]     -> 32
[ 6, 5, 4, 3, 2, 1 ]     -> 178
[ 1, 3, 5, 7, 5, 3, 1 ]  -> 235
[ 9, 8, 6, 4, 5, 7, 3 ]  -> 989
[ 7, 4, 6, 8, 5, 9, 3 ]  -> 1003

Brachylog, 26 bytes
{{|{|↔}~c₂l₁ʰ↰ᵗc}{+|×}ˡ}ᶜ¹

Try it online!
Times out on test cases of length 5 or greater.
It can probably be golfed further; the first half feels clunky.
Explanation
{…}ᶜ¹  Count unique outputs for predicate.

{|{|↔}~c₂l₁ʰ↰ᵗc}  First part: permute list by reversing and recursing.
{|             }  Either return input unchanged, or
  {|↔}            possibly reverse it,
      ~c₂         split it into two parts,
         l₁ʰ      check that the first part has length 1,
            ↰ᵗ    call this sub-predicate on the second part,
              c   and plug the first part back.

{+|×}ˡ  Second part:
{   }ˡ  left fold by
 +|×    addition or multiplication (chosen separately for each element).

Python 3, 102 99 bytes
lambda v:len({*f(v,0)})
f=lambda v,N:v and sum([f(k,N*a)*N+f(k,N+a)for a,*k in(v,v[::-1])],[])or[N]

Try it online! Runs out of resources for the larger test cases on TIO.

J, 88 71 bytes
([:#@~.@,(+`*>@{~])}.@,@,."2/&.:":(,:@{~(+&(|*+/\.-0&<)<:)"1))2#:@i.@^#

Try it online!
How it works
From the permutations of taking the first/last element, we calculate absolute indices. With this we get all possible orders of selecting elements without recursion. Converted to strings and interwoven with + or -, we can execute them to get all numbers to count the unique.
2#:@i.@^#

Build up all boolean possibilities up to the length of the input.
(+&(|*+/\.-0<])<:)"1)

The boolean lists get added from right to left and then multiplied with its absolute value (thus zeroing itself out): 0 1 1 0 0 1 -> 3 3 2 1 1 1 -> 0 3 2 0 0 1. The same happens with the decremented list, so _1 0 0 _1 _1 0 -> … -> _3 0 0 _2 _1 0. If the numbers are positive, we decrement them -0<] to account for 0-based indices. We then add both lists up: _3 2 1 _2 _1 0. This is the reverse of numbers to pick as J binds right to left.
,:@{~

Get the numbers at the indices, with _1 taking the last and so on. Itemize each number.
(+`*>@{~])

The original boolean lists mapped to operators, 0 -> +, 1 -> *.
}.@,@,."2/&.:":

Interpret each number as a string, make a table of all numbers and the operators, dropping the first operator with }. (7 + 777 * 77). With &.: the right operator gets reversed, and thus J interprets this string as a number.
[:#@~.@,

With the list of possible numbers, remove duplicates and get the length.

@LuisMendo Aren't the second to fifth steps in his explanation to filter out the permutations that are invalid? I can't read J, but all test cases are correct in the TIO. And the [2,2,2,2,11] and [2,2,11,2,2] test cases would have resulted in the same result otherwise.

Ah, ok. The "permutations" part misled me

05AB1E, 40 39 bytes
„RćD¦‚Ig©ãεvy.Vˆ]¯®ô„+*®<ãðδšδ.ιJ˜€.VÙg

Try it online or verify most test cases. (The last three test cases are too large for the test suite due to the ã builtin, although can still be verified in the loose TIO.)
Explanation:
„Rć         # Push string "Rć"
   D        # Duplicate it
    ¦       # Remove the first character: "ć"
     ‚      # Pair them together: ["Rć","ć"]
      Ig    # Get the length of the input-list
        ©   # Store this length in variable `®` (without popping)
         ã  # Get the cartesian power of the ["Rć","ć"] with this length
ε           # For-each over the list of list of strings:
 v          #  Inner loop over each string `y` in the list:
  y.V       #   Evaluate/execute `y` as 05AB1E code on the (implicit) input-list:
            #    `ć` extracts the head; it pops the list and pushes the remainder-list
            #    and first item separated to the stack
            #    `Rć` reverses the list first, before doing the same
     ˆ      #   Pop and store this top value in the global array
]           # Close the nested loops
 ¯          # Push the global array
  ®ô        # Split it into parts equal to the length `®`
„+*         # Push string "+*"
   ®<       # Push length `®` minus 1
     ã      # Get the cartesian power of the "+*" with this length-1
       δ    # For each list in this list of strings:
      ð š   #  Convert the string to a list of characters, and prepend a space character
δ           # Apply on the two lists double-vectorized:
 .ι         #  Interweave the two lists
   J        # Join each list of strings together to a single string
    ˜       # Flatten this list of lists of strings
€           # Map over each string:
 .V         #  And execute/evaluate it as 05AB1E code
Ù           # Then uniquify the list of resulting values
 g          # And take its length to get the amount of unique values
            # (after which it is output implicitly as result)

Example input: [1,5,2,3]
Example list of strings: ["ć","Rć","Rć","ć"]
Example operations: ["+","*","+"]
This will become string "1 3+5*2+", which evaluated/executed as 05AB1E (Reverse Polish notation) results in 22.

T-SQL, 228 bytes
Input is a table variable:
WITH C as(SELECT v u,1/i+1f,@@rowcount-sign(i-1)t FROM @
WHERE i in(1,@@rowcount)UNION ALL SELECT o,f+SIGN(t-i),t-i/t
FROM c JOIN @ ON i in(f,t)and f<=t
CROSS APPLY(values(v*u),(v+u))p(o))SELECT
count(distinct u)FROM C WHERE f>t

Try it online

C++ (gcc), 235 232 bytes
#include<set>
using I=int;
void g(I n,I*f,I*l,std::set<I>&s){if(f-l){g(n**f,f+1,l,s);g(n+*f,f+1,l,s);g(n*l[-1],f,l-1,s);g(n+l[-1],f,l-1,s);}else s.insert(n);}I f(I*f,I*l){std::set<I>s;g(*f,f+1,l,s);g(l[-1],f,l-1,s);return s.size();}

Try it online!
Usage: int result_count = f((int*) first, (int*) last); where first is a pointer to the first element of an int array, and last is the pointer to one past the end of the array.
Assumes all results an intermediate values will fit in an int.
Explanation: Using a std::set<int> to keep track of which results have been found, recursively checks each possible path, then returns the size of the set of results.
Ungolfed:
#include <set>
void helper(int N, int *first, int *last, std::set &results){
    if (first != last) {
        helper(n * first[0], &first[1], last, results); // v = beginning; N = N * v
        helper(n + first[0], &first[1], last, results); // v = beginning; N = N + v
        helper(n * last[-1], f, &last[-1], results); // v = end; N = N * v
        helper(n + last[-1], f, &last[-1], results); // v = end; N = N + v
    } else {
        results.insert(N);
    }
}
int f(int *first, int *last){
    std::set results;
    helper(first[0], &first[1], last, results); // N = beginning
    helper(last[-1], first, &last[-1], results); // N = end
    return results.size();
}

187 Bytes

183 bytes

Charcoal, 56 bytes
≔Ｅ³Ｅθ§θ⁺ιμθＦθ¿⊖Ｌι«≔Ｅ²⊟ιηＦ⟦ΣηΠη⟧Ｆ²⊞θ⁺⎇λ⮌ιι⟦κ⟧»Ｆ¬№υι⊞υιＩＬυ

Try it online! Link is to verbose version of code. Explanation:
≔Ｅ³Ｅθ§θ⁺ιμθ

The first two numbers to be added or multiplied can either be the last two numbers in the list, the last and the first, or the first two. Create three cyclic rotations of the list with each combination ending up at the end of the list.
Ｆθ

Start a breadth-first search.
¿⊖Ｌι«

If this entry still has 2 or more numbers, then...
≔Ｅ²⊟ιη

... remove the last 2 numbers into a separate list, ...
Ｆ⟦ΣηΠη⟧

... take their sum and product, ...
Ｆ²⊞θ⁺⎇λ⮌ιι⟦κ⟧

... and append that to both the remaining numbers and their reverse, so that the number at either end gets to be combined on the next iteration.
»Ｆ¬№υι

Otherwise if this entry hasn't yet been seen, then...
⊞υι

append it to the list of distinct entries.
ＩＬυ

Print the length of the final list.

perl -alp, 176 bytes
@t=([@F],[reverse @F]);while(@t){($N,@l)=@{shift@t};@l?push@t,([$N+$l[0],@l[1..$#l]],[$N*$l[0],@l[1..$#l]],[$N+$l[-1],@l[0..$#l-1]],[$N*$l[-1],@l[0..$#l-1]]):$s{$N}++}$_=keys%s

Try it online!
This just tries all possibilities (all \$\frac{2 \cdot (4^n -1)}{3}\$ of them), where \$n\$ is the number of items on the input.

Io, 157 bytes
(Sort of) a port of ovs's answer, go upvote them!
method(v,f(v,0)size)
f :=method(v,N,if(v size>0,list(v,v reverse)map(i,k :=i slice(1);a :=i at(0);list(if(N>0,f(k,N*a),f(k,N+a)),f(k,N+a)))flatten unique,N))

Try it online!
Io, 272 bytes
First time doing BFS, I'm definitely not good at it anyway.
method(x,f(0,x,1))
f :=method(L,x,N,if(x size<1,return N)if(L<1,list(f(L+1,x slice(1),x at(0)),f(L+1,x slice(0,-1),x at(-1)))flatten unique size,list(f(L+1,x slice(1),N*x at(0)),f(L+1,x slice(1),N+x at(0)),f(L+1,x slice(0,-1),N*x at(-1)),f(L+1,x slice(0,-1),N+x at(-1)))))

Try it online!


text:
Logo Pack LAPACK
This is the logo for LAPACK, a widely used software library for numerical linear algebra.

Your task is to print the logo  (color and matrix brackets not required) as this exact string. Trailing newline is allowed.
L  A  P  A  C  K
L -A  P -A  C -K
L  A  P  A -C -K
L -A  P -A -C  K
L  A -P -A  C  K
L -A -P  A  C -K

What's the winning criterion?

my bad, I added in the code-golf tag

@Shaggy no, this is [tag:kolmogorov-complexity]

@Shaggy none of those are standard for kolmogorov-complexity so I will disallow them too.

I wonder if the minus pattern can be built mathematically...

@Bubbler It's not quite the top 66 of the standard 8*8 Hadamard matrix -- you'd need to switch around some rows or some columns. It's the tensor (block) product of the 22 Hadamard matrix with a 33 matrix that looks like the 33 Fourier matrix, but with +1 and -1 replacing the complex values. One way to get the whether the (i,j) entry is negated is as (i|j)/6^i*j%2: TIO

@qwr may I suggest updating the challenge with the explicit requirement of no trailing spaces?

https://math.stackexchange.com/questions/465519/what-is-the-significance-of-the-matrix-in-the-lapack-logo I have a bounty here for what the logo is

Python 2, 69 bytes
print"L %sA %sP %sA %sC %sK\n"*6%tuple('     - - -   --- -'+'-  -'*3)

Try it online!
Kind-of a boring solution. Makes a string template for the output with slots to put in minuses, then inserts in hardcoded string of minuses and spaces for those slots. I didn't find a way to compress or generate this length-30 binary sequence shorter than hardcoding it. The only optimization the code uses is that the sequence ends in 3 copies of '-  -'. The output includes a trailing newline which the challenge allows.
The template could also use %2s in place of  %s which would allow also putting in empty string for the spaces, but I don't see how to use this.

Python 2, 91 bytes
i=0
for c in'LAPACK'*6:print' -'[chr(i+33)in'(*,12467;<@AD']*(c!='L')+c+'\n'*(c=='K'),;i+=1

Try it online!
I know most previous answers already beat this, but it's my first golf and I quite enjoyed the result :-)!
Edit: Thanks very much to @xnor for the tip with '\n'*(c=='K') all the tips!

A nice first golf! A pattern you might find useful as a special case of the selector [x,y][b] where x is empty is just y*b.

It looks though that your output doesn't match the spacing for alignment from the challenge. You could fix this by including a space in the alternative case to -, which probably actually allows you to make things shorter.

Thank you @xnor! The x=y*b is awesome. I've corrected the code and lowered the size ;)!

Nice improvement! On second look, the challenge though doesn't allow leading spaces, which looks tricky to deal with for a solution like yours. You'd need to avoid the prefix on the L or do something different.

Oh, I didn't notice the spaces, thank you again! I fixed it in the simple way, but tomorrow I'll try to think in a better solution. Thanks for all the help!

x86-16 machine code, IBM PC DOS, 54 48 49 bytes
Binary:
00000000: b106 be25 01ad cd29 84e4 740e b020 cd29  ...%...)..t.. .)
00000010: d2ec 7302 b02d cd29 ebeb b00d cd29 b00a  ..s..-.).....)..
00000020: cd29 e2de c34c 1541 0350 1641 0c43 194b  .)...L.A.P.A.C.K
00000030: 00                                       .

Build and test using xxd -r on your favorite DOS VM.
Listing:
B1 06       MOV  CL, 6              ; loop 6 rows
        ROWLOOP:
BE 0121     MOV  SI, OFFSET LS      ; letter string into SI
        COLLOOP:
AD          LODSW                   ; letter into AL, dash pattern into AH
CD 29       INT  29H                ; write to screen
84 E4       TEST AH, AH             ; is AH = 0?
74 0E       JZ   END_NL             ; if so break loop, write NL
B0 20       MOV  AL, ' '            ; space char into AL
CD 29       INT  29H                ; write to screen
D2 EC       SHR  AH, CL             ; shift dash bit into CF
73 02       JNC  NO_DASH            ; is a dash?
B0 2D       MOV  AL, '-'            ; dash char in AL
        NO_DASH:
CD 29       INT  29H                ; write to screen
EB EB       JMP  COLLOOP            ; loop until end of string
        END_NL:
B0 0D       MOV  AL, 0DH            ; CR char
CD 29       INT  29H                ; write to screen
B0 0A       MOV  AL, 0AH            ; LF char
CD 29       INT  29H                ; write to screen
E2 DE       LOOP ROWLOOP            ; loop until end of rows
C3          RET                     ; return to DOS

        LS  DB  'L',15H,'A',3H,'P',16H,'A',0CH,'C',19H,'K',0

How?
The "letter string" data contains two bytes for each letter - the high byte is the letter and the low byte is a bitmap describing if that letter should be followed by a dash for each row.  The rows are indexed 6 to 1 starting from the top, where the bit in the corresponding order represents whether or not there's a dash.
Examples:
Row 5, Col 0: Data 'L', 0x15 (010101)
The fifth bit is a 1 indicating that for the fifth row after the L there is a dash after.
Row 2, Col 3: Data 'A', 0xC (001100)
The second bit is a 0 indicating that for the fifth row after the A there is not a dash after.
Or looking at it a different way, the odd bytes [ 0x15, 0x3, 0x16, 0xC, 0x19, 0x0 ] form the bitmap of the dashes (only rotated and flipped):
0x15    010101
0x3     000011
0x16    010110
0xC     001100
0x19    011001
0x0     000000

Runtime:
A standalone IBM PC DOS COM executable.  Output to console.

JavaScript (ES6),  74 72  71 bytes
_=>`L A P A C K
`.repeat(i=6).replace(/ /g,c=>c+' -'[863064083>>++i&1])

Try it online!
How?
We build a string consisting of the pattern "L A P A C K\n" repeated 6 times and match all spaces. We replace each of them with either "  " or " -" depending on the result of a test on a bit mask.
In binary, the constant 863064083 is:
  bit 31                  bit 7  bit 0
    v                       v      v
    00110011011100010101000000010011
    \___/\___/\___/\___/\___/  \___/
row:  4    3    2    1    0      5

Because we start with i=6 and pre-increment i at each iteration, the first row is encoded by the bits 7 to 11 (0-indexed).
As stated in the ECMAScript specification, bitwise shifts are processed modulo 32. So there's a wrap-around when i exceeds 31 and the last row can safely be encoded by the bits 0 to 4.

Alternate version
For 69 bytes, we could do:
_=>`LAPACK
`.repeat(i=6).replace(/\B/g,c=>' '+' -'[863064083>>++i&1])

Try it online!
But the corresponding output includes 2 trailing spaces on the last row1. Because the challenge looks very strict about leading and trailing whitespace, this is probably invalid. ¯\_(ツ)_/¯
1: Now, would you have noticed them if I didn't tell ya?! :-p

Charcoal, 29 27 bytes
Ｅ?*<)3&✂⭆⍘℅ι- ⁺ ⁺λ§LAPACKμ²

Try it online! Link is to verbose version of code. Edit: Saved 2 bytes by appropriating @KevinCruijssen's custom base conversion idea. Explanation:
 ?*<)3&                     Literal string of code points
Ｅ                           Map over characters
           ι                Current character
          ℅                 Take the ordinal
         ⍘  -               Convert to custom base `- `
        ⭆                   Map over characters and join
                 λ          Current character
                ⁺           Concatenated with
                   LAPACK   Literal string `LAPACK`
                  §         Indexed by
                         μ  Inner index
              ⁺             Prefixed with a space
       ✂                   ² Slice off the leading spaces

APL+WIN, 58 bytes
n←96⍴¯2↓∊'LAPACK',¨⊂'  '⋄n[⎕av⍳'ì↑⍋+.28;EHRU^']←'-'⋄6 16⍴n

Explanation:
'LAPACK',¨⊂'  ' concatenate 2 spaces to each letter in LAPACK

96⍴¯2↓∊ convert to a vector, drop last 2 spaces and replicate to form a 96 element vector

⎕av⍳'ì↑⍋+.28;EHRU^' convert characters to ascii code point integers

n[.....]←'-' use integers as index positions to assign - character

6 16⍴n reshape vector as a 6 16 matrix

Perl 5, 57 bytes
$"=" { ,-}";say+(<"@{[L,A,P,A,C,K]}\n">)[0,21,3,22,12,25]

Try it online!
Explanation
First $" (which is a magic variable that is used as a field separator when lists are interpolated into strings - default is " ") is set to  { ,-}. Then say is called which is a newline-terminated print function, passing in the listed indexes (0, 21, 3, 22, 12, 25) from the result of the glob (<...> is shorthand for calling glob) <"@{[L,A,P,A,C,K]}\n">. This glob expands to:
L { ,-}A { ,-}P { ,-}A { ,-}C { ,-}K

Which, due to the { ,-}s, will generate a list containing all permutations of the string with either   or - before every letter (except the leading L). The chosen indices are the ones we need for the logo.

Ruby, 63 bytes
puts"L%sA%sP%sA%sC%sK
"*6%(0..29).map{|i|'  -'[644276896[i],2]}

Try it online!
Builds the output string by successive substitution from an array of prefixes. For each letter other than L, the appropriate two-character prefix (either   or  -) is selected by using the binary digits of 644276896 (100110011001101110001010100000 in binary) to index into the three-character string   -.

05AB1E, 31 bytes
•x—o—Õ•₃вε„ -Åв’la•Î’u.ι2ôJðý¦,

Try it online.
Explanation:
•x—o—Õ•     # Push compressed integer 251957282837
       ₃в   # Convert it to base-95 as list: [32,53,35,54,44,57]
ε           # Foreach over the integers:
 „ -Åв      #  Convert it to custom base-" -",
            #  which basically means to convert it to base-2 and index it into " -"
 ’la•Î’     #  Push dictionary string "lapack"
       u    #  Uppercase it: "LAPACK"
 .ι         #  Interleave the characters in the two strings
   2ô       #  Split it into pairs of characters
     J      #  Join each pair together
      ðý    #  Join the list by spaces
        ¦   #  Remove the first character in front of the "L"
         ,  #  And output it with trailing newline

See this 05AB1E tip of mine (sections How to use the dictionary?, How to compress large integers?, and How to compress integer lists?) to understand why ’la•Î’ is "lapack"; •x—o—Õ• is 251957282837; and •x—o—Õ•₃в is [32,53,35,54,44,57].
([32,53,35,54,44,57] is [100000,110101,100011,110110,101100,111001] in binary.)

Oh of course, custom base conversion, I was so close... thanks for the 2 byte saving on my answer.

@Neil Yw I guess. ;) PS: your current TIO is broken.

Yeah, I forgot to update the link when I golfed, and then I'd been editing trying another approach, so I didn't have the right code to hand. Should be fixed for real now...

Python 3, 107 bytes
s='LAPACK';e=enumerate
for i,_ in e(s):print(*[' -'[(j%2+i%2==2)^(i//2+j//2==3)]*(j!=0)+k for j,k in e(s)])

Try it online!
How it works: blue squares are in the form
\$\begin{pmatrix}1&1\\1&-1\end{pmatrix}\$ hence j%2+i%2==2 and red squares (when i//2+j//2==3) are in the opposite form
\$\begin{pmatrix}-1&-1\\-1&1\end{pmatrix}\$ thus we simply xor the expressions with ^.
\$\$
\begin{array}{rr|rr|rr}
\color{blue}{\mathrm{L}}&
\color{blue}{\mathrm{A}}&
\color{blue}{\mathrm{P}}&
\color{blue}{\mathrm{A}}&
\color{blue}{\mathrm{C}}&
\color{blue}{\mathrm{K}}\\
\color{blue}{\mathrm{L}}&
\color{blue}{\mathrm{-A}}&
\color{blue}{\mathrm{P}}&
\color{blue}{\mathrm{-A}}&
\color{blue}{\mathrm{C}}&
\color{blue}{\mathrm{-K}}\\
\hline
\color{blue}{\mathrm{L}}&
\color{blue}{\mathrm{A}}&
\color{blue}{\mathrm{P}}&
\color{blue}{\mathrm{A}}&
\color{red}{\mathrm{-C}}&
\color{red}{\mathrm{-K}}\\
\color{blue}{\mathrm{L}}&
\color{blue}{\mathrm{-A}}&
\color{blue}{\mathrm{P}}&
\color{blue}{\mathrm{-A}}&
\color{red}{\mathrm{-C}}&
\color{red}{\mathrm{K}}\\
\hline
\color{blue}{\mathrm{L}}&
\color{blue}{\mathrm{A}}&
\color{red}{\mathrm{-P}}&
\color{red}{\mathrm{-A}}&
\color{blue}{\mathrm{C}}&
\color{blue}{\mathrm{K}}\\
\color{blue}{\mathrm{L}}&
\color{blue}{\mathrm{-A}}&
\color{red}{\mathrm{-P}}&
\color{red}{\mathrm{A}}&
\color{blue}{\mathrm{C}}&
\color{blue}{\mathrm{-K}}
\end{array}
\$\$
Other techniques used:
print(*[x]) instead of print(' '.join(x)),
s*(j==0) instead of s if j else '',
[falsy,truthy][expr] instead of truthy if expr else falsy, where the former list is just a string ' -',
the rest is pretty straightforward.

APL (Dyalog), 37 bytes
' -'[(6⍴2)⊤⎕A⍳'AVDWMZ'],¨6 6⍴'LAPACK'

Try it online!

⎕IO←0.

We encode the dashes matrix by

encoding dashes as 1s (and spaces as 0s)
converting each column from binary to a decimal number (0 21 3 22 12 25)
indexing into the alphabet (AVDWMZ).

We decode it the same way:

⎕A⍳ - retrieves index into alphabet
(6⍴2)⊤ converts to binary columns
' -'[...] - 1 becomes dash.

Then we generate the LAPACK matrix with 6 6⍴'LAPACK', and concatenate each pair with ,¨.

C (gcc), 92 91 84 83 bytes
Saved 7 bytes thanks to the man himself Arnauld!!!
Saved a byte thanks to ceilingcat!!!
f(i){for(i=30;i--;i%5||puts("K"))printf("%c %c","CAPAL"[i%5]," -"[22141337>>i&1]);}

Try it online!

84 bytes

@Arnauld That's lovely - thanks! :-)

Retina, 62 bytes
This is way too long.
The markdown parser breaks terribly if I use the TIO's post snippet generator, so there's an extra leading newline in the snippet below: there is actually only 1 leading newline!

bbcccbc-cc-b--b-- c
b

c
 -
L`.{6}
.
$0X
Y`X`\LAPACK
.L
L

The first 2 lines replace the empty string with bbccc... c, the next 4 lines decode it into spaces and dashes by simple substitutions (b -> 3 spaces, c ->  -), the next line splits it into 6 lines of length 6 (producing a 6x6 sign matrix), the next two lines replace each character c by cX , the next line cyclically transliterates all Xs into LAPACKs, and the last 2 lines remove leading whitespace.
Try it online!

Changed the code block to a fenced code block. Looks like it's now correct, preserving one leading newline and a line with three blanks. Strangely, the three blanks weren't preserved in preview.

///, 83 bytes
/$/ -//#/A@//!/
L //@/  /L@#P@#C@K!-#P$#C$K! #P@A$C$K!-#P$A$C@K! A$P$#C@K!-A$P@#C$K

Try it online!

R + magrittr, 312 bytes
library(magrittr)

A <- matrix(c(1,1,1,-1),nrow = 2)
B <- matrix(c(1,1,1,1,1,-1,1,-1,1),nrow = 3)
kronecker(B,A) %>%
  apply(1, function(x) {paste0(x,strsplit("LAPACK","")[[1]]) %>%
  gsub("-1","-",.) %>%  gsub("1"," ",.)})  %>%
  apply(2,function(x){paste0(x, collapse = " ")})  %>%
  cat(sep = "\n")

Try it online!
This gives on my console:
 L  A  P  A  C  K
 L -A  P -A  C -K
 L  A  P  A -C -K
 L -A  P -A -C  K
 L  A -P -A  C  K
 L -A -P  A  C -K

With the function kronecker() we construct a block matrix by replicating A by B coefficients.
A is a 2x2:
> A
     [,1] [,2]
[1,]    1    1
[2,]    1   -1

which are the signs that we want to replicate in 3x3 blocks multiplied by the coefficients in B:
> B
     [,1] [,2] [,3]
[1,]    1    1    1
[2,]    1    1   -1
[3,]    1   -1    1

Then we explode LAPACK with strsplit() and prepend 1 or -1. With gsub() we substitute 1 and -1. Then, we collapse the strings and print out to the console.

Welcome to the site! This is a code golf challenge, so you should aim to minimise the number of bytes/characters in your code. For example, there are a number of spaces I'm sure can be removed, as well as some other stuff (not to familiar with R). You should be able to test your code here, which also allows users who don't have R installed to verify your code. Finally, I'ed edited your answer slightly to fit the standard answer format.

B%x%A is a nifty shortcut for kronecker(B,A), and it's generally shorter to just nest all your calls together rather than using the pipe syntax.

112 bytes -- still your method, just heavily golfed.

@Giuseppe unfortunately the challenge doesn't allow leading spaces. I struggled with that on my code hahahah

@yyyyyyyan fair enough, 125 bytes -- didn't really read the spec and was focused on golfing the existing answer.

Actually, my golf isn't right anyway, has the minus signs in the wrong places...

Japt -R, 30 bytes
Happy to be beating 05AB1E after quite a bit of work on this but still feel I could do much better. Originally based on Neil's Charcoal solution.
"?*<)3&"¬®csSi-)í"LAPACK")ò ¸x

Test it

PowerShell, 94 77 bytes
-17 bytes thanks to mazzy
-join("L  A  P  A  C  K
"*6|% t*y|%{"$_-"[++$i+12-in' &,:=BHKYVdgp'[0..12]]})

Try it online!
Just checking for the indexes we need saves 9 bytes over just writing out the block. However, if we represent the indexes using their char values, we save loads more. We add 12 to the current iteration to get everything into the printable ASCII range. ' &,:=BHKYVdgp'[0..12] converts our index string into an index array so we can use -in.

77 bytes?

PowerShell, 62 57 bytes
Port of the Arnauld's alternative answer. Very nice! Delicious! Thanks.
We avoid the problem with 2 trailing spaces on the last row because we use the array of strings, not the string with repeated LAPACK\n.
,'LAPACK'*6-replace'\B',{' '+' -'[(214811968-shr++$i)%2]}

Try it online!

PowerShell, 71 bytes
port of C (gcc) answer. Thanks @Noodle9 and @Arnauld.
-join(29..0|%{'CAPAL'[$_%5];' ';' -'[(22141337-shr$_)%2];'K
'*!($_%5)})

Try it online!

Io, 125 bytes
"      - - -    -- - --   --   --  - "foreach(x,i,("LAPACK"exSlice(x%6,x%6+1).." ".. i asCharacter .. if(x%6>4,"
",""))print)

Try it online!

Python 2, 132 bytes
s,a,i="0"*19+bin(0x208200090824009002402)[2:],list("L  A  P  A  C  K\n"*6),0
for c in s:
	if(int(c)):a[i]="-"
	i+=1
print "".join(a)

Try it online!
Yes, I realise this is longer than a simple print statement, but I spent too long trying to get this to work and I liked the approach (for larger matrices, this method would become much more efficient). There must be at least a few ways to shave a couple bytes off this answer

brainfuck, 356 bytes
++++++++[>+++++>++++++++>++++>+++++++++>+<<<<<-]>+++++>+>>++++>++<.<..<.>..>++++.<..<.>..<++.>..>-----.>.<+.<.<<.>--.>..>++++.<.<<.>.>..<++.>.<<.>>>-----.>.<+.<..<--.>..>++++.<..<.>.<<.>++.>.<<.>>>-----.>.<+.<.<<.>--.>..>++++.<.<<.>.>.<<.>++.>..>-----.>.<+.<..<--.>.<<.>>>++++.<.<<.>.>..<++.>..>-----.>.<+.<.<<.>--.>.<<.>>>++++.<..<.>..<++.>.<<.>>>-----.>.

Try it online!
There is the version, line by line (The 1st one is used to store the different chars)
++++++++[>+++++>++++++++>++++>+++++++++>+<<<<<-]>+++++>+>>++++>++
<.<..<.>..>++++.<..<.>..<++.>..>-----.>.
<+.<.<<.>--.>..>++++.<.<<.>.>..<++.>.<<.>>>-----.>.
<+.<..<--.>..>++++.<..<.>.<<.>++.>.<<.>>>-----.>.
<+.<.<<.>--.>..>++++.<.<<.>.>.<<.>++.>..>-----.>.
<+.<..<--.>.<<.>>>++++.<.<<.>.>..<++.>..>-----.>.
<+.<.<<.>--.>.<<.>>>++++.<..<.>..<++.>.<<.>>>-----.>.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Find the discrete logarithm
Task
Write a program/function that when given 3 positive integers \$a, b\$ and \$m\$ as input outputs a positive integer \$x\$ such that \$a^x\equiv b\ (\text{mod}\ m)\$ or that no such \$x\$ exists.
A reference implementation can be found here.
Constraints
You can expect \$a\$ and \$b\$ to be less than \$m\$.
Scoring
This is code-golf so shortest bytes wins.
Sample Testcases
# a, b, m -> x

10, 10, 50 -> 1
10, 100, 200 -> 2
10, 1, 127 -> 42
35, 541, 1438 -> 83
35, 541, 1438 -> 1519
1816, 2629, 3077 -> 223
3306, 4124, 5359 -> 1923
346, 406, 430 -> None
749430, 2427332, 2500918 -> 8025683
3442727916, 3990620294, 6638635157 -> 5731137125

Note: in the third testcase the solution cannot be 0 since the solution has to be a positive number

Mathematica has a built in that does exactly this...  MultiplicativeOrder   https://reference.wolfram.com/language/ref/MultiplicativeOrder.html

The restriction against an output of zero feels to me like a corner case gotcha.

@xnor It indeed is. Without that edge case, both my 05AB1E and MathGolf answers would have been a byte shorter by using a list in the range $[0,m]$ instead of $[1,m]$ and removing the final increment to convert the 0-based to a 1-based index. Then again, using just positive integers for $a,b,m,x$ is a reasonable additional requirement, even if it doesn't add much to the core challenge itself except for a minor edge case.

Could you add a few more test cases that fall within 2**53-1 please?

C (gcc), 59 53 51 bytes
Saved 6 bytes thanks to the man himself Arnauld!!!
Saved 2 bytes thanks Dominic van Essen!!!
p;x;f(a,b,m){for(p=a,x=1;p-b&&++x<m;)p=p*a%m;x%=m;}

Try it online!
Inputs positive integers \$a,b,m\$ with \$a,b<m\$.
Outputs a positive integer \$x\$ such that \$a^x\equiv b\ (\text{mod}\ m)\$ or \$0\$ if no such \$x\$ exists.

57 bytes without the p= at the end, if it's Ok to output m for 'no solution exists'.

or 53 bytes.

@DominicvanEssen Nice idea but don't see how outputting m could possibly be valid for signalling 'no solution exist'.

I kind-of thought that m could be considered equivalent to zero when using mod-m arithmetic...  In any case, it's an impossible-to-obtain value for the solution that could be pre-declared to represent 'no solution exists'.

@DominicvanEssen Sure, but the kicker's that it's a positive integer and it's not a solution. It requires extra work outside of the function to deduce what the output actually means.

53 bytes?

@Arnauld Bravo - was trying to untangle testing for answer and end to no avail - thanks! :D

That's great.  And, now that m isn't changed, you can do this for 52 bytes

@Dominic van Essen And we're there! Very nice - thanks! :D

Do you need the last semicolon before the )?

@Floris Yes, it's part of the syntax of a for loop..

Python 2, 55 51 bytes
def f(a,b,m,x=1):a**x%m==b<exit(x);x<m<f(a,b,m,x+1)

Try it online!
A recursive function that simply tests all exponents from \$1\$ to \$m\$. Returns through exit code: a positive exponent \$x\$, or \$0\$ if no such \$x\$ exists.

a==b<c with side effects is definitely evil syntax

JavaScript (Node.js),  38  33 bytes
Expects (a,m)(b) as 3 BigInts. Throws RangeError if there's no solution.
(a,m,x=m)=>g=b=>a**--x%m-b?g(b):x

Try it online!

JavaScript (Node.js), 39 bytes
Expects (a,m)(b) as 3 BigInts. Returns false if there's no solution.
NB: This version always returns the smallest solution.
(a,m,x=0n)=>g=b=>a**++x%m-b?x<m&&g(b):x

Try it online!

05AB1E, 10 7 bytes
Lm¹%³k>

Inputs in the order \$m,a,b\$; outputs 0 if no \$x\$ is found.
Try it online or verify all test cases.
Explanation:
L        # Push a list of values `x` in the range [1, (implicit) input `m`]
 m       # Take the (implicit) input `a` to the power of each of these `x`
  ¹%     # Take each modulo the first input `m`
    ³k   # Get the 0-based index of the first occurrence of the third input `b`
         # (-1 if there are none)
      >  # And increase it by 1 to make it a 1-based index
         # (after which it is output implicitly as result)

APL (Dyalog Extended), 23 bytes
{⍺(∊×⍳⍨)(⍺⍺|⍵×⊢)⌂traj⍵}

Try it online!
Dyalog APL can't handle large integers, so a modulo should be performed after each iteration.
How it works
{⍺(∊×⍳⍨)(⍺⍺|⍵×⊢)⌂traj⍵}  ⍝ dop; ⍵ ⍺ ⍺⍺ ← a b m
        (      )⌂traj    ⍝ Collect all iterations until duplicate is found
                     ⍵   ⍝   starting from a:
            ⍵×⊢          ⍝     Multiply a
         ⍺⍺|             ⍝     Modulo m
 ⍺(  ⍳⍨)                 ⍝ Find the 1-based index of b in the result,
   ∊×                    ⍝   changing to 0 if not found

Ruby, 41 bytes
->a,b,m,x=0{(a**x+=1)%m==b&&x||x<m&&redo}

Try it online!
The logic is straightforward: increment the exponent \$x\$ and return it if it satisfies the required equation, otherwise repeat while \$x\$ is less than \$m\$. Outputs the smallest solution for \$x\$, or false if no solution exists.

R+gmp, 47 46 bytes
Or only 37 bytes by requiring input in the form of bigz big integer.
function(a,b,m)match(T,as.bigz(a)^(1:m)%%m==b)

Try it online!

arguably, you can just use ordinary integers and save yourself the call to as.bigz

and it's more efficient to use which(...) rather than match(T,...) (you will get NA if there isn't one)

@JDL Unfortunately, without the bigz big integer, it fails by going out of the integer range for all except the first (smallest) two test cases.

@JDL and the reason that I ended-up using match(T,...) instead of which(...) is because many discrete logarithms have more-than-one solution (for instance, the fourth test case), so which needs an extra [1] at the end to only output one of them, which makes it longer.

a*1 would turn a into a double-precision — is that big enough?

@JDL Unfortunately, not even nearly big enough!  A double-precision float isn't  big enough to handle 3306^5359 (the last example) at all (R simply evaluates it as Inf).  And, worse, the need to take the modulo means that all calculations need to be accurate to the last integer digit, which is a long way beyond the precision of a floating-point representation!

The most-elegant solution - I think - is to perform the modulo at every step of the exponentiation.  That way, the numbers never get too big.  This is what I've attempted in the other 'base R only' answer, so have a look & see if you can beat that one (or improve it!)...

MathGolf, 8 bytes
_╒k▬\%=)

Port of my 05AB1E answer, so also:
Inputs in the order \$m,a,b\$; outputs 0 if no \$x\$ is found.
Try it online.
Explanation:
_         # Duplicate the first (implicit) input `m`
 ╒        # Pop one and push a list in the range [1, `m`]
  k       # Push the second input `a`
   ▬      # For each value `x` in the list, take `a` to the power `x`
    \     # Swap so the originally duplicated `m` is at the top of the stack
     %    # Take modulo-`m` on each value in the list
      =   # Get the first 0-based index of the value that equals the third (implicit)
          # input `b` (-1 if there are none)
       )  # And increase it by 1 to make it a 1-based index
          # (after which the entire stack joined together is output implicitly as result)

bc, 58 50 bytes
define f(a,b,m){for(;x<m;)if(a^++x%m==b)return(x)}

Try it online!
This just tries the integers from 1 to m, and outputs the first one
which satisfies being a discrete log. Otherwise, the function returns
0 (default return value).

53 bytes by syntax guesswork...

@DominicvanEssenThanks. And we can even omit the x=0 in that case.

Brachylog, 19 bytes
Takes in a list of [A,M,B], output is either X or false. The [3306, 5359, 4124] test case times out on TIO, but returns the correct result locally. First Brachylog answer, so probably not the best solution. :-)
bhM>.>0&h;.^;M%~t?∧

Try it online!
How it works
bhM>.>0&h;.^;M%~t?∧
bhM                 set the second item to M
   >.>0             output must be between M and 0
       &h           input's first item (A)
         ;.^        A^output
            ;M%     A^output mod M
               ~t?  must unify with the tail from the input (B)
                  ∧ return the output

Haskell, 42 bytes
(a#m)b=last$0:[x|x<-[1..m],mod(a^x-b)m==0]

Try it online!
The function (a # m) b returns a positive integer x such that a ^ x == b (mod m). If no such x exists, it returns 0. This is done by the brute force method.

Java 8, 97 bytes
(a,b,m)->{for(int x=0;x++<m;)if(a.modPow(b.valueOf(x),b.valueOf(m)).equals(b))return x;return-1;}

\$a\$ and \$b\$ are both java.math.BigInteger; \$m\$ and the output \$x\$ are both int.
Outputs -1 if no \$x\$ is found.
Try it online.
Explanation:
(a,b,m)->{            // Method with 2 BigInteger & integer parameters and integer return
  for(int x=0;x++<m;) //  Loop `x` in the range (0,m]:
    if(a.modPow(b.valueOf(x),b.valueOf(m))
                      //   If `a` to the power `x`, modulo `m`
       .equals(b))    //   equals `b`:
      return x;       //    Return `x` as result
  return-1;}          //  If the loop has ended without result, return -1 instead

Io, 57 bytes
method(a,b,m,x :=1;for(i,1,m,if((x=x*a%m)==b,return i))0)

Try it online!

R, 61 bytes
function(a,b,m){for(i in c(1:m,0))if((T=(a*T)%%m)==b)break;i}

Try it online!
The base form of R doesn't support arbitrary-precision arithmetic (see my other 'R+gmp' answer for a solution using the 'gmp' library that allows this).
But, pleasingly, the step-by-step calculation of (a^x)mod m comes-out at only 14 bytes longer than the brute-force approach, and it's much faster.

Charcoal, 14 bytes
ＮθＩ⊕⌕﹪ＸＮ…·¹θθＮ

Try it online! Link is to verbose version of code. Takes input in the order m, a, b and outputs 0 if there is no solution. Explanation:
Ｎθ              Store `m`
        …·¹θ    Range from 1 to `m` inclusive
      ＸＮ        Take powers of `a`
     ﹪      θ   Reduce modulo `m`
    ⌕        Ｎ  Find index of `b`
   ⊕            Convert to 1-indexing
  Ｉ             Cast to string
                Implicitly print

Retina, 84 bytes
\d+
*
"$+"{`,(?=(_+))((_+),)+
,$.1*$3$&
)`^(_+),\1+
$1,
L$`.*(,_+)(,_+)+$(?<=\1)
$#2

Try it online! Sadly no test suite as this uses "$+", and I can't figure out how to emulate that with multiple sets of inputs (Retina just crashes when I try). Takes input in the order m, a, b and produces no output if there is no solution. Explanation:
\d+
*

Convert to unary.
"$+"{`
)`

Repeat m times...
,(?=(_+))((_+),)+
,$.1*$3$&

... multiply the second number by the second last number and insert it between the first two numbers...
^(_+),\1+
$1,

... and reduce it modulo m.
L$`.*(,_+)(,_+)+$(?<=\1)
$#2

Count the position of the power matching b starting from the end.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Is it an Arithmetic Sequence or not?
Challenge
In this challenge, the input will be an ordered set of numbers and the program should be able to tell if the set of numbers is an Arithmetic Sequence.
Input

The input will be a list separated by ,(comma) or , (comma+space).
The minimum length of the list should be 3 elements.

Output

The Output can be a Boolean (True or False),  or a number (1 for True, 0 for False).

Test cases
In: 1, 3, 5
Out: True

In: 1,4, 7
Out: 1

In: 5, 9,10
Out: 0

In: 5,3,1
Out: False

Rules

This is code-golf, so the shortest code by bytes wins.
The input will be finite

Best of Luck

Welcome to Code Golf Stack Exchange. Nice challenge. It is highly recommended to allow input and output by our default rules, instead of having arbitrary restrictions like prohibiting functions. Some languages only have functions.

It is also highly recommended to provide some test cases.

Will the input have a minimum of 2 elements.

You say "a set of numbers". Does that mean they might not be in order?

"..... (also, if this isn't valid, the Mathematica answer isn't either)" . @mypronounismonicareinstate you are funny!

Thank you for taking the time to clarify a few things. As already pointed out by @Adám, please consider using our default I/O rules in your future challenges. Unless that's the whole point of the challenge, parsing the input and/or formatting the output is just a useless annoyance. Also, there's no such thing as "an ordered set" as a set has no order by definition.

"- This can also run on an infinity loop.". What does that mean?

@pppery That the user should endlessly give a set of numbers.

Sorry, I still don't understand you. Are you saying "the input must be finite"?

@pppery Yes exactly!

Why is 5,3,1 false?

I'm still confused by all the mention of "set". The input 1,3,2 should be False, right? Can all the "set" be changed to "list"?

@xnor I edited the question. Thank you.

So, the last thing to clarify is why 5,3,1 is false.

I hope this question gets re-opened, my intended-to-post solutions: 85 bytes and 84 bytes.

I would like to re-open this, but I don't understand why 5,3,1 is false

@JoKing because 5,3,1 is an unordered set of numbers. In the question I said an ordered set of numbers.

When you say ordered/unordered set, do you actually mean ascending vs not ascending list? Because 5,3,1 is an arithmetic sequence, with a difference of -2. Either you should specify that this will not be an input, or you should rephrase the question

MathGolf, 5 bytes
ê│▀£┴

Input ,-delimited; outputs 1/0 for truthy/falsey respectively.
Try it online. (MathGolf is able to execute multiple test cases at once for each line of STDIN input, but feel free to only use a single input if you'd like.)
Explanation:
ê      # Read the comma-delimited input-string as integer-list
 │     # Get the forward differences of each overlapping pair in this list
  ▀    # Uniquify these differences
   £   # Pop and push the length to get the amount of unique differences
    ┴  # Check that this length is equal to 1 (1 if 1; 0 if >= 2)
       # (after which the entire stack joined together is output implicitly as result)

Retina 0.8.2, 47 bytes
\d+
$*
A`(1+),(?!\1)
(?<=(1+),)\1

^1*(,1*)\1*$

Try it online! Only works on nondescending sequences of at least two integers. Explanation:
\d+
$*

Convert to unary.
A`(1+),(?!\1)

Check that the sequence is ascending.
(?<=(1+),)\1

Compute the differences after the first value.
^1*(,1*)\1*$

Check that all of the differences are equal.

If it only handles non-descending input, then it doesn't handle "a set of numbers" as specified by OP, does it?

@Adám Well, I wasn't sure what ordering of the set I could assume... I could easily sort the numbers if necessary, it would only cost 7 bytes I think.

APL (Dyalog Unicode), 8 bytes (SBCS)
1=≢∪2-/⎕

Try it online!
1= Is 1 equal to
≢ the count of
∪ unique
2-/ pairwise differences
⎕ in the evaluated input?
The ⎕ prompts for input and executes it. Luckily, , is APL's concatenation functions, so the required input format evaluates to a list. Spaces are ignored.

05AB1E, 5 bytes
',¡¥Ë

Input ,-delimited; outputs 1/0 for truthy/falsey respectively.
Try it online or verify a few more test cases.
Explanation:
',¡   '# Split the (implicit) input-string on ","
   ¥   # Get the deltas (forward differences) of each overlapping pair in this list
    Ë  # Check if all differences are equal (1 if truthy; 0 if falsey)
       # (after which this result is output implicitly)

Of course, this would have been 2 bytes with default I/O rules by taking a list input: ¥Ë.


text:
Get string "-" with JavaScript using only the symbols from "+[]"
Challenge: Get the JavaScript string value containing only the "-" character using code only containing the following three symbols: +[]. Note: I'm not sure if this is possible.
Scoring criterion: The number of bytes of code used.
Why? I've set myself a challenge to be able to write code using only the above three characters that can evaluate to ANY JavaScript number. The only thing left I am missing is having access to the "-" character. Once I have this, everything else becomes possible. This question is what gave me inspiration for this.
Definitions
Here is a list of definitions I've so far come up with to write a JavaScript expression (on the left) using only the +[] symbols (on the right). Most definitions reuse existing definitions.

0: +[]
1: ++[[]][0]
(EXPR): [EXPR][0]
1: (1)
2: 1+1
3: 1+2
4: 1+3
5: 1+4
6: 1+5
7: 1+6
8: 1+7
9: 1+8
POSITIVE_INTEGER: +((DIGIT1+"")+DIGIT2+DIGIT3+...)
"": []+[]
EXPR+"": EXPR+[]
undefined: [][0]
"undefined": undefined+""
"undefined": ("undefined")
"u": "undefined"[0]
"n": "undefined"[1]
"d": "undefined"[2]
"e": "undefined"[3]
"f": "undefined"[4]
"i": "undefined"[5]
NaN: +undefined
"NaN": NaN+""
"N": "NaN"[0]
"a": "NaN"[1]
Infinity: +(1+"e"+3+1+0)
"Infinity": Infinity+""
"I": "Infinity"[0]
"t": "Infinity"[6]
"y": "Infinity"[7]
"function find() { [native code] }": ([]["f"+"i"+"n"+"d"]+"")
"c": "function find() { [native code] }"[3]
"(": "function find() { [native code] }"[13]
")": "function find() { [native code] }"[14]
"{": "function find() { [native code] }"[16]
"[": "function find() { [native code] }"[18]
"a": "function find() { [native code] }"[19]
"v": "function find() { [native code] }"[22]
"o": "function find() { [native code] }"[17]

Unfinished definitions
These definitions contain missing pieces, highlighted in red (never mind, I can't figure out how to change the color, I'll use italics for now).

Number: 0["constructor"]
OBJ.FUNC(): +{valueOf:OBJ.FUNC}
OBJ.FUNC(): {toString:OBJ.FUNC}+""
"-": (Number.MIN_SAFE_INTEGER+"")[0]
"-": (Number.NEGATIVE_INFINITY+"")[0]
"-": (Number.MIN_VALUE+"")[2]
"-": ("".indexOf()+"")[0]
".": (+"1e-1")[1]

Thanks to the amazing answers to this question, I've created a JSFiddle that can generate any JavaScript number using those 3 characters. Input a number, tap "Go!", and then copy and paste the JavaScript into your devtools console to see it in action. You can also hover over the generated output in the explanation section for details on how it works.

Despite our banner's ill-chosen subtitle, coding challenges are actually off-topic except in the sense that competitions are a type of challenge. All out competitions must have an objective scoring criterion.

@Adám Ok, I will add a scoring criterion

@Adám Programming puzzles are on-topic; this seems fairly similar

Just in case you'd like to update your script accordingly, 2 is ++[++[[]][+[]]][+[]], 3 is ++[++[++[[]][+[]]][+[]]][+[]], etc. That's what I'm doing in the last revision of my answer.

@Arnauld Maybe I should update my script to only use +[] haha. Thanks I'll update the numbers. So n is ++[n-1][0]

The undefined can be [][[]] instead of [][0]. Also, you've added the "a" twice to your list in the spoiler (one at NaN and one at the find native). And nice way to further golf the integers with the pre-increment @Arnauld. (I won't update my answer to do the same, since then we'll have the same solutions again.)

That pre-increnent idea is great and it saves a lot of characters

@DavidCallanan, you're list of ways to make things is amazing.

 260 ... 210  205 bytes
Saved 5 bytes thanks to @user202729
[+[[+[++[[]][+[]]+[++[[]][+[]]]+[[+[][[]]]+[][[]]][+[]][++[[]][+[]]+[+[]]]+[++[[]][+[]]]+[+[]]+[+[]]]+[]][+[]][++[[]][+[]]]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[++[[]][+[]]]]+[]][+[]][++[++[[]][+[]]][+[]]]

Try it online!
How?
We first generate the string "11e100" and coerce it to an number to get 1.1e+101. By coercing it back to a string and extracting the 2nd character, we obtain a "."
Using this ".", we can now generate the string ".0000001". When forced to a number, this gives 1e-7, which can be used to extract a "-".
Below is a slightly more readable version:
[+[[+['11' + [[NaN] + undefined][0][10] + '100'] + []][0][1] + '0000001'] + []][0][2]

Commented
[                           // singleton array:
  +[                        //   coerce to a number:
    [                       //     singleton array:
      +[                    //       coerce to a number:
        ++[[]][+[]] +       //         1 +
        [++[[]][+[]]] +     //         "1" +
        [                   //         singleton array:
          [+[][[]]] +       //           "NaN" +
          [][[]]            //           undefined
        ][+[]]              //         [0] -> "NaNundefined"
        [                   //         build [10]:
          ++[[]][+[]] +     //           1 +
          [+[]]             //           "0"
        ]                   //         -> "e"
        + [++[[]][+[]]]     //         + "1"
        + [+[]] + [+[]]     //         + "0" + "0" -> "11e100"
      ]                     //       -> 1.1e101
      + []                  //       coerce to a string
    ][+[]]                  //     [0] -> "1.1e101"
    [ ++[[]][+[]] ]         //     [1] -> "."
    + [+[]] + [+[]] + [+[]] //     + "0" + "0" + "0"
    + [+[]] + [+[]] + [+[]] //     + "0" + "0" + "0"
    + [++[[]][+[]]]         //     + "1" -> ".0000001"
  ]                         //   -> 1e-7
  + []                      //   coerce to a string
][+[]]                      // [0] -> "1e-7"
[                           // build [2]:
  ++[                       //   pre-increment:
    ++[[]][+[]]             //     1
  ][+[]]                    //   [0]
]                           // -> "-"

No way you genius! How??

Hmm, you now use the exact same approach as my answer with "11e100" and ".0000001". I'll have to later check where you saved your 2 bytes. :) EDIT: Outgolfed you again. ;p

@KevinCruijssen I honestly have no idea. :-) But I've added a commented version.

@Arnauld, I definitely didn't think this was possible.

[[+[][[]]]+[][[]]][+[]][++[[]][+[]]+[+[]]]

@user202729 Clever way to get this "e". :-)

286 256 251 247 244 240 bytes
[+[[+[++[[]][+[]]+[++[[]][+[]]]+[[][[]]+[]][+[]][++[[]][+[]]+[++[[]][+[]]][+[]]+[++[[]][+[]]][+[]]]+[++[[]][+[]]]+[+[]]+[+[]]]+[]][+[]][++[[]][+[]]]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[++[[]][+[]]]]+[]][+[]][++[[]][+[]]+[++[[]][+[]]][+[]]]

Did I just outgolf @Arnauld in his favorite language despite barely knowing JS?! ;) EDIT: Never mind, he just golfed it the moment I post it.. Of course. XD
Try it online.
Explanation:
Techniques used:

+[]: 0
++[[]][+[]]: 1
[][[]]: undefined
[EXPRESSION]+[]: Cast to string
+[EXPRESSION]: Cast to a number
"STRING"[INDEX]: Get the INDEX'th character of the STRING
[EXPRESSION][+[]]: Wrap and extract to have access to the next command (necessary after we casted to a string, number, or concatted some strings together); a.k.a. it acts as wrapping the EXPRESSION in parenthesis: (EXPRESSION).

I first create the string "11e100". Casting this to a number and then back to a string will result in "1.1e+101". From this, I extract the ., and use it to create the string ".0000001". Casting this to a number and then back to a string will result in "1e-7", from which we can extract the -.
Of course I didn't come up with this myself, since I barely program in JavaScript nor JSFuck. The genius behind this is @Lynn, who posted the following in this answer of his/her for the JSF**k with only 5 symbols? challenge:

Also, we can make "11e100", cast to number and back to string, to get "1.1e+101", from which we extract . and +.
Using that ., in turn, we can make the string ".0000001", cast it to number and back, to get "1e-7", winning us -.

Code explanation:
Step 1: Create "11e100":
++[[]][+[]]            // Push 1
+[           ]         // Concat:
  ++[[]][+[]]          //  Another 1
+[...]                 // Concat:
   [][[]]              //  Push undefined
         +[]           //  Cast it to a string: "undefined"
  [         ][+[]]     //  Wrap it in a list, and extract it again
                  [3]  //  Get the (0-based) 3rd character of this string: "e",
                       //  where the 3 is created like this:
 ++[[]][+[]]           //   Push 1
 +                     //   Add:
   ++[[]][+[]]         //    Push another 1
  [           ][+[]]   //    Wrap it in a list, and extract it again
 +[++[[]][+[]]][+[]]   //   And do the same to add another 1
+[++[[]][+[]]]         // Concat another 1
+[+[]]                 // Concat a 0
+[+[]]                 // And concat another 0

Step 2: Convert it to "1.1e+101":
+[^]                   // Cast "11e100" to a number
    +[]                // And convert it back to a string

Step 3: Extract the .:
[^][+[]]               // Wrap it in a list, and extract it again
        [1]            // Get the (0-based) 1st character of this string: ".",
                       // where 1 is created as before:
         ++[[]][+[]]   //  Push 1

Step 4: Create ".0000001":
^+[+[]]                // Concat a 0 to the "."
+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]
                       // And concat five more 0s
+[++[[]][+[]]]         // Concat a 1

Step 5: Convert it to "1e-7":
+[^]                   // Cast ".0000001" to a number
    +[]                // And convert it back to a string

Step 6: Extract the -:
[^][+[]]               // Wrap it in a list, and extract it again
        [2]            // Get the (0-based) 2nd character of this string: "-",
                       // where 2 is created like this:
 ++[[]][+[]]           //  Push 1
 +                     //  Add:
   ++[[]][+[]]         //   Push 1
  [           ][+[]]   //   Wrap it in a list, and extract it again

I'm afraid @Arnauld just shortened his, hard luck!

@DavidCallanan Yeah, I noticed. :) Should have known, since he's the JS god around here, and this is only my second JS answer ever, haha.


text:
Eight days a week
Back in 1965, The Beatles released their hit song 'Eight Days a Week'.
In this code-golf challenge we are going to reimagine dates of the 21st century as if there really were eight days a week.
Input
A Gregorian calendar date between 1 January 2001 and 31 December 2100 inclusive. You may take input in any convenient format (including built-in date objects).
Output
The weekday number, week number, and week-numbering year (all defined below) corresponding to the input date. You may use any format (to be specified in your answer) in which all three numbers are unambiguously identifiable.
Week date system
The week date system, based on the ISO week date system but modified for eight-day weeks, works like this:

Reckoning of dates begins on 1 January 2001 (Gregorian), which is weekday number 1 of week number 1 of week-numbering year 2001.
Weeks begin on weekday number 1 and end on weekday number 8. (So 9 January 2001 is weekday number 1 of week number 2 of week-numbering year 2001.)
Week number 1 of a week-numbering year is the week that contains 4 January.
Week-numbering years contain exactly 45 or 46 weeks. Thus a week-numbering year begins on weekday number 1 of week number 1 and ends on weekday number 8 of week number 45 or 46.

Given that the number of days in a Gregorian calendar year is never a multiple of 8, the above rules have two important consequences:

Week number 1 of a week-numbering year may begin in the last four days of December of the previous Gregorian year.
Week number 46 (if there is one) of a week-numbering year may end in the first three days of January of the next Gregorian year.

Test cases
Input (Gregorian yyyy-mm-dd) -> Output (week-numbering year, week number, weekday number)
2001-01-01 -> 2001, 1,1
2001-01-08 -> 2001, 1,8
2001-01-09 -> 2001, 2,1
2001-12-31 -> 2001,46,5
2002-01-01 -> 2001,46,6
2002-01-04 -> 2002, 1,1
2002-12-29 -> 2002,45,8
2002-12-30 -> 2003, 1,1
2020-02-29 -> 2020, 8,7
2037-09-13 -> 2037,32,5
2061-04-23 -> 2061,15,4
2100-12-31 -> 2101, 1,4

Related, but that challenge involves standard 7-day weeks, has finicky I/O requirements, and bans date/time libraries and built-ins.

May the weekday be 0-indexed?

@Arnauld Yes that's fine.

JavaScript (ES6),  129 ... 107  105 bytes
Expects a Date object. Returns [year, week, weekday].
d=>(g=n=>(w=/an 0[^9]/.test(x=new Date(99,24,n))?++y/y:w+1,q=(d-x)/864e5)>3?g(n+8):[y,w,5+q])(-3,w=y=2e3)

Try it online!
How?
We start a few days before January 1, 2001 and progressively advance in the future, adding 8 days at each iteration. We increment the year and reset the week number each time we reach the 4th of January. We stop as soon as the target date is passed.
The most important part in the code is:
/an 0[^9]/.test(x = new Date(99, 24, n))

When the year argument is less than 100, the Date() constructor interprets it as 19xx. So, new Date(99, 24, n) means 24 months and n-1 days after January 1, 1999, or n-1 days after January 1, 2001.
When passed to the .test() method, the date is implicitly turned into a string. For instance, new Date(99, 24, 5) is converted to:
"Fri Jan 05 2001 00:00:00 GMT+0000 (Coordinated Universal Time)"

January is the only month whose 3-letter abbreviation ends in -an. So /an 0[^9]/ is used to test if the date is between January 1 and January 8 (both included).
What we really want to know is whether we are between January 4 and January 11, but the corresponding regular expression would be significantly longer. It's shorter to do it that way and use an offset of -3 days instead. This is why n is initialized to -3.
Commented
d => (                // d = input date
  g = n =>            // g is a recursive function taking a number of days n
    (                 //
      w =             // update w:
        /an 0[^9]/    //   if the following date x is between January 1 and
        .test(        //   January 8 (meaning that x + 3 days is within the
          x =         //   week including the 4th of January)
          new Date(   //     where x is defined as ...
            99, 24, n //       ... n-1 days after January 1, 2001
          )           //       (24 months and n-1 days after January 1, 1999)
        ) ?           //   then:
          ++y / y     //     increment the year y and set w to 1
        :             //   else:
          w + 1,      //     increment w
      q = (d - x)     // if x + 3 days is less than the target date d
          / 864e5     // i.e. the difference in days q between d and x
    ) > 3 ?           // is greater than 3:
      g(n + 8)        //   do a recursive call with n + 8,
                      //   i.e. one '8-day week' later
    :                 // else:
      [               //   return the result array:
        y,            //     year
        w,            //     week number
        5 + q         //     weekday: 8 + (q - 3)
      ]               //   end of array
)(-3, w = y = 2e3)    // initial call to g with n = -3 and y = 2000

T-SQL, 83 80 76 bytes
Saved 2 bytes by 0-indexing weekday.
Solved without looping
SELECT
year(z|7^1),(datepart(y,z|7^1)+7)/8,z%8FROM(SELECT
datediff(d,2,@)z)t

Try it online
In order to show this method provides the correct results, I have included a link to compare all test cases from the question. This link is not 0 indexed to allow easy comparison

JavaScript (Node.js), 166 bytes
d=>{w=(d-978336e6)/r+.5&7
for(D=0,e=new Date(d.getTime()+(7-w)*r);e.getMonth()!=0||e.getDate()!=4;D++)e.setTime(e.getTime()-r)
return[e.getYear(),8+D>>3,w+1]}
r=864e5

Takes input as a Javascript date object. Outputs as a 3-element list [week-year, week number, weekday number]. The week-numbering year is expressed as a 2-digit year (year minus 1900). If this is not acceptable, change e.getYear() to e.getFullYear() for +4 bytes.
Try it online!
Huh?
r=864e5 // milliseconds in a day
d=>{ // Take d as a date object
 w= // w is 1 less than the week number
  (d-978336e6) // milliseconds since Jan 1, 2001
  /r+  // Divide to get days
  .5&7 // Round (up or down) to nearest integer, and take mod 8.
       // This rounding smooths over DST and related variations
       // Variations over 12 hours do not occur, as far as I know
 for(
  D=0,  // D will be the number of days since the last Jan 4
  e=new Date(d.getTime()+(7-w)*r); // Initialize e to be the end of this week
  e.getMonth()!=0||e.getDate()!=4; // While e is not Jan 4 of any year:
   D++  // Increment D
  ) e.setTime(e.getTime()-r)  // Set e to the day before
 return [
  e.getYear(), // The week-numbering year of d is the same as the Gregorian year of the preceding Jan 4
  8+D>>3, // Convert days elapsed into weeks since Jan 4
  w+1 // the week number
 ]
}

Python 3, 181 bytes
def c(t):
 y,w,d=2001,1,1;D=type(t);O=D.toordinal
 for o in range(730487,O(t)+1):
  y,w,d=(y,w,d+1)if d<8 else(y,w+1,1)if O(D(y+1,1,4))not in range(o,o+8)else(y+1,1,1)
 return y,w,d

Try it online!
My approach counts years, weeks and days for every proleptic Gregorian ordinal between 2001-01-01 and the date.
c expects a datetime.date instance of a date on or after 2001-01-01.
Every day the day counter is incremented unless a week has passed.
Every week the day counter is reset and the week counter is incremented, unless january 4th of the next year is in the next week.
Every year the week counter is reset and the year counter is incremented.
The magic number 730487 is the ordinal of 2001-01-02:
730487 == datetime.date(2001, 1, 2).toordinal()
c returns a tuple of integers containing the year, week number and day of the week in that order.
week number and day of the week are >=1.


text:
Shortest python3 code for: Find the difference between a number and a power of two not exceeding a given number
So, this is a task from one very popular educational site in Russia:
https://acmp.ru/index.asp?main=task&id_task=786&ins=1
Mathematically, you need to find the power of two not exceeding the given number, read from the standard input stream, and output their difference in the standard output stream.
My python3 solution takes 41 characters, but the leader’s solution is only 40 characters.
Who can shorten the code?
Newlines, spaces and tabs are not included while counting code length.
x = int(input())
print(x - 2 ** (len(bin(x)) - 3))

Your code (with spaces removed) is 42 characters. Did you forget to count the newline, perhaps?

@Dingus spaces, tabs and newlines are not included.

You should state that in the question. Not counting spaces/tabs/newlines is unusual on this site.

It is almost certainly a bad idea not to count newlines, spaces and tabs because somebody can encode a binary string using spaces and tabs, decode it to ASCII and evaluate it.

The site states "[Размер кода] = max([длина кода без пробелов, табуляций и символов переноса], [полная длина кода, делённая нацело на 4])" - (I think this is something like...) code size is the greatest of (a) the code length without spaces, tabs and hyphens and (b) total code length divided by 4. Doesn't that make yours 39 (two hyphens, -)?

Not counting whitespace in the score is not a good idea. That said, the task here is so simple that the naive approach appears to be shorter than any of the answers to that question, so I won't close as duplicate.

@pppery Also, you shouldn't close as a duplicate, because that's a completely different challenge to this, where the only similarity is not counting whitespace

@cairdcoinheringaahing The issue is that if you don't count whitespace there is a simple wrapper that solves any task in python in ~45 bytes of non-whitespace.  Thus it doesn't matter what the task is the the score is always the same assuming that you can solve the problem.  I agree with pppery here though that because this task is so simple that the wrapper method is not viable and thus this is not a duplicate.

Python 3, 40 39 bytes (not counting the newline)
First I simplified \$2^{a-3}\$ to \$\frac{2^a}8\$, then I used the lower-precedence operators << and ^ so that // can be replaced by - (which saves a byte).
x=int(input())
print(1<<len(bin(x))-3^x)

Try it online!

If Python 2 is allowed, this can be 37 bytes (not counting the space or newline).

@Dingus I think the int(...) is also not necessary in Python 2.

Indeed, it looks like you're right. (I don't know Python well enough to say for sure.)

@mypronounismonicareinstate any idea to get 38?)))

Python 3, 39 bytes
print(int('0'+bin(int(input()))[3:],2))

Try it online!
Subtracting the largest power of two less than a number is the same as removing the first 1 from its binary representation.
Unfortunately python rather mysteriously errors on trying to convert the empty binary string to an int so we need '0'+ if we want it to work on zero or one.  If we relax the requirements to only require two or more then we can remove 4 bytes.
Python 3, 35 bytes
print(int(bin(int(input()))[3:],2))

Try it online!

The question doesn't specify the version of Python to be used so you could switch to 2 and drop the inner int().

@Shaggy ACMP only supports Python 3 (as far as I know).

@Ad Hoc Garf Hunter, Great!

"we need '0'+ if we want it to work on zero or one" - 0 is an invalid input anyway, since it's smaller than all powers of 2.


text:
Is it a geometric sequence or not?
Well, last time I asked for an arithmetic sequence, now comes the geometric sequence
Challenge
In this challenge, the input will be an unordered set of numbers and the program should be able to tell if the set of numbers is a Geometric Sequence.
Input

The input will be a set separated by ,(comma).

Output

The Output can be a Boolean (True or False), or a number (1 for True, 0 for False).

Test cases
In: 1,3,9
Out: True

In: 1,4,16
Out: 1

In: 2,6,14
Out: 0

In: 2,8,4
Out: True

In: 4,6,9
Out: 1

Rules

This is code-golf, so the shortest code by bytes wins.
The minimum length of the input set would be 3 elements.

Best of Luck

Another test case: 4,6,9

For your next challenge, I'd highly recommend posting in the Sandbox to get any feedback on your next idea, helping you avoid the issues you experienced with the arithmetic sequence challenge

@caird Thanks for the idea with the sandbox. I will do it next time.

I don't understand why 2 8 4 is true?

Can the common ratio be negative? E.g $1, -2, 4,-8$

@Surculose I think as per the definition of a geometric sequence, no

@Jonah Notice that the input is an unordered set. So 2, 4, 8 is a geometric sequence, and 2, 8, 4 is an unordered version of that set

@Tanmay Both Wikipedia and the link you provided allow negative common ratio, so please add your definition to the post if you define geometric sequence differently. Also, are the input guaranteed to be positive integers?

Can the input contain duplicates, and if yes, what's the correct output for 1,1,1? Is 0,0,0 a valid input, and if yes, what's the correct output?

Also, if 0,0,0 is valid, I suggest 0,0,3 as a test case. 9,12,16 is also a good one (ratio 4/3 will trip up naive floating point solutions).

Does the code has to take the user input or can it be a function?

We also need some test cases with 4 or more numbers.

J, 15 14 13 bytes
1=&#&=2%/\/:~

Try it online!
-1 byte thanks to xash
-1 byte thanks to Bubbler

1= Does one equal...
&#&= the length of the uniq of...
2%/\ the list created by dividing each element by its right neighbor in the input list...
/:~ sorted.

14 bytes: 1=&#&~.2%/\/:~

13 bytes by using monadic = in place of ~.

Jelly, 4 bytes
Ṣ÷ƝE

Try it online!
Thanks to fireflame241 for pointing out a mistake
How it works
Ṣ÷ƝE - Main monadic link, takes an array as input
     - e.g                            A = [2, 8, 4] or   A = [2, 6, 14]
Ṣ    - Sort                               [2, 4, 8]          [2, 6, 14]
  Ɲ  - Over overlapping pairs [x, y]...   [[2, 4], [4, 8]]   [[2, 6], [6, 14]]
 ÷   - ...divide x by y?                  [0.5, 0.5]         [0.33, 0.43]
   E - Is the list all the same?          1                  0

Fails for 2,4,16. I'd suggest "quotient all equal" instead of "all divisible"

@fireflame241 I'd suggest that test case to be added to the challenge, as I'm sure it could catch out a lot of potential solutions

@fireflame241 Corrected, using that tip, for no gains of bytes.Thanks!

Isaacg's 4,6,9 already would cover this situation if OP adds it

@fireflame241 My previous code outputted 0 for that test case, but (obviously) failed for the 2,4,16 case

4,6,9 is a geometric sequence (r=1.5), so it should have been 1

@fireflame241 Yep, just realised that :/

@fireflame241 Thanks for the idea with the floating-point number as r. I added it to the test caes. :-}

APL (Dyalog Unicode), 25 19 bytes
{~∨/⌈(⊣-⊃)2÷/⍵[⍋⍵]}

Try it online!
-6 bytes thanks to @Adám
⍵[⍋⍵]      ⍝ sort ⍵
2÷/        ⍝ Take the quotient of all consecutive pairs
           ⍝ Check if all are equal:
(⊣-⊃)       ⍝ Subtract the first quotient
~∨/⌈        ⍝ Are all 0?

({÷/⍵}⌺2) → 2÷/

@Adám Good tip! Just curious here, is there an analog to ⌺ (on a higher-dimensional array, so not /) that only includes regions completely enclosed in the input, not just centered on an element in the input array? Best I could come up with is either using / and ⌿ on different axes or using ↑ on rotated views of the input array.

No, there isn't. You'll have to pad until it can complete a full window outside your actual data, and then chop that off. Try it online!

An anonymous user has suggested the following golf: {~∨/⌈(⊣-⊃)2÷/⍵[⍋⍵]} $\to$ {1=⍴∪2÷/⍵[⍋⍵]}

Retina, 56 bytes
N`\d+
Lv$`\b\d+,(\d+),(\d+)
;$2**_;$1*$1*
A`(;_+)\1\b
^$

Try it online! Link includes test suite. Explanation:
N`\d+

Sort in ascending order.
Lv$`\b\d+,(\d+),(\d+)

List all triples of numbers.
;$2**_;$1*$1*

For each triple a,b,c calculate ca and b².
A`(;_+)\1\b

Delete all lines where they equal.
^$

Check that there were no unequal triples.
Note that this runs in unary so it fails on large numbers, but you can use this similar 62-byte program that does the calculations in decimal instead:
N`\d+
Lv$`\b\d+,(\d+),(\d+)
;$.($2**);$.($1*$1*
A`(;.+)\1\b
^$

JavaScript (ES6), 47 bytes
Returns a Boolean value.
a=>!a.sort((a,b)=>b-a).some(p=n=>a-(a=p/(p=n)))

Try it online!

R, 38 bytes
function(x)!sd(diff(y<-sort(x))/y[-1])

Try it online!

sort x

calculate difference between successive elements

divide by value of each element (except first) = fold-difference

check if results are all the same (standard deviation = zero)

Fails for negative fold-differences between elements (which seems to be a true geometric sequence, but it isn't clear whether this is required by the challenge).  Fixed by sorting x by absolute value, at a cost of +9 bytes:
47 bytes
function(x)!sd(diff(y<-x[order(abs(x))])/y[-1])

diff(log())? Ah, except that might fail for negative numbers

That's a nice idea but (as you say) I can't seem to wrangle it to work with negatives.

Python 3, 56 55 bytes
Saved a byte thanks to Surculose Sputum!!!
lambda l:l.sort()!=len({b/a for a,b in zip(l,l[1:])})<2

Try it online!

You can do l.sort()<len(...)<2 in Python 2, but the input needs to be all floats for the division to work. Alternately in Python 3, l.sort()!=len(...)<2

@SurculoseSputum Hmm, the Python 2 tip worked but I guess that was just luck that the integer divisions worked. Going with the Python 3 tip - thanks! :D

APL(NARS), 14 chars, 28 bytes
{1=≢∪2÷/⍵[⍒⍵]}

it seems 2÷/1 3 9 do 1÷3 3÷9 and 2,/1 3 9 make couples
  h←{1=≢∪2÷/⍵[⍒⍵]}
  ⎕fmt {⍵,⊂,h⍵}¨(1 3 9)(1 4 16)(2 6 14)(2 8 4)(4 6 9)
┌5─────────────────────────────────────────────────────────────────┐
│┌4─────────┐ ┌4──────────┐ ┌4──────────┐ ┌4─────────┐ ┌4─────────┐│
││      ┌1─┐│ │       ┌1─┐│ │       ┌1─┐│ │      ┌1─┐│ │      ┌1─┐││
││1 3 9 │ 1││ │1 4 16 │ 1││ │2 6 14 │ 0││ │2 8 4 │ 1││ │4 6 9 │ 1│││
││~ ~ ~ └~─┘2 │~ ~ ~~ └~─┘2 │~ ~ ~~ └~─┘2 │~ ~ ~ └~─┘2 │~ ~ ~ └~─┘2│
│└∊─────────┘ └∊──────────┘ └∊──────────┘ └∊─────────┘ └∊─────────┘3
└∊─────────────────────────────────────────────────────────────────┘


text:
Lumberjaxe Code Golf
Tom the lumberjack is going to do his daily routine: chop trees. After all, it's his job to do so. His boss has ordered him to chop trees in a straight line marked with a special tape to identify them, so he knows which trees he is going to have to chop. However, Tom quickly realizes he has a problem. His axe will only chop so much wood before breaking, and he forgot to bring a spare with him. Plus, the trees are different sizes. A small tree, marked with an i, will take 2 swings of the axe to chop, and a large tree, marked with an | will take 4 swings. Can Tom chop all of the assigned trees?
The Objective
Given two inputs, a string that determines the sequence of small and large trees and an integer that determines the durability of the axe, create a program that determines not only if Tom's axe will break or not, but also determine how many of each tree type he chopped down. It's code-golf, so the shortest code in bytes wins!
Example
Input 1 example:i||iii| This input string determines the sequence of trees.
Input 2 example:50 This input integer determines the durability of the axe.
The outputs for this particular example will be a boolean and a string as follows(True means Tom's axe broke):
False
4 small, 3 big

Can alternate modes of input be used? e.g. a series of bits representing i and |

Sure, as long as I can read the input its fair game.

How flexible is the output format? Would [ false, [ 4, 3 ] ] work as well?

Well yes it would, the same applies. If I can read the output, then it's fair game.

Can you give more examples with edge cases, e.g. 20 durability? Should the axe break on the last swing of i||iii| or not?

The axe will not break if the 2 are equal, as Tom still chopped all of the trees.

You should wait at least 1 week before accepting an answer. And since this is a code-golf challenge, you should accept the shortest one. (PS: On CGCC, it's also perfectly fine to never accept any answer.)

When you say "boolean" do you mean a Truthy or Falsey value?

Some more examples will make for a better challenge.

@NipDip: "Sure, as long as I can read the input its fair game." So, using 2 for i and 4 for | in the input is OK?

Yes, that is ok, also sry for the lack of examples.

05AB1E, 20 bytes
-5 bytes thanks to Kevin Cruijssen.
ηʒÇ3%·ÌO@}θD¹Ês{γ€g‚

Try it online!
Explanation
η                    Prefixes of the input. ["i", "i|", "i||", "i||i", "i||ii", "i||iii", "i||iii|"]
 ʒ                   Filter:
  Ç                      Ord codes. E.g. "i||i" -> [105, 124, 124, 105]
   3%                    Mod 3.          ->        [0, 1, 1, 0]
     ·                   Double.         ->        [0, 2, 2, 0]
      Ì                  Add 2.          ->        [2, 4, 4, 2]
       O                 Sum the prefix. ->        12
        @}               Does it exceed
                       the second input? -> 50 >= 12 -> 1

          θ              The last item of the filtered prefixes: "i||iii|"
           D             Duplicate.
            ¹Ê           Is it not equal to the first inupt?     "i||iii|" != "i||iii|" -> 0
              s          Swap the other copy up.                 "i||iii|"
               {         Sort.                                   "iiii|||"
                γ        Group by consecutive equal items.       ["iiii","|||"]
                 €g      Map: length.                            [3, 4]
                   ‚     Pair.                                   [0, [3, 4]]

Nice approach. Some things to golf: the leading S can be removed; the Os‹ can be O›; and the Dg¹g‹sJθ can be θD¹Ês: try it online - 20 bytes.

I think you have an off by one error (or need to use >= in place of >) - e.g. this should return [0, [1, 1]]. Also is it acceptable to return [[],[]] when we can't cut the first tree, or [[0],[x]] when we make it through the first x trees which happen to be of the same type?

JavaScript (Node.js), 52 bytes
Takes input as (b)(n), where b is a Buffer (using the characters described in the challenge) and n is the durability of the axe.
Returns a Boolean value and 2 integers as [ broken, [ small, big ]].
b=>n=>[b.some(c=>(n-=6&c+1)<0||!++a[c%3],a=[0,0]),a]

Try it online!
How?
Given an ASCII code c, we use 6 & (c + 1) to get the number of swings needed to chop the tree, and c % 3 to get an index into the tree-counting array a[] (0 for small, 1 for big).
 char. | c = ASCII code | 6 & (c + 1) | c % 3
-------+----------------+-------------+-------
  'i'  |       105      |      2      |   0
  '|'  |       124      |      4      |   1

J, 37 34 33 bytes
(](-:;+/@#:@])(>:2*+/\)#])' i'i.]

Try it online!
-1 byte thanks to Bubbler
Converts small to 1, big to 2.  Now create a filter by doubling and scan summing, and apply filter to find entries less than or equal to the left input.  Take just those entries, convert to binary, and sum to get the <num big>, <num small> part of the answer.  Check if the filtered list equals the unfiltered list to get the "chops down all trees?" part of the answer.

You can omit the last char | in ' i|'i.].

R, 63 bytes
using characters exactly as described in challenge (or only 54 bytes using 0,1 to represent small & big trees, and outputting 0,1 to represent FALSE/TRUE axe breaking).
function(a,t)list(sum(c<-2+2*(t<"i"))>a,table(t[cumsum(c)<=a]))

Try it online!

Python 2, 103 \$\cdots\$ 82 80 bytes
Saved 4 6 9 11 bytes thanks to ovs!!!
f=lambda s,n:n<sum(6&ord(t)%6for t in s)and f('<'+s[:-1],n)or map(s.count,"<i|")

Try it online!
Inputs a string of trees \$s\$ (as is and |s) and an axe durability \$n\$.
Outputs a list of [axe broken, small trees, large trees] where axe broken is truthy if Tom's axe broke (or falsy otherwise) followed by the number of trees cut down.
How
If \$c\$ is either i, | or < then:
$$
\text{6&ord(c)%6} = \left\{
\begin{array}{ll}
    2  \text{ if c is 'i'}\\
    4 \text{ if c is '|'}\\
    0 \text{ if c is '<'}
\end{array}
\right.
$$
this is summed for all the trees in \$s\$ to calculate its needed durability. If it's too much for Tom's axe then we repeatedly try again without the last tree and set Tom's axe as broken by inserting a < into \$s\$, making that count truthy. When Tom's axe us strong enough we return what happened to his axe along with the number of each tree still in \$s\$.

(h,[*map(s.count,"i|")]) for -4.

@ovs Nice one - thanks! :-)

If you modify the output format slightly, it is 85 bytes

@ove Nice two - thanks again! :D

A last one: if you output a truthy/falsy value instead of 1/0, 82 bytes (or 80 bytes in Python 2) are possible.

@ove And it's a hat trick! Thanks muchly! :D

Keg, 32 bytes
0:&®s?⑷¦i2⑹|\|4©s⑨®s±™⑸¿⅀0=⑻©s(.

Try it online!
Takes input as trees, durability and outputs big, small and whether or not the axe breaks.
Somehow, Keg beat pyth.

Jelly, 14 bytes
I'm assuming, for now, that the "boolean" part of the output may be given as a Truthy/Falsey value.
Og©2ḤÄ’<a®‘ċⱮ3

A dyadic Link accepting the trees (a list of characters) on the left and the axe durability (an integer) on the right which yields a list of three integers, [is_broken, small_trees, big_trees] (Note that non-zero integers are Truthy in Jelly while 0 is Falsey).
Try it online!
How?
Og©2ḤÄ’<a®‘ċⱮ3 - Link: list of characters, T; integer, D   e.g. "|i|iii"; 14
O              - Ordinals (T)                                   [124,105,124,105,105,105]
  ©            - copy this to the register and yield it:
 g 2           -   greatest common divisor with two             [2,1,2,1,1,1]
    Ḥ          - double                                         [4,2,4,2,2,2]
     Ä         - cumulative sums                                [4,6,10,12,14,16]
      ’        - decrement                                      [3,5,9,11,13,15]
       <       - less than (D)?                                 [1,1,1,1,1,0]
        a      - logical AND with:
         ®     -   recall the value from the register           [2,1,2,1,1,0]
          ‘    - increment                                      [3,2,3,2,2,1]
            Ɱ3 - map across 3 with: (i.e. for right in [1,2,3])
           ċ   -   count occurrences                            [1,3,2]

Python 3.8, 109 bytes
f=lambda l,n,a=0,b=0:f(l[1:],m,a+1-j,b+j)if l and(m:=n-((j:='i|'.index(l[0]))+1)*2)>=0 else[l!=''and m<0,a,b]

Try it online!

@Alexley I have a found a 107 byte solution by placing f= in the header.Try it online!

@Tanmay thanks for the sugession, but the function is recursive, so f is a part of the code. Alternatively, why don't we move all the function into the header instead?) $0$ bytes.

Retina 0.8.2, 55 bytes
\d+
$*
(11)+1?(?<-1>(i)|(?<-1>(\|)))*($)?.*
$#4 $#3 $#2

Try it online! Takes input as [durability][trees] without a separator and outputs [complete] [big] [small]. Explanation:
\d+
$*

Convert the durability to unary.
(11)+1?

Capture half the durability as $#1.
(?<-1>(i)|(?<-1>(\|)))*

Count the trees as they are matched, and decrement the remaining durability appropriately depending on the size of tree.
($)?.*

Determine whether the all of the trees were chopped down.
$#4 $#3 $#2

Output the desired results.

Desmos, 73+31+8+8 = 125 120 bytes
-5 bytes from finding a new builtin, which cost a few bytes but allowed three functions to be collapsed into one.
l(g)=\sum_{m=1}^{t.length}\left\{2*\sum_{n=1}^m t[n]<=d:g[t[m]],0\right\}
\left\{d-total(t)*2<0:1\right\}
l([1,0])
l([0,1])

(each line is an individual function, line breaks are not used and don't count towards bytes)
Try it online
Desmos is absolutely the wrong choice of language for this problem.
Input is taken as a variable t holding the trees as an array of 1s and 2s, representing 2s and 4s (as accepted in the comments, Desmos doesn't even support strings anyways) / small and large trees and a variable d holding the durability. Output is in the second function (will it break, undefined for no and 1 for yes) and third and fourth functions (short and tall trees chopped respectively.
Explanation:
l(g)=\sum_{m=1}^{t.length}\left\{2*\sum_{n=1}^m t[n]<=d:g[t[m]],0\right\}

Calculates the amount of trees of a certain type chopped. It goes through each tree, checks if it has enough durability to chop it with the inner sum, and if so, adds a 1 or a 0 depending on the tree type, based on a lookup array g passed to it.
\left\{d-total(t)*2<0:1\right\}

Simple calculation to check if the durability available is less than what's required. Fun fact: Desmos can't properly output truthy or falsey values! It does support true and false, as you can see if you plug in \left\{3>2:1,0\right\} (where 3>2 evaluates to true, causing 1 to be output instead of 0), but you can't actually get then to print. Plug in 3>2 and you don't get any output. Additionally, try to use values we might traditionally think of as truthy or falsey in those same formulas, and you get an error! For this reason, it's possible that this isn't technically a truthy/falsey output based on this, but that definition allows for the occasional exception, which I think this fits under. I think we can all agree that 1 is truthy and undefined is falsey, so that's what I've gone with here. A looser definition (for example, any positive number is truthy and 0, undefined, and negatives are falsey) would likely allow for this line to be shorter.
l([1,0])

Calculate 1 (short) trees chopped with a 1 in position 1.
l([0,1])

Calculate 2 (tall) trees chopped with a 1 in position 2.

"desmos is absolutely the wrong choice of language for this problem."  I admire the stubbornness.


text:
Verify Tents and Trees solution
Background
Tents and Trees (try here) is a puzzle played on a square (or rectangular) grid, where the objective is to place tents horizontally or vertically adjacent to each of the trees, so that no two tents touch each other in 8 directions (horizontally, vertically, and diagonally) and the number of tents on each row/column matches the given clues.
Example puzzle and solution
In these examples, trees are T and tents are A.
Puzzle
  2 0 2 0 2 1
2 . T . T . .
1 . . . . T .
1 T . T . . .
2 . . . . . T
1 T . . . . .
0 . . . . . .

Solution
  2 0 2 0 2 1
2 . T A T A .
1 A . . . T .
1 T . T . A .
2 A . A . . T
1 T . . . . A
0 . . . . . .

Challenge
Given a grid with some tents and trees, determine whether the tents are placed correctly. Ignore the number clues in this challenge. In particular, your program should check the following:

The number of tents equals the number of trees,
The tents do not touch each other in 8 directions, and
There is at least one way to associate every tent with an adjacent tree in 4 directions, so that every tree is used exactly once.

If all of the above are satisfied, output a truthy value; otherwise, output a falsy value. You can choose to follow your language's convention of truthy/falsy, or use two distinct values for true/false respectively.
You may take the input in any reasonable way to represent a matrix containing three distinct values to represent a tree, a tent, and an empty space respectively.
Standard code-golf rules apply. The shortest code in bytes wins.
Test cases
This uses the same notation as the above example; T for trees, A for tents, and . for empty spaces.
Truthy
. . .
. . .
. . . (empty board)

T A

A T A
. . T

A T A
T . T
A T A
(note that there are two ways to associate tents with trees)

A . .
T T A
A T T
. . A

. T A .
A . . T
T T . A
. A . .

Falsy
(The number of Ts and As don't match)
T

A

T A T

(Two A's touch each other)
T A T
A . .

A . . A
T T T T
. A A .

(Some T's are not associated with an A)
A T A
T T .
A T A

A . T
T T A
A . .

Can we assume the input will always contain at least one tent and/or tree? So an input with only empty spots / dots is undefined and it doesn't matter whether it outputs truthy or falsey? And what about an empty input?

@Kevin Input may have zero tents and zero trees, which is truthy. You can assume the input will have at least one row and one column. Will add a test case shortly.

J, 88 86 bytes
Expects a matrix with 0 for ., 1 for A and 2 for T.
(2>1#.1=,);.3~&2 2*/@,&,1&=((1 e.[:*/"{2>[:+/"1|@-"2)i.@!@#A.]) ::0&($ #:i.@$#~&,])2&=

Try it online!
How it works
1&= (…) 2&=

Tents on the left side, trees on the right side.
(…)&($#:i.@$#~&,])

Convert both arguments to 2D coordinates.
(…) ::0

If the following function throws an error, return 0. This happens only in the single A case. :-(
i.@!@#A.]

List all permutations of the trees.
|@-"2

Get the difference between the tents from every permutation.
[:*/2>[:+/"1

Check that each difference's sum is 1.
1 e.

Does any permutation fulfill this?
(2>1#.1=,);.3~&2 2

Get all 2x2 matrices of the original, and check if there is at most one tent in there.
*/@,@,

Combine both results, flatten the lists, and check if there are only 1's.

JavaScript (ES7),  159 156  153 bytes
Expects a matrix of integers, with 0 for empty, -1 for a tree and 1 for a tent. Returns 0 or 1.
m=>(g=(X,Y,R)=>!/1/.test(m)|m.some((r,y)=>r.some((v,x)=>1/Y?(q=(x-X)**2+(y-Y)**2)?R?v+q?0:g(R[X]=r[x]=0)|R[X]++|r[x]--:q<3*v:0:v>0&&!g(x,y)&g(x,y,r))))``

Try it online!
How?
The main recursive function is used to perform 3 distinct tasks. The corresponding calls are marked as A-type, B-type and C-type respectively in the commented source. Below is a summary:
 type   | Y defined | R defined | task
--------+-----------+-----------+----------------------------------------------------
 A-type |    no     |     no    | Look for tents. Process B-type and C-type calls
        |           |           | for each of them.
--------+-----------+-----------+----------------------------------------------------
 B-type |   yes     |     no    | Look for another tent touching the reference tent.
--------+-----------+-----------+----------------------------------------------------
 C-type |   yes     |    yes    | Look for adjacent trees. Attempt to remove each of
        |           |           | them with the reference tent. Chain with an A-type
        |           |           | call.

Commented
m => (                       // m[] = input matrix
  g = (                      // g is the main recursive function taking:
    X, Y,                    //   (X, Y) = reference tent coordinates
    R                        //   R[] = reference tent row
  ) =>                       //
    !/1/.test(m) |           // success if all the tents and trees have been removed
    m.some((r, y) =>         // for each row r[] at position y in m[]:
      r.some((v, x) =>       //   for each value v at position x in r[]:
        1 / Y ?              //     if Y is defined:
          ( q = (x - X) ** 2 //       q = squared distance (quadrance)
              + (y - Y) ** 2 //           between (x, y) and (X, Y)
          ) ?                //       if it's not equal to 0:
            R ?              //         if R[] is defined (C-type call):
              v + q ? 0 :    //           if v = -1 and q = 1, meaning that we have
                             //           found an adjacent tree:
                g(           //             do an A-type recursive call:
                  R[X] =     //               with both the reference tent
                  r[x] = 0   //               and this tree removed
                )            //             end of recursive call
                | R[X]++     //             restore the tent
                | r[x]--     //             and the tree
            :                //           else (B-type call):
              q < 3 * v      //             test whether this is a tent with q < 3
          :                  //       else (q = 0):
            0                //         do nothing
        :                    //     else (A-type call):
          v > 0 &&           //       if this is a tent:
            !g(x, y)         //         do a B-type recursive call to make sure it's
            &                //         not touching another tent
            g(x, y, r)       //         do a C-type recursive call to make sure that
                             //         it can be associated to a tree
      )                      //   end of inner some()
    )                        // end of outer some()
)``                          // initial A-type call to g with both Y and R undefined

05AB1E, 53 49 42 60 bytes
1«ÐεNUεXN)]€`{.¡н}¦`UœεX‚®ζε`αO<]PßsZð×ª€ü2ø€ü2J˜2δ¢à*ISPΘ‚à

+11 bytes as bug-fix (thanks for noticing @xash) and +7 bytes to account for inputs only containing empty cells.. Not too happy with the current program full of ugly edge-case workarounds tbh, but it works..
Input as a list of string-lines, where \$2\$ is a tent; \$3\$ is a tree; and \$1\$ is an empty spot.
Outputs \$1\$ for truthy; and anything else for falsey (only \$1\$ is truthy in 05AB1E, so this is allowed by the challenge rule "You can choose to follow your language's convention of truthy/falsy").
Try it online or verify all test cases.
Explanation:
I do three main steps:
Step 1: Get all coordinates of the trees and tents, and check whether there is a permutation of tree permutations that has a horizontal or vertical distance of 1 with the tent coordinates.
1«         # Add a trailing empty spot to each row
           # (to account for matrices with only tents/trees and single-cell inputs)
  Ð        # Triplicate this matrix with added trailing 2s
   ε       # Map each row to:
    NU     #  Store the index of this outer map in `X`
    ε      #  Inner map over each cell of this row:
     XN)   #   Create a triplet of the cell-value, `X`, and the inner map-index `N`
   ]       # Close the nested maps
    €`     # Flatten the list of lists of cell-coordinates one level down
{          # Sort the list of coordinates, so the empty spots are before tents, and tents
           # before trees
 .¡ }      # Then group them by:
   н       #  Their first item (the type of cell)
     ¦     # And remove the first group of empty spots
`          # Pop and push the list of tree and tent coordinates separated to the stack
 U         # Pop and store the tent coordinates in variable `X`
           # (or the input with trailing empty spots if there were only empty spots in
           #  the input)
  œ        # Get all permutations of the tree coordinates
           # (or the input with trailing empty spots if there are none, hence the
           #  triplicate instead of duplicate..)
ε          # Map each permutation of tree coordinates to:
 X‚        #  Pair it with the tent coordinates `X`
    ζ      #  Zip/transpose; swapping rows/columns,
   ®       #  with -1 as filler value if the amount of tents/trees isn't equal
     ε     #  Map each pair of triplets to:
      `    #  Pop and push them separated to the stack
       α   #  Get the absolute different between the values at the same positions
        O  #  Take the sum of those differences for each triplet
         < #  Subtract each by 1 to account for the [2,3] of the tree/tent types
]          # Close the nested maps
 P         # Take the product of each difference of coordinates
  ß        # And pop and push the smallest difference

Step 2: Get all 2x2 blocks of the matrix, and check that each block contains either none or a single tent (by counting the amount of tents per 2x2 block, and then getting the maximum).
s          # Swap to get the input-matrix with trailing empty spots we triplicated
 Z         # Get its maximum (without popping)
  ð×       # Create a string with that many spaces
    ª      # And append it to the list
           # (it's usually way too large, but that doesn't matter since it's shortened
           #  automatically by the `ø` below)
 €         # For each row:
  ü2       #  Create overlapping pairs
           #  (the `ü2` doesn't work for single characters, hence the need for the
           #   `1«` and `Zð×ª` prior)
    ø      # Zip/transpose; swapping rows/columns
           # (which also shortens the very long final row of space-pairs)
     €     # For each column of width 2:
      ü2   #  Create overlapping pairs
           # (we now have a list of 2x2 blocks)
 J         # Join all 2x2 blocks together to a single 4-sized string
  ˜        # And flatten the list
    δ      # Then for each 4-sized string:
   2 ¢     #  Count the amount of tents it contains
      à    # Pop and get the maximum count
           # (if this maximum is 1, it means there aren't any adjacent nor diagonally
           #  adjacent tents in any 2x2 block)

Step 3: Add the checks together, and account for inputs consisting only of empty spots as edge-case:
*          # Multiply the two values together
 I         # Push the input-matrix again
  S        # Convert it to a flattened list of digits
   P       # Take the product
    Θ      # Check that this is exactly 1 (1 if 1; 0 if not)
     ‚     # Pair it with the multiplied earlier two checks
      à    # And pop and push the maximum of this pair
           # (for which 1 is truthy; and anything else is falsey)
           # (after which it is output implicitly as result)

Brachylog, 59 47 54 45 bytes
Trying to get into Brachylog lately, so here is a (now very) rough port of my J approach. Takes in a matrix with 0 for ., 2 for A and 3 for T. Either fails to unify (prints false) or doesn't.
c=₀|¬{s₂\s₂c⊇Ċ=₂}&{iiʰgᵗcṗʰ}ᶠhᵍpᵗz₂{\b-ᵐȧᵐ+1}ᵐ

Try it online! or verify all test cases (returns truthy cases).
How it works
c=₀|

Either the flatten matrix contains only 0's or …
¬{s₂\s₂c

No 2x2 submatrix flattened …
⊇Ċ=₂}

contains an ordered subset of length 2 that is just 2's (tents).
&{iiʰgᵗc

And the input must be converted to [type, y, x], where …
ṗʰ}

type is a prime (there seems no shorter way to filter out 0).
ᶠp

Find all [type, y, x] put them into a list, and permute this list.
hᵍ

Group them by their type; [[[3,0,2], …], [[4,1,2], …]].
z₂

Zip both groups together and make sure they have the same length. We now have [[[3,0,2], [4,1,2]], …]
{\b-ᵐȧᵐ+1}ᵐ

For every element [[3,0,2], [4,1,2]] transpose [[3,4],[0,1],[2,2]] behead [[0,1],[2,2]] subtract [_1,0] absolute value [1,0] sum 1 and that must unify with 1. So this unifies if any permutation of the one group is exactly 1 tile away from the other one.

Wolfram Language (Mathematica), 146 bytes
<<Combinatorica`
f=2*Length@MaximalMatching@MakeGraph[v=Position[#,A|T],Norm[#-#2]==1&]==Length@v&&
And@@Join@@BlockMap[Count[#,A,2]<2&,#,{2,2},1]&

Try it online!
Note:

The second line break is only added in the post for ease of reading.
importing  Combinatorica later will make the symbols refer to the Global ones and will not have the correct result.
Although Combinatorica`MakeGraph is rather long, MaximalMatching is 7 characters shorter than FindIndependentEdgeSet.
I suppose this solution is the fastest...? There exists algorithms to find maximal matching in polynomial time, while testing all permutations take exponential time.