text:
Baba is golf, flag is win
If you haven't played the game Baba is You, I think you really should. Whether you’ve played it or not, have a go at implementing it as a code golf.
The idea behind this challenge is to have a bit more complicated, non-standard task with a bit longer answers.
Game rules
Alas, the challenge is not to implement the entire game, impressive though that may be (I'm sure there is a single 05ab1e instruction for it. If not, someone should submit an issue. It's a gross omission from the language ). This will be a simplified version of the game:

There are only 3 entities: Baba, Rock and Flag and the corresponding nouns (lowercase baba, rock and flag)
There is only one operator - is
There are only 3 properties: you, win and push
Everything is always stop (N.b. stop is not a property which exists on the board) This prevents anything from overlapping and makes the management of the game grid simpler.
Because everything is always stop, there is an alternate win condition. You can win if:

noun is you and noun is win -- just like in the original
noun which is you attempts to push something which is win, but that something cannot move (whether because it's not push, or it is push and is somehow blocked form moving). See examples for more details.

Just like in the main game text (nouns you, win and push and the operator is) are always push
There is only one level. This one:

. . . . . . . . . . . . .
. r i p . . . . R R R . .
. . . . . . . R . . . R .
. b i y . B . R . F . R .
. . . . . . . R . . . R .
. f i n . . . . R R R . .
. . . . . . . . . . . . .

where uppercase letter correspond to entities and lowercase to their respective nouns. . is empty, p is push, y is you and n is win (originally I've implemented walls, and there was a namesake crash so I've made win n instead).

The grid is parsed for rules just like in the original game. There are two types of rules:

noun is property, for example baba is you or flag is push. These type of rules are referred to as behaviours.
noun is noun, for example baba is rock. These type of rules are referred to as swaps. Since this grid does not have two of any of the nouns, one does not have to worry about the case like rock is rock (which would, otherwise, affect the execution of other rules)

The rules work only from left to right, and from top to bottom.
The only allowed moves are up, down, left and right. No idle, no undo.
When a move is made, every entity which is you attempts to move in the direction specified.
The order of actions in a single step is as follows:

Search the grid for all the current rules
Parse the rules into behaviours and swaps
Apply all the swaps to the grid in an alphabetical order (Only one swap per cell)
Perform an action for the turn according to the behaviours

Here is an example game where the rule rock is push has been changed into rock is win.

Golfing challenge rules
Your task is to implement the above game of Baba is You, using the smallest number of source code bytes (the usual). Your program will take a sequence of moves as an input, and output 1, or True, or otherwise something meaningful if this sequence of moves leads to a victory on the above grid (and only on this grid. Just hardcode it in). Otherwise, the program will output 0, or False or nothing.
You can assume that every sequence of moves is a valid sequence in any format. I've used symbols ^V<>^ for example, but you're most welcome to assume it's udlr instead.
You can assume any input sequence either ends on a win, or does not lead to one. This means you do not have to worry about there being any more moves past the winning one. If such sequence is passed to your program, it's an undefined behaviour and your program can do anything.
I've implemented this version of the game in python. You can find it here. Some of the more tricky behaviour is specified in the readme (If you find any weird edge cases I haven't thought of let me know or send me a PR). There is a minimal self-contained version of the code in /golf/golfing_full.py and the abbreviated version in /golf/golfing_short.py. The sum total comes to 1930 bytes (sans the test at the end).
Test cases
- Fastest win
1: >>^>>V
- Fastest loss (you don't actually have to check for loss explicitly)
0: <^<V
- Baba is win
1: <VV<V<<^V>>^<
- Rock is baba
1: <^^^<<V>V<>>
- Rock is you
1: <^^^<<V^<<VV>><<^>><<
- Rock is win
1: <VVV<^<^>V>^^V<<<<^^^>^>>>>VVV<^>>>
- Rock is win but also push
1: <^<<<<V>>>V>VV<<^^^>^<VV>>V<V<^^>^<V>>>>>>>V<^^^^>^<<<<<<<<<
- Baba is flag
0: <V<<<<V>>V>^^>>^^>>^>>V
- Baba is you is win
0: <V<<<<V>>V>>^^VV>^^
- Flag is rock is win
1: <V<<V^<V>>>^^<^>^^<<V^<<VV>>>^>VVVV^^^<<<<^>>^>VVVV>>V^<<V>>^^>>
- Flag is rock is win, but win on what used to be the flag
1: >VV>^^<^>V>^VV<<<<<<<V^>V>>^>V^^<<^>^^<<V^<<VV>>>^>VVVV^^^<<<<^>>^>VVVVV^^>>>>>>
- Rules don't work upside down
0: <V<<<<V>>V>>>^V<<<^>V>>^V<<^>V>>^^^>>^>>V
- Rules don't work backwards
0: <V<<<<V>>V>>>^V<<<^>V>>^V<<^>><^^^>V>V<^<V<VV>>>>^<<<>^^>>^>>V
- Rules (swaps) are applied alphabetically
1: <^<<<<V>>^<<^^>>V^<<VV>>^><V><V><<<VVV>^^<^>>V>^^<^>VVV>VV<<^^^<^>V>^<^>><<V<<^>>>>>V<^<VV<<
- Rules (swaps) are applied alphabetically, case 2
1: <^<<<<V>>^<<^^>>VV<V>V>>VV<<^V<<^>^^^<^>^>VV>V<V<V>^^>V>V>>>^^<<
- Rock is baba is flag
0: <^^^<<V^<<V><VVVVV>>^V<<^>^<^><
- Rock is baba is flag, case 2
0: <^^^<<V^<<V>>>><<<V>>><<<<VVVV>>^V<<<^^>>>><<<<V>>>><<<<^^>>>><
- Walk into the corner for a while and make a circle around the board
1: VVVV>>>>>>>>^^^^^^^>^^>^>^<<<<<<<<<<<<<VVVVVVV^^>>>>>>>>^>
- Win at the last moment
1: >>V>V<<<V<<<^V<<^><^^^^^>>V^<<V><VV><

@xash, Clarified under 'game rules' in the bullet point starting with 'The grid is parsed for rules...'. Thanks for pointing this out. I guess I'm cursed with knowledge of coding this for a while and playing the original game, so I didn't pick up on the fact that it's not obvious.

I am not sure this is clear but I don't see any issues.  It would be nice if the close voters could point out what they think is unclear.

@Noodle9, Thank you for the feedback. To clarify: I’m not telling anyone to go and purchase anything. I’m merely expressing my opinion about something, namely that: ”Baba is You is an excellent game and that I believe it would appeal to a similar type or person to whom code golfing does”. Nevertheless, I see how my original post might have been misinterpreted, and therefore I’ve rephrased it slightly to make it more clear (the first couple of sentences).

At least for some of us, 'bonk in the corner' has a very different meaning.

After re-reading this a few times, I think I more-less understand the game now, but the description could definitely be friendlier to those unfamiliar :) In particular, I missed some basic introduction to movement, something like "when the player makes a move, it applies to the entity which is you under current rules". But then, if Rock is you - do all the rocks move? What if some of them are blocked? What constitutes a block? It's very much preferable to walk through several such cases in the task rather than just point to examples.

Also I don't get the concept of stop, and is it really relevant in your version of the game? For me, the winning conditions - (1) an entity is you and win simultaneously, and (2) a you entity bumps into a non-pushable win entity - look fully self-contained without the need to introduce stop, or maybe am I missing something?

@KirillL. You’re not missing anything. There is no stop in this version. I’m talking about it for compatibility with the original game when’re that is indeed a property, but I used it is a bit confusing if you don’t know it. I’ll make it more clear in the text. Thanks for the feedback.

What actually happens when you create rock is baba is flag?

Test case which depends on that behavior: >>V>V<<<V<<<^V<<^><^^^^^>>V^<<V><VV>< (assuming I didn't make a mistake)

@Nitrodon Good spot. In the case you specified you win. This is because of the order of operations. At the end penultimate step Baba (the entity) pushes baba (the noun). On the next step baba becomes flag. Simultaneously all the rocks become baba (which do not become flag because of only one saw rule). Then everything which is you (aka all the ex-baba `rocks) moves left. The win condition is checked and you win.

@Nitrodon, If that rock was not there to win in the last moment, you'd loose. The same would be the case if the last move in your sequence was e.g. > instead of <.

What "baba" means (in enlish)? In russian it means "woman" and this word is a little bit pejorative ;)

@VictorVosMottorthanksMonica It doesn’t really mean anything. It’s just the name of the little bubbly creature in the game. :) I do know what you mean though. The word ‘baba’ has the same meaning (aka ‘old woman’) in Polish too, but I honestly did not realise until you’ve mentioned it just now.

Just because I'm russian... Just because.

Any test case where you're pushing you, and if badly handled one of them think it can't move?

Do your complete game handle baba is baba special or just as first considered swapping?

Python, 1930 1927 1686 bytes

1927 (-3) by replacing tabs with spaces
1686 (-241) Thanks to @pppery (silently ignoring errors)

This is the 'proof-of-principle' solution. I'm sure some more bytes can be shaved off with better eval tricks.
Expanded code + explanation
Try it online! <- With the tests appended at the end
e=enumerate;v=reversed;t=tuple;z=zip
P=t('ypn');N=t('bfr');E=t('BFR')
exec('''exec('ip%sxP;io%sxN;ie%sxE;tr%s[c cz(*x)];f%s[t(v(r))rx]'%(('=lambda x:',)*5))
exec('rp%sf(tr(g));rm%str(f(g));rh%sf(tr(f(tr(g))));rz%sg'%(('=lambda g:',)*4))
from collections import deque
def et(seq):
 w=deque(maxlen=3);i=3
 _map(w.append,seq):
  i-=1
  if not i:i=1; yield t(w)
def F(g):
 iu=lambda t:(io(t[0])and t[1]=='i')and(io(t[2])or ip(t[2]));s=[]
 rg:
  tet(r):if iu(t):s.append((t[0],t[2]))
 cz(*g):
  tet(c):if iu(t):s.append((t[0],t[2]))
 sorted(s)
def R(r):
 b={n:dict(z(P,(False,)*3))nN};s=[]
 j,ar:
  if ip(a):b[j][a]=True
  else:s.append((j,a))
 b,sorted(s)
def at(p,b):
 len(p)or Z
 if p[0]=='.':p
 elif len(p)==1:Z
 h=lambda c:(ie(c)and b[c]['p'])or c(*P,*N,'i')
 if not h(p[0]):Z
 if p[1]=='.':(p[1],p[0],*p[2:])
 else:q=at(p[1:],b);(q[0],p[0],*q[1:])
S=t('^V<>')
qp=dict(z(S,(rz,rh,rp,rm)));qm=dict(z(S,(rz,rh,rm,rp)))
def T(g,b,s):
 g=qp[s](g);h=[['.'_r]rg];iy=lambda c:ie(c)and b[c]['y'];iw=lambda c:ie(c)and b[c]['n']
 j,re(g):
  k,celle(r):if not iy(cell):h[j][k]=cell;continuep=[h[l][k]lv(range(j))]try: q=at(p,b) l,me(v(q)):h[l][k]=m h[j-1][k]=cellexcept: len(p)and iw(p[0])and Z h[j][k]=cell
 qm[s](h)
def S(g,s):
 h=[[c cr]rg]
 a,bs:
  j,re(g):k,ce(r): if ie(c)and c==a and h[j][k]is c:h[j][k]=b.upper()
 h
def Y(q):
 g=[[c cr]r('.'*13+'|.rip....RRR..|.......R...R.|.biy.B.R.F.R.|.......R...R.|.fin....RRR..|'+'.'*13).split('|')]
 try:
  p(*q,None):b,s=R(F(g))nb: if b[n]['y']and b[n]['n']:Zg=S(g,s)if p:g=T(g,b,p)
 except:1
 0'''.translate({2:"for ",3:"return ",4:".lower()",5:" in ",6:"\n   "}))

1595 bytes.

The default rules for IO formats are pretty flexible, so I think you can get rid of the error handling for 1574 bytes.

Python 3, 707 646 615 bytes
e=enumerate
S=eval(input())
exec('''g=[[int(k/10**i)%10FiIrange(11,-2,-1)]FkI[0,71800004440,40004,51902040304,40004,61000004440,0]];g[5][3]=10
R=lambda a,b:(4<a<8)*any([*r[i:i+3]]==[a,1,b]FrI[*g,*zip(*g)]Fi,pIe(r[2:]))
FsIS:
 G=[[([b-3FbI(5,6,7)if R(c+3,b)]+[c])[0]FcIr]FrIg]
 F_I' '*s:G=[*zip(*G)][::-1]
 Fj,rIe(G):
  r=G[j]=[*r]
  Fk,CIe(G[j]):
   l=0
   if R(C+3,9):
    Fi,cIe(r[:k]):l=(c<2or c>4or R(c+3,8))and[l,i+1][c<1]
    if l<1:0<k and R(r[k-1]+3,10)and E
    else:r[l-1:k]=r[l:k+1];r[k]=0
 g=G
 F_Irange(s):g=[*zip(*g[::-1])]
 FaI5,6,7:R(a,10)and R(a,9)and E'''.replace("I"," in ").replace("F","for "))

Try it online! (all testcases, simulates stdin)
Essentially a rewrite from the ground up, loosely based on MarcinKonowalczyk's golfing_full.ipynb.
Takes input through STDIN as a list of integers, where 0,1,2,3 correspond to left, up, right, down respectively. Throws an error on win and does not throw on loss as per this default.

-61 bytes: use integers instead of characters, take input through STDIN instead of as function, other small changes
-31 bytes: exec-replace on for  and  in

Ungolfed
def grid_has_rule(grid, rule):
    return any(rule in ''.join(row) for g in [grid, zip(*grid)] for row in g)

def print_grid(grid):
    print('\n'.join(''.join(row) for row in grid), end='\n\n')

def play(sequence):
    grid = [[x for x in row] for row in '.............|.rip....RRR..|.......R...R.|.biy.B.R.F.R.|.......R...R.|.fiw....RRR..|.............'.split('|')]

    for step in sequence:
        # (clone)
        new_grid = [row*1 for row in grid]

        # Perform swaps
        # automatically alphabetical order because 'bfr' is sorted
        new_grid = [
            [
                (
                    [b.upper() for b in 'bfr' if grid_has_rule(grid,chr(ord(c)+ord('a')-ord('A'))+'i'+b)] # priorities "<c>ib", then "<c>if", then "<c>ir"
                    +[c] # then no rule: c unchanged
                )[0]
                for c in row
            ]
            for row in grid
        ]

        # we can't modify grid because it stores the current rules
        # grid = new_grid

        # Step
        # re-orient new_grid until movement direction is left
        for _ in range(step):
            # rotate 90 CCW: transpose followed by reflect
            new_grid = [*zip(*new_grid)][::-1]

        for j, row in enumerate(new_grid):
            new_grid[j] = list(row)
            for k, cell in enumerate(new_grid[j]):
                if not grid_has_rule(grid,chr(ord(cell)-ord('A')+ord('a'))+"iy"):
                    # cell is not you
                    new_grid[j][k] = cell
                    continue

                # try pushing left from (j, k)
                # might not be push: B,F,R
                # get the rightmost cell to the left which isn't push:
                last_unpushable_i = [i for i,c in enumerate(new_grid[j][:k]) if c in 'BFR' and not grid_has_rule(grid,c.lower()+'ip')]
                last_unpushable_i = last_unpushable_i[-1] if last_unpushable_i else -1
                last_gap = [i for i,c in enumerate(new_grid[j][:k]) if c=='.' and last_unpushable_i<i] # (maybe slice from list(enumerate))
                if not last_gap:
                    # no gaps left, unpushable
                    if k > 0:
                        if grid_has_rule(grid, chr(ord(new_grid[j][k-1])-ord('A')+ord('a')) + 'iw'):
                            # object can't move and is win
                            return True
                    new_grid[j][k] = cell
                else:
                    # maybe del trick?
                    L = last_gap[-1]
                    new_grid[j][L:k] = new_grid[j][L+1:k+1]
                    new_grid[j][k] = '.'
        grid = new_grid
        # revert orientation (maybe just take this-last instead)
        for _ in range(step):
            # rotate 90 CW: reflect followed by transpose
            grid = [*zip(*grid[::-1])]

        # I'm leaving this here for future debugging
        # print('<^>V'[step])
        # print_grid(grid)

        # Check for you is win condition
        # Doesn't need to be at top because can't have yiw at start
        for a in 'bfr':
            if grid_has_rule(grid, a+'iw') and grid_has_rule(grid, a+'iy'):
                return True

Golfed, commented (old)
# does grid g have the rule u, either horizontally or vertically?
R=lambda g,u:any(u in''.join(r)for g in[g,zip(*g)]for r in g)
e=enumerate
# main: play, given sequence S
# "<^>v" --> [0,1,2,3]
def P(S):
    # generate grid g
    g=[*map(list,['.'*13,'.rip....RRR..','.......R...R.','.biy.B.R.F.R.','.......R...R.','.fiw....RRR..','.'*13])]

    # for each step s
    for s in S:
        G=[ # create a new grid G, which consists of the swaps applied to g
        [
            (
                [b.upper()for b in'bfr'if R(g,chr(ord(c)+32)+'i'+b)]# priorities "<c>ib", then "<c>if", then "<c>ir"
                +[c])[0] # then no swap: plain c
                for c in r
            ]
            for r in g
        ]
        # rotate grid counter-clockwise s times until movement direction pointing left
        for _ in range(s):G=[*zip(*G)][::-1]
        # for each row of the rotated grid G
        for j,r in e(G):
            # side effect of the zip is that it produces tuples
            # no good since we have to modify them
            r=G[j]=[*r]
            # go from left to right in the row
            # this allows us to modify the row
            for k,C in e(G[j]):
                # test if the cell is you
                if R(g,chr(ord(C)+32)+"iy"):
                    l=0 # l shall be 1 more than index of the last empty cell to the left of this cell but not
                        # to the left of an entity that is not push; 0 if none exists
                        # Travel from left to right in the list of cells to the left of this cell
                        # (negative logic) If the cell is an entity and is not push, then l=0
                    for i,c in e(r[:k]):l=(c not in'BFR'or R(g,c.lower()+'ip')) and\
                            [l,i+1][c=='.']                  # otherwise set l=i+1 if c is empty, else l
                    # l<1: no empty cell to the left exists
                    # If not at the edge
                    # and the cell to the left is win, throw a NameError: win
                    if l<1:0<k and\
                        R(g,chr(ord(r[k-1])+32)+'iw') and\
                        E
                    # there is an empty cell at index l-1, so push
                    # shift cells over by one; set the cell you are pushing from to empty
                    else:r[l-1:k]=r[l:k+1];r[k]='.'
        g=G
        # rotate grid clockwise s times until back to normal
        for _ in range(s):g=[*zip(*g[::-1])]
        # test for X is win and X is you:
        for a in'bfr':R(g,a+'iw')and R(g,a+'iy')and E

J, 456 441 399 bytes
Takes in the list of directions, with V < ^ > as 0 1 2 3.
0=[:+./@,@><@(4 o@,&4(4 o@,&0])13#.inv 36bdnnshw5d 85686 36ba491bbil 85686 36bbvydg17b)([:(([*0=[:+/@,y*w)r)@(([:><@[([+-~/@]*(={.))~&.>/@,~[:<"1@\:~@;e(<@(l,.4-~])~"{~+&4)~])r)(4-[)o(o=:|.@|:~&0)(([*0=[:+/@,y*1|.(w=:e.l&11)*0=p)([((*-.)+_1|.*)2=[:z&.|.(p*0<[)>.2*(y=:e.l&10)*1|.p=:((0=[:(z=:(2*4<3#.|:@,:)/\.)*@[+e.)e-.l&10,(l=:#&e@e.~(4+(e=:1+i.4),.5)&,.)&12))])(r=:3[\"1(,@,|:))@])&.>/@,~<"0@|.@]

Try it online!
Or play around with the version that prints the board after each step.
How it (roughly) works
It goes quite well as an tacit definition, as we're just working on the matrix itself. It maps the characters to numbers according to the list in level.
Ungolfed:
 NB. map stored as base 13, then padded with floors and walls
walls=:4 rot@,&4(4 rot@,&0])13#.inv 36bdnnshw5d 85686 36ba491bbil 85686 36bbvydg17b
 NB. rotate matrix x times
rot=:|.@|:~&0
 NB. BFRW as numbers
objs=:1 2 3 4
 NB. get all 1x3 lists of the original and the transposed matrix
rules=:(3 [\"1 (,@,|:))
 NB. check if rule exists, e.g isrule&10 -> things that can be pushed
isrule =: (#&objs@e.~ (4 + objs ,. 5)&,.)
 NB. 0 2 0 0 1 1 2 1 0 -> 0 2 0 0 2 2 2 0 0
 NB. used for checking which fields can move/get pushed
red=:(2* 4< 3#. |: @ ,:)/\.
 NB. places that can be walked into
pass=:((0 = [: red *@[ + e.)  objs -. isrule&10 , isrule&12)
 NB. win place can't be walked into (not pushable or blocked),
 NB. with a you-entity that walks down -> won
wonpush=: ([ * 0 = [: +/@, (e. isrule&10) * 1 |. (e. isrule&11) * 0 = pass)
 NB. exists entity that is you and win?
wonyou =: ([ * 0 = [: +/@, (e. isrule&10) * (e. isrule&11))
 NB. calculate which places gets moved or pushed down in a step
shifts=:( 2 = [: red&.|. (  pass * 0 < [) >. 2 * (e. isrule&10) * 1 |. pass)
 NB. actually move down entities
move_down=:([ ((*-.)+_1 |.  *) shifts)
 NB. get all rules of the form (objs is objs), sort them, replace them
replace=: ([: > <@[ ([ + -~/@] * (={.))~&.>/@,~ [: <"1@\:~@; objs (<@(isrule ,. 4-~])~"{~ +&4)~ ])
 NB. rotate so movement goes down, check wonpush, move down, rotate back, replace, check wonyou
move=: ([: (wonyou rules)@(replace rules) (4-[) rot rot (wonpush move_down ]) rules@] )
 NB. append moves to the matrix and reduce from right to left with move,
 NB. e.g. 0 move 1 move 0 move walls
sim2=: (<@walls move&.>/@,~ <"0@|.@])
 NB. after everything is finished, does contain matrix only 0? if yes -> won

BaBa Is You,  663  615 bytes
File .l:
00000000: 4143 4854 554e 4721 0501 4d41 5020 0200  ACHTUNG!..MAP ..
00000010: 0000 0000 4c41 5952 b301 0000 0300 0f00  ....LAYR........
00000020: 0000 0c00 0000 0c00 0c00 00ff 0000 0000  ................
00000030: 0000 0000 0000 803f 0000 803f 0000 0100  .......?...?....
00000040: 0080 3fff ffff 024d 4149 4e87 0000 0078  ..?....MAIN....x
00000050: 5e63 2004 5819 3959 19b9 5958 d9b9 9918  ^c .X.9Y..YX....
00000060: 9919 3919 9999 1819 58b8 9958 9840 1a39  ..9.....X..X.@.9
00000070: 99d8 18b8 1959 3838 1919 9959 8098 9389  .....Y88...Y....
00000080: 8583 1bcc 061b cbc2 0085 dc40 9a1b c666  ...........@...f
00000090: 038a 02a5 ffe3 040c 6059 4ea0 7ddc cc30  ........`YN.}..0
000000a0: 45cc 0c20 08e2 3160 e865 6680 a802 d150  E.. ..1`.ef....P
000000b0: bd40 3770 b3fc ffcf 0894 018b 32fd ff8f  .@7p........2...
000000c0: 9045 b618 532f c8fd 5c44 d98b 6c0e a160  .E..S/..\D..l..`
000000d0: 0400 5728 8923 4441 5441 0100 0000 0030  ..W(.#DATA.....0
000000e0: 0000 0078 5e63 4603 0c0c cc0c 70c0 8cc4  ...x^cF.....p...
000000f0: 060a 6270 3135 3380 84c0 4ae1 7220 21b8  ..bp153...J.r !.
00000100: 30d0 7466 10c6 2ecb 0cb6 8199 1000 006d  0.tf...........m
00000110: d701 660f 0000 000c 0000 000c 000c 0000  ..f.............
00000120: ff00 0000 0000 0000 0000 0080 3f00 0080  ............?...
00000130: 3f00 0001 0000 803f ffff ff02 4d41 494e  ?......?....MAIN
00000140: 1600 0000 785e fb4f 1660 e4c4 af8d 91f9  ....x^.O.`......
00000150: ff28 4009 0100 74d2 62ba 4441 5441 0100  .(@...t.b.DATA..
00000160: 0000 0012 0000 0078 5e63 c60d 18d0 a418  .......x^c......
00000170: 9807 0900 00bc 3402 170f 0000 000c 0000  ......4.........
00000180: 000c 000c 0000 ff00 0000 0000 0000 0000  ................
00000190: 0080 3f00 0080 3f00 0001 0000 803f ffff  ..?...?......?..
000001a0: ff02 4d41 494e 0d00 0000 785e fb3f 0ae8  ..MAIN....x^.?..
000001b0: 1202 00e6 5866 a844 4154 4101 0000 0000  ....Xf.DATA.....
000001c0: 0b00 0000 785e 631e 8200 00bf 9a02 1d    ....x^c........

File .ld:
[tiles]
changed_short=016,082,
object082_name=text_phantom
changed_count=2
object016_name=text_feeling
changed=object016,object082,
object016_argtype=2,

Summon a phantom item to detect win
Weaken thing that are on others
feeling and phantom looks bad since image take extra bytes

Baba is You in baba is you... Love it!

@Jacob Usually simulating self is easier, lots of work to claim differences

Do using position of NEAR and OPEN to mean FEELING and PHANTOM save line in .ld?

I tried to modify NEAR to FEELING but it only allow FEELING ROCK, no FEELING YOU


text:
Is this stack of CNN layers valid?
Background
This challenge is about Convolutional neural networks, and its two main building blocks, namely Convolutional layer and Pooling layer.
For simplicity, we ignore the "depth" of the images and intermediate tensors, and just look at the width and height.
Convolutional layer
A convolutional layer works like a kernel in image processing. It is defined by kernel width and height, and kernel mode (min, mid, or max). A min kernel extracts values at positions where the entire kernel overlaps with the original image. For a mid kernel, the center of the kernel is placed over each pixel of the image; for a max kernel, all positions where any pixel overlaps with the kernel is considered.
One pixel per positioning of the kernel is produced, resulting in a 2D array which can be smaller than (min), equal to (mid), or larger than (max) the input image.
Kernel (C is the center)
###
#C#
###

Image
*****
*****
*****
*****
*****

Min kernel convolution (results in 3x3)
###**     **###
#C#**     **#C#
###** ... **###
*****     *****
*****     *****
 ...       ...
*****     *****
*****     *****
###** ... **###
#C#**     **#C#
###**     **###

Mid kernel convolution (results in 5x5)
###           ###
#C#***     ***#C#
###***     ***###
 ***** ... *****
 *****     *****
 *****     *****
  ...       ...
 *****     *****
 *****     *****
 ***** ... *****
###***     ***###
#C#***     ***#C#
###           ###

Max kernel convolution (results in 7x7)

###             ###
#C#             #C#
###****     ****###
  *****     *****
  ***** ... *****
  *****     *****
  *****     *****
   ...       ...
  *****     *****
  *****     *****
  ***** ... *****
  *****     *****
###****     ****###
#C#             #C#
###             ###

If the input image has IR rows and IC columns, and the kernel has KR rows and KC columns, the output dimensions are defined as follows:

Min kernel: IR - KR + 1 rows, IC - KC + 1 columns; invalid if the resulting rows or columns are zero or negative
Mid kernel: IR rows, IC columns; error if either KR or KC is even
Max kernel: IR + KR - 1 rows, IC + KC - 1 columns

Pooling layer
A pooling layer is defined by window width and height, and the horizontal and vertical stride size (how many units to move at once in either direction). See the following illustration:
3x3 window, 2x2 stride pooling on a 7x7 image
###**** **###** ****###
###**** **###** ****###
###**** **###** ****###
******* ******* *******
******* ******* *******
******* ******* *******
******* ******* *******

******* ******* *******
******* ******* *******
###**** **###** ****###
###**** **###** ****###
###**** **###** ****###
******* ******* *******
******* ******* *******

******* ******* *******
******* ******* *******
******* ******* *******
******* ******* *******
###**** **###** ****###
###**** **###** ****###
###**** **###** ****###

If the input image has IR rows and IC columns, and the pooling layer has the window of WR/WC rows/columns and SH/SV horizontal/vertical stride, the output dimensions are defined as follows:

Rows: (IR - WR)/SV + 1, error if (IR - WR) % SV != 0 or WR < SV
Cols: (IC - WC)/SH + 1, error if (IC - WC) % SH != 0 or WC < SV

Stacking multiple layers
The convolutional and pooling layers can be stacked in any arbitrary way, so that the output of the previous layer becomes the input of the next layer. The dimensions of the input image to the entire stack is provided, and the dimensions of each intermediate image should be calculated sequentially. A stack of layers is valid if no error occurs at any layer. The final output size does not matter, as long as it can be calculated without error.
The following stack is valid:
Input image 25x25
1. Min Convolution 3x3         => Intermediate image 23x23
2. Pooling 3x3 with stride 2x2 => Intermediate image 11x11
3. Max Convolution 3x3         => Intermediate image 13x13
4. Max Convolution 4x4         => Intermediate image 16x16
5. Pooling 2x2 with stride 2x2 => Intermediate image 8x8
6. Min Convolution 5x5         => Intermediate image 4x4
7. Pooling 4x4 with stride 3x3 => Output image 1x1

Taking any contiguous subsequence of the stack, starting with the respective (intermediate) image as the input, is also valid. (e.g. steps 2, 3, 4, 5 with input image 23x23)
Any of the following modifications to the 7-layer stack above will result in an invalid stack:

Replace step 2 with stride 4x4 or 2x4: stride is larger than window in at least one dimension
Replace step 3 with mid convolution: image size becomes too small at step 7
Replace step 4 with mid convolution: mid convolution with even kernel dimension is an error
Replace step 6 with kernel size 9x5 or larger: kernel does not fit in the image (IR-KR+1 is zero or negative, which is an error)

Challenge
Given the input dimensions and the description of a stack of convolutional/pooling layers, determine if it is a valid configuration, i.e. not an error.
The description of the stack can be taken in reasonable ways to represent

a list (sequence) of two kinds of layers
for a convolutional layer, the kernel size (width/height; two numbers) and mode (min/mid/max)
for a pooling layer, the window size (width/height) and stride (horizontal/vertical; four numbers in total)

All numbers (kernel size, window size, stride) are guaranteed to be positive integers.
You may output truthy/falsy by following your language's convention or selecting two distinct values for true/false respectively.
Standard code-golf rules apply. The shortest code in bytes wins.

Do we have to deal with kernel size 0xn?

@fireflame241 "All sizes are guaranteed to be positive integers." This includes kernel sizes.

@xash Oops, thanks for pointing out.

Python 3.8 (pre-release), 138 134 118 bytes
lambda s,l:[s:=[(r:=(I-(m:=M-(M>1))*k)/S+m+0%(k%2+m**2))+(r%1+(S>k)and E)for I,k,S,*_ in zip(s,*L,(1,1))]for M,L in l]

Try it online!
Anonymous function that throws an error only if the given layers are in error. Takes a list of layers, where each layer is either:

[mode, [KR,KC]] where mode is -1,0,or-1 corresponding to a max,mid, or min convolutional layer, or
[2, [WR, WC], [SR, SC]] where the 2 indicates a pooling layer

I could save a few bytes if (1,1) could be added as a third element of convolutional layers, but I feel that's redundant information with the mode already differing it from pooling layers.
Commented
f=\
lambda s,l:\
 [
  s:=[             # set s (size) to:
   (
    r:=                # an optimized calculation of the new size (r) along width (i=0) or height (i=1)
                         # (need to set this to r because s is not updated until finishing this element)
                         # [IR - KR + 1, IR, IR + KR - 1, (IR - WR)/SV + 1]
                         # <--> (IR - m * KR)/(SV or 1) + m where m is -1 for max, 0 for mid, 1 for min, and 1 for pool
    (I-                    # (IR-
     (m:=M-(M>1))          #  m  # (need to convert pool(M=2) to 1, leave -1,0,1 unchanged) # maybe something with `M&2` might shorten
     *k)/                  # * KR)/
    S                      # SV
    +m                     # + m
    +0%(               # error if k is even and m==0 (mid):
    k%2+m**2             # This sum gives 0 iff k is even and m==0
    )                    # 0 mod the sum throws ZeroDivisionError if the sum is 0
   )                     # otherwise it is equal to 0 and does not affect the sum
   +(
     r%1+(S>k)         # True if r is not an integer or the stride size is greater than the window size
    and E              # throw NameError (E is not defined) if the above is true
   )                   # otherwise, False equals 0 in sums, so this does not affect the sum
   for I,k,S,*_ in zip(s,*L,(1,1))       # repeat for rows and columns
                                         # The (1,1) provides the default value of S
  ]
  for M,L in l  # repeat for each layer
 ]

Named function + traditional for-loop approach for the same bytecount:
def f(s,l):
 for M,L in l:s=[(r:=(I-(m:=M-(M>1))*k)/S+m+0%(k%2+m**2))+(r%1+(S>k)and E)for I,k,S,*_ in zip(s,*L,(1,1))]

Ungolfed
def f(size, layers):
    while layers:
        [mode, *layer] = layers.pop(0)

        if mode < 2:
            # convolutional, mostly eq to pooling with S=(1,1)
            layer += [(1,1)]

        kernel, stride = layer

        m = 1 if mode > 1 else mode
        for i in 0,1:
            size[i] = (size[i] - m*kernel[i])/stride[i] + m
            # check for fractions
            if size[i] % 1:
                return False
            # can't have even kernel dimension on a mid window
            if m==0 and kernel[i]%2==0:
                return False
            # stride can't be larger than kernel
            if stride[i] > kernel[i]:
                return False
    return True

05AB1E, 45 bytes
sεÐgiĀ«]vyн³Dp-Nè©*-yθ/®+ÐïÊyнÈ®_*y`‹«à~i0q]1

Inspired by @fireflame241's ungolfed Python answer, so make sure to upvote him!
Three loose inputs:

The window dimensions [w,h]
List of layers, where [[r,c]] is a convolutional layer and [[r,c],[r,c]] is a pooling layer.
List of kernel modes, where -1 is max; 0 is mid; 1 is min; and 2 is a pooling layer.

Try it online. (No test suite due to the q, but I've manually checked the four falsey examples.)
Explanation:
s                   # Swap to get the first two (implicit) inputs onto the stack,
                    # with the second input at the top
 ε                  # Map over each layer:
  Ð                 #  Triplicate the layer
   gi               #  If it's length is 1 (thus a convolutional layer):
     Ā              #   Truthify both integers, so we have a pair of 1s: [1,1]
      «             #   Merge it to the layer
 ]                  # Close the if-statement and map
  v                 # Loop over each layer `y`, consisting of two pairs [kernel,stride]:
   yн               #  Get the first pair (the kernel)
     ³              #  Push the third input-list of modes
      Dp-           #  Transform the 2s into 1s (by checking for prime, and subtracting)
         Nè         #  Get the mode at the current loop-index
           ©        #  Store it in variable `®` (without popping)
            *       #  Multiply this mode to the kernel-pair
             -      #  Subtract each from the dimensions-pair
              yθ    #  Get the last pair (the stride)
                /   #  Divide the dimension-pair by the stride-pair
                 ®+ #  And add the modified mode `®` to each
   Ð                #  Triplicate the modified dimensions-pair
    ï               #  Cast the values in the top copy to integers
     Ê              #  Check if the top two pairs are NOT equal
                    #  (1 if the dimension-pair contains decimal values; 0 if integers)
    yн              #  Push the kernel again
      È             #  Check for both values if they're even (1 if even; 0 if odd)
       ®_           #  Check if `®` is 0 (1 if 0; 0 if not)
         *          #  Multiply the checks
    y`              #  Push the kernel-pair and stride-pair separated to the stack
      ‹             #  Check if [kernel-row < stride-row, kernel-column < stride-column]
    «               #  Merge the pairs of checks together
     à              #  Check of any are truthy of this quartet by taking the maximum
    ~               #  Check if either is truthy by taking the bitwise-OR
     i              #  If this is truthy:
      0             #   Push a 0
       q            #   And stop the program
                    #   (after which this 0 is output implicitly as result)
 ]                  # Close the if-statement and loop
  1                 # And push a 1
                    # (which will be output implicitly if we didn't encountered the `q`)

J, 84 bytes
Takes in a list of layers; mode x y for convolution, with _1 0 1 for min mid max, and a 2x2 matrix wx wy ,: sx sy for pooling, and x y for the initial image. Returns 0 if it is a valid description, 1 otherwise.
_ e.&>(1(+_*[><.)@+(-{.)%(]*>:)/@])`((+_*1>])@+}.(]-~*+_*(2|[)+:|@]){.)@.(]3=#)~&.>/

Try it online!
How it works
(…)`(…)@.(]3=#)~&.>/

We fold the list from the right (where initially the 25 25 stands), and based on the left length (3 for convolution, 2 for pooling), we choose from two functions. Whenever we encounter an error, we set to row or column dimension to infinity. For convolution with example _1 3 3 (min 3x3):
((+_*1>])@+}.(]-~*+_*(2|[)+:|@]){.)
           }.(                 ){.  split into 3 3 and _1 as arguments
                            |@]     mode != 0?
                      2|[           3 3 even?
                          +:        not-or, so 1 iff mode = 0 and dimension even
                   _*               if this^ returns 1, convert it to infinity
                 *+                 add to this dim * mode (_3 _3)
              ]-~                   subtract the mode (_2 _2)
           +                        add to the image dimension (23 23)
  (+_*1>])                          if the dimensions are less than 1, add infinity

For pooling, with for example 3 3,:2 2 on the left side, 23 23 on the right side:
(1(+_*[><.)@+(-{.)%(]*>:)/@])
                   (]*>:)/@]  multiple stride with (window greater/equal stride?)
             (-{.)%           (image - window)% mstride, is infinity iff mstride is 0
 1          +                 add one
  (+_*[><.)                   add infinity if flooring a dimensions changes it

An the end, after applying each layer:
_ e.&>       unbox and check if at least one dimension is infinity

source: Stack Exchange

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

sort: votes


text:
Archimedes's cattle problem

Compute, O friend, the number of the cattle of the sun which once grazed upon the plains of Sicily, divided according to color into four herds, one milk-white, one black, one dappled and one yellow. The number of bulls is greater than the number of cows, and the relations between them are as follows:
White bulls   \$= (\frac{1}{2} + \frac{1}{3})\$ black bulls + yellow bulls,
Black bulls   \$= (\frac{1}{4} + \frac{1}{5})\$ dappled bulls + yellow bulls,
Dappled bulls \$= (\frac{1}{6} + \frac{1}{7})\$ white bulls + yellow bulls,
White cows    \$= (\frac{1}{3} + \frac{1}{4})\$ black herd,
Black cows    \$= (\frac{1}{4} + \frac{1}{5})\$ dappled herd,
Dappled cows  \$= (\frac{1}{5} + \frac{1}{6})\$ yellow herd,
Yellow cows   \$= (\frac{1}{6} + \frac{1}{7})\$ white herd.
If thou canst give, O friend, the number of each kind of bulls and cows, thou art no novice in numbers, yet can not be regarded as of high skill. Consider, however, the following additional relations between the bulls of the sun:
White bulls + black bulls = a square number,
Dappled bulls + yellow bulls = a triangular number.
If thou hast computed these also, O friend, and found the total number of cattle, then exult as a conqueror, for thou hast proved thyself most skilled in numbers.
- Archimedes

Some clarifications:

black herd = black bulls + black cows, white herd = white bulls + white cows, etc.
\$(\frac{1}{2} + \frac{1}{3})\$ black bulls + yellow bulls, means only the black bulls get the coefficient
A square number is a number which can be represented as n * n where n is an integer
A triangular number is a number which can be represented as 1 + 2 + ... + (n - 1) + n

Task
Write a program/function to output the size of the smallest herd that could satisfy both the first and second parts of the above problem.
Output
You must output this number. Standard Output rules for integers apply.
Scoring
This is code-golf so shortest bytes wins.

Hash of decimal representation of answer for easy checking:

sha256 (with newline): 4fce7274734a18e9d27592e59480b50876da243de4caef4323f783339c456a7c
sha256 (without newline): 8500b362f3d6b5e96c775ca16d1475b519ff18669b0f6f3d35e4fb23d2c18d01

Inspired by The Archimedes Number - Numberphile

In each formula, there aren't parens around, say, black bulls + yellow bulls, meaning only the black bulls get the coefficient?

Helios should have had very small cattle or a quite big idea of the size of Sicily... ;-)

@Rmano Very very very very very small cattle - see this

Sledgehammer, 67 66 26 bytes
-40 bytes thanks to @GregMartin and I also no longer have any idea about how my answer works
Completes in less than a few seconds!
⡇⣄⠀⠇⣺⠇⢞⡞⣵⣍⠪⢺⡇⠜⢂⡒⢃⠦⠲⣎⠇⠣⡔⢻⡦⠔

Mathematica code:
Floor[Divide[25194541,184119152] * (NumberFieldFundamentalUnits@Sqrt[4729494])^4658]

(the reason for the Divide is that by default Mathematica represents x/y as x * y^-1, which is half a byte longer in Sledgehammer).

OEIS A096151 has some information: the value is 50389082*t(1)^2, where (s(1), t(1)) is the smallest nontrivial solution to s^2 - D*t^2 = 1, with D=410286423278424 (or smallest solution t divisible by 9314 for squarefree D=4729494). So while it is a primary solution to the Pell's equation with large D, it is also >2000th solution for a smaller D. How that turns into the exact formula is still a mystery.

Found a shorter expression in Mathematica that gives the same result: 224571490814418*y^2 /. FindInstance[x^2-410286423278424*y^2==1 && x>1, {x, y}, Integers][[1]]. I don't know how it'll compress well, but it's definitely easier to port to other languages.

@Bubbler After minor Sledgehammer-specific golfing, that seems to be 41 bytes. (besides, I think FindInstance is harder to port to other languages than simple mathematical operations with arbitrary precision!)

The main problem with porting your solution is that most languages don't have arbitrary-precision decimal (as opposed to integer) or using it is very ungolfy. (The now-deleted 05AB1E one had this exact problem.) FindInstance can be simulated with brute force over integers. :)

I don't know Sledgehammer, but I'm guessing it will save many bytes to replace 109931986732829734979866232821433543901088049 +   50549485234315033074477819735540408986340 Sqrt[4729494] by the mathematically equivalent NumberFieldFundamentalUnits[Sqrt[4729494]]. (prepend with Last if you don't like the fact that this returns the answer as a single-element list)

@GregMartin since you found that built-in, you arguably know Sledgehammer much better than I do :)

oh no, I just know Mathematica and number theory :)

Looks like NumberFieldFundamentalUnits returns a length-1 list, so I think you need [[1]] or something to trim the outer {}.

@Bubbler returning a single-element list is acceptable

Wolfram Language (Mathematica), 84 83 bytes
224571490814418y^2/.{1}.FindInstance[x^2-410286423278424y^2==1&&x>1,{x,y},Integers]

Try it online!
-1 byte thanks to @J42161217.
Gives the identical result to the existing Sledgehammer solution. Uses the Pell equation directly to find the required y, and substitutes into the formula for the desired value. One problem was that the OEIS didn't have the correct constant factor (which must be multiplied by 4456749).
This one should be easier to port to other languages, since the Pell equation can be brute-forced using just integers.
Deriving the formula
Start with the minimal solution of the linear equations, which is already present on MathWorld, where \$W,X,Y,Z\$ denote white, black, dappled, and yellow bulls and \$w,x,y,z\$ denote the cows, and \$S\$ is the grand total:
$$
W,X,Y,Z = 10366482, 7460514, 7358060, 4149387 \\
w,x,y,z = 7206360, 4893246, 3515820, 5439213 \\
W+X = 17826996, Y+Z = 11507447, S = 50389082
$$
Now we need to find the integer multiple of all the values such that \$(W+X)n\$ is a square and \$(Y+Z)n\$ is a triangular number (which can be alternatively written as "8 times that plus 1 is a square"):
$$
(W+X)n = x^2 \\
8(Y+Z)n + 1 = y^2
$$
Note that \$W+X\$ is squarefree except for having the prime factor 2 twice, so \$x\$ must be a multiple of \$\frac{W+X}{2}\$. Substitute \$x=\frac{W+X}{2}x_1\$, then we get
$$
n = \frac{W+X}{4}x_1^2
$$
Substitute this into the equation for \$y\$ and rearrange a bit, then we get
$$
y^2 - 2(W+X)(Y+Z)x_1^2 = 1
$$
So the \$2(W+X)(Y+Z)\$ is where the number 410286423278424 comes from. Now assume we solved it; then we have the value for \$x_1\$. The final answer we want is \$S n\$, or
$$
S n = \frac{W+X}{4}Sx_1^2
$$
where \$\frac{W+X}{4}S\$ evaluates to 224571490814418.

83 bytes

JavaScript (Node.js),  373 ... 304  296 bytes
Returns a BigInt of 206545 digits.
Most BigInt literals in the code are stored as strings in base 119. This saves 8 bytes but leads to many unprintable characters. Below is a sanitized version without this compression scheme.
_=>[...1e9+[9542]].map(i=>M.push(m=([a,b,c]=m,[d,e,f]=M[i-2]||m,[v=a*d+b*f,a*e+b*d,u=c*d+a*f])),m=[0x4EDF512CD794532694B80D70C2648ADB08931n,0x119A739D926824D28537A6B609D64903072098n,0x16163EA6FB9A566AD5B17C9614A6476F10864n],M=[[0x104941B82B6E51BED5n,0n,0x48F880D7EEB3F6CAAn]])&&v*u*v*u*48222351474n/4657n

Try it online!
Note: Interestingly, it takes 6 times longer to turn the number into a string than to compute it (~2400ms and ~400ms on TIO respectively).
How?
Preamble
Node is definitely not the right tool for the job. We need to use an algorithm relying on integers exclusively and we don't have any advanced math built-in at our disposal.
It would probably be possible to solve the Pell equation used by Bubbler, but given the magnitude of the number we're looking for, I doubt that a size-optimized version of such an algorithm would return anything in a reasonable amount of time.
In order to get something that actually works, I've decided to use the formula described in the next paragraph.
Formula
This is an implementation of the method described in A simple solution to Archimedes' cattle problem by Antti Nygrén, whose final formula is:
$$\begin{pmatrix}v\\u\end{pmatrix}=\begin{pmatrix}a_1&a_2\\a_3&a_1\end{pmatrix}^{1164}\times\begin{pmatrix}r_1\\r_2\end{pmatrix}$$
$$T=6299\times 957\times u^2v^2+\frac{21054639\times 957\times u^2v^2}{4657}$$
with:
$$\begin{align}&a_1=109931986732829734979866232821433543901088049\\
&a_2=392567302329690546856394748066206816187916440\\
&a_3=30784636507697855142356992218944109072681060\\
&r_1=300426607914281713365\\
&r_2=84129507677858393258\end{align}$$
Implementation
We start with m = [a1, a2, a3] and M = [[r1, 0, r2]].
We iterate through the list [...1e9 + [9542]] which expands to:
['1','0','0','0','0','0','0','0','0','0','9','5','4','2']

For each value \$i\$ in the above list:

we build the vector [a,b,c] from m

we build the vector [d,e,f] from either M[i-2] if it exists, or m otherwise

we update m to [v,v',u] where:
$$\begin{pmatrix}v&v'\\u&\color{grey}{u'}\end{pmatrix}=\begin{pmatrix}a&b\\c&a\end{pmatrix}\times\begin{pmatrix}d&e\\f&d\end{pmatrix}=\begin{pmatrix}ad+bf&ae+bd\\cd+af&\color{grey}{ce+ad}\end{pmatrix}$$
Note: we don't need \$u'\$, so it's not computed at all

we push the new instance of m into M

During the first 10 iterations, M[i-2] is undefined and m is used instead. So we essentially just square the original matrix 10 times. In other words, we compute:
$$\begin{pmatrix}a_1&a_2\\a_3&a_1\end{pmatrix}^{1024}$$
During the next 3 iterations, we multiply by previous occurrences of m: M[9-2], M[5-2] and M[4-2], which correspond to the original matrix to the power of \$128\$, \$8\$ and \$4\$ respectively in order to reach:
$$\begin{pmatrix}a_1&a_2\\a_3&a_1\end{pmatrix}^{1024+128+8+4}=\begin{pmatrix}a_1&a_2\\a_3&a_1\end{pmatrix}^{1164}$$
The last iteration is a multiplication by M[0] where we've stored [r1, 0, r2] at the very beginning of the process, leading to:
$$\begin{pmatrix}v&\color{grey}{v'}\\u&\color{grey}{u'}\end{pmatrix}=\begin{pmatrix}a_1&a_2\\a_3&a_1\end{pmatrix}^{1164}\times\begin{pmatrix}r_1&\color{grey}{0}\\r_2&\color{grey}{r_1}\end{pmatrix}$$
At this point, \$v\$ and \$u\$ are set correctly and we just need to compute:
$$\frac{v^2u^2\times 48222351474}{4657}$$

I might be missing something, but would it be shorter to just update [u,v] by the matrix 1164 times?

@xnor Well, your much more clever implementation is the proof that it can be made significantly shorter (at least 111 bytes shorter). I think I've been worrying too much from the beginning about the poor performance of Node with large integers on that one. It's a bit too late now, so I'll leave my answer as-is. :-)

surely the shorter form would be worth posting another solution?

@ASCII-only Well, the shorter form is really just a port of xnor's answer.

Python 2, 166 bytes
u=0x104941b82b6e51bed5
v=0x48f880d7eeb3f6caa
k=2*u*v
a=0x4edf512cd794532694b80d70c2648adb08931
exec"u,v=a*u+7766*k*v,a*v+609*k*u;"*1164
print u*u*v*v*48222351474/4657

Try it online!
Based on Arnauld's formula and method. I start with an initial u,v, and update them by a 2*2 matrix operation 1164 times. I looked for constants sharing large common factors and extracted those.

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


text:
The one counting challenge to rule them all!
Background
Mathematicians are interested in all kinds of algebraic structures, e.g. groups, rings, boolean algebras. Generally, we have several operations (addition, multiplication, meet, join, etc.), and some equational relationships on the operations (e.g. associativity of multiplication). This makes up an algebraic theory. Formally, we want \$k\$ functions, the \$i\$-th of which takes \$s_i\$ arguments. We also want some equalities to hold between the functions. In our case, we only consider equalities between expressions of depth at most 2, e.g. \$f(g(x), h(x, y), h(y, z), f(x, y, w, z))\$. The equalities should hold whatever values you plug in for the variables.
Let's take a quick example. A semigroup is such an algebraic structure.  We need to have one function \$f_1\$, with \$s_1=2\$. There is just one equational relationship: \$f_1(f_1(x, y), z) = f_1(x, f_1(y, z))\$.
We are interested in models of the algebraic theories. A model, simply put, is just an implementation of the functions. We choose an underlying set \$M\$, and we implement the required functions \$f_i\$ as taking \$s_i\$ arguments from the set \$M\$, and returning an element of \$M\$, so that the equations hold when you plug in any element of \$M\$ for the variables. For example, if we take \$M = \{0,1,2\}\$, and \$f_1\$ to be the addition modulo 3, we get a model for the semigroup. The order of a model is simply the size of \$M\$. So the model above has order 3.
Suppose that, for a fixed algebraic theory, there are two models, with underlying set \$M\$ and \$N\$, and functions \$f_i\$ and \$g_i\$, respectively. If, after some relabeling of the elements, two models become exactly the same, we say they are isomorphic. In that case, the two models are essentially the same, and usually we don't care about their difference.

 More formally, if we can find a mapping \$\sigma: M \to N\$ such that \$g_i(\sigma(m_1), \sigma(m_2), \dots, \sigma(m_{s_i})) = \sigma(f_i(m_1, \dots, m_{s_i}))\$, we say that \$\sigma\$ is a morphism. Furthermore, if there is another morphism \$\pi : N \to M\$, and \$\sigma(\pi(x)) = x\$, \$\pi(\sigma(y)) = y\$ holds for every \$x \in N, y\in M\$, we say that the two models are isomorphic.

Task
Your challenge is a very natural question that arises when studying algebraic theories.

Given an algebraic theory (whose equations involve only expressions of depth at most 2) and a natural number \$n\$, compute the number of distinct models of order \$n\$, up to isomorphism.

You may write a function or a complete program. You can suppose the input is reasonably parsed for you. See the examples. Standard loopholes apply. This is code-golf, so the program with the shortest byte length wins.
Example Cases
Input: The theory of groupoids. There is one function f taking 2 arguments.

f(f(x, y), z) = f(x, f(y, z))

n = 2.

Output: 5.

We'll fully work this out. For the rest of the example cases the basic idea is the same.
Let's take M = {0, 1}, the actual labelling of the elements obviously doesn't affect the outcome. We have four values to decide on, f(0, 0), f(0, 1), f(1, 0), f(1, 1). Let's case split on f(0, 1).

Case 1: f(0, 1) = 0. So 0 = f(0, 1) = f(f(0, 1), 1) = f(0, f(1, 1)). We further case split on f(1, 1).

Case A: f(1, 1) = 0. Then 0 = f(0, f(1, 1)) = f(0, 0). If further, f(1, 0) = 0, then f is a constant function, and obviously satisfies the equation. If f(1, 0) = 1, then 1 = f(1, 0) = f(1, f(1, 1)) = f(f(1, 1), 1) = f(0, 1) = 0, contradiction.
Case B: f(1, 1) = 1. Let's consider f(0, 0).

Case i: f(0, 0) = 0. Then f(1, 0) = f(f(1, 1), 0) = f(1, f(1, 0)). If f(1, 0) = 1, plugging that in yields 1 = f(1, 1) = 0, contradiction. SO f(1, 0) = 0. So f(x, y) = x and y, which satisfies the equation, as you learned early in discrete mathematics.
Case ii: f(0, 0) = 1. Then f(1, 0) = f(f(0, 0), 0) = f(0, f(0, 0)) = f(0, 1) = 0. So the whole thing is just the xnor function.

Now let's look back: we've already got the constant function 0, the boolean and, and xnor. We proceed:

Case 2: f(0, 1) = 1. We could do the case analysis all over again. But note that everything exactly mirrors case 1, except that 0 and 1 are inverted, and the two arguments of f is swapped. Since swapping the arguments doesn't affect associativity, we immediately get what we wanted: the constant function 1, the boolean nand and xor.

Now we need to make sure they are all non-isomorphic. In fact, the two constant functions are isomorphic, since the relabelling that swaps 0 and 1 converts between them. So we've got 5 different possibilities.
Input: There are three functions f, g, h taking 1, 2 and 0 arguments, respectively.
The equations are:

g(g(x, y), z) = g(x, g(y, z))
g(x, f(x)) = h()
g(f(x), x) = h()
g(h(), x) = x
g(x, h()) = x

n = 3

Output: 1.

You may assume that the functions are labeled with natural numbers, here we use letters to make it more readable. Note that the expressions on both sides of the equalities should be implemented as trees or nested lists. You can assume that such trees are passed to your function as argument, so you can skip the parsing part. But in case you want to fiddle with eval-like stuff you can also accept string input.
The model of this algebraic theory is exactly the groups. And all groups of order 3 are isomorphic to \$\mathbb Z_3\$, which takes the underlying set to be \$\{0,1,2\}\$, and g is the addition modulo 3, f is negation, h() equals 0. Then the equations translate to:

\$(x + y) + z = x + (y + z)\$;
\$x + (-x) = 0\$;
\$(-x) + x = 0\$;
\$0 + x = x\$;
\$x + 0 = x\$.

These are just the familiar properties of addition.
Input: Same as previous, except `n = 6`.

Output: 2.

In fact, for this algebraic theory, the answer should be the very first sequence of OEIS, which demonstrates the importance of such sequences.

Input: There are 4 functions f, g, h, i, that takes 2, 2, 0, 1 arguments, repectively. The equations are:

f(f(x, y), z) = f(x, f(y, z))
g(g(x, y), z) = g(x, g(y, z))
f(x, y) = f(y, x)
f(i(x), x) = h()
f(h(), x) = x
g(x, f(y, z)) = f(g(x, y), g(x, z))
g(f(y, z), x) = f(g(y, x), g(z, x))

n = 10.

Output: 4.

This is OEIS A027623.
Input: There is just 1 function f taking 1 argument. The equations are:

f(x) = f(x)
f(f(y)) = f(f(y))

n = 30

Output: 10712682919341.

 Note that the equations are redundant. f is simply any function. We draw a directed edge from a to b if f(a) = b, this produces a graph where every vertex's out-degree is 1. Since we consider things up to isomorphism, we need to count such graphs with unlabeled nodes. We first consider a connected component. Since the out-degree is always 1, you can uniquely follow the edges until you hit a previously visited vertex. This produces a cycle (possibly with length 1 or 2). We consider the rest of the vertices in this connected component. They have to be on trees rooted on the cycle. Counting such graphs should be standard practice. The number of connected component is A002861, and the total number is A001372.

Input: 2 functions f, g both taking 2 arguments.

f(x, y) = f(y, x)
g(x, y) = g(y, x)
f(f(x, y), z) = f(x, f(y, z))
g(g(x, y), z) = g(x, g(y, z))
f(x, g(x, y)) = x
g(x, f(x, y)) = x

Output: OEIS A006966.

It is clear that this challenge is a very general generalization of various counting problems.

Below are some degenerate corner cases.
Input: There are no functions. There are no equalities. n = 7.

Output: 1.

This is just finding sets with 7 elements, and if there are bijections between two sets they count as the same. Of course, there are bijections between every two sets with 7 elements. So the answer is 1.
Input: There are no functions. The only equality is x = y. n = 7.

Output: 0.

The equalities should hold for all x and y. So there can only be at most 1 distinct element, but we require 7.
Input: Same as above, except `n = 1`.

Output: 1.

Input: Any algebraic theory, n = 0.

Output: 1. (Regardless of the theory.)

This challenge could definitely benefit from a fully worked example or 2.

@Shaggy Done. Is there any way I can collapse a long paragraph? The examples are several times longer than the problem statement!

The case you worked out about monoids (actually semigroups since the definition has no identity) is off by one: and and nand are not isomorphic: the relabelling swaps both inputs and outputs. The isomorphic function to and is or; the isomorphic function to nand is nor (and(1,1)=1 ←→ or(0,0)=0)

@fireflame241 fixed.

suggested rephrasing: "non-isomorphic models" -> "distinct models up to isomorphism"

The five semigroups of order two areand/or, xor/xnor, the null semigroup (constant 0 function), the left zero semigroup (f(x, y) = x), and the right zero semigroup.

Haskell,  482 ... 408 402 bytes

-5 thanks to @ovs
-18 by inlining functions that are used just once
-12 by introducing short names of constants and removing parentheses
-11 by making a function local so it can take less arguments
-29 thanks to @Laikoni and @Trebor
-6 bytes by preferring list comprehension to filter, and turn F Int[A] into Q[A]Int for 1 space (I changed the letter to ease the changing of the test cases).

import Data.List
data A=Q[A]Int|V Int
t=map
w=sequence
y(V i)=i
y(Q l _)=maximum$0:t y l
(0!_)_=1
(n!e)q=c[b|m<-w$t(a.(n^))e,let b=[\b->f!!sum(zipWith(*)b(t(n^)r))|f<-m],and[h l==h r|(l,r)<-q,v<-a$1+y l`max`y r,let h(V i)=v!!i;h(Q e f)=b!!f$h<$>e]]where;a i=w$r<$[1..i];d#w=all(\p->or[(t(.t(p!!))d!!f)q/=(t((p!!).)w!!f)q|(f,z)<-zip r e,q<-a z])$permutations r;c[]=0;c x=1+c(filter(head x#)x);r=[0..n-1]

Try it online!
The function (!) accepts input as (n ! arities) equations, where n is the given n, arities is a list of \$s_i\$, as specified in the challenge, equations should be in the predefined datatype A, whose ungolfed version reads
data Expression
  = Func Int [Expression] | Var Int

An expression is either a Var variable, indexed by natural numbers (here Int saves bytes), or Func i [arg1, arg2, arg3, ...], which is just the \$i\$-th function, applied to the list of arguments. I have entered the equations in the footer in TIO, in case you are interested. (Func Int [Expression] becomes Q[A]Int in the golfed code to save one space.)
As mentioned by @fireflame241 it is very hard to get anything interesting done within the time limit. Nonetheless I've written a decent set of tests to check against OEIS.

Ungolfed version (still messy but hopefully the comment makes it clear):
import           Data.List

data Expression
  = Func Int [Expression] | Var Int deriving (Show)

tabulate n arity f =
  intercalate
    "\n"
    [ "f" ++ show assv ++ " = " ++ show (f assv)
    | assv <- sequence (replicate arity [0 .. n - 1])
    ]

showModel n arities m =
  intercalate "\n\n" [tabulate n a f | (a, f) <- zip arities m]

-- auxiliary function to find the largest variable number
-- this is less efficient, but saves the hassle of having to bookkeep the used variables
vars (Var i)    = i
vars (Func _ l) = maximum $ 0 : map vars l  -- the 0 is to avoid empty lists

-- evaluates an expression in the model `funcs`
evaluate :: [[Int] -> Int] -> [Int] -> Expression -> Int
evaluate funcs varass (Var i) = varass !! i
evaluate funcs varass (Func f es) = funcs !! f $ map (evaluate funcs varass) es

-- auxiliary function to generate all possible variable assignments
varasss n l r = sequence (replicate (1 + max (vars l) (vars r)) [0 .. n - 1])

-- I think this can be further golfed, but havent come up with good ones yet
checkValid ::
     Int -> [Int] -> [(Expression, Expression)] -> [[Int] -> Int] -> Bool
checkValid n arities equations funcs =
  and
    [ evaluate funcs v l == evaluate funcs v r
    | (l, r) <- equations
    , v <- varasss n l r
    ]

-- generates all models. The outer list comprehension runs over a cartesian product M1 * M2 * ...,
-- where Mi is the (flattened) table of all the possible implementation of the i-th function
-- Then the complicated `sum $ zipWith` stuff computes the index of the flattened table Mi
-- from the un-flattened index
allModels :: Int -> [Int] -> [[[Int] -> Int]]
allModels n arities =
  [ [\b -> f !! (sum $ zipWith (*) b (map (n ^) [0 ..])) | f <- m]
  | m <-
      sequence (map (\i -> sequence (replicate (n ^ i) [0 .. n - 1])) arities)
  ]

-- see if two models are identical, by comparing the values.
ident :: Int -> [Int] -> [[Int] -> Int] -> [[Int] -> Int] -> Bool
ident n arities m1 m2 =
  and
    [ (m1 !! f) assv == (m2 !! f) assv
    | f <- [0 .. length arities - 1]
    , assv <- sequence (replicate (arities !! f) [0 .. n - 1])
    ]

-- see if two models are isomorphic, by testing all permutations.
-- (p !!) computes the permutation
-- the mysterious `((p!!).)` was generated by http://pointfree.io/ from `(\f -> \i -> p !! (f i))`.
-- It is understandable, but I couldnt have come up with that ;)
isom :: Int -> [Int] -> [[Int] -> Int] -> [[Int] -> Int] -> Bool
isom n arities m1 m2 =
  or
    [ ident n arities (map (flip (\i -> ($map (p !!) i))) m1) $map ((p !!) .) m2
    | p <- permutations [0 .. n - 1]
    ]

-- used to partition the valid models into isomophic classes
-- This was taken from one of my projects, which ultimately
-- comes from some StackOverflow code snippet, which Ive lost the source
splitOffFirstGroup :: (a -> a -> Bool) -> [a] -> ([a], [a])
splitOffFirstGroup equal xs@(x:_) = partition (equal x) xs
-- splitOffFirstGroup _     []       = ([],[])  -- Not really necessary

equivalenceClasses _ [] = 0
equivalenceClasses equal xs =
  let (fg, rst) = splitOffFirstGroup equal xs
   in 1 + equivalenceClasses equal rst

-- putting everything together...
answer 0 _ _ = 1  -- corner case
answer n arities equations =
  equivalenceClasses (isom n arities) $
  filter (checkValid n arities equations) $ allModels n arities

Nice first answer! You can write your splitOffFirstGroup function slightly shorter as j e y=partition(e$y!!0)y.

@ovs Thanks! Two more bytes can be saved by making y point-free: j e=partition=<<e.(!!0)

Indeed that's 3 more bytes... I accidentally included an extra space.

pointfree.io does seem to be a good way to shorten Haskell code!

Just in case you haven't seen them yet: Here's a collection of Tips for golfing in Haskell.

partition=<<e.(!!0) can be further shortened to partition=<<e.head. (sum$zipWith...) can be sum(zipWith...). There's an extra space in c [].

snd$partition p x is filter(not.p)x. Instead of using not, we can negate o: from o d w=any(\p->and[...==...|...]) we go to o d w=all(\p->or[.../=...|...]).

a=w.flip replicate r can be a=w.(`replicate`r). You can use infix notation for the main function a:  a 0 _ _=1;a n e q= ... becomes (0!_)_=1;(n!e)q= .... [let A in B | C] can be wrote without the in: [B | C, let A].

1+max(y l)(y r) can be 1+y l`max`y r. a=w.(`replicate`r) can further be shortened to a n=w$r<$[1..n]. All together 410 bytes: Try it online!. Sorry for all those pings.

@Laikoni Of course, you can also infix o d w to get d#w. So c(filter(head x#)x). Saves 2 more bytes.

@Laikoni Ok, wow. It seems like you can always drain bytes from code! And thanks for the tips!!

Python 3, 393 382 bytes
-11 bytes thanks to @ovs
from itertools import*
T=tuple
P=product
def C(A,e,n):
 G=range(n);t=0;c=[]
 for m in P(*[[dict(zip(P(*[G]*a),o))for o in P(*[G]*n**a)]for a in A]):
  E=lambda x,f:f[x]if x*0==0else m[x[0]][T(E(s,f)for s in x[1:])]
  if m not in c: c+=[T({T(r[a]for a in k):r[f[k]]for k in f}for f in m)for r in permutations(G)];t+=all(E(q[0],f)==E(q[1],f)for q,N in e for f in P(*[G]*N))
 return t

Try it online!
Takes each equation in the list as a pair of two expressions (LHS and RHS) and the number of free variables. Each expression is a tree representation, where the first non-negative integer of each list represents the index of the function, and the rest of the list are the function's arguments. (Uncomment the second-to-last line of the TIO link to see what the input looks like). The footer performs a bunch of parsing on the input string before passing to the function.
This generates all possible mappings of inputs to outputs for each function and tests if each one works. Ideally implemented, this general algorithm would have worst-case time complexity something like \$O(\frac{n^{\sum A}LEn^L}{n!})\$ (very slow), where \$n\$ is the order the given, \$\sum A\$ is the sum of the arities of the functions, \$L\$ is the average length of each equation (the whole equation is evaluated), and \$E\$ is the number of equations. There are \$n^{\sum A}\$ possible models, but sets of \$n!\$ on average are mutually isomorphic. Each class of models gets tested once (Ideally, we could ignore all but \$1\$ of each class, but it is not trivial to skip over isomorphic models. Hence, there is probably a full \$n^{\sum A}\$ term added for my implementation, and even higher since it checks for dict membership in a list of dicts). In the worst case, all of these \$n^{\sum A}/n!\$ models are valid, but they have to be verified by checking all \$E\$ equations and all \$n^L\$ possible inputs, each of which take (on average across the equations) \$L\$ time to evaluate. In the average case, I"m guessing only the log of this number has to be checked, so the average case would be roughly \$O(\frac{n^{\sum A}L\log(En^L)}{n!})=O(\frac{n^{\sum A}L^2\log(E)}{n!})\$. In the best case, for example with the equation x=y, each model gets invalidated with the first or second check (0=0 ... 0=1), so best case is \$O(\frac{n^{\sum A}}{n!})\$.
With these unwieldy time complexities, I have had to (greatly) shrink some of the orders input in order to run on TIO. The OEIS sequences that list millions of elements were generated with some specialized algorithm or formula. However, this has to run in the general case, so it can't easily make logical deductions that a human can (SAT is NP-hard, so I doubt the time complexity can be much improved).
Commented golfed code
from itertools import*

T=tuple
P=product

def C(A,e,n):
    G=range(n);
    t=0;# t: total number of models found so far
    c=[]    # c: list of isomorphic models of those already considered
            # A set would be better for time, but it takes a few too many bytes
            # to stringify dicts in a consistent way
    for m in P(   # m is a model
        *[
            [
                dict(zip(
                    P(*[G]*a), # inputs
                    o
                ))
                for o in P(*[G]*n**a) # possible outputs
            ]
            for a in A    # Why does this have to be enclosed in a list?
        ]   # P: choose one mapping for each function
    ):
        # I place the definition of E here so it can take advantage of scope to access m,n
        E=lambda x,f:f[x]if x*0==0else m[x[0]][T(E(s,f)for s in x[1:])] # E: evaluate an eXpression given free variables f
        # haven't already considered an isomorphic model:
        if m not in c:\
            c+=[    # append all isomorphic models
                T(
                    {
                        T(r[a]for a in k):r[f[k]]  # apply mapping
                        for k in f     # to keys (inputs) and values (outputs)
                    }
                    for f in m
                )
                for r in permutations(G) # r is a remapping, e.g. [0,2,1] on n=3 swaps 2 and 1
            ];\
            t+=all( # is the model valid?
                E(q[0],f)==E(q[1],f)        # LHS and RHS are equal
                    for q,N in e            # when given each possible list of free variables
                    for f in P(*[G]*N)
            )
    return t

General idea
from itertools import*

def execute(expr,free_vars,model,n):
    try:
        func_id, *params = expr
        params = tuple(execute(subexpr,free_vars,model,n) for subexpr in params)
        return model[func_id][params]
    except:
        # expr is an int ==> a variable
        return free_vars[expr]

def get_all_models():
    return product(
        *[
            [
                {i:o for i,o in zip(
                    product(*[range(n)]*arity), # inputs
                    output
                )}
                for output in product(*[range(n)]*n**arity)
            ] # possible outputs
            for arity in arities    # Why does this have to be enclosed in a list?
        ]
    )

def relabellings(model,n):
    return [
        tuple(
            {
                tuple(relabelling[a] for a in k): relabelling[e]
                for k,e in func.items()
            }
            for func in model
        )
        for relabelling in permutations(range(n))
    ]

def model_works(model, equations, n):
    return all(
        execute(eq[0],free_vars,model,n) == execute(eq[1],free_vars,model,n)
            for eq, num_free_vars in equations
            for free_vars in product(*[range(n)]*num_free_vars)
    )

def count(arities, equations, n):
    total=0
    considered = []
    for model in get_all_models():
        if model in considered:
            continue
        for r in relabellings(model, n):
            considered.append(r)
        if model_works(model, equations, n):
            total += 1
    return total

You can directly create dictionaries from zip objects: dict(zip(P(*[G]*a),o)).

@ovs Oh! That's the way. I tried dict.from_keys, but it sets all items to None.


text:
The matrix has U
Given a matrix of size at least 3×3 formed by positive integers, determine if it contains at least one "U" pattern, defined as
+ + + - - - + +
+ + - N - N - +
+ + - N - N - +
+ + - N N N - +
+ + + - - - + +

where

N is the same number, repeated in those seven positions
- (optional) represents any number different than N. Each - can be a different number
+ (optional) represents any number. Each + can be a different number.

The amount of + and - entries obviously depends on the size of the matrix. In particular, some - may not exist because the pattern is adjacent to a matrix border. The above representation corresponds to a 5×8 matrix.
The pattern must have the specified orientation. Reflections or rotations are not valid.
Test cases
Truthy

Pattern with N=8:
 3 4 7 5 6 5 4 8
 8 7 3 8 5 8 2 4
 9 9 9 8 7 8 1 3
 4 5 3 8 8 8 3 6
 6 8 9 2 3 2 1 4

Same pattern with some N values nearby:
 3 4 7 5 6 5 8 8
 8 7 3 8 5 8 2 4
 9 9 9 8 7 8 1 3
 4 5 3 8 8 8 3 6
 6 8 8 2 3 2 1 4

Pattern with N=3, touching a matrix border:
 7 5 4 7 5 4 5 6
 7 1 5 3 5 3 6 3
 3 5 3 3 9 3 2 3
 3 1 2 6 7 3 3 3
 4 5 2 8 9 6 8 4

Pattern with N=4, touching a matrix corner:
 4 1 4 6
 4 3 4 3
 4 4 4 5
 7 5 3 5

Two patterns, with N=5 and N=9:
 6 7 9 4 5 6 7
 5 2 5 9 8 9 8
 5 1 5 9 6 9 3
 5 5 5 9 9 9 4
 8 7 6 1 3 2 5

Pattern with N=3, and broken pattern with 1:
 1 2 1 2 3 2 3
 1 2 1 2 3 2 3
 1 1 1 1 3 3 3

Numbers can be greater than 9; here N=25:
 23 56 34 67 34  3
 34 25  4 25 48 49
 24 25 97 25 56 56
 12 25 25 25 32 88

Minimalistic case, N=2:
 2 1 2
 2 5 2
 2 2 2

Falsy

Nothing special here:
 7 8 6 5 4
 3 4 5 6 3
 3 5 6 4 4
 7 8 9 3 2

Rotated or reflected patterns are not valid:
 9 9 9 3 7 7 7 5
 4 4 9 2 7 8 7 6
 9 9 9 8 7 9 7 4

Some - entry spoils the pattern
 9 5 5 6 5
 3 8 5 9 5
 2 9 5 5 5

Some - entry spoils the pattern, even if the result would be a "U" with longer horns
 7 8 5 2 5
 9 2 5 6 5
 3 8 5 9 5
 2 9 5 5 5

Minimalistic case, no pattern
 9 9 9
 9 8 9
 9 9 9

Additional rules

You can choose to output:

Any two distinct values/arrays/strings... depending on whether the matrix contains the specified pattern or not; or
Anything truthy if the matrix contains the specified pattern, and anything falsy otherwise. The specific truthy and falsy values/arrays/strings... can be different for different inputs.

The code should work in theory for matrices of arbitrarily large size, containing arbitrarily large numbers. In practice, it is acceptable if the program is limited by time, memory or data-type restrictions.
Input and output are flexible as usual. Programs or functions are allowed, in any programming language. Standard loopholes are forbidden.
Shortest code in bytes wins.

Suggest testcase: 1 2 1 2 3 2 3/ 1 2 1 2 3 2 3/ 1 1 1 1 3 3 3 a broken 1 with a valid 3.

@tsh Good idea! Edited

Somewhat related.

Can there be 0's in the input? Negative numbers? The examples suggest not.

@Abigail No, only positive integers (it's stated in the first line)

@Downvoter Any suggestion to improve this challenge, or future challenges?

APL (Dyalog Extended), 62 51 45 bytes (SBCS)
-6 based on fireflame241's solution.
⍲,(⍱{'GILNQRS'≡⎕A[⍸,⍵]~'AEUY'}⌺5 5⍤=)¨∘⊂0⍪0,⊢

Try it online!

Lots of funny faces in the code as usual ⍨ ö ¨∘

@LuisMendo Well, it'd only add one byte.

I have added a new test case (which now appears second); in case you want to include it

@LuisMendo I'm a bit busy. Feel free to edit my post.

Done. I added the new case and another one that was missing

JavaScript (ES7),  124 110  105 bytes
Returns a Boolean value.
m=>m.some((r,y)=>r.some((v,x)=>(g=n=>n--?v==(m[y+~-(n/5)]||0)[x+n%5-1]^144140166590/3**n%3&&g(n):1)(24)))

Try it online!
How?
For each reference cell of value \$v\$ at \$(x,y)\$ in the input matrix \$m\$, we test 24 neighbor cells.
The constant \$144140166590\$ is \$111210001101011010121112_3\$ in base 3. By reversing the digits and rearranging them into a 5x5 matrix, this gives:
$$\begin{pmatrix}2&1&1&1&2\\
1&\color{red}0&1&0&1\\
1&0&1&0&1\\
1&0&0&0&1\\
2&1&1&1&-\end{pmatrix}$$
where:

the cell in red is the reference cell
\$0\$ means that this cell must be equal to \$v\$
\$1\$ means that this cell must be different from \$v\$
\$2\$ means that we don't care

The bottom-right cell of the matrix is ignored, but it should be a \$2\$ anyway (for we don't care).
The \$n\$-th cell to test (0-indexed) is the cell whose coordinates are:
$$\big(x+(n\bmod 5)-1,y+\lfloor n/5\rfloor-1\big)$$
The corresponding value in the above matrix is given by:
$$V=\left\lfloor\frac{144140166590}{3^n}\right\rfloor\bmod 3$$
We do a bitwise XOR between the cell comparison test and \$V\$:
 is equal |  V  | XOR | success?
----------+-----+-----+--------------------------
     0    |  0  |  0  | no (should be equal)
     1    |  0  |  1  | yes
----------+-----+-----+--------------------------
     0    |  1  |  1  | yes
     1    |  1  |  0  | no (should be different)
----------+-----+-----+--------------------------
     0    |  2  |  2  | yes \__ always
     1    |  2  |  3  | yes /   ≠ 0

If all 24 tests are successful, we've found a valid U.

Julia 0.6, 78 75 bytes
x->any(n->7∈conv2(reshape(digits(287035908958,3)-1,5,5),1÷-~abs(x-n)),x)

Try it online!
Uses 2D-convolution to find the pattern encoded in the magic constant. The constant is derived via base 3 digits similarly to Arnauld's answer, but with 0 and 2 swapped. This way, after subtracting 1, we get the following correspondence: N = 1, '+' = 0, '-' = -1.
The input matrix is transformed to N = 1, everything else = 0. After convolution, the middle cell of the found pattern will accumulate a total of 7 (for the number of N's in the U-shape). If any of required N's is missing, the sum will not reach 7, and if an N (= 1) is present in the forbidden position, it will gain a negative contribution due to the multiplication by -1 in the pattern.

Nice! Convolution is the way I've seen this problem from the beginning

APL (Dyalog Extended), 62 bytes
{{∨/∊({7 9 12 14 17 18 19≡1 5 21 25~⍨⍸,⍵}⌺5 5)¨(,⍵)=¨⊂⍵}0⍪0,⍵}

Try it online! (includes the new test case).
My first APL golf! Returns a 1 if there is a U, or 0 otherwise.

Nice idea in the inner dfn. I've borrowed and golfed it a bit. However, only 1 is truthy in APL, so you should replace +/ with ∨/

@Adám Fixed. Smart use of the alphabet in yours

Charcoal, 58 bytes
⊙θ∧‹¹κ⊙ι∧‹¹μ⬤θ⬤ν∨‹³⁺↔⁻ξ⊖κ↔⁻ρ⊖μ⁼⁼λπ∧›²↔⁻ξ⊖κ∨⁼¹↔⁻ρ⊖μ∧⁼ξκ⁼ρ⊖μ

Try it online! Link is to verbose version of code. Takes input as an array and outputs a Charcoal boolean, i.e. - if it contains U, nothing if not. Explanation:
⊙θ∧‹¹κ

Find a valid bottom row where:
⊙ι∧‹¹μ

Find a valid right column where:
⬤θ⬤ν

All elements of the array must satisfy:
∨‹³⁺↔⁻ξ⊖κ↔⁻ρ⊖μ

The element has a Manhattan distance from the centre of the U of more than 3, or...
⁼⁼λπ

... the equality of the element with the outer element matches:
∧›²↔⁻ξ⊖κ

The vertical distance of the element from the centre of the U is less than 2, and...
∨⁼¹↔⁻ρ⊖μ

... the horizontal distance of the element from the centre of the U is exactly 1, or...
∧⁼ξκ⁼ρ⊖μ

... the element is the bottom centre of the U.

J, 68 bytes
Builds up 16 U's with the 16 possible combinations of 0 and 1 in the corners, then looks for them in the position matrix of each number.
[:+./@,(0 4 4|.#:20 20 28(,4 4&#:)"p./i.16)E."2/[:(="{~,)4|:@|.@,&_]

Try it online!


text:
Scientific notation in Base-16
Input a scientific notation number (base 10), output scientific notation in base 16 (as defined below).
Details
In scientific notation, all non-zero numbers are written in the form
$$ m \times 10^n $$
Where \$ n \$ is an integer, and \$ m \$ is a real number, \$ 1 \leq |m| < 10 \$.
Consider scientific notation in base 16.
$$ m \times 10^n = m' \times 16^{n'} $$
\$ n' \$ is an integer, and \$ m' \$ is a real number where \$ 1 \leq |m'| < 16 \$.
Input / Output
Input a positive real number. You may also choice to input \$m\$, and, \$n\$ separately. For all testcase, -100 < n < 100.
Output the number in hexadecimal scientific notation. Could be a single string or two strings. Number \$m\$, and, \$n\$ should also be formatted as hexadecimal strings.
Output as 1.2E3E4 is not allowed due to ambiguous. (1.2E3×104, or 1.2×103E4) You have to use other notations. For example, 1.2E3E+4, 1.2E3, 4, 1.2E3&4, 1.2e3E4, 1.2E3e4, 1.2E3P4, 1.2E3⏨4, 1.2E3*^4 are all acceptable.
Testcases
m, n -> m', n'
1.6, 1 -> 1, 1
6.25, -2 -> 1, -1
1.0, 1 -> A, 0
7.257672195146994, 93 -> d.eadbeef, 4d
1.234567, 89 -> f.83e0c1c37ba7, 49
1, -99 -> 8.bfbea76c619f, -53

You output may be slightly different from given testcase due to floating point errors. But you should keep at least 4 hex digits precision, and \$1 \leq m' < 16\$.
Rule
This is code golf. Shortest codes in each languages win.

@Noodle9 In 1.2E3E4, the digit E and the exponential separator have the same case.

@Noodle9 The E in 1.2E3 is not an exponent, it is hexadecimal 14.  So in the examples n' is not 1.210^3 (1200), it is 1 + 2/16 + 14/1616 + 3/161616 (approximately 1.1804 decimal).

@2012rcampion Ahhhhh! Now it makes total sense - thanks! :D

Be good to add a negative testcase.

Since there are already some answers assume positive numbers. I'm going to restrict the input as positive integers. Sorry for any changes. I had updated the description which only require to handle positive numbers.

Output as 1.2E3E4 is not allowed  Easily fixed by using X as the exponentiation letter: 1.2E3X4 or 1.2X3E4.

JavaScript (ES6),  134 124  121 bytes
Expects a float and returns an array of 2 strings.
n=>([x,y]=(+(g=n=>s=n.toString(16))(n).replace(r=/[1-f]/g,1)).toExponential().split`e`,[x.replace(r,_=>r.exec(s)),g(+y)])

Try it online!
How?
We first convert the input to hexadecimal and save the result in the variable s.
For instance, 7.257672195146994e93 is turned into:
"deadbeef0000000000000000000000000000000000000000000000000000000000000000000000"

We replace all non-zero hexadecimal digits with 1's:
"111111110000000000000000000000000000000000000000000000000000000000000000000000"

We coerce this back to an integer and invoke the .toExponential() method:
"1.1111111e+77"

We split this string into x = "1.1111111" and y = "+77".
We replace all 1's in x with the non-zero hexadecimal digits of s in order of appearance:
"d.eadbeef"

Finally, we convert y to hexadecimal:
"4d"

Below is another example with 6e-19:
"0.000000000000000b116b7de48f008"
"0.00000000000000011111111111001"
"1.1111111111001e-16"
[ "1.1111111111001", "-16" ]
[ "b.116b7de48f008", "-10" ]

Commented
n => (                       // n = input
  [x, y] =                   // x = mantissa, y = exponent
    (                        //
      +(                     // coerce to integer:
        g = n =>             //   g is a helper function converting its input ...
          s = n.toString(16) //     ... to a hexadecimal string saved in s
      )(n)                   //   invoke g with n
      .replace(              //   replace:
        r = /[1-f]/g,        //     r = regular expression to match the non-zero
                             //         hexa digits
        1                    //     replace all of them with 1's
      )                      //   end of replace()
    )                        //
    .toExponential()         // convert to exponential notation
    .split`e`,               // split into [ x, y ] = [ mantissa, exponent ]
  [                          // output array:
    x.replace(               //   replace in x:
      r,                     //     use r a 2nd time to match the 1's
      _ => r.exec(s)         //     use r a 3rd time to get the next hexa digit
                             //     from s, this time taking advantage of the
                             //     stateful nature of RegExp
    ),                       //   end of replace()
    g(+y)                    //   convert y to hexadecimal
  ]                          // end of output array
)                            //

JavaScript (ES6), 217 bytes

f=
n=>/^-?0\./.test(n=n.toString(16))?n.replace(/^(-?)0(.0*)(.)(.*)/,(_,s,z,d,t)=>s+d+'.'+t+'e-'+z.length.toString(16)):n=n.replace(/(-?.)(\w*).?(.*)/,(_,s,d,t)=>s+'.'+d+t+'e='+d.length.toString(16)).replace(/0*e=/,"e+")
<input type=number step=any oninput=o.textContent=f(+this.value)><pre id=o>

Output format is -?[1-f]\.([0-f]*[1-f])?e[+-][1-f][0-f]*.

Perl 5, 181 bytes
sub f{($e,$x)=(0,10**pop()*pop);$x/=16,$e++while$x>=16;$x*=16,$e--while$x<1;join('',map{sprintf$_?'%x':'%x.',$x%16,$x-=$x%16,$x*=16}0..12)=~s,\.?0*$,,r,sprintf$e<0?'-%x':'%x',abs$e}

Try it online!
I think using sprintf('%a',$x) could make the answer much shorter, just not sure how.
Ungolfed:
sub f {
  my($m, $n) = @_;
  my($e, $x) = (0, $m * 10**$n);
  $x/=16, $e++ while $x >= 16;
  $x*=16, $e-- while $x <  1;
  return (
    join('',map{sprintf$_?'%x':'%x.',$x%16,$x-=$x%16,$x*=16}0..12) =~ s,\.?0*$,,r,
    sprintf($e<0?'-%x':'%x',abs$e)
  )
}

Test:
for my $test (map[/-?[\da-f\.]+/gi],split/\n/,<<''){
    1.6, 1                -> 1, 1
    6.25, -2              -> 1, -1
    1.0, 1                -> a, 0
    7.257672195146994, 93 -> d.eadbeef, 4d
    1.234567, 89          -> f.83e0c1c37ba7, 49
    1, -99                -> 8.bfbea76c619f, -53

    my($m,$n,$Mexp,$Nexp)=@$test;
    my($Mgot,$Ngot)=f($m,$n);
    my $testname = sprintf"  %-25s -->  %s", "$m, $n", "$Mexp, $Nexp";
    is("$Mgot,$Ngot", "$Mexp,$Nexp", $testname);
}

Output:
ok 1 -   1.6, 1                    -->  1, 1
ok 2 -   6.25, -2                  -->  1, -1
ok 3 -   1.0, 1                    -->  a, 0
ok 4 -   7.257672195146994, 93     -->  d.eadbeef, 4d
ok 5 -   1.234567, 89              -->  f.83e0c1c37ba7, 49
ok 6 -   1, -99                    -->  8.bfbea76c619f, -53

R, 192 bytes
function(x,i=function(x,p=F,y=abs(x))`if`(y>0,{d=c(0:9,letters[1:6])[rev(y%/%(16^(0:log(y,16)))%%16+1)]
c("-"[x<0],d[1],"."[p],d[-1])},0))cat(i(x*16^(3-(n=log(x^2,16)%/%2)),T)," ",i(n),sep="")

Try it online!
Happily handles negative numbers, even if now not required.
Commented:
base16float==function(x,
    l=c(0:9,letters[1:6]),                          # define hexadecimal digits
    i=function(x,point=FALSE,y=abs(x))              # create function to write hexadecimal integers
    `if`(x==0,0,                                    # if x is zero, just write zero
        {d=l[rev(y%/%(16^(0:log(y,16)))%%16+1)]     # otherwise get the digits for each power-of-16
            c("-"[x<0],d[1],"."[p],d[-1])})         # and paste them together with the sign
    )                                               # (and with a "." after the first digit if
                                                    # specified by point=TRUE in the function call)
    cat(i(x*16^(3-(n=log(abs(x),16)%/%1)),T),       # so: first output the mantissa as a 4-digit integer
                                                    # with point=TRUE to include the dot,
        " ",                                        # leave a gap,
        i(n),                                       # and write the exponent
        sep="")

Ruby, 62 61 bytes
->x{'%x.%x,%+x'%[m=x/16**n=Math.log(x,16).floor,m%1*16**9,n]}

Try it online!
Input is a (decimal) float. Output is in the form \$m',n'\$, where \$m'\$ has a maximum precision of 10 hex digits and \$n'\$ is always signed.
'%x.%x,%+x' is a shorthand form of sprintf syntax, which creates formatted strings for numeric output. The format specifier x converts its argument to hexadecimal and the + guarantees signed output (otherwise negative numbers would be output with two leading dots representing an infinite string of leading ffs). We do three conversions to hex: (i) the integral part of \$m'\$, (ii) the fractional part of \$m'\$ (m%1; multiplying by 16**9 is necessary because the fractional part is ignored by sprintf), and (iii) \$n'\$.
The solution makes use of some straightforward mathematical transformations. Let \$m'=16^{m''}\$, so that \$x\equiv m10^n=m'16^{n'}=16^{m''+n'}\equiv 16^y\$. Then \$y=\log_{16}x\$. We are told that \$n'\$ is an integer, hence we take \$n'=\lfloor y\rfloor\$. This is the only choice of \$n'\$ for which \$0\le m''=y-n'<1\$, and hence the only choice of \$n'\$ for which \$1\le 16^{m''}=m' < 16\$ as required.
To support negative inputs, add .abs in two places and another + in the format string, bringing the code to 70 bytes:
->x{'%+x.%x,%+x'%[m=x/16**n=Math.log(x.abs,16).floor,m.abs%1*16**9,n]}

C(GCC), 32 bit float, 133 129 128 bytes
-4 bytes ceilingcat
m;e;s(float f){m=*(int*)&f;e=(m>>23)-127;m=(m&-1U>>9|1<<23)>>3-(e&3);printf("%x.%05xE%c%x",m>>20,m&-1U>>12,"+-"[e<0],abs(e/4));}

Try it online!
This extracts the exponent and mantissa from a floating point number.  Since the maximum exponent is +/-127 in base 2 (approx 38 base 10), this doesn't quite meet the challenge since it fails on larger exponents. So...
C(GCC), 64 bit float, 167 163 147 bytes
-4 bytes ceilingcat
long m;e;s(double f){m=*(long*)&f;e=(m>>52)-1023;m=(m&-1UL>>12|1L<<52)>>3-(e&3);printf("%lx.%013lxE%c%x",m>>49,(m&-1UL>>15)*8,"+-"[e<0],abs(e/4));}

Try it online!

Suggest (~e&3) instead of 3-(e&3)

Python 3, 135 \$\cdots\$ 119 105 bytes
def f(x):m,n=x.hex().split('p');m=hex(int('1'+m[4:],16)<<int(n)%4);return m[2]+'.'+m[3:],f'{int(n)//4:x}'

Try it online!
Inputs a float.
Returns a tuple of strings \$(m',n')\$.

Python 3.8, 284 bytes
struct approach. At least I tried)
from struct import*
m=lambda s,c,n,k:[s[n:],'-'+s[k:]][c]
n=lambda s:m(s,s[0]=='-',2,3)
o=lambda s,x:m(s,x<0,0,0)
p=lambda x:x[2]+'.'+x[3:]
s=lambda x,y,d=2**52:(o(p(hex((x%d+d)*2**((x//d+1)%4)).rstrip('0')),y),n(hex(((x//d)%2048-1023)//4)))
f=lambda x:s(unpack('Q',pack('d',x))[0],x)

Try it online!


text:
Divide into 2 isosceles triangles
Given the measures of two of the interior angles of a triangle (x and y; the other angle can be easily calculated with 180 - x - y), draw a line segment that cuts this triangle into two isosceles triangles. You need to output the angle measures of both of your triangles.
However, because the base angles are the same, you only need to output the list [apex angle, base angle] of the divided triangles for both of the isosceles triangles. You can output the divided triangles in any order.
An example
Say your input is 100, 60.

Let's take a look at the complete triangle first. The triangle looks approximately like this.

   100

60            20

Now we try to divide one of the angles such that two divided triangles are both isosceles triangles.

       100

(40,20)           20

Now our bottom triangle is an isosceles triangle, since both of the base angles
of the bottom triangle are 20. The angle measures of the bottom triangle
looks approximately like this.

       140
20             20

Now, is the top triangle an isosceles triangle?

    100
          40
40

It is an isosceles triangle, because two of the angle measures are 40.

Therefore, for [100, 60], you need to output [[100, 40], [140, 20]].

Example cases
[20, 40] -> [[140, 20], [100, 40]]
[45, 45] -> [[90, 45], [90, 45]]
[36, 72] -> [[108, 36], [36, 72]]
[108, 36] -> [[108, 36], [36, 72]]
[44, 132] -> [[92, 44], [4, 88]]

Specifications

You can always assume that the triangle is dividable into two isosceles triangles.
You can output one of the many solutions of the cases; for example, you can also output [20, 40] -> [[100, 40], [20, 80]] for the first test case.

Nice challenge, but I think it could benefit a lot from some (rough) pictures to illustrate the example better. It took me a while to figure out what was being asked tbh.

Is it guaranteed that the input triangle can be divided that way? (For instance, it's impossible to divide an equilateral triangle into 2 isosceles triangles.)

Did you mean [20, 40] -> [[140, 20], [100, 40]] for the first test case?

The 3rd test case should be [36, 72] -> [108, 36], [36, 72]

FYI I found a PDF linked from a Math Overflow question. A triangle can be divided into 2 isosceles triangles either if the smallest angle is < 45° and is exactly one half or one third of one of the other angles, or if one of the angles is 90°.

@neil can you add the link?

@LevelRiverSt https://math.stackexchange.com/a/270488/30622

Isn't [20, 40] -> [[100, 40], [20, 80] another valid answer for the first test case?

I've added a new test case [44, 132] -> [[92, 44], [4, 88]] where it's not the smallest angle that appears tripled.

@xnor I should have said that an angle exists that is < 45° and is exactly one half or one third of one of the other angles. Sorry about that.

05AB1E, 39 38 bytes
OƵΔαª©90KD®Qiʒ45‹®y23S*åà*}ßx‚}ε90α·y‚

Input as a pair of integers; output as a pair of pairs of integers.
Try it online or verify all test cases.
Explanation:
O                 # Take the sum of the (implicit) input-pair of angles
 ƵΔα              # Get the absolute difference with (compressed) 180
    ª             # Append that third angle to the (implicit) input-pair
     ©            # Store it in variable `®` (without popping)
90K               # Remove 90 from the triplet of angles
   D              # Duplicate it
®Qi               # If it's still equal to `®` (thus none were 90):
   ʒ              #  Filter the triplet by:
    45‹           #   Check that the angle is smaller than 45
               *  #   AND
        y2 S*     #   Check if the angle multiplied by 2
          3S* à   #   or multiplied by 3
       ®     å    #   is in the triplet of angles `®`
   }ß             #  After the filter: pop and push the minimum of the remaining angles
     x            #  Double it (without popping)
      ‚           #  Pair the non-doubled and doubled values together
  }ε              # After the if statement: map the angles in the pair to:
    90α           #  Get the absolute difference with 90
       ·          #  Double it
        y‚        #  And pair it with the non-mapped angle
                  # (after which the resulting pair of pairs is output implicitly)

See this 05AB1E tip of mine (section How to compress large integers?) to understand why ƵΔ is 180.

Python 3.8 (pre-release), 123 129 bytes
g=lambda*p:[[180-2*x,x]for x in p]
f=lambda a,b:((c:=180-a-b)==90or c>45>2in{a/b,b/a})*g(a,b)or(c/3in{a,b})*g(c/3,c/3*2)or f(b,c)

Try it online!
A function that takes in 2 angles, and returns the 2 isosceles triangles. If the given triangle cannot be divided, the function loops forever.

APL (Dyalog Unicode), 47 bytes
(⊢,⍨¨2×90-⊢)∘{90∊⍵:⍵~90⋄1 2×⌊/⍵∩∊⍵÷⊂2 3},,180-+

Try it online!
A tacit function that takes two angles as left and right arguments.
Uses the information found by Neil, modified to take care of xnor's test case:

A triangle can be divided into 2 isosceles triangles either if one of the angles is < 45° and is exactly one half or one third of one of the other angles, or if one of the angles is 90°.

Now, the base angles of the result can be found as follows:

If one of the angles is 90°, the bases are the other two angles.
Otherwise, one of the angles is < 45° and is exactly one half or one third of one of the other angles should hold, because the input is guaranteed to have a solution. In this case, the angle satisfying the condition becomes the base for one triangle, and the other triangle's base angle is twice the angle.

How it works: the code
(⊢,⍨¨2×90-⊢)∘{90∊⍵:⍵~90⋄1 2×⌊/⍵∩∊⍵÷⊂2 3},,180-+  ⍝ Left, Right: two angles
                                        ,,180-+  ⍝ Length-3 vector of three angles
             {                         }  ⍝ Find two base angles:
              90∊⍵:⍵~90⋄                  ⍝ If an angle is 90, the bases are the other two
                              ⍵∩∊⍵÷⊂2 3   ⍝ Otherwise, find the angles that are 1÷2 or 1÷3 of another
                        1 2×⌊/            ⍝ Take the minimum angle of that and attach its double
(          )∘  ⍝ Attach apex angles to two base angles
     2×90-⊢    ⍝ apex=180-2×base
 ⊢,⍨¨          ⍝ Attach each apex to the left of the base

Charcoal, 66 bytes
Ｆ²⊞υＮ⊞υ⁻¹⁸⁰Συ≔Φυ∧‹ι⁴⁵∨№υ⊗ι№υ×³ιθ¿θ≔⟦⌊θ⊗⌊θ⟧θＦ№υ⁹⁰≔Φυ⁻⁹⁰κθＩＥθ⟦⊗⁻⁹⁰ιι

Try it online! Link is to verbose version of code. Explanation:
Ｆ²⊞υＮ

Input the two provided angles.
⊞υ⁻¹⁸⁰Συ

Calculate the third angle.
≔Φυ∧‹ι⁴⁵∨№υ⊗ι№υ×³ιθ

See if any angle under 45° appears doubled or tripled.
¿θ≔⟦⌊θ⊗⌊θ⟧θ

If so then the base angles of the result are that angle and the doubled angle.
Ｆ№υ⁹⁰

Otherwise if this is a right-angled triangle, ...
≔Φυ⁻⁹⁰κθ

... then the base angles of the result are the other two angles.
ＩＥθ⟦⊗⁻⁹⁰ιι

If we got any base angles then compute the apex angles and output all of the angles.

R, 146 132  128 bytes
or 158 150 146 bytes to output the 4 angles as 2 lists of 2 angles each.
function(i,j,t=c(i,j,180-i-j),s=min(t))`if`((45-s/4)%in%t,c(45-s/4,90+s/2,s,90-s/2),c(s,180-2*s,2*s,`if`(90%in%t,90-s,180-4*s)))

Try it online!
An approach that does not use the 'one-half or one-third' trick:
Consider initial triangle with angles a,b,s, where s is the smallest angle (so s is never divided).  a will be the angle that gets divided.
case 1: right-angle triangle (uses both bases of smaller triangles as sides)
=> divide right angle
case 2: starting triangle uses base and base+wall of smaller triangles as sides
=> t1=b,b,d (where d is formed from divided angle: d=a-s)
=> t2=s,s,180-b
=> so (from t2) we get b=2*s and we can specify both t1 and t2 from s
case 3: starting triangle uses only 1 base as side (other is created internally)
=> t1=b,b,180-d (where d is formed from divided angle: d=a-b)
=> t2=s,d,d
=> so (from t2): d=90-s/2, and we can specify both t1 and t2 from s
and (from t1): b=45-s/4 to check when this case is satisfied (but we won't bother to do this...)
Readable code:
cuttri=function(i,j,t=c(i,j,180-i-j)){      # we don't know which angle is a or b
    s=min(t)                                # but we know s is the smallest
    if(90 %in% t){                          # case 1: right-angle triangle
     list(c(90-s,2*s),c(s,180-2*s))}
    else if((2*s) %in% t){                  # case 2:
     list(c(2*s,180-4*s),c(s,180-2*s))}
    else if((45-s/4) %in% t){               # case 3 (but we don't actually need to check if
     list(c(45-s/4,90+s/2),c(s,90-s/2))}    # we're assured that triangle can be divided)
}

Note that because the golfed code skips the final check for case 3, the output will be incorrect if it is 'fed' non-valid angles corresponding to a triangle that can't be divided into two isosceles triangles.