[Question]
  [
You are given four integers: \$e,s,b\in\{0,1\}\$ and \$S\in \{0,1,2,4\}\$, where \$e,s,b,S\$ stand for egg, sausage, bacon and spam respectively.
Your task is to figure out whether the corresponding ingredients match a valid entry in the following menu:
```
 [e]gg | [s]ausage | [b]acon | [S]pam
-------+-----------+---------+--------
   1   |     0     |    1    |   0
   1   |     1     |    1    |   0
   1   |     0     |    0    |   1
   1   |     0     |    1    |   1
   1   |     1     |    1    |   1
   0   |     1     |    1    |   2
   1   |     0     |    1    |   4
   1   |     0     |    0    |   4
   1   |     1     |    0    |   2
```
This is a subset of the menu described in the famous [Monty Python's sketch](https://www.businessinsider.com/email-term-spam-junk-mail-actually-stems-monty-python-sketch-2017-1), where dishes based on other ingredients are omitted.
## Rules
* You can take \$(e,s,b,S)\$ in any order and any convenient format as long as they are clearly separated into 4 distinct values as described above (e.g. claiming that your code takes a single bitmask with all values packed in there is not allowed).
*Examples:* `[1,0,1,4]`, `"1014"`, or 4 distinct arguments
* Each value is guaranteed to be valid (i.e. you don't have to support \$e=2\$ or \$S=3\$).
* You may return (or print) either:
	+ a truthy value for *matching* and a falsy value for *not-matching*
	+ a falsy value for *matching* and a truthy value for *not-matching*
	+ 2 distinct, consistent values of your choice (please specify them in your answer)
* This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'")
## Test cases (all of them)
Format: `[e, s, b, S] --> matching`
```
[ 0, 0, 0, 0 ] --> false
[ 0, 0, 0, 1 ] --> false
[ 0, 0, 0, 2 ] --> false
[ 0, 0, 0, 4 ] --> false
[ 0, 0, 1, 0 ] --> false
[ 0, 0, 1, 1 ] --> false
[ 0, 0, 1, 2 ] --> false
[ 0, 0, 1, 4 ] --> false
[ 0, 1, 0, 0 ] --> false
[ 0, 1, 0, 1 ] --> false
[ 0, 1, 0, 2 ] --> false
[ 0, 1, 0, 4 ] --> false
[ 0, 1, 1, 0 ] --> false
[ 0, 1, 1, 1 ] --> false
[ 0, 1, 1, 2 ] --> true
[ 0, 1, 1, 4 ] --> false
[ 1, 0, 0, 0 ] --> false
[ 1, 0, 0, 1 ] --> true
[ 1, 0, 0, 2 ] --> false
[ 1, 0, 0, 4 ] --> true
[ 1, 0, 1, 0 ] --> true
[ 1, 0, 1, 1 ] --> true
[ 1, 0, 1, 2 ] --> false
[ 1, 0, 1, 4 ] --> true
[ 1, 1, 0, 0 ] --> false
[ 1, 1, 0, 1 ] --> false
[ 1, 1, 0, 2 ] --> true
[ 1, 1, 0, 4 ] --> false
[ 1, 1, 1, 0 ] --> true
[ 1, 1, 1, 1 ] --> true
[ 1, 1, 1, 2 ] --> false
[ 1, 1, 1, 4 ] --> false
```
*Spam spam spam spam. Lovely spam! Wonderful spam!*
  
[Answer]
# [Python](https://docs.python.org/3/), 32 bytes
```
"001111020114001410120110".count
```
[Try it online!](https://tio.run/##dZDNbsMgEITvfopVTqCiikl8quRrXyC9pTk4FUksIccC3KpP767z09Y2i5B2GZbh03Tf6XxpN8Oxeh9W1oKXXXMpuS9hMfZ29fxx6ds0fJ0b7wgvBXlDqQ4nl6gi91l71bRdn5TWBSlnojmYreYrXxBfcBNTUFE/jeVwK@5WtvwiuMgjx9GDT11o2qSuWnX/RA@7HVnz2LQ39Fr76PbFfx2Cvhb0MqdD8IfgD8EfOX8I/BD4IfBD4IfAD4Eff/xvoZ/JM3sI8WMS/68NhPQxSX82/oBfysjLWXNkzCGgZ5PHJPmlTZkbz7Ejzw6BfZH7Dw "Python 3 – Try It Online")
Takes input in `'sbeS'` order as a single string, like `'1102'`. Simply checks whether the string appears as a substring of the hardcoded string, using the object method to avoid needing to write out a costly `lambda` to define a function.
The desired strings are squished together as much as possible via overlapping. For example, the part `"001111020114` checks for `0011`, `0111`, `1111`, `1110`, and `1102`. The fact that `2` and `4` can only appear as the counts of spam, which is listed last, lets us append strings directly to their right without false positives. I played with the order of the inputs to try to overlap more, but there might be a better outcome.
I suspect this approach can be beaten with a modulo chain or similar using number inputs.
[Answer]
# [Python 3](https://docs.python.org/3/), 31 bytes
```
oct(0x20a00924204c00c048).count
```
[Try it online!](https://tio.run/##dZBBTsMwEEX3OcUsbWEh/@AFIGXLBcqudJFGLo1kJZHtQHv64FIKJPFIkSb5Hr88/eEcj333MB2qt6lvotCnUtdaP5Wm1KbRutHmUd43/djF6fPYOkt4LsgpirV/t5Eqsh@1E203jFFIWZCwKqi92sh05ApKB@klRC@CvLuM/XXY69ikG96GtHK4MNLX4Nsuiu@s@vmJnLZb0ur20E7RS@2C3RX/czB5yeQml4Phg@GD4SPHB@MPxh@MPxh/MP5g/PHn/@rHRbzAg6kfs/p/MWDax6z9xfpNfh0jH2fhyMDBqGebx6z5Ncbk1nPuyLuDcV/1/gU "Python 3 – Try It Online")
Based on [@xnor](https://codegolf.stackexchange.com/users/20260/xnor)'s [answer](https://codegolf.stackexchange.com/a/199678/88089)
[Answer]
# [Python 2](https://docs.python.org/2/), ~~29 28~~ 25 bytes
-3 bytes thanks to [dingledooper](https://codegolf.stackexchange.com/users/88546)! (Suffixing a string as the `hash` input)
```
lambda s:hash(s+'?pB{')%3
```
An unnamed function accepting a string of digit characters, `egg+bacon+spam+sausage` (e.g. `'0040'`) which yields a falsey value (`0`) if on the menu or a truthy value (`1` or `2`) if not.
**[Try it online!](https://tio.run/##bZJNbsMgEIX3OcVsKkChFeOwihRFyhW6zQa3/olUYys4iyrp2V0rBoXXBlug8bwPP5gZvse298VU747Tl@vKT0dh27rQyrAW@@FwFeplMw3nkx9JVBSopHe60f7oX@NYx1Ws6v5MVdNoCoPr5tldgmsqTaX76D2dPEnJmsz9ZaUpRvyIYhqiLJeU89cCOAtKC7ssShM588gZ8GKSFwNRyjFwDBwD989nxhXAoTMLSgtK@1fJcIPZabMzMDhj8MLghZ/cZ8al/6ntiuaxNMNSaChxKry4CU21FNef5RFvc2d0bpR3BqRxA6WmXw "Python 2 – Try It Online")**
This was found by [dingledooper](https://codegolf.stackexchange.com/users/88546) using [this code](https://gist.github.com/Lydxn/5cc75ab94c18056427823b9d4b67dc02 "Git Hub") ([Try it online](http://clang.llvm.org/), limited to printables, which finds the above).
---
**28 byter...**
```
lambda*i:hash(i)/442%89%22%5
```
An unnamed function accepting four integers, `sausage, bacon, spam, egg` which yields a falsey value (`0`) if on the menu or a truthy value (`1`, `2`, `3`, or `4`) if not.
**[Try it online!](https://tio.run/##bZLNCsIwEITvPsVeSluNmA0RVBAfwquXVPsHmharB8F3r8UmmFFDaNnOfM0km/Zxqxqr@mJ76M/mkp3MtN5UpquSOl1oraLVOlIqWvbttbY3inPqKKM9PWl3sHM3Zu4dT4rmSnlZCupacxme5t6ZMheUmWNjqbaUJCxIvienglzFn8rJUAWadw5fFXAanBr@Mjql4@RHk5BF@iwSKq8xcAwcA/eTM@AUcJhMg1ODU387GU4w2G2wB4ZkDFkYsvCf8ww4v166mdAwxsswNhpa7BsfP2NBRfJfHLi0fwE "Python 2 – Try It Online")**
---
**Another 28:**
```
lambda*i:hash(i)/8883%55%8-2
```
[Try it here!](https://tio.run/##bVLLCsIwELz7FXuRtppitkYogvgRXr2k2hdoWmw9CP57LTbBjLqEhM3MJJPdtI@@akwyFLvjcNHX7KwX9bbSXRXW0SpN0/V8s5mncTK0t9r0FOTUUUYHetL@aGIbS7sGs6K5UV6WgrpWX8dZ3ztd5oIyfWoM1YbCkAXJ9@BIkM34k1kYMg9zzHE3AZ0CpoJTJqa0OvnBJHiRzouEzGEMOgYdg@7Hp6dLQIfOFDAVMNU3k6GC3mu9NzA4Y/DC4IX/1NPTufui7YzGmD7D1GhosWt88AwEFaH3FRw80aPhBQ "Python 2 – Try It Online") (accepts `egg, spam, bacon, sausage`)
---
**29 byters...**
```
lambda*i:hash(i)/676%86%9%6-2
```
[Try it here!](https://tio.run/##dVLLCsIwELz7FXspbTVitoT6APEjvHpJtS/QtFg9CP57rbbBjI8lLGx2Jpl91LdLUZmozda79qhPyUGPy1WhmyIow1k8j71F7C29eBq19bk0F/JTaiihLd1pszPTwSZP54@y6kxpngtqan3qvL42Ok8FJXpfGSoNBQELkq/DoaAh4nc0pCFychbZ3UbAU4BU8EqPlANPvnMStEirRUJkcww8Bh4D70unw4uAh8oUIBUg1SeSoYNOtU4NDMoYtDBo4R/9dHj2v3A1os76TegHDSO2g/fvvqAs@LsKYfsA "Python 2 – Try It Online") (accepts `egg, spam, sausage, bacon`)
Or one which returns `True` if on the menu or `False` otherwise:
```
lambda*i:hash(i)/64%31%14%8<2
```
[Try it here!](https://tio.run/##bZJNDsIgEIX3nmI2TVvFyFRijNF4CLduqPYvUdpYXZh499q0EHkqIZBh3gcPhuZ5L2uTdPnu2F30NT3rabUpdVtGVbxYqWDJAatgvU265laZO4UZtZTSgV60P5q5bTM7h5O8vlFWFILaRl/7UT9aXWSCUn2qDVWGoogFyaFzLMhG/IlsGiIv55T9agKcAqWCXUaltJz85CR4kc6LhMjlGDgGjoH78elxCXDoTIFSgVJ9Kxle0LutdwcGZwxeGLzwn/f0OHdevJlQ38bPMBYaSuwKH75CQXn09QsGYNDF3Rs "Python 2 – Try It Online") (accepts `spam, sausage, egg, bacon`)
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 11 bytes
```
•ʒº-ép•bsCè
```
[Try it online!](https://tio.run/##LY2xDcIwEEV7pohcx1K@45oUROwRSxRUIHkBZmAEKlghZdIxBos490xO8pP97935lqd0vZQ@nMfBNd4fGzeU3@P1fS6zXz93u6Z8Wt@lLZ3VQSCACOyITGQik2XCE57whCc8oRgssu4OnkyACILw/uAPFO2oS2tDeHTZbLUB "05AB1E – Try It Online")
Inputs as a string `"Sesb"`. Outputs 0 for matching and 1 for non-matching.
```
•ʒº-ép•      # compressed integer 269454360636
       b     # convert to binary: 11111010111100101110110100000000111100
        sC   # convert the input from binary: 8S + 4e + 2s + b
             # (this doesn't error out on digits > 1)
          è  # use this value to index in the above bitstring
```
[Answer]
# x86-16 machine code, 30 bytes
```
D0 E3       SHL  BL, 1              ; e << 1 
0A FB       OR   BH, BL             ; BH = e << 1 | s 
D0 E7       SHL  BH, 1              ; es << 1 
0A C7       OR   AL, BH             ; AL = e << 2 | s << 1 | b 
D0 E0 03    SHL  AL, 3              ; AL =<< 3 (80186+ only)
0A C4       OR   AL, AH             ; AL = spam table value 
B1 09       MOV  CL, 9              ; search 9 entries 
BF 013B     MOV  DI, OFFSET SPAM    ; in SPAM table 
F2/ AE      REPNZ SCASB             ; search table - ZF if found, NZ if not 
C3          RET                     ; return to caller
SPAM        DB   28H, 38H, 21H, 29H, 39H, 1AH, 2CH, 24H, 32H    ; SPAM table
```
Input as `BL = e`, `BH = s`, `AL = b`, `AH = S`. Output `ZF` if valid entry, `NZ` if not valid
Encodes the input values into a 6-bit binary value (`00esbSSS`), and compares against the table of known valid results.
Here's output from a little test program for PC DOS that takes input from command line:
[![enter image description here](https://i.stack.imgur.com/yVkGN.png)](https://i.stack.imgur.com/yVkGN.png)
Note: Due to the use of `SHL AL, imm8`, this won't work on an 8088-based PC/XT. It would be +1 byte to do `MOV CL, 3 / SHL AL, CL`.
[Answer]
# [PHP](https://php.net/), ~~61~~ ~~59~~ ~~56~~ ~~34~~ ~~32~~ ~~30~~ 27 bytes
```
<?=74958>>33-$argn%95%34&1;
```
[Try it online!](https://tio.run/##FcwxDsIwEAXRnnMQukgMdgQRIXTcgwpoEgs4P8uOJW/xNXrt2SKm6@VYx@E0z6X02/v7sXTj0JW64xyxz7fJj@fgqXlwww03csMOO@ywww477MgOPfTQQw899NBDDz300EMPPfTQy1N/a/u@1uUT/e0P "PHP – Try It Online")
Each input (ordered esbS) is read as a decimal value and the modulus buckets them into a smaller range (i.e. a hashing function), which are then looked up in the "bit table" of the constant.
The hashing function has clashing values, but these all coincide when values are either truthy or falsy.
[Answer]
# [GolfScript](http://www.golfscript.com/golfscript/), 24 bytes 21 bytes
This refinement of the solution is thanks to Grimmy, who took my formatting and used stronger stack manipulation to save a bunch of whitespace and variable assignment.
The following is the code (for the first time, newlines are necessary).
```
'\;*
>>
@^*
;>'n/\=~
```
Grimmy's solution at the bottom takes in a string of a list of arrays and applies the following operation to all of them, even though it's not strictly necessary. Golfscript can take input as a header, which is where my TIO references. Grimmy's is much cleaner to see all the outputs.
Input is a stack-dump of four elements: e, s, b, S
For the following explanation, I'm going to use N as a "newline" indicator so you can understand how this works in my formatting.
```
'\;*N>>N@^*NN;>'n/\=~ #Do as instructed
'              '      #String notation
'\;*N          '      #[Index 0] Pop s, then multiply e and b
'    >>N       '      #[Index 1] A trickier operation, will explain at bottom.
'       @^*N   '      #[Index 2] s*(e xor b)
'           N  '      #[Index 3] Can never be called.
'            ;>'      #[Index 4] Ensure e=1, s=0.
'              'n/    #Split the string on newlines (stack is e s b S "x/y/z")
                  \   #Swap the top two elements of the stack (e s b "x/y/z" S)
                   =  #Find the (top element)th element of (second element)
                    ~ #Then evaluate it.
```
So, why do these operations work?
```
m=0
 [e]gg | [s]ausage | [b]acon | spa[m]
-------+-----------+---------+--------
   1   |     0     |    1    |   0
   1   |     1     |    1    |   0
As long as e=1 and b=1, s can be anything. So if m=0, our output can be e*b
We do this in the program with {\;*} 
This removes s from the array, then multiplies e and b together. If they're both 1, yay! If not, then we get a 0.
m=1
 [e]gg | [s]ausage | [b]acon | spa[m]
-------+-----------+---------+--------
   1   |     0     |    0    |   1
   1   |     0     |    1    |   1
   1   |     1     |    1    |   1
3/4 binary options. As long as we have e=1, and we DON'T have s=1, b=0, then we're good.
e*NOT(s*NOT(b))
or
e*(NOT(s) + b)
So, why does {>>} work?
It starts by checking that s>b. This should NEVER be true. So we have 0.
Then we check if e>0, which is true if e=1 and the above worked. If the above *didn't* work, then e>1 will never be true.
m=2
 [e]gg | [s]ausage | [b]acon | spa[m]
-------+-----------+---------+--------
   0   |     1     |    1    |   2
   1   |     1     |    0    |   2
As long as s=1, then we have an xor situation!
s*(e xor b)
{@^*} pulls the e to the top of the stack, then xors it with b.
Then the * multiplies that result with s.
m=4
 [e]gg | [s]ausage | [b]acon | spa[m]
-------+-----------+---------+--------
   1   |     0     |    0    |   4
   1   |     0     |    1    |   4
As long as e=1 and s=0, we don't care about b.
e*NOT(s)
We just do this with {;>}, which removes b from the equations, and makes sure e>s, which can only be the case is e is 1 and s is 0.
```
There we go! With brainpower combined, feast your eyes upon this beautiful creation!
[Try the 21-byter online!](https://tio.run/##S8/PSStOLsosKPlvqACCBv/VY6y1uOzsuBzitLi4rO3U8/RjbOv@/wcA "GolfScript – Try It Online")  
[Try the old 24-byter online!](https://tio.run/##S8/PSStOLsosKPlvqGAAhCb/o6tjrLVqq@3saqsd4rRqDaqt7WpjY2zr/v8HAA "GolfScript – Try It Online")  
[Try all examples online on the old solution (26 bytes)! (Courtesy Grimmy)](https://tio.run/##Tc6xCsIwGMTx3acIGTvYnGQrDb5HUxdBEURF3ULy6hFC@FeyHOT43Xd93i@f8/v2@lYbH3ZMe2vmYGyspSwpTkNOIeR0PA3ZpSnkNc6lNfNYF2faW3c9iXQg@Z5ET/RET70nPOEJT3jCE566Iq4St4g1sSE2hNw0ev@eR3Ek8btdsK155M1zJK0/ "GolfScript – Try It Online")
[Answer]
# Python, ~~[49](https://tio.run/##dZPRaoNAEEXf/YphX9S4CRljpQ3YnwiUQtIHJUotRmV381DEb7ezNoFEdkBU7uzM3cNl@l/z3bW7qYIMTlOTX4pzDgdZSi2LfVG3QZy@JS/JLt2muzQ8xtHr6hAlqzKKVzoqviZTaqOpVwhxhK28P/AF6/U7VHmjS@@hgFwh5gqJs4CcB3IeyHmg0wM5DuQ4kONAjgM5DuQ48InDqOuTvrRALg5cxnGbhFwauEzjqeEBYqkjo7sN0GWAHII7CVwmsZyUOBucDMgwIMfgyIEWY6P7pjaBOLUi9Lz60nfKwI/uWq/qFNgNgrqdv3rvAf33Erqroa2y2r17HkkDAEoJWkIh4UBH7JxN0@VnHVCjLf@3zm/aS3trQaoirQpumx3eBJVlYmurvapbE1QiGPwPH@rKtmeZgpIIwP/0xxAGGj8C3WFQ43yXgc6Mlmj6Aw)~~ 44 bytes
```
lambda S,e,s,b:269454360636>>8*S+4*e+2*s+b&1
```
You can [verify all test cases](https://tio.run/##dZPRaoNAEEXf/YphH6rRTcgYkTaQ/ESgFJo@KFFqMSq7m4cifrudtQlE2QFRmdk7dw@X6X7Nd9vsxhIOcB7r7JpfMjjJQmqZ7@NtiukO35Itpsfja3iKkrCI4lBH@QuOptBGk0wI8Qlb@XjgC9brI5RZrQvvqYFcI@YaibOBnAdyHsh5oNMDOQ7kOJDjQI4DOQ7kOHDGYdRtVl9aIBcHLuO4T0IuDVymMRM8QSzryNTdBugyQA7BnQQuk1hOSpwCJwMyDMgxOHKgxdjorq5MIM6NWHlede1aZeBHt41XtgrsBkHVTF@994D@OwntzdBW2dpDPY2kAQCFBC0hl3CiI3bOpm6ziw5IaNv/0ulNe2lvLaiqqFYG96W2xzpVNSYoRdD77z5UpVUcDgoKujT4H/6wgp4mDkC2vRom@57ODBZi/AM). Outputs 0 for a valid recipe and 1 otherwise.
Hats off to @Arnauld for shaving me 5 bytes :)
Borrows [Grimmy's](https://codegolf.stackexchange.com/a/199644/75323) approach so be sure to upvote that one as well!
[Answer]
# [Python 3](https://docs.python.org/3/), ~~52~~ \$\cdots\$ ~~48~~ 44 bytes
```
lambda e,s,b,S:206163194016>>8*S+e*4+s*2+b&1
```
[Try it online!](https://tio.run/##dZFNa4QwEIbv/oqph@JHtvi6Iq0Qj/0D25v1oLuRClZFU2kRf7vdQpdFyUAOyUxmXh6e/kd/dO1xreT72hSf5aUgJUZRilMSBjHiI16iAHGaPnsnX3mRP3qhXz5iHeT8NnypxC5GW9Br0YzXe9tpur4Xq@oG0kJR3VJmZRkF4nYo//@di00DXCPkGpGxAS4DXAa4DBgzwHGA4wDHAY4DHAc4Dtw5/rTs6vsIcDqw0XHfBM4GNjb2AzcIQx1M3RwAUwA4BLMJbEwYNkXGASMDGAZwDAYPeWLRJCvH065F/VC32qnsualH7Wh3ocMhpXlaaB4yZ3qQgSulyhdS3706a3V5st31Fw "Python 3 – Try It Online")
Ouputs Truthy for true and Falsy otherwise.
[Answer]
# [C (clang)](http://clang.llvm.org/), 49 bytes
```
f(e,s,b,S){return 206163194016>>8*S+e*4+s*2+b&1;}
```
[Try it online!](https://tio.run/##hZPLSsNAGEb3PsVQqOQKOeMQWgp5iS7VRS@JFHSQtK5Knz0qFK04Px8kizAcJofDt6t3r5v4Mk1D1lfHalut8/PYnz7G6HzT0j6wDA1t1y2KddkXoTwWvtzes7pMh3hyb5tDzHJ3vnsfvz6HbPbYVO76uGdX13Xn5nuXzff5U5xVbsh@z/Pvd5UgESQm6QXpTTIIMqRJhCemJ8IT0xPhiemJ8CTtieiJ2RPRE7MnoidmT0RPzJ6Inpg9ET0xeyJ68tOTJBkE@c8TsU/MfSL2ye0@SZJekN68MwgypO9EeF57pkkEiUl6QRqeCE/SnoiemD0RPY19IvbJ7T7TfxsEGdJ3IjyNnoiemD0RPTF7Inr@3edl@gQ "C (clang) – Try It Online")
Ouputs `1` for true and `O` otherwise.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jellylanguage), ~~[13](https://tio.run/##Vc@xDcJAEAXR3FVQgAMGUQGUcXJIgtwA2YHIaMBIJNAERmRQyV0jSwJYI22ywdfobTd9v4uo@bIuj@t7KOOh7u81n1dNGY81D@V5et0iIqV5O/te1zYJfQt9S33/HdqhHdox7VAP9VAP9VAP9VCPqYd8yId8yId8yId8yId8yId8yId8yId8v6/7AA)~~ 11 [bytes](https://github.com/DennisMitchell/jellylanguage/wiki/Code-page)
```
“BƑṗ©N’Bị@Ḅ
```
You can [try all the test cases](https://tio.run/##Vc@xCcJQGEXh3ikyQASP2AVEMoC9hJQ2kgXsgggprKxE0AEEBzAIFgbcI1nkaaGGA6/5eVwO32pZFOsQuvKUvvZtfXhe5l15TNv7btbetqGtH8nnLxpOo648J001aKpuc12EkGWjOPq@PB5k6Brrmuj679AO7dCOfod6qId6qId6qId69D3kQz7kQz7kQz7kQz7kQz7kQz7kQz7k@135Gw)!
Thank you, @Nick, for saving me 2 bytes. I'm currently tied with the [shortest 05AB1E answer](https://codegolf.stackexchange.com/a/199644/75323) :)
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 17 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
"~ "øUn5 d
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=IoKbfoOcIIaBmCL4VW41IGQ&input=IjExMTIi)
```
"~ "øUn5 d     Program taking U, the string in "esbS" form
"~ "           String with values 130,155,126,131,156,32,134,129,152
              ø          Does it contain
               Un5       The input converted from Base-5 string to a number
                   d     And converted to a char?
```
[Answer]
# APL+WIN, 23 bytes
```
×+/'é¢~â£ ≠ü⌹'=⎕av[5⊥⎕]
```
Index origin = 0
Prompts for a vector 4 integers and returns 1 for true zero for false.
Explanation:
Converts input vector from base 5 to an integer used to index into APL+WIN's atomic character vector (extended ASCII) and checks if it is in the menu which has similarly been converted to characters.
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~51 41~~ 36 bytes
```
->*x{"J36:;>'-."[""<<x.join.oct%77]}
```
[Try it online!](https://tio.run/##KypNqvyfZvtf106rolrJy9jMytpOXVdPKVpJycamQi8rPzNPLz@5RNXcPLb2f7SBjmGsXkFRfkppcokGmKcDJbUM9PRMYjX1chMLqmsqagoUoit00qK1KmKB2gA "Ruby – Try It Online")
Returns `nil` (falsy) or a string (truthy).
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 18 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
•ÿŸ»¢•bŽ9“«S4äøJIå
```
Input as a concatenated string of \$e||s||b||S\$. If this is not allowed, a single byte has to be added for an explicit `J`oin.
Pretty straight-forward approach, so will golf it down from here.
[Try it online](https://tio.run/##AS8A0P9vc2FiaWX//@KAosO/xbjCu8Ki4oCiYsW9OeKAnMKrUzTDpMO4SknDpf//MTEwMg) or [verify all test cases](https://tio.run/##Jc2hCsJQHEbxVxk3L3hkxWS3GsXgwGAyCMLakg9gNg1NvsBARNhlL7IXuW47t/wvfBx@58uhPB3TtVqHbLjds7BOQ93EX992n64Zv2X/XQ31o3tvi/iM7aaKr5SnXViML@TTwbP0FPPBDTfcmDfssMMOO@yww465Qw899NBDDz300EMPPfTQQw899Ji8/R8).
**Explanation:**
```
•ÿŸ»¢•              # Push compressed integer 4221990791
      b             # Convert it to binary: 11111011101001100111011110000111
       Ž9“          # Push compressed integer 2442
          «         # Merge them together: 111110111010011001110111100001112442
           S        # Convert it to a list of digits
            4ä      # Split it into 4 equal-sized parts
              ø     # Zip/transpose; swapping rows and columns, to create quartets
               J    # Join those together
                Iå  # And check if the input-string is in this list
                    # (after which the result is output implicitly)
```
[See this 05AB1E tip of mine (section *How to compress large integers?*)](https://codegolf.stackexchange.com/a/166851/52210) to understand why `•ÿŸ»¢•` is `4221990791` and `Ž9“` is `2442`.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 15 bytes
```
№%')-/36AE§γ↨θ² 
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z@gKDOvRMM5vxRIKqmqa@rqG5s5uirpKDiWeOalpFZopOsoOCUWp2oU6igYaQKB9f//0dEmOgoGYGQYG/tftywHAA "Charcoal – Try It Online") Link is to verbose version of code. Takes input ingredients as a list in reverse order and outputs a Charcoal boolean i.e. `-` for matching and nothing for non-matching. Explanation:
```
             θ  Input list
            ↨ ² Convert from "base 2"
          §γ    Index into printable ASCII
№%')-/36AE      Is the result contained in the given literal?
                Implicitly print.
```
One of my rare answers that don't use any characters with unusual widths meaning that the explanation lines up nicely for once.
[Answer]
# [cQuents](https://github.com/stestoltz/cQuents), 38 bytes
```
?112,1001,Z+3,Z+6,Z+1,Z+3,1102,Z+8,Z+1
```
[Try it online!](https://tio.run/##Sy4sTc0rKf7/397Q0EjH0MDAUCdK2xiIzYAYwjY0NDACMixAAv//A5UBAA "cQuents – Try It Online")
Builds a list of all of the possible inputs (in integer form) and returns True if they are in the list.
[Answer]
# Excel, 67 bytes
```
=CHOOSE(D1+1,A1*C1,AND(A1,B1<=C1),AND(B1,A1+C1=1),,AND(A1,NOT(B1)))
```
Follows similar logic to that used by @Mathgeek
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 9 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
“ṚE⁾’,3ḥỊ
```
A monadic Link accepting a list of integers, `[egg, sausage, bacon, spam]`, which yields a truthy value (`1`) if on the menu or a falsey value (`0`) if not.
**[Try it online!](https://tio.run/##y0rNyan8//9Rw5yHO2e5Pmrc96hhpo7xwx1LH@7u@v//f7ShjoIBGJnEAgA "Jelly – Try It Online")** Or see the [test-suite](https://tio.run/##bZAxCgIxFESvkgOk@BNzBfEQS0qbZS8gWMRtBG@gaGnnARTFRjxI/kXiLrp8BiwSePyZTP60y65b1ar5WG6HuW6emvd@Vq7nct/V9@O11f7SDkfzab2otWngnXg33sm7kUAk37ERjGAkEwVSRnolmk9@SplmQgQiVkYjkA/kA/lgPlAeKI9/BsoD5f3bnbflBrmXQE0IEYgidR2IYkof "Jelly – Try It Online").
There may well be an 8 or 7 out there using a similar method, it's just a mater of finding them!
### How?
```
“ṚE⁾’,3ḥỊ - Link: list of integers
“ṚE⁾’     - base 250 number = 11455143
      3   - three
     ,    - pair = [11455143, 3]
       ḥ  - Jelly's hash: use 11455143 as a salt and [1,2,3] as a domain
        Ị - insignificant? (effectively "equals one?")
```
---
**[Another 9](https://tio.run/##bZAxCgIxFESvkgOk@BP@HTzEktJm2QsIFsFG2MZa0Eaw034RK0XvkVwk7qLLZ8AigcefyeRPu@y6Va0lHfLQ59vufX2cStr7kIdzfd2f27K5tOMp6bhe1No08E68m@7o3UQgku/YCEYwkpkCKZVeUfPJTynzTIhAxEo1AvlAPpAP5gPlgfL4Z6A8UN6/3XlbbpB7CdSEEIFIqetApDF@AA "Jelly – Try It Online")** which takes `[egg, sausage, bacon, spam]` and yields `2` when on-menu or `1` when not:
```
“Ḋẏƭ¢’,2ḥ
```
[Answer]
# [JavaScript (V8)](https://v8.dev/), 35 34 30 bytes
```
(e,s,b,S)=>s<S?5/S-s&e+b*s:e&b
```
[Try it online!](https://tio.run/##dZPRS4NgFMXf/SvuxhizfbPdWBAzi6AGQW8@RjC16zBMh/dzBeLfbm6u@Nq84Nu55xx/HL6PYBdwVCRbPdvdNLHXTEixCpVve3d8699fX/ozHtM0vOAljcMmJQ1xkKQMHsxdKy6zSCd5BppYt1ZgBaECXwF9bynS9G5DZQFEecYaCuIy1a0zNk5tt9WTGCaDwVEfeN6JvaucTvenh6w8JSfNN5P1qHp1HCcoNuUnZZrfalg9PL88PcJXwDCqusR6fSipgVKmLtAMMQO6Q6u2DkAwV78fqPYnWnt7cCKhLF3J0kKQUO5CuQvlLhS6UOZCmQtlLpS5UOZCmQv/uHRR9ijnVSjPheZc//JQXgvNtXpMR6h@BUVFKsL@IpSRpKXQXKo/byGYBCYUmVBmOt/JfHfD1f5VL4eqe9622/wA "JavaScript (V8) – Try It Online")
I wrote a random expression generator and left it running for a few hours to generate the expression following the `=>`. In this answer I am only posting unedited outputs from the generator.
[Answer]
**RUST, 98 Bytes**
```
fn f(e:u8,s:u8,b:u8,x:u8)->bool{match x|s<<3|e<<4|b<<5{17|20|26|42|48|49|52|56|57=>true,_=>false}}
```
[Try it here](https://tio.run/##bVDvS@QwEP3s/hWjH84Waulku@rFtofiDwRBOI77IiJtTbly2VaaFJWmf/uamQVZxJa8mXl5ecnMMBq7GY0CY5@lbHspJ5@1XQQXY/Nblc/z2abpoAmUHE8jQ1ARvHkIj4qq7/W0Lm39D96cybKlU1mWuirLVhOeOJE4cexS4dJTl/50K@FWx251khd2GFX0lBdNqY2aZ7piXbZdEMK02NPKglHWQA78liCMdV//p9B2yvi4Ll8Cp52Ox@518Hn4SdH5PXbQ/riOS/NUvVs6dEYbgX5IHuEIqsPkMAL9gLuF2C2Wu0X6CPs5V6F3mcO47rVWtZUy@6vqLPADgd1FYwmLgi9t@oG6gbaDH9wVvbBt/Eh9FScRbca4DWIbliHkOWfptp@Xoe2s7vaDg5v7PzDJX/MBK7mp2S/lx/hVen1@e3d1Kb@Rz4t5k9C38AsZBWNKiMwj88g8Eo@sR9Yj65H1yHpkPaJAQs8j@yMZEQrOU8r9T8g8Mo/Esz@yv0fBDPkg65H1yHry/wA)
]