text:
Collapsing numbers
Let's define the a function on natural numbers \$n\$, written as base 10 digits \$d_k\; d_{k-1}\; \dotsc\; d_1\; d_0\$, as follows:
As long as there are equal adjacent digits \$d_i\;d_{i-1}\$, replace them by their sum \$d_i+d_{i-1}\$ from left to right. If there were any such digits, repeat the same procedure.
In other words, in each iteration we greedily take all pairs of equal adjacent digits and replace them by their sum at the same time (using the left-most pair if they overlap).
Example
Let's take \$\texttt{9988}\$ for example:

The first adjacent digits which are equal are the two \$\texttt{9}\$
So we replace them by \$\texttt{9 + 9} = \texttt{18}\$ which gives us \$\texttt{1888}\$
Since we're still in the first left-right traversal and there were still two \$\texttt{8}\$s we need to first replace these
So we get \$\texttt{1816}\$
Something changed, so we need to do another iteration
But there are no such digits, so we stop

Therefore the \$9988^\text{th}\$ number in that sequence is \$1816\$.
Challenge
The first 200 terms are:
0,1,2,3,4,5,6,7,8,9,10,2,12,13,14,15,16,17,18,19,20,21,4,23,24,25,26,27,28,29,30,31,32,6,34,35,36,37,38,39,40,41,42,43,8,45,46,47,48,49,50,51,52,53,54,10,56,57,58,59,60,61,62,63,64,65,12,67,68,69,70,71,72,73,74,75,76,14,78,79,80,81,82,83,84,85,86,87,16,89,90,91,92,93,94,95,96,97,98,18,10,101,102,103,104,105,106,107,108,109,20,21,4,23,24,25,26,27,28,29,120,121,14,123,124,125,126,127,128,129,130,131,132,16,134,135,136,137,138,139,140,141,142,143,18,145,146,147,148,149,150,151,152,153,154,20,156,157,158,159,160,161,162,163,164,165,4,167,168,169,170,171,172,173,174,175,176,24,178,179,180,181,182,183,184,185,186,187,26,189,190,191,192,193,194,195,196,197,198,28

Your task is to generate that sequence, either

given \$n\$, return the \$n^\text{th}\$ number in that sequence,
given \$n\$, return the first \$n\$ numbers in that sequence
or generate the sequence indefinitely.

You may choose your submission to use either \$0\$- or \$1\$-indexing, but please specify which.
Test cases
You may use the above given terms, however here are some larger ones:
222 -> 42
1633 -> 4
4488 -> 816
15519 -> 2019
19988 -> 2816
99999 -> 18189
119988 -> 21816
100001 -> 101
999999 -> 181818

Python 3, 128 bytes
def t(z):j=z and(z[0]==z[1:2])+1;return[str(int(z[0])*j),*t(z[j:])]if j else''
def c(n):r="".join(t(n));return r!=n and c(r)or r

Try it online!

Welcome to PPCG! Nice first post!

108 bytes

Python 2, 97 96 93 bytes
def f(n):r=re.sub(r'(.)\1',lambda m:`int(m.group(1))*2`,n);return r!=n and f(r)or r
import re

Try it online!

Non regex version:
Python 2, 133 130 122 112 98 bytes
def f(n):
 r='';s=n
 while s:a=1+(s[0]==s[1:2]);r+=`int(s[0])*a`;s=s[a:]
 return r!=n and f(r)or r

Try it online!

Jelly, 11 bytes
DŒg+2/€FVµ¡

This is an unnecessarily slow, full program.
Try it online!
Alternate version, 12 bytes
DŒg+2/€FVµƬṪ

One byte longer, but much faster. Works as a program or a function.
Try it online!
How it works
DŒg+2/€FVµƬṪ  Main link. Argument: n (integer)

         µ    Combine the previous links into a chain. Begin a new one.
D               Decimal; yield n's digit array in base 10.
 Œg             Group adjacent, identical digits into subarrays.
   +2/€         Map non-overlapping, pairwise sum over the subarrays.
                If there is an odd number of digits in a subarray, the
                last digit will remain untouched.
       F        Flatten; dump all sums and digits into a single array.
        V       Eval; turn the result into an integer.
          Ƭ   Execute the chain 'til the results are no longer unique.
              Return all unique results.
           Ṫ  Tail; extract the last result.

The 11-byte version does the same, except it calls the link n times for input n, instead of calling it until a fixed point is reached.

It's not unnecessary if it saves 1 byte :-)

JavaScript, 48 47 46 bytes
Input and output as strings. Returns the nth term of the sequence.
f=s=>s-(s=s.replace(/(.)\1/g,x=>x/5.5))?f(s):s

Try it online

1 byte saved thanks to Arnauld
1 byte saved thanks to tsh

x[0]*2 -> x/5.5

Thanks, @tsh. Wouldn't have thought of that.

Haskell, 70 bytes
until((==)=<<f)f
f(a:b:c)|a==b=show(2*read[a])++f c|1<2=a:f(b:c)
f a=a

Input is taken as a string.
Try it online!

It doesn't save you anything so far, but with the same length you can replace the second clause with |x<-b:c=a:f x or even f(a:c)=a:f c, in case one or the other could actually lead to an improvement:)

Retina, 16 bytes
+`(.)\1
$.(2*$1*

Try it online! Link includes test cases. Explanation:
+`

Repeat until the input stops changing.
(.)\1

Replace pairs of adjacent digits...
$.(2*$1*

... with twice the digit. ($1* generates a string of $1 _s, 2* duplicates that, and $.( takes the length. Actually, the Retina engine is cleverer than that and just doubles $1.)

C# (.NET Core), 231, 203, 200, 196, 192 bytes
EDIT:  Function is now at 185 bytes plus 18 for using System.Linq;
Thanks to BMO (for 1>0 being equal to true plus newline removal) and Mr. XCoder (for f=!f statements)!
EDIT2:  Down to 182 bytes plus 18 for using System.Linq thanks to dana for sharing a few golf tips!
EDIT3:  Thanks to Embodiment of Ignorance for the int[] -> var, removal of short circuit && -> &, and changing up ToArray -> ToList! (178 bytes + 18 using)
EDIT4:  Embodiment of Ignorance dropped 4 bytes by changing an assignment.  Dummy me shoulda counted!  Thanks again :D
p=>{var f=1>0;while(f){var t=p.Select(n=>n-48).ToList();p="";f=!f;for(var j=0;j<t.Count;j++){if(j<t.Count-1&t[j]==t[1+j]){p+=t[j]+t[++j];f=!f;continue;}p+=t[j];}};return p;};

Try it online!

174 before using

Perl 6, 37 bytes
{($_,{S:g[(\d)$0]=2*$0}...*==*)[*-1]}

Try it online!
This is a function which generates the nth term of the sequence, given n as its argument.
($_, { ... } ... * == *) is the sequence of successive changes to the input number, generated by the bracketed expression (a simple regex substitution) and stopping when * == *, that is, when the last two numbers in the sequence are equal.  Then the [*-1] takes just the final element of that sequence as the return value.

You can save bytes by removing the ==* and replacing the *-1 with $_, since there are always less than n replacements for a number n. 33 bytes

Japt v2.0a0 -h, 15 14 bytes
Returns the nth term of the sequence.
Æ=s_r/(.)\1/ÏÑ

Try it
This should work for 10 bytes but there seems to be a bug in Japt's recursive replacement method.
e/(.)\1/ÏÑ

Wolfram Language 108 bytes
ToExpression[""<>ToString/@Total/@Flatten[Partition[#,UpTo@2]&/@Split@IntegerDigits@#,1]]&~FixedPoint~#&

Explanation
IntegerDigits transforms the input number into a list of its digits.
Split groups consecutive repeated digits.
Partition[#, UpTo@2]&/@ breaks runs of like digits into lists of, at most, lengths of 2.
Flatten[...,1] eliminates occasional overly-nested braces--e.g., {{2,2}} becomes {2,2}
Total/@ sums totals of paired digits.  Isolated digits need not be summed.
ToString converts the totals (and isolated digits) to strings.
""<> joins all the strings in the list.
ToExpression converts the outcome to an integer.
...~FixedPoint~#& applies the function until the result ceases to change.

Perl 5 -p, 21 bytes
s/(.)\1/$1*2/ge&&redo

Try it online!

C# (Visual C# Interactive Compiler) with flag /u:System.Text.RegularExpressions.Regex, 70 bytes
s=>{for(;s[0]!=(s[0]=Replace(s[0],@"(.)\1",m=>m.Value[0]*2-96+"")););}

Outputs by modifying the input. Takes in a list containing one string for input.
Thanks to @dana for golfing an entire 23 bytes!
Try it online!

95+34 - 33 + 1 for the extra space you need in the commandline args, iirc

Recursive anonymous functions have to be defined first, and the definition is in included in the byte count.

Oh, it's recursive

Nice! I think I can get it down a bit more

That's a pretty good score considering it's C# :)

Groovy, 63 bytes
{s->r=/(\d)\1/
while(s=~r)s=s.replaceAll(r){(it[1]as int)*2}
s}

Try it online!

05AB1E, 11 bytes
Δγε2ôSO}˜J

Try it online or verify all test cases.
Explanation:
Δ             # Continue until the (implicit) input no longer changes:
 γ            #  Split the integer in chunks of the same adjacent digits
              #   i.e. 199999889 → [1,99999,88,9]
  ε     }     #  Map each to:
   2ô         #   Split it into parts of size 2
              #    i.e. 99999 → [99,99,9]
     €S       #   Split each part into digits
              #    i.e. [99,99,9] → [[9,9],[9,9],[9]]
       O      #   And take the sum of each part
              #    i.e. [[9,9],[9,9],[9]] → [18,18,9]
         ˜    #  Flatten the list
              #   i.e. [[1],[18,18,9],[16],[9]] → [1,18,18,9,16,9]
          J   #  Join everything together
              #   i.e. [1,18,18,9,16,9] → 118189169
              # (And output the result implicitly at the end)
              #  i.e. output = 28189169

Clean, 118 bytes
import StdEnv,Data.List
$[a,b:t]|a==b=[1,(a*2)rem 10]%(1-a/5,1)++ $t=[a: $[b:t]]
$l=l

limit o iterate$o map digitToInt

Try it online!
Takes the first repeated value (limit) from the infinite list of applications (iterate) of a lambda performing a single step of the collapsing process. Input taken as a [Char].

C# (Visual C# Interactive Compiler), 111 bytes
s=>{var t=s;do{s=t;t="";for(int i=0;i<s.Length;)t+=s[i]%48*(s[i++]!=(s+0)[i]?1:2*++i/i);}while(t!=s);return t;}

Try it online!
HUGE credit to @ASCIIOnly for golfing ~30 ;) At first we were both posting updates simultaneously, but at some point he clearly went to town!
-2 thanks to @EmbodimentOfIgnorance!
Less golfed code...
// s is the input as a string
s=>{
  // t is another string used
  // to hold intermediate results
  var t=s;
  // the algorithm repeatedly
  // processes s and saves the
  // result to t
  do{
    // copy the last result to s
    // and blank out t
    s=t;
    t="";
    // iterate over s
    for(int i=0;i<s.Length;)
      // append either 1 or 2 times
      // the current digit to t
      t+=s[i]%48*
        // compare the current digit
        // to the next digit. to prevent
        // an out-of-bounds exception,
        // append a 0 to s which either
        // gets ignored or collapses
        // to 0
        (s[i++]!=(s+0)[i]
          // if they are different, then
          // the multiplier is 1
          ?1
          // if they are the same, then
          // the multiplier is 2, and we
          // have to increment i
          :2*++i/i);
  }
  // continue this until the input
  // and output are the same
  while(t!=s);
  return t;
}

139

134

@ASCIIOnly - Good move :) (s[i++]-48)*2 => s[i++]*2-96

131

119

125

117?

116

114

You nailed it :) I am halfway expecting an updated version as I write this comment ;)

Let us continue this discussion in chat.

Red, 84 83 80 bytes
func[n][if parse s: form n[to some change[copy d skip d](2 * do d)to end][f s]s]

Try it online!
Returns the nth term of the sequence.
Explanation:
Red[]
f: func [ n ] [
    if parse s: form n [  ; parse the input converted to a string
        to some change [  ; find and change one or more
            copy d skip   ; digit (in fact any character, no predefined character classes)
            d             ; followed by itself
        ] (2 * do d)      ; with its doubled numeric value
        to end            ; go to the end of the string
    ] [ f s ]             ; call the function with the altered string if parse returned true
    s                     ; finally return the string
]

Scala, 84 bytes
s=>{var t=s
while(t!=(t="(\\d)\\1".r.replaceAllIn(t,m=>s"$m"(0)*2-96+""),t)._2){}
t}

Try it online!

Husk, 15 bytes
→U¡ödṁoṁodΣC2gd

Try it online!

Ruby -p, 39 34 bytes
-5 bytes thanks to Steffan
$_.gsub!(/(.)\1/){$1.to_i*2}&&redo

Attempt This Online!

You have to count the F= in the bytecount since you're recursing. However, you can just replace F[s] with redo and then you don't need to.

@Steffan I always forget about redo. Thanks.

You can get 34 bytes with a full program and -p flag: $_.gsub!(/(.)\1/){$1.to_i*2}&&redo ATO

@Steffan Of course. Good catch.


text:
Order of Elements of the Rubik's Cube
Introduction
All the possible moves and their combinations of a Rubik's Cube form a group. A group in general is a set with some binary operation defined on it. It must contain a neutral element with respect to this operator as well as inverses for every element of the set. For instance the integers \$\mathbb Z\$ with the addition \$+\$ forms a group. In the case of the Rubik's Cube it is a finite group as there are only about \$4.3 \cdot 10^{19} \$ distinct moves. This implies that any move has a finite order, this means that if you repeat any move enough times, you will end up back at the original state that the cube had when you started applying those moves.
Challenge
Given some move on the Rubik's Cube, determine how many times you have to repeat that move until you get to the original state (i.e. find the order of that move).
Details

We are using the \$3\times 3\times 3\$ Rubik's Cube.
There are 12 elementary moves: Each of those turns the front, back, left, right, up or down layer by 90°. The clockwise moves are denoted by the corresponding letters F,B,L,R,U,D. The counterclockwise elementary moves are denoted by the same letters followed by an apostrophe, for instance F' denotes a counter clockwise rotation of 90° of the front layer. If you want, you can also use a lower case letter f instead.
We write all non elementary moves a sequence of elementary moves, these are written as a string and read from left to right. As an example FFU' denotes a clockwise rotation of 180° of the front layer followed by a counterclockwise rotation of the top layer. Similarly FFF = F'.
The order of the Rubik's Cube group is $$43'252'003'274'489'856'000 = 2^{27}\cdot 3^{14}\cdot 5^3\cdot 7^2\cdot 11.$$ Lagrange's theroem says that for any element of a finte group, the order of that element must divide the order of that group. So your submission must necessarily output a divisor of the number above. In fact the element with the greatest order in the Rubik's Cube group has only an order of \$1260 = 2^2 \cdot 3^2 \cdot 5 \cdot 7\$.

Examples
Thanks @KevinCruijssen for verifying:
Move     Order
(empty)             1
F                   4
FF                  2
FFFF                1
U'L'              105
LLUU                6
L'L'U'             30
RUUD'BD'         1260
U'L'U'LU'L'U'U'L    4
R'LFRL'U'           5

source: Stack Exchange

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

sort: votes


text:
Min-Max GHC command line error bytes to bytes of source code
GHC command line errors can be horrible, lets make them as bad as possible. To disincentivize very long programs use the following formula to calculate your "score".
(# of bytes of GHC output) / 2^(8 + # of bytes of code)

Template Haskell is banned as there is probably a TH configuration where you can replicate an error f(n) times where f is an arbitrary fast growing computable function. CPP and GHC options are banned for similar reasons.
GHC output should be computed using this release of GHC 8.6.3.
To calculate the bytes of GHC output run:
ghc -hide-all-packages -package base Main.hs |& wc -c

The following is an example submission:
main = print (1 + True)

Error:
[1 of 1] Compiling Main             ( Main.hs, Main.o )

Main.hs:1:15: error:
    • No instance for (Num Bool) arising from a use of ‘+’
    • In the first argument of ‘print’, namely ‘(1 + True)’
      In the expression: print (1 + True)
      In an equation for ‘main’: main = print (1 + True)
  |
1 | main = print (1 + True)
  |               ^^^^^^^^

Score:
375 / 2^(8 + 24) = 0.0000000873114914

Submissions must contain the code and the score. Highest score wins.

Related. I suspect an answer inspired from there could be quite competitive. And probably (I'm pretty confident) could have an unbounded score

yep

2.9MB already

I recommend looking into [tag:busy-beaver] challenges.  In particular, for these kinds of challenges, I often recommend a maximum length, and a requirement that the program must eventually halt.

@ASCII-only Your program’s score of 2919209/2^(8 + 30) ≈ 0.0000106 is handily beaten by the empty program’s score of 142/2^(8 + 0) = 0.5546875. However, the winning constructions at Make a long type signature are doubly-exponential, so you can get an unbounded score. I don’t think this scoring system is going to work.

@AndersKaseorg Yeah, definitely. Even that challenge has a length limit because of the same issue. Alternatively, maybe you could count type names as one byte long

@AndersKaseorg I was trying to solve the sensitivity around 0 with the plus 8. Do you have a better scoring method?

The plus 8 doesn’t do anything except uniformly divide all scores by 256. I think it’s going to be hard to find something that isn’t totally arbitrary and doesn’t strongly favor either the empty program or programs compiling with too many errors to fit in the visible universe. Maybe the challenge should be to find the shortest program that produces at least (say) 1000000 bytes of errors?

Also with that formulation, there’s probably no need to ban specific features like Template Haskell because it probably costs more bytes to use them than the shortest program to produce 1000000 bytes of errors. In fact, you could open the challenge up to any language with a concept of compile errors, not just Haskell.

@ASCII-only This is beautiful! :)

@flawr I stole it off the linked question though

Score diverges to \$\infty\$
f=(:).(:)
g=f.f.f.f.f.f.f.f -- adding ".f" always results in better score
main=g+main g

Based on ASCII-only's construction, it is pretty easy to get ever-increasing score with longer and longer programs. Just posting to knock the challenge out of the unanswered list.
Given the following program form
f=(:).(:).(:) -- n copies of (:) composed
main=f+main f

the sizes of error messages are:
2 copies -> 2328
3 copies -> 8121 (x3.488)
4 copies -> 27121 (x3.339)
5 copies -> 103385 (x3.812)
6 copies -> 432486 (x4.183)
7 copies -> 1898125 (x4.388)
8 copies -> 8495224 (x4.475)
9 copies -> 39395094 (x4.637)
10 copies -> 198171503 (x5.030)

We can't know the exact formula of this because Haskell's error message pretty-printing is complicated, but we can at least know that adding one copy of .(:) consistently increases the error size by a factor of 4 or higher. In the top submission, adding two characters .f adds two copies of (:), multiplying the error size by at least 16 and therefore the score by
\$16 \div 4 = 4\$.
To roughly see what is going on, here's the full error for 1-copy (:) program: (those ��s are pretty quotes, which got somehow broken in my editor)
[1 of 1] Compiling Main             ( Main.hs, Main.o )

Main.hs:2:1: error:
    ? Couldn't match expected type ��IO t0��
                  with actual type ��(a0 -> [a0] -> [a0])
                                    -> (a0 -> [a0] -> [a0])
                                    -> [a0 -> [a0] -> [a0]]
                                    -> [a0 -> [a0] -> [a0]]��
    ? Probable cause: ��main�� is applied to too few arguments
      In the expression: main
      When checking the type of the IO action ��main��
  |
2 | main=f+main f
  | ^

Main.hs:2:6: error:
    ? Couldn't match type ��[a -> [a] -> [a]]�� with ��a -> [a] -> [a]��
      Expected type: (a -> [a] -> [a])
                     -> (a -> [a] -> [a]) -> [a -> [a] -> [a]] -> [a -> [a] -> [a]]
        Actual type: (a -> [a] -> [a])
                     -> [a -> [a] -> [a]] -> [a -> [a] -> [a]]
    ? Possible cause: ��(+)�� is applied to too many arguments
      In the expression: f + main f
      In an equation for ��main��: main = f + main f
    ? Relevant bindings include
        main :: (a -> [a] -> [a])
                -> (a -> [a] -> [a]) -> [a -> [a] -> [a]] -> [a -> [a] -> [a]]
          (bound at Main.hs:2:1)
  |
2 | main=f+main f
  |      ^^^^^^^^

and for 2-copy (:) program:
[1 of 1] Compiling Main             ( Main.hs, Main.o )

Main.hs:2:1: error:
    ? Couldn't match expected type ��IO t0��
                  with actual type ��(a0 -> [[a0] -> [a0]] -> [[a0] -> [a0]])
                                    -> (a0 -> [[a0] -> [a0]] -> [[a0] -> [a0]])
                                    -> [[a0 -> [[a0] -> [a0]] -> [[a0] -> [a0]]]
                                        -> [a0 -> [[a0] -> [a0]] -> [[a0] -> [a0]]]]
                                    -> [[a0 -> [[a0] -> [a0]] -> [[a0] -> [a0]]]
                                        -> [a0 -> [[a0] -> [a0]] -> [[a0] -> [a0]]]]��
    ? Probable cause: ��main�� is applied to too few arguments
      In the expression: main
      When checking the type of the IO action ��main��
  |
2 | main=f+main f
  | ^

Main.hs:2:6: error:
    ? Couldn't match type ��[[a -> [[a] -> [a]] -> [[a] -> [a]]]
                            -> [a -> [[a] -> [a]] -> [[a] -> [a]]]]��
                     with ��a -> [[a] -> [a]] -> [[a] -> [a]]��
      Expected type: (a -> [[a] -> [a]] -> [[a] -> [a]])
                     -> (a -> [[a] -> [a]] -> [[a] -> [a]])
                     -> [[a -> [[a] -> [a]] -> [[a] -> [a]]]
                         -> [a -> [[a] -> [a]] -> [[a] -> [a]]]]
                     -> [[a -> [[a] -> [a]] -> [[a] -> [a]]]
                         -> [a -> [[a] -> [a]] -> [[a] -> [a]]]]
        Actual type: (a -> [[a] -> [a]] -> [[a] -> [a]])
                     -> [[a -> [[a] -> [a]] -> [[a] -> [a]]]
                         -> [a -> [[a] -> [a]] -> [[a] -> [a]]]]
                     -> [[a -> [[a] -> [a]] -> [[a] -> [a]]]
                         -> [a -> [[a] -> [a]] -> [[a] -> [a]]]]
    ? Possible cause: ��(+)�� is applied to too many arguments
      In the expression: f + main f
      In an equation for ��main��: main = f + main f
    ? Relevant bindings include
        main :: (a -> [[a] -> [a]] -> [[a] -> [a]])
                -> (a -> [[a] -> [a]] -> [[a] -> [a]])
                -> [[a -> [[a] -> [a]] -> [[a] -> [a]]]
                    -> [a -> [[a] -> [a]] -> [[a] -> [a]]]]
                -> [[a -> [[a] -> [a]] -> [[a] -> [a]]]
                    -> [a -> [[a] -> [a]] -> [[a] -> [a]]]]
          (bound at Main.hs:2:1)
  |
2 | main=f+main f
  |      ^^^^^^^^

Basically the inferred type signature of main is blowing up by factor of >4. The type has the format of x -> y -> z -> w, where each of x, y, z, w contains the sub-structure p -> q -> r. When a copy of (:) is added, q and r parts are doubled and z and w are quadrupled.

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


text:
Find if a list is an ABC-triple
Three positive integers A, B, C are ABC-triple if they are coprime,
with A < B and satisfying the relation : A + B = C
Examples :

1, 8, 9 is an ABC-triple since they are coprime, 1 < 8 and 1 + 8 = 9
6, 8, 14 is not because they are not coprime
7, 5, 12 is not because 7 > 5

You can see this Frits Beukers 2005 presentation for more details about ABC-triples.
Input/Output
Three integers, decimal written. May be separated values or
list. Output had to be a truthy/falsy value whether the three
integers are an ABC-triple.
Note: It is important to respect integers order in the list, for example: 1, 8, 9 is not considered as the same list as 9, 1, 8 or any other combination. So first is an ABC-triple and second is not.
Thus A is the first element of the list, B the second and C the third.
Test cases
Each of the following lists should output a truthy value
[1, 8, 9]
[2, 3, 5]
[2, 6436341, 6436343]
[4, 121, 125]
[121, 48234375, 48234496]

Each of the following lists should output a falsey value
[1, 1, 2]
[1, 2, 5]
[1, 9, 8]
[4, 12872682, 12872686]
[6, 8, 14]
[7, 5, 12]

Does the output have to be only one of two values, or can we output different truthy/falsy values for different inputs?

I think it should be consistent: your code have to output one kind of truthy/falsy values whatever the input. But the truthy/falsy couple can be what you want as far as it does the job: differentiate lists.

If we take the input as list of three values, does the input have to be in the order [A,B,C], or are we also allowed to take the input in the order [C,B,A] or [C,A,B]?

You have to respect order since A < B is a criteria in the challenge.

@david A < B can still be respected when we take the input list in the order [C,A,B]. ;) But ok, perhaps it's indeed best to leave the input-order for lists-input as [A,B,C] to reduce confusion.

@kevin-cruijsen Yes and it's an ABC triple! with that particular definition...

@david Please edit that information into the challenge, to avoid confusion

I don't think requiring a particular list order is compatible with allowing input to be taken as separate values, as separate values are inherently unordered and may be taken as a list.

@LuisMendo when in doubt, check meta: https://codegolf.meta.stackexchange.com/questions/2190/interpretation-of-truthy-falsey

Haskell, 48 38 29 bytes
-10 bytes due to TFeld's gcd trick!
-7 bytes thanks to HPWiz for improving the co-primality test and spotting a superfluous space!
-2 bytes thanks to nimi for suggesting an infix-operator!
(a!b)c=a<b&&a+b==c&&gcd a b<2

Try it online!
Explanation
The first two conditions a < b and a + b == c are fairly obvious, the third one uses that \$\gcd(a,b) = \gcd(a,c) = \gcd(b,c)\$:
Writing \$\gcd(a,c) = U \cdot a + V \cdot c\$ using Bézout's identity and substituting \$c = a + b\$ gives:
$$
U \cdot a + V \cdot (a + b) = (U + V) \cdot a + V \cdot b
$$
Since the \$\gcd\$ is the minimal positive solution to that identity it follows that \$\gcd(a,b) = \gcd(a,c)\$. The other case is symmetric.

Also, I believe you only need that gcd a b==1. Since gcd a b divides a+b=c. i.e gcd(gcd a b)c=gcd a b

@HPWiz: Ah yes,of course, thanks! Will edit later when not on mobile..

Jelly, 10 9 bytes
Ṫ=S×</=g/

Try it online!
How it works
Ṫ=S×</=g/  Main link. Argument: [a, b, c] (positive integers)

Ṫ          Tail; pop and yield c.
  S        Take the sum of [a, b], yielding (a + b).
 =         Yield t := (c == a + b).
    </     Reduce by less than, yielding (a < b).
   ×       Multiply, yielding t(a < b).
       g/  Reduce by GCD, yielding gcd(a, b).
      =    Check if t(a < b) == gcd(a, b).

Perl 6, 33 32 bytes
-1 byte thanks to nwellnhof
{(.sum/.[2]/2*[<] $_)==[gcd] $_}

Try it online!
Anonymous code block that takes a list of three numbers and returns True or False.
Explanation
{                              }  # Anonymous code block
                       [gcd] $_   # Is the gcd of all the numbers
 (                  )==           # Equal to
  .sum        # Whether the sum of numbes
      /       # Is equal to
       .[2]/2 # The last element doubled
             *[<] $_   # And elements are in ascending order

32 bytes

Excel, 33 bytes
=AND(A1+B1=C1,GCD(A1:C1)=1,A1<B1)

05AB1E, 12 11 10 bytes
Saved 1 byte thanks to Kevin Cruijssen
ÂÆ_*`\‹*¿Θ

Try it online!
or as a Test Suite
Explanation
ÂÆ           # reduce a reversed copy of the input by subtraction
  _          # logically negate
   *         # multiply with input
    `        # push the values of the resulting list separately to stack
     \       # remove the top (last) value
      ‹      # is a < b ?
       *     # multiply by the input list
        ¿    # calculate the gcd of the result
         Θ   # is it true ?

Oops.. deleted my comment.. >.> So again: you can save a byte by using multiples instead of swaps with product: RÆ_*`\‹*¿Θ Test Suite.

@KevinCruijssen: Thanks! Yeah, usually when you have that many swaps, you're doing something wrong :P

Wolfram Language 24 30 28 26 bytes
With 2 bytes shaved by Doorknob.
A further 2 bytes shaved off by @jaeyong sung
#<#2&&GCD@##==1&&#+#2==#3&

I think you should also be able to use CoprimeQ@## to save 2 bytes.

@Doorknob, If the first and second numbers are coprime, are they necessarily coprime with their sum?

They are, but the original definition actually states that A, B, and C should be coprime. Most answers check only A and B just because it's usually shorter.

I think GCD@##==1 would save 2 bytes

Java 10, 65 64 bytes
(a,b,c)->{var r=a<b&a+b==c;for(;b>0;a=b,b=c)c=a%b;return r&a<2;}

-1 byte thank to @Shaggy.
Try it online.
Explanation:
(a,b,c)->{        // Method with three integer parameters and boolean return-type
  var r=          //  Result-boolean, starting at:
        a<b       //   Check if `a` is smaller than `b`
        &a+b==c;  //   And if `a+b` is equal to `c`
  for(;b>0        //  Then loop as long as `b` is not 0 yet
      ;           //    After every iteration:
       a=b,       //     Set `a` to the current `b`
       b=c)       //     And set `b` to the temp value `c`
    c=a%b;        //   Set the temp value `c` to `a` modulo-`b`
                  //   (we no longer need `c` at this point)
  return r        //  Return if the boolean-result is true
         &a<2;}   //  And `a` is now smaller than 2

a==1 -> a<2 to save a byte.

bash, 61 bytes
factor $@|grep -vzP '( .+\b).*\n.*\1\b'&&(($1<$2&&$1+$2==$3))

Try it online!
Input as command line arguments,
output in the exit code
(also produces output on stdout as a side effect, but this can be ignored).
The second part (starting from &&(() is pretty standard,
but the interesting bit is the coprime test:
factor $@      # produces output of the form "6: 2 3\n8: 2 2 2\n14: 2 7\n"
|grep -        # regex search on the result
v              # invert the match (return truthy for strings that don't match)
z              # zero-terminated, allowing us to match newlines
P              # perl (extended) regex
'( .+\b)'      # match one or more full factors
'.*\n.*'       # and somewhere on the next line...
'\1\b'         # find the same full factors

last && can be changed to & because of precedence

JavaScript (ES6),  54 43 42  40 bytes
Thanks to @Shaggy for pointing out that we don't need to compute \$\gcd(a,c)\$. Saved 11 bytes by rewriting the code accordingly.
Takes input as 3 separate integers. Returns \$true\$ for an ABC-triple, or either \$0\$ or \$false\$ otherwise.
f=(a,b,c)=>c&&a/b|a+b-c?0:b?f(b,a%b):a<2

Try it online!

I don't think you need to test gcd(c,a).

@Shaggy Thanks! I've rewritten the code entirely.

Python 2, 69 67 63 62 55 bytes
lambda a,b,c:(c-b==a<b)/gcd(a,b)
from fractions import*

Try it online!

Python 3, 58 51 bytes
lambda a,b,c:(c-b==a<b)==gcd(a,b)
from math import*

Try it online!

-7 bytes, thanks to H.PWiz

is the gcd in gcd trick valid? What if a is not coprime with c?

@jo-king If p divides a and c, it should divide c-a so b.

@JoKing: It is in this case, but not in general (you can prove it via Bezout's identity).

You can take it one step further and use gcd(a,b), since gcd(a,b) divides a+b

It's shorter to import math and math.gcd in python 3

Japt, 16 14 13 11 bytes
<V¥yU «NÔr-

Try it
                :Implicit input of integers U=A, V=B & W=C
<V              :Is U less than V?
  ¥             :Test that for equality with
   yU           :The GCD of V & U
      «         :Logical AND with the negation of
       N        :The array of inputs
        Ô       :Reversed
         r-     :Reduced by subtraction

Here is another 11 byte solution, though on closer inspection it isn't much different from yours in its actual logic.

@KamilDrakari, had a variation on that at one stage, too. It could be 10 bytes if variables were auto-inserted when > follows ©.

Regex (ECMAScript), 34 bytes
Input is in unary, in the domain ^x*,x*,x*$ (repeated xs delimited by ,).
^(?!(xx+)\1*,\1+,)(x*)(,\2x+)\3\2$
Try it online! - SpiderMonkey (Mozilla Firefox) regex engine
Try it online! - .NET regex engine with ECMAScript emulation enabled
# see https://codegolf.stackexchange.com/questions/178303/find-if-a-list-is-an-abc-triple
^
(?!                # Verify that A and B are coprime. We don't need to include C in the
                   # test, because the requirement that A+B=C implies that A,B,C are
                   # mutually comprime if and only if A and B are coprime.
    (xx+)\1*,\1+,  # If this matches, A and B have a common factor \1 and aren't coprime.
)
(x*)(,\2x+)\3\2$   # Verify that A<B and A+B=C. The first comma is captured in \3 and
                   # reused to match the second comma, saving one byte.

The question does say "Three integers, decimal written", so this might not qualify (as it takes input in unary), but it makes for such an elegant pure regex that I hope it will at least be appreciated.
However, note that if the phrasing is to be literally interpreted, lambda and function submissions that take integer arguments are to be disqualified too, as to strictly adhere to the question's specification they would need to take the input in the form of a string.

C# (Visual C# Interactive Compiler), 90 bytes
n=>new int[(int)1e8].Where((_,b)=>n[0]%++b<1&n[1]%b<1).Count()<2&n[0]+n[1]==n[2]&n[0]<n[1]

Runs for numbers up to 1e8, takes about 35 seconds on my machine. Instead of calculating the gcd like others, the function just instantiate a huge array and filter the indexes that aren't divisors of a or b, and check how many elements are left. Next it check if element one plus element two equals element three. Lastly, it checks if the first element is less than the second.
Try it online!

C# (Visual C# Interactive Compiler), 59 bytes
(a,b,c)=>Enumerable.Range(2,a).All(i=>a%i+b%i>0)&a<b&a+b==c

Try it online!

J, 27 bytes
(+/=2*{:)*({.<1{])*1=+./ .*

Try it online!
Inspired by Jo King's Perl solution

Pari/GP, 30 bytes
Saved 2 bytes thanks to @Shaggy.
(a,b,c)->a<b==gcd(a,b)&&a+b==c

Try it online!

30 bytes(?)

C# (.NET Core), 68 bytes
Without Linq.
(a,b,c)=>{var t=a<b&a+b==c;while(b>0){c=b;b=a%b;a=c;}return t&a<2;};

Try it online!

Stax, 12 bytes
ü╡v╕7+Pü°╔|g

Run and debug it

By re-arranging slightly, you can get 11. https://staxlang.xyz/#p=8d4d0aa8fac1c545d0f061&i=[1,8,9]%0A[2,3,5]%0A[2,6436341,6436343]%0A[4,121,125]%0A[121,48234375,48234496]%0A%0A[1,1,2]%0A[1,2,5]%0A[1,9,8]%0A[4,12872682,12872686]%0A[6,8,14]%0A[7,5,12]&m=2

Clean, 43 bytes
import StdEnv
$a b c=a<b&&a+b==c&&gcd a b<2

Try it online!
Similar to basically everything else because the direct test is the same.

Retina 0.8.2, 42 41 bytes
\d+
$*
A`^(11+)\1*,\1+,
^(1+)(,1+\1)\2\1$

Try it online! Link includes test cases. Edit: Saved 1 byte thanks to @Deadcode. Explanation:
\d+
$*

Convert to unary.
A`^(11+)\1*,\1+,

Check that A and B have no common factor.
^(1+)(,1+\1)\2\1$

Check that A < B and A + B = C.

There appears to be a bug in your program. [121, 48234375, 48234496] is returning false.

@Deadcode Fixed, thanks for letting me know.

As with my regex, you can drop 1 byte by changing ^(1+),(1+\1),\1\2$ to ^(1+)(,1+\1)\2\1$.

@Deadcode Thanks! It's a shame that my use of Retina's A operation doesn't actually save me any bytes.

Actually, I would say the main benefit is that you can move the Antigrep operation (coprime assertion) after the part that simply asserts that A<B and A+B=C, because the latter will fail faster and benefit the overall average speed of the regex with random test cases. I'd suggest that move. I can't do it in my pure regex for obvious reasons.

Another speed optimization would be to change (,1+\1) to (,\11+) but you can't do that because 1 is your unary digit and it would be interpreted as \11.

@Deadcode I'm using Retina's behaviour of turning the last regex into a positive assertion (actually a (count of) match stage) so moving the antigrep would cost me 5 bytes.

Befunge-98 (FBBI), 83 bytes
&:&:03p&:04pw>03g04g\:v_1w03g04g+w1.@
00:    7j@.0[^j7      _^;>0.@;j7;>0.@;:%g00\p

Try it online!
The input which is a triple of integers [A,B,C] is feeded into Befunge as space-separated integers C B A.

Mathematica 35 bytes
CoprimeQ @@ # && #[[1]] + #[[2]] == #[[3]] &

if order is important:
CoprimeQ @@ # && Sort[#]==# && #[[1]] + #[[2]] == #[[3]] &

or...
And[CoprimeQ @@ #, Sort@# == #, #[[1]] + #[[2]] == #[[3]]] &

Common Lisp, 51 bytes
(lambda(a b c)(and(< a b)(=(+ a b)c)(=(gcd a c)1)))

Try it online!

Vyxal g, 10 bytes
⟨ḣ¯=|Þ⇧|ġṅ

Try it Online!
Checks if the difference between the last two numbers equals the first one, if its sorted in ascending order, and if the gcd = 1


text:
Length of the Longest Descent
Your task is to determine the length of the longest descent down a "mountain" represented as a grid of integer heights. A "descent" is any path from a starting cell to orthogonally adjacent cells with strictly decreasing heights (i.e. not diagonal and not to the same height). For instance, you can move from 5-4-3-1 but not 5-5-4-3-3-2-1. The length of this path is how many cell movements there are from the starting cell to the ending cell, thus 5-4-3-1 is length 3.
You will receive a rectangular grid as input and you should output an integer indicating the longest descent.
Examples
1 2 3 2 2
3 4 5 5 5
3 4 6 7 4
3 3 5 6 2
1 1 2 3 1

The length of the longest descent down this mountain is 5. The longest path starts at the 7, moves left, up, left, up, and then left (7-6-5-4-2-1). Since there are 5 movements in this path, the path length is 5.
They might be all the same number.
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1

Since this height map is flat, the longest descent is 0. (not 19, since the path sequence must be strictly descending)
Height maps can be made up of larger numbers than single-digit numbers.
10 12 13 14 15 15
17 14 15 15 15 16
18 20 21 15 15 15
21 14 10 11 11 15
15 15 15 15 15 15

The longest path here is of length 6. (21, 20, 18, 17, 14, 12, 10)
...And even bigger numbers are fine too.
949858 789874  57848  43758 387348
  5848 454115   4548 448545 216464
188452 484126 484216 786654 145451
189465 474566 156665 132645 456651
985464  94849 151654 151648 484364

The longest descent here is of length 7. (786654, 484216, 484126, 474566, 156665, 151654, 151648, 132645)
Rules and Notes

Grids may be taken in any convenient format. Specify your format in your answer.
You may assume the height map is perfectly rectangular, is nonempty, and contains only positive integers in the signed 32-bit integer range.
The longest descent path can begin and end anywhere on the grid.
You do not need to describe the longest descent path in any way. Only its length is required.
Shortest code wins

How should the last example be interpreted?

@PeterTaylor I'm not sure what you mean.

I think the last example is just a matrix of multi digit numbers

@EmbodimentofIgnorance, ah, yes, I see. It would be a lot easier to spot the path with two-digit numbers rather than 4 to 6.

Is the matrix guaranteed to be square?

@Οurous: just rectangular. Not jagged.

JavaScript (ES7),  106 103 102  98 bytes
f=(m,n=b=-1,x,y,p)=>m.map((r,Y)=>r.map((v,X)=>(x-X)**2+(y-Y)**2-1|v/p?b=n<b?b:n:f(m,n+1,X,Y,v)))|b

Try it online!
Commented
f = (                        // f = recursive function taking:
  m,                         //   m[]  = input matrix
  n = b = -1,                //   n    = length of the current path; b = best length so far
  x, y,                      //   x, y = coordinates of the previous cell
  p                          //   p    = value of the previous cell
) =>                         //
  m.map((r, Y) =>            // for each row r[] at position Y in m[]:
    r.map((v, X) =>          //   for each value v at position X in r[]:
      (x - X) ** 2 +         //     compute the squared Euclidean distance
      (y - Y) ** 2           //     between (x, y) and (X, Y)
      - 1                    //     if A) the above result is not equal to 1
      | v / p ?              //     or B) v is greater than or equal to p:
        b = n < b ? b : n    //       end of path: update b to n if n >= b
      :                      //     else:
        f(m, n + 1, X, Y, v) //       do a recursive call
    )                        //   end of inner map()
  ) | b                      // end of outer map(); return b

How?
During the first iteration, \$x\$, \$y\$ and \$p\$ are all undefined and both tests (A and B in the comments) evaluate to NaN, which triggers the recursive call. Therefore, all cells are considered as a possible starting point of the path.

Jelly,  23 21  20 bytes
-2 thanks to Erik the Outgolfer
ŒỤŒPạƝ§ỊẠƲƇœị⁸QƑƇṪL’

Try it online! (way too inefficient for the examples - path here is 95 94 93 83 77 40 10 so 6 is yielded)
How?
ŒỤŒPạƝ§ỊẠƲƇœị⁸QƑƇṪL’ - Link: list of lists of integers, M
ŒỤ                   - multi-dimensional indices sorted by values
  ŒP                 - power-set
          Ƈ          - filter, keep those for which:
         Ʋ           -   last four links as a monad:
     Ɲ               -     for each pair of neighbours:
    ạ                -       absolute difference
      §              -     sum each
       Ị             -     insignificant?
        Ạ            -     all?
           œị        - multi-dimensional index into:
             ⁸       -   chain's left argument, M
                Ƈ    - filter, keep only those:
               Ƒ     -   unaffected by?:
              Q      -     de-duplicate
                 Ṫ   - tail
                  L  - length
                   ’ - decrement

Python 2, 150 147 140 136 134 132 125 123 120 bytes
l=lambda g,i,j:max(0<g.get(t)<g[i,j]and-~l(g,*t)for d in(-1,1)for t in((i+d,j),(i,j+d)))
lambda g:max(l(g,*t)for t in g)

Try it online!
Takes input in the form of a dictionary (x, y): value.
-7 bytes thanks to wizzwizz4, -2 bytes thanks to Jonathan Allen, -2 bytes thanks to BMO
Alternative, 123 121 bytes
l=lambda i,j:max(0<g.get(t)<g[i,j]and-~l(*t)for d in(-1,1)for t in((i+d,j),(i,j+d)))
g=input();print max(l(*t)for t in g)

Try it online!
Essentially the same solution, just with the final lambda replaced by an actual program. I personally like the first one better, but this one comes close in byte count by allowing g to be used as a global variable.

Clean, 211 207 bytes
import StdEnv,Data.List
z=zipWith
$l=maximum[length k-1\\p<-permutations[(v,[x,y])\\y<-[0..]&u<-l,x<-[0..]&v<-u],(k,[m:n])<-map unzip(subsequences p)|and[all((>)2o sum o map abs)(z(z(-))n[m:n]):z(>)k(tl k)]]

Try it online!
A brute-force solution taking a list-of-lists-of-integers ([[Int]]).
The TIO driver takes the same format as the examples through STDIN.
It's too slow to run any of the examples on TIO and probably locally too, but works in theory.
This one does the same thing faster, can do 3x3 or 2x4 on TIO and 4x4 and 3x5 locally.
Indented:
$ l
    = maximum
        [ length k-1
        \\p <- permutations
            [ (v, [x, y])
            \\y <- [0..] & u <- l
            , x <- [0..] & v <- u
            ]
        , (k, [m: n]) <- map unzip
            (subsequences p)
        | and
            [ all
                ((>) 2 o sum o map abs)
                (zipWith (zipWith (-)) n [m:n])
                :
                zipWith (>) k (tl k)
            ]
        ]

Haskell, 188 186 bytes
Needs \$\texttt{-XNoMonomorphismRestriction}\$:
f m|c<-[0..length(m!!0)-1],r<-[0..length m-1]=h[g[(x,y)]|x<-r,y<-c,let g((x,y):p)=h[1+g(k:p)|i<-[-1,1],k@(u,v)<-[(x+i,y),(x,y+i)],u#r,v#c,m!!u!!v<m!!x!!y,not$k#p]]
(#)=elem
h=foldl max 0

Try it online!
Alternatively we could use notElem over (not.).(#) without the flag for \$+4\$ bytes:
Try it online!
Explanation & Ungolfed
Strategy: Recursively try all feasible paths, keeping track of visited entries and maximize their length.
Let's first define some helpers.. Since we need elem and notElem, let's use (#) for elem. Also, to maximize we'll need a total function (maximize is not), returning \$0\$ when the list is empty:
safeMaximum = foldl max 0

Now we're ready to define our recursive function fun :: [[Integer]] -> Integer:
fun xs
  | c <- [0..length(m!!0)-1]             -- all possible indices of xs' columns
  , r <- [0..length m-1]                 -- all possible indices of xs' rows
  = safeMaximum                          -- maximize ..
      [ g [(x,y)]                        -- .. initially we haven't visited any others
      | x <- c, y<-r                     -- .. all possible entries
-- For the purpose of golfing we define g in the list-comprehension, it takes all visited entries (p) where (x,y) is the most recent
      , let g((x,y):p) = safeMaximum     -- maximize ..
          [ 1 + g(k:p)                   -- .. recurse, adding (x,y) to the visited nodes & increment (the next path will be 1 longer)
          | i <- [-1,1]                  -- offsets [left/up,right/down]
          , k@(u,v) <-[(x+i,y),(x,y+i)]  -- next entry-candidate
          , u#c, v#r                     -- make sure indices are in bound ..
          , m!!u!!v < m!!x!!y            -- .. , the the path is decreasing
          , not$(u,v)#p                  -- .. and we haven't already visited that element
          ]
      ]

How does this take grids? List of lists?

@Beefster: Yes, it says [[Integer]] is list of lists. Though in the linked TIO you have a wrapper parse :: String -> [[Integer]], st. you can use strings split on spaces and new-lines.

Python 3, 219 bytes
e,m=len,enumerate
b=lambda g,x,y:[b(g,i,j)for o in[-1,1]for i,j in[(x+o,y),(x,y+o)]if e(g)>i>=0<=j<e(g[x])and g[x][y]<g[i][j]]
l=lambda t:e(t)and 1+max(map(l,t))
d=lambda g:max(l(b(g,x,y))for x,r in m(g)for y,_ in m(r))

Try it online!
Grid is represented as list of lists:
[
    [1, 2, 3, 2, 2],
    [3, 4, 5, 5, 5],
    [3, 4, 6, 7, 4],
    [3, 3, 5, 6, 2],
    [1, 1, 2, 3, 1],
]

Original ungolfed code:
def potential_neighbours(x, y):
    return [(x-1, y), (x+1, y), (x, y-1), (x, y+1)]

def neighbours(grid, x, y):
    result = []
    for i, j in potential_neighbours(x, y):
        if 0 <= i < len(grid) and 0 <= j < len(grid[x]) and grid[x][y] < grid[i][j]:
            result += [(i, j)]
    return result

def build_tree(grid, x, y):
    return [build_tree(grid, i, j) for i, j in neighbours(grid, x, y)]

def longest_path_in_tree(tree):
    if len(tree) == 0:
        return 0
    return 1 + max(map(longest_path_in_tree, tree))

def longest_descent(grid):
    trees = [build_tree(grid, x, y) for x, row in enumerate(grid) for y, _ in enumerate(row)]
    return max(map(longest_path_in_tree, trees))

Python 3, 263 227 bytes
def f(m):
 p={(x,y):[c for i in[-1,1]for c in[(x,y+i),(x+i,y)]]for x,y in m};d={c:0 for c in p if not p[c]}
 while len(p)-len(d):
  for c in p:
   for b in p[c]:
    if b in d:d[c]=max(d[b]+1,d.get(c,0))
 return max(d.values())

Try it online!
-2 bytes thanks to BMO
Takes grids in the format {(0, 0): 1, (1, 0): 2, ...}. This format can be generated from the example format using the following utility function:
lambda s,e=enumerate:{(x,y):int(n)for y,l in e(s.split('\n'))for x,n in e(l.split())}


text:
Remove indentation
Write a program which removes any common leading spaces from the input string. For example, if the least indented line started with 3 spaces, and every other line has >= 3 leading spaces, then remove 3 spaces from the beginning of each line.
The indentation consists solely of spaces, and the string will not contain any tabulation. This is the same as the textwrap.dedent function in python.
Example (input, output):
Input
       7aeiou
   3b
     555

Output
    7aeiou
3b
  555

Input
this
 is
  a
   test

Output
this
 is
  a
   test

Input
    Hello
 world

Output
   Hello
world

Hi! I'm not familiar with Python. Can you explain what the dedent function does, so we can replicate it without needing to know Python? Thanks!

please don't override PPCG's default submission guidelines. It's usually perfectly fine to submit functions without calling them, and allowing input as a predefined variable just turns submissions into snippets

Additionally, this looks very close to being a duplicate of https://codegolf.stackexchange.com/q/53219/42963

It seems that example text looses 3 leading spaces on each line? Is this what the task is? May we assume that input always has at least 3 spaces on each line? May we assume a variable to hold a list of strings if this is more natural to our language?

@DJMcMayhem, thanks, I didn't know what the minimum proper question could be.

Perl 6, 11 bytes
*.indent(*)

Try it online!


text:
Surreal Numbers
Surreal Numbers are one way of describing numbers using sets. In this challenge you will determine the value of a surreal number.
Intro
A surreal number consists of two sets: a left and right. The value of the surreal number must be greater than all numbers in the left set and less than all numbers in the right set. We define 0 as having nothing in each set, which we write as {|}. Each surreal number also has a birth date. 0 is born on day 0. On each successive day, new surreal numbers are formed by taking the numbers formed on previous days and placing them in the left/right sets of a new number. For example, {0|} = 1 is born on day 1, and {|0} = -1 is also born on day 1.
To determine the value of a surreal number, we find the number "between" the left and right sets that was born earliest. As a general rule of thumb, numbers with lower powers of 2 in their denominator are born earlier. For example, the number {0|1} (which is born on day 2 by our rules) is equal to 1/2, since 1/2 has the lowest power of 2 in its denominator between 0 and 1. In addition, if the left set is empty, we take the largest possible value, and vice versa if the right set is empty. For example, {3|} = 4 and {|6} = 5.
Note that 4 and 5 are just symbols that represent the surreal number, which just happen to align with our rational numbers if we define operations in a certain way.
Some more examples:
{0, 1|} = {1|} = {-1, 1|} = 2
{0|3/4} = 1/2
{0|1/2} = 1/4
{0, 1/32, 1/16, 1/2 |} = 1

Input
A list/array of two lists/arrays, which represent the left and right set of a surreal number. The two lists/arrays will be sorted in ascending order and contain either dyadic rationals (rationals with denominator of 2^n) or other surreal numbers.
Output
A dyadic rational in either decimal or fraction form representing the value of the surreal number.
Examples
Input -> Output
[[], []] -> 0
[[1], []] -> 2
[[], [-2]] -> -3
[[0], [4]] -> 1
[[0.25, 0.5], [1, 3, 4]] -> 0.75
[[1, 1.5], [2]] -> 1.75
[[1, [[1], [2]]], [2]] -> 1.75

This is code-golf, so shortest code wins.

Isn't 0 always born the earliset, since it's born on day 0?

@EmbodimentofIgnorance Yes, but 0 isn't always within the bounds of the left and right set.

What does "between" the two sets mean?

And for the last example, is the [[1],[2]] a surreal number? If so, do we evaluate the value of surreal numbers inside the set first, then use the values as regular rational integers to find the value of the outside surreal number?

@EmbodimentofIgnorance For your second comment: yes, that's correct on both counts.

@EmbodimentofIgnorance "Between" means greater than all members of the left set and less than all members of the right set.

Can I take the input as a string, since I don't get how to implement the surreal numbers in the arrays thing? (Since hypothetically, those surreal numbers can have surreal numbers which in turn have more surreal numbers in them...)

Let us continue this discussion in chat. @EmbodimentofIgnorance

{|6} Should be 0, not 5, in the real surreal numbers.

Closely related: https://codegolf.stackexchange.com/q/38425/25180. Maybe a duplicate. The only difference (if fixed) is this challenge uses sets. But they don't add much for finite numbers.

Python 3.7, 228 197 184 bytes
Thanks to @LyricLy and friends for helping me golf this down a lot
1e999 stolen from @Quintec's solution
m=1e999
g=lambda p:[f(*x)if[]==x*0else x for x in p]
def f(l,h):
 h=min(g(h+[m]));l=max(g(l+[-m]));s=1
 while h-l<=1:l*=2;h*=2;s*=2
 return-(-h//1+1)/s if h<=0else l*h>=0and(l//1+1)/s

Try it online!

I can't get this code running and producing the correct results... do you have a TIO link?

Added a tio.run link now, sorry for forgetting to do that

Python, 371 362 261 251 248 241 236 234 231 bytes
-122 bytes thanks to @ASCII-only
def f(s):
 if s<[]:return s
 a=map(f,s[1]+[1e999,-1e999]+s[0]);m,n,u=a[-1],a[0],1
 while n-m<=1:m*=2;n*=2;u/=2.
 x,y=abs(m)-1,abs(n)-1;s=m>0>n or m<0<n;r=[[m-x*s,m+x*s][m<0]+1,[n-y*s,n+y*s][n<0]-1][x>y];return u*int([0,r][`r`<"m"])

Try it online!

Fail on [[-8],[5]] I guess, though I don't knows what it is

Yeah, invalid. Probably should be 0?

half fixed

there we go, now to golf it

Still invalid though, only works up to 9e9 in either direction, unless you change the spec to, say, require only up to the limits of a float32 or float64

removed log

works up to float limit

@ASCII-only Wow thanks so much

@Quintec Gotta make sure that's what you want it to do though

also... The two lists/arrays will be sorted in ascending order? then you can do this (wait. is it broken

fixed

@ASCII-only yer a wizard

248

241 (note that 1e999 is greater than float limit (~4e308?), so it's the same as float infinity)

@ASCII-only you ninja'd me doing it darn

Let us continue this discussion in chat.