[Question]
  [
## Challenge:
## Input:
Two integer parameters `a` and `b` (where `a<b` and the difference is at least 2)
## Output:
Output or return this text, where `a` and `b` are filled in:
```
(a,b) = ]a,b[ = {a<x<b}   = {a<x&&x<b}   = a+1..b-1
[a,b) = [a,b[ = {a<=x<b}  = {a<=x&&x<b}  = a..b-1
(a,b] = ]a,b] = {a<x<=b}  = {a<x&&x<=b}  = a+1..b
[a,b] = [a,b] = {a<=x<=b} = {a<=x&&x<=b} = a..b
```
## Challenge rules:
* I/O is flexible. Can be printed to STDOUT, returned as a string/character-array, etc. Can be inputted as two integers, decimals, strings (not sure why since you need to calculate the `a+1` and `b-1`, but be my guest..), etc.
* Any amount of leading and/or trailing new-lines are allowed, and any amount of trailing and/or leading spaces for each line is allowed.
* The spaces at the equal signs (including those to align them in the same column) are mandatory, spaces between the other characters are not allowed.
* `a+1` and `b-1` are replaced with the correct values after these calculations.
* You are not allowed to use `≤` instead of `<=`.
* You are not allowed to use `&` instead of `&&`.
* You are allowed to output the numbers with `.0` (as long as it's consistent, and not more than one decimal zero).
* You can assume `a` is at least 2 lower than `b` (in order for `(a,b)` to be correct).
* The lines should be output in the order shown.
## Example:
Input: `a=-5, b=10`  
Output:
```
(-5,10) = ]-5,10[ = {-5<x<10}   = {-5<x&&x<10}   = -4..9
[-5,10) = [-5,10[ = {-5<=x<10}  = {-5<=x&&x<10}  = -5..9
(-5,10] = ]-5,10] = {-5<x<=10}  = {-5<x&&x<=10}  = -4..10
[-5,10] = [-5,10] = {-5<=x<=10} = {-5<=x&&x<=10} = -5..10
```
## General rules:
* This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so shortest answer in bytes wins.  
Don't let code-golf languages discourage you from posting answers with non-codegolfing languages. Try to come up with an as short as possible answer for 'any' programming language.
* [Standard rules apply](https://codegolf.meta.stackexchange.com/questions/2419/default-for-code-golf-program-function-or-snippet/2422#2422) for your answer, so you are allowed to use STDIN/STDOUT, functions/method with the proper parameters and return-type, full programs. Your call.
* [Default Loopholes](https://codegolf.meta.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default) are forbidden.
* If possible, please add a link with a test for your code.
* Also, please add an explanation if necessary.
*PS: For those who had [seen this challenge in the Sandbox](https://codegolf.meta.stackexchange.com/a/16101/52210) when it was still a [kolmogorov-complexity](/questions/tagged/kolmogorov-complexity "show questions tagged 'kolmogorov-complexity'") challenge with `a` and `b` hard-coded, I've changed it to an input challenge to prevent boring hard-coded and encoded answers like we usually see with KC challenges.*
  
[Answer]
# JavaScript (ES6), ~~184~~ ~~182~~ ~~181~~ 180 bytes
Takes input in currying syntax `(a)(b)`. Returns an array of 4 strings.
```
a=>b=>[1,2,3,4].map(k=>'31,23 = 31,23 = {10x72}4{10x&&x72}45..6'.replace(/\d/g,(n,i)=>[(+n?k<3:k&1)?'<':'<=',a,b,'][)([[]('[(i*17^k*718)%9],'   = '.slice(k/2),a+k%2,b-(k<3)][n%7]))
```
[Try it online!](https://tio.run/##hY3BboMwEETv/QousLvBGGySkkSYfIjjSIaQiJgaFKqqUtVvpzRSDzn1MjMajd7c7Iedmns3vid@OLfzRc1WVbWqtGCS5Wxt@Jsd0akK8qXJAxX8@ZfIPgv5vf71KHrEDeevwO/t2NumxfR4Tq8MPeto4WHsD67M9y4SdIAS9lAqYJbVDIwm1NogaOxWoji5VSG2FO4MgyBYnoBPfbcAXSqJ2diFktUJLjAy2oeFIZqbwU9D3/J@uOIFkw2hyIjfhs4jHD1Q/NCX51lGKP8dJZLwCUXzDw "JavaScript (Node.js) – Try It Online")
### How?
For each row **k** with **1 ≤ k ≤ 4**, we start with the following template:
```
"31,23 = 31,23 = {10x72}4{10x&&x72}45..6"
```
and replace each decimal digit **n** at position **i** according to the following table:
```
  n  | Replaced with           | Code
-----+-------------------------+------------------------------------------
 0,7 | comparison operator     | (+n ? k < 3 : k & 1) ? '<' : '<='
  1  | a                       | a
  2  | b                       | b
  3  | interval bound          | '][)([[]('[(i * 17 ^ k * 718) % 9]
  4  | a substring of '   = '  | '   = '.slice(k / 2)
  5  | either 'a' or 'a + 1'   | a + k % 2
  6  | either 'b' or 'b - 1'   | b - (k < 3)
```
[Answer]
# [Python 2](https://docs.python.org/2/), ~~225~~ ~~203~~ 195 bytes
```
a,b=input()
for d in 0,1:
 for m in 0,1:k=`a`+','+`b`;o='{'+`a`+'<'+m*'=';c='x<'+d*'='+`b`+'}'+'  '[m+d:];print' = '.join(['(['[m]+k+')]'[d],']['[m]+k+'[]'[d],o+c,o+'x&&'+c,`a+1-m`+'..'+`b-1+d`])
```
[Try it online!](https://tio.run/##PY1BCoMwEEX3niIrv3ai1EI32pwkBKKGUitJRCxYSs@eJpQWZuC/xzB/eW43704h9HwQk1seW1FmV78ywybHjrxpM5bQ/nAWutcEDtKD7rzAK6ZkLiB7gEA3CuwRTIJ0RHiDwBikJdOqblknt4EJhvruJ1dIxJFW0UwoFaRRHOpv5Nd4GuNiz3PEpHtqKhs/13WqqBoyWpUhVGfeHD8 "Python 2 – Try It Online")
[Answer]
# [m4](https://www.gnu.org/software/m4/manual/m4.html), 194
Seems like a job for a macro processor. Not sure if m4 meets our standards for a programming language. It does have looping ability and arithmetic eval, so I assume its close to the mark.
```
define(l,`$1a,b$2 = $3a,b$4 = {a<$5x<$6b} $8= {a<$5x&&x<$6b} $8= $7')dnl
l(`(',`)',],[,,,incr(a)..decr(b),`  ')
l([,`)',[,[,=,,a..decr(b),` ')
l(`(',],],],,=,incr(a)..b,` ')
l([,],[,],=,=,a..b,)
```
This is my first non-trivial look at m4, so I suspect there are more golfing opportunities I've missed.
Inputs are passed using `-D` macro definitions at the command line. Not sure if anything needs to be added to the score for these, as as far as I can tell this is the only way to meaningfully pass parameters:
```
$ m4 -Da=-5 -Db=10 intnot.m4
(-5,10) = ]-5,10[ = {-5<x<10}   = {-5<x&&x<10}   = -4..9
[-5,10) = [-5,10[ = {-5<=x<10}  = {-5<=x&&x<10}  = -5..9
(-5,10] = ]-5,10] = {-5<x<=10}  = {-5<x&&x<=10}  = -4..10
[-5,10] = [-5,10] = {-5<=x<=10} = {-5<=x&&x<=10} = -5..10 $
```
[Try it online](https://tio.run/##TYzBCsIwEETvfkUOS5PAtlht1UNz8y9CIYmtEGhTUQ@C@OvGbaBS5rCz@2ZnrGLs@qsPvRjQQGnRwY4pBvvZVeTetoH61cDBfRiclj3LVic4ctmFYTMIIzgaybFFjYg@XO7CyqLoejJOomGMS4rpFNIkhWjXPOG5pU0i/i9xC9apviWm5meHMsbvdHv6KTxifrYqr2k4VW5/).
---
Thanks @Dennis for [adding m4 to TIO](https://tio.run/##yzX5DwQA) so quickly!
[Answer]
# [Python 2](https://docs.python.org/2/), 187 bytes
```
t=a,b=input()
for j in 1,0:
 for i in 1,0:print"%%s%d,%d%%s = "%t*2%('[('[i],'])'[j],'[]'[i],']['[j])+"{%d<%sx%%s<%s%d}%s = "%(a,'='[i:],'='[j:],b,' '*(i+j))*2%('','&&x')+`a+i`+'..'+`b-j`
```
[Try it online!](https://tio.run/##NYzRCoMgGIXvewoJ7Nf8ixbsJvJJRLCIMb2wKAeNsWd3Fg0OfHxwzlne4Tn7NsYgBxyl9csrMJ495pU4Yj25YdNl5FD712W1PuSUbnRCOiUSSXIaypYyUClWI2gOyiUqfbk6nIv8Q6eebnta9cfB91qzAUGmaqdPusQRgUDJrHCcn9@AUBQ7cGEGYY2AugZhxsqZGKs73pof "Python 2 – Try It Online")
[Answer]
# [Java (JDK 10)](http://jdk.java.net/), 251 bytes
```
a->b->("(a,b)q]a,b[q{a<x<b}  q{a<x&&x<b}  q"+-~a+".."+~-b+"\n[a,b)q[a,b[q{a<=x<b} q{a<=x&&x<b} qa.."+~-b+"\n(a,b]q]a,b]q{a<x<=b} q{a<x&&x<=b} q"+-~a+"..b\n[a,b]q[a,b]q{a<=x<=b}q{a<=x&&x<=b}qa..b").replace("a",a+"").replace("b",b+"").replace("q"," = ")
```
[Try it online!](https://tio.run/##jZA/b4MwEMX3fIqTh8gW2GqHTgXGSh06ZaQMZ0KQiWP@mahRRL46NYa06dbFvjv/3nvyVXhGXu2PU66x7@EDlYHrBqAZpFY59Batu8612sPJvdGd7ZQp0wywK3vmUYDKmYjBKi0Og8mtqo14W4vo3diiLLrwf9BinyRwgBgm5InkCSUUQ8nazJ1pe8XoK5IjgK@227UhAb9hQIQgwY3LgHya1IvSuyj24FKtqhYf8Dkj8xnZkhGvuKd985MhF/esTe947JFf97lx7pIw0RWNxrygBEno1I8TSUL5d9KSkLifEza9@s3uLr0tTqIerGjcZqw29CCwafSF8he2Vs9PjM34uBmnbw "Java (JDK 10) – Try It Online")
## Credits
* -50 bytes thanks to [Kevin Cruijssen](https://codegolf.stackexchange.com/users/52210/kevin-cruijssen)
[Answer]
## [Perl 5](https://www.perl.org/), 181 bytes
I thought this would have worked out a lot shorter...
```
$_="sd,ds = sd,ds = {dsxsd}s= {dsx&&xsd}s= d..d
"x4;s!s!("()][<<   [)[[<=<  (]]]<<=  [][]<=<= "=~s/[<= ]+/$&$&/gr=~/ +|<=|./g)[$-++]!ge;s/d/$F[$x%2]+{8,1,9,-1,19,-1,28,1}->{$x++}/ge
```
[Try it online!](https://tio.run/##NYnLCoMwFET3/YqrpKIkMVUqtJh02Z8Il1KISKFU8XYh@Pj0pqGPzcycM30z3Cvv2cXE5IQjMPDvydFIbqHvSpIfuDx3m3jc1xRRlMZphlZrALCZtdqElSKi1iYYtBiMgdispMIJyBVLWKLawawK@KzNnKs2s0xyjlHb1KScYmfLxm2JfDqIQhyFLETxyTLwIk8TGzlfVNt4Lysodq@uf966B3nZX98 "Perl 5 – Try It Online")
### Explanation
Originally this was using a `printf` format string, but just having `s` and `d` was shorter when combined with `s///`.
First the format string is built into `$_` and quadruplicated, then all `s`s are replaced with the corresponding bracket, `<`, `<=` or spaces, depending on the replacement index. I hoped to save some more bytes with the duplication of the last 5 chars of each block, but this only ended up saving 2 bytes. The resultant string is split up into elements of spaces, `<=` or single characters.
Finally all `d`s are replaced with the desired number which is adjusted based on the index of the current replacement via a hash key.
[Answer]
# JavaScript, ~~190~~ 189 bytes
```
x=>y=>`(0)7]0[7{1<x<2}  7{1<52}  73..4
[0)7[0[7{18x<26{185261..4
(0]7]0]7{1<x826{1<5=263..2
[0]7[0]7{18x82}7{185=2}71..2`.replace(/\d/g,d=>[[x,y],x,y,x+1,y-1,`x&&x<`,`}  = `,` = `,`<=`][d])
```
[Try it online](https://tio.run/##JY7LCoMwFET3/QpXktD4SFofi8QfSQMRE6VFVLSUSPHb7U26mRk4HJhX@2m3bn0u72SajT17cTrR7KLRKMeVymX1pdxxdkSRX0UYtzS9XyRwGXgNvIQqWEk9QbkCUwWz9oQXgpUgMZBUJQOqAR2@gR0VeEynq13GtrMoe5hsIEY0UjqyKwJB3JWSPaFEuzh2XBMNR0QE/U8utJJG4bObp20ebTrOA@pRUmBEc4zPHw)
[Answer]
# [Stax](https://github.com/tomtheisen/stax), 74 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
```
ÉyU≤₧pΔz▀σ┬`♪•a≤☻Σ╕←k►¬╗Ö)ßâL╫§▐ƒ┼°╚íS3:Y¶7]7♂e╖à╙ô≥;M0h8♦Oún┼ë`←B╠╫║┌♂α▲╚
```
[Run and debug it](https://staxlang.xyz/#p=907955f39e70ff7adfe5c2600d0761f302e4b81b6b10aabb9929e1834cd715de9fc5f8c8a153333a5914375d370b65b785d393f23b4d306838044fa36ec589601b42ccd7bada0be01ec8&i=-5+10&a=1)
This uses stax's string templates heavily. Unpacked, ungolfed, and commented, it looks like this.
```
Y                   save second input in Y register (first is already in X)
.)].([|*            cross product of ")]" and "(["; this produces [")(", ")[", "](", "]["]
{                   begin block to map over interval delimiters
  E"`x,`y"a++       push delimiters separately, then wrap them around the inputs    e.g. "(-5,10)"
  c"(])["|t         copy last value, then replace parentheses with braces           e.g. "]-5,10["
  ih'=              push half the iteration index and "="                           e.g. 0 "="
  |;'=              push iteration parity (alternating 0 and 1) and "="             e.g. 0 "=" 0 "="
  "{`x<`*x<`*`y}"   multiply each equal sign by its occurrence, and template        e.g. "{-5<x<10}"
  c'x.x&:mR         copy last value, then replace "x" with "x&&x"                   e.g. "{-5<x&&x<10}"
  yvih xi|e         calculate final bounds offsets                                  e.g. -5 1 10 -1
  "`+..`+"          add inputs to offsets, and embed in template                    e.g. "-4..9"
  5l                combine last 5 values into array
m                   map [")(", ")[", "](", "]["] using block
:<                  left-align grid colums to add extra spaces
m" = "*             for each row, join with " = " and output
```
[Run this one](https://staxlang.xyz/#c=Y++++++++++++++++%09save+second+input+in+Y+register+%28first+is+already+in+X%29%0A.%29].%28[%7C*+++++++++%09cross+product+of+%22%29]%22+and+%22%28[%22%3B+this+produces+[%22%29%28%22,+%22%29[%22,+%22]%28%22,+%22][%22]%0A%7B++++++++++++++++%09begin+block+to+map+over+interval+delimiters%0A++E%22%60x,%60y%22a%2B%2B++++%09push+delimiters+separately,+then+wrap+them+around+the+inputs%09e.g.+%22%28-5,10%29%22%0A++c%22%28]%29[%22%7Ct++++++%09copy+last+value,+then+replace+parentheses+with+braces+++++++%09e.g.+%22]-5,10[%22%0A++ih%27%3D+++++++++++%09push+half+the+iteration+index+and+%22%3D%22+++++++++++++++++++++++%09e.g.+0+%22%3D%22%0A++%7C%3B%27%3D+++++++++++%09push+iteration+parity+%28alternating+0+and+1%29+and+%22%3D%22+++++++++%09e.g.+0+%22%3D%22+0+%22%3D%22%0A++%22%7B%60x%3C%60*x%3C%60*%60y%7D%22%09multiply+each+equal+sign+by+its+occurrence,+and+template++++%09e.g.+%22%7B-5%3Cx%3C10%7D%22%0A++c%27x.x%26%3AmR++++++%09copy+last+value,+then+replace+%22x%22+with+%22x%26%26x%22+++++++++++++++%09e.g.+%22%7B-5%3Cx%26%26x%3C10%7D%22%0A++yvih+xi%7Ce++++++%09calculate+final+bounds+offsets++++++++++++++++++++++++++++++%09e.g.+-5+1+10+-1%0A++%22%60%2B..%60%2B%22+++++++%09add+inputs+to+offsets,+and+embed+in+template++++++++++++++++%09e.g.+%22-4..9%22%0A++5l+++++++++++++%09combine+last+5+values+into+array%0Am++++++++++++++++%09map+[%22%29%28%22,+%22%29[%22,+%22]%28%22,+%22][%22]+using+block%0A%3A%3C+++++++++++++++%09left-align+grid+colums+to+add+extra+spaces%0Am%22+%3D+%22*++++++++++%09for+each+row,+join+with+%22+%3D+%22+and+output&i=-5+10&a=1)
[Answer]
# [Python 2](https://docs.python.org/2/), ~~277~~ ~~199~~ ~~193~~ 189 bytes
```
a,b=input()
for i in 4,3,2,1:x,y=i%2,i>2;e='=';p=`a`+','+`b`;print'(['[x]+p+'])'[y],e,']['[x]+p+']['[y],e,2*('{%d<%s<%s%d} %s= '%(a,e*x+'%sx',e[y:],b,i/2*' '))%('','x&&')+`a+1-x`+'..'+`b-y`
```
[Try it online!](https://tio.run/##Rc2xCsIwGEXh3afIEm/S/FUbdbHGFwmBtFgxSxtshQTx2WsFQTjTWb6Yp/vQ63luqDWhj89JyNVteLDAQs8OtCdN1SlRNoFrChdddwYGdTS@8QoE5Vtfx0foJwgLm5yKCk7CZkcdwf2f/T1dCLz49czHJX59Mz4aBi4a6oqkwMcE6mw@OWopbHUBBim5wIKl9RpS@UZVZVr0zebLl9nPc3mkavcB "Python 2 – Try It Online")
[Answer]
# Excel, 399 bytes
```
="("&A1&","&B1&") = ]"&A1&","&B1&"[ = {"&A1&"<x<"&B1&"}   = {"&A1&"<x&&x<"&B1&"}   = "&A1+1&".."&B1-1&"
 ["&A1&","&B1&") = ["&A1&","&B1&"[ = {"&A1&"<=x<"&B1&"}  = {"&A1&"<=x&&x<"&B1&"}  = "&A1&".."&B1-1&"
 ("&A1&","&B1&"] = ]"&A1&","&B1&"] = {"&A1&"<x<="&B1&"}  = {"&A1&"<x&&x<="&B1&"}  = "&A1+1&".."&B1&"
 ["&A1&","&B1&"] = ["&A1&","&B1&"] = {"&A1&"<=x<="&B1&"} = {"&A1&"<=x&&x<="&B1&"} = "&A1&".."&B1
```
Nothing particularly interesting here.
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 224 237 bytes
```
f(a,b,c,m,n,o){for(c=0;++c<5;printf("%c%d,%d%c = %c%d,%d%c = {%d<%sx<%s%d}%*s= {%d<%sx&&x<%s%d}%*s= %d..%d\n","[("[m],a,b,"])"[n],"[]"[m],a,b,"]["[n],a,"="+m,"="+n,b,o,"",a,"="+m,"="+n,b,o,"",a+m,b-n)){m=c%2;n=c<3;o=3-c/2;}}
```
[Try it online!](https://tio.run/##ddCxboMwEAbgPU9xcuUIw0ETokzGeRHqAc4lsRTsCmhUCfHsrsnQ0qGDrf//brDOlF@Jwot1dP8071CNk7G@uF12f@hu22ihSxpskbBHh17MnR8SUgeZZVSd5cdg3dQljBM3yA0nULDNMzcVH7/i4Wbh6fgj@/0WuSkKbt4cQ1YnrO41rm8yLVjtdDS9sfppDTLFsv55u@geGfsHI7S5E2LuFfFSOkXVSXp1yum1lMsS4gbQN9Yla2iGKyHQrRkgTWN5CJh3AGDjN8TRpRQQ0@TtWh/1UQuE31pqIeRuCSE/h@PhGw "C (gcc) – Try It Online")
Moving the "<[=]" into the format string allowed me to remove the array altogether. Also, moving `printf()` into the `for` loop saved a semicolon.
**Original answer**
```
f(a,b,c,m,n,o){char*e[]={"<=","<"};for(c=0;++c<5;){m=c%2;n=c<3;o=3-c/2;printf("%c%d,%d%c = %c%d,%d%c = {%d%sx%s%d}%*s= {%d%sx&&x%s%d}%*s= %d..%d\n","[("[m],a,b,"])"[n],"[]"[m],a,b,"]["[n],a,e[m],e[n],b,o,"",a,e[m],e[n],b,o,"",a+m,b-n);}}
```
[Try it online!](https://tio.run/##bZBNboMwEEb3nMJy5QjDQBOirIxzEdcLGENiKdgV0KgS4uyuqVSVSl3N@94s5geLG2J4sQ4fH6Yj9TQb68v7NfmjHraNLvRpAy0gDODA8wXvzZh1SsuF1pICrekqej@mKI8iz7G@CL4MElklnMT6LLw8F/haiffRurlPKUNmgBmGRJI9L7FOn2xiZmXZ9JMPh51ipiyZeXNxqkqpGjRsm1HNqXI6Or1z6ts10G2q27gFD5T@q/IB2sJxsa4hLkmGxrp0g2a8IZDtYpJlMTw5WRJCiI0/ia1rxUmk2dstPtVJcyC/sdKci2QNobiE0/EL "C (gcc) – Try It Online")
There's nothing particularly noteworthy here: I used the usual tricks for shaving the size of the function (hoisting `int` autos into the function header, using K&R style, indexing into string constants.) Storing the {"<=","<"} into an array proved more size-efficient than inserting a format specifier for this challenge as it was used more than once.
[Answer]
# Javascript, ~~273~~ ~~258~~ 232 bytes
Thanks Kevin Cruijssen for saving me 15 bytes !
```
e=>f=>'(j)h]j[h{a<x<b}  h{a<x&&x<b}  hc..d\n[j)h[j[h{a<=x<b} h{a<=x&&x<b} ha..d\n(j]h]j]h{a<x<=b} h{a<x&&x<=b} hc..b\n[j]h[j]h{a<=x<=b}h{a<=x&&x<=b}ha..b'.replace(/a|b|c|d|h|j/g,m=>{return{a:e,b:f,c:e+1,d:f-1,h:" = ",j:e+","+f}[m]})
```
[Try it online](https://tio.run/##TY1BDoMgAAS/wkkhRa2HXoj4EcsBEEwbBaO2aaK@3aKi7Wl3k53Mk795L7tHO0TGlmrRdFE01zQPIccCAQqYy8LlyLNPJmYAfA@Cc8o4Lu@m8EDxA@h@8f0gKOAbsBqYN7DDQE9g@/vpDGI3MG9gp2G9/Bn26QwijDvV1lwqmPBJTHIqkwo3NB87Nbw6M3KisCAaS6IuKS6JjtK5aNiMFmlNb2sV17aCGkY3BNMrQssX)
Thanks for TFeld for giving me that idea, saving around 60 bytes from my original answer.
**Ungolfed :**
```
e => f => '(j)h]j[h{a<x<b}  h{a<x&&x<b}  hc..d'
 + '\n[j)h[j[h{a<=x<b} h{a<=x&&x<b} ha..d'
 + '\n(j]h]j]h{a<x<=b} h{a<x&&x<=b} hc..b'
 + '\n[j]h[j]h{a<=x<=b}h{a<=x&&x<=b}ha..b'
.replace(/a|b|c|d|h|j/g, m=>{
        return {a:e,b:f,c:e+1,d:f-1,h:" = ",j:e+","+f}[m]
    }
)
```
---
# Javascript (original answer), 340 bytes
```
(a,b)=>alert(`(${a},${b}) = ]${a},${b}[ = {${a}<x<${b}}   = {${a}<x&&x<${b}}   = ${a+1}..${b-1}\n[${a},${b}) = [${a},${b}[ = {${a}<=x<${b}}  = {${a}<=x&&x<${b}}  = ${a}..${b-1}\n(${a},${b}] = ]${a},${b}] = {${a}<x<=${b}}  = {${a}<x&&x<=${b}}  = ${a+1}..${b}\n[${a},${b}] = [${a},${b}] = {${a}<=x<=${b}} = {${a}<=x&&x<=${b}} = ${a}..${b}\n`)
```
[Answer]
# [Retina](https://github.com/m-ender/retina/wiki/The-Language), 216 bytes
```
.+
$&()][<<  ¶$&[)[[<=< ¶$&(]]]<<= ¶$&[][]<=<=
((.*),(.*))(.)(.)(.)(.)(<=?)(<=?)( *)
$4$1$5 = $6$1$7 = {$2$8x$9$3}$10 = {$2$8x&&x$9$3}$10 = $2_$8..$3_$9
_<=
\d+_
$&*___
T`<`_` _+<|\.-_+<
___<
_
__<
-1
_(_*)
$.1
-0
0
```
[Try it online!](https://tio.run/##TY5NCsIwEIX3c4oshpD0JyTVagsTvIS7NEwFXbhxIS4E9VoewIvFVEUKw/ce3@bN@XA5nnYuJVMCSqVjIBLi9UQZdAjk6dNVjJHIf30MMXsPSplCVxO0MrMjv/lBFBpwiQ5b4QWuclnncsMGuyv2uHigs38h5dxhw9gZgwvGHjivwbAvOb9YMDNsRxp5FFzSfTB1Dsg2AybWDljxNG0c1BZsSm3l7Bs "Retina – Try It Online") Explanation:
```
.+
$&()][<<  ¶$&[)[[<=< ¶$&(]]]<<= ¶$&[][]<=<=
((.*),(.*))(.)(.)(.)(.)(<=?)(<=?)( *)
$4$1$5 = $6$1$7 = {$2$8x$9$3}$10 = {$2$8x&&x$9$3}$10 = $2_$8..$3_$9
```
Build up the main bulk of the result.
```
_<=
```
If the variable is involved in a loose inequality, then the value is inclusive, so we can delete the placeholder.
```
\d+_
$&*___
```
Convert the value to unary and add 2.
```
T`<`_` _+<|\.-_+<
```
Remove the placeholder for a strict lower inequality or a negative strict upper inequality. It's still had 2 added, but 1 will be subtracted later, giving the desired result.
```
___<
_
```
Subtract 2 from the other non-zero strict inequalities, restoring the original value, from which 1 will be subtracted later.
```
__<
-1
```
Change a strict upper inequality of `0` to `-1`.
```
_(_*)
$.1
```
Subtract 1 from the remaining strict inequalities and convert to decimal.
```
-0
0
```
Fix up another edge case.
[Answer]
# Python 3, 180 bytes:
```
lambda a,b:[eval('f"'+"{%r[j]}{a},{b}{%r[i]} = "*2%('([',')]','][','[]')+"{{{a}<{'='[:j]}x%s<{'='[:i]}{b}}}{'  '[i+j:]} = "*2%('','&&x')+'{a+j}..{b-i}"')for i in(1,0)for j in(1,0)]
```
## explanation
Basically builds an f-string that is evaluated in a list comprehension. Old-style `%` string interpolation is used to delay evaluating the expressions until the f-string is evaluated.
```
lambda a,b:[
    eval(
      'f"' +                                                            # f-string prefix
      "{%r[j]}{a},{b}{%r[i]} = "*2%('([',')]','][','[]') +              # first two terms
      "{{{a}<{'='[:j]}x%s<{'='[:i]}{b}}}{'  '[i+j:]} = "*2%('','&&x') + # second two terms
      '{a+j}..{b-i}"'                                                   # last term
      )
    for i in(1,0)for j in(1,0)
    ]
```
The first part of the string, 'f"', will become the prefix for the f-string.
The second part of the string builds the format string for the first two interval expressions. `%r` is used to save from needing to put quotes in the format, i.e., `"{%r[j]}"` is the same as `"{'%s'[j]}"`. When the f-string is evaluated, the correct bracket is selected.
The third part of the string builds the next two interval expressions.
The last part formats the "a..b" part of the f-string.
The assembled f-string looks like: `f"{'(['[j]}{a},{b}{')]'[i]} = .... = {a+j}..{b-i}"`
When the f-string is evaluated, all the expressions in braces `{}` are are replaced by their value. So,
`{a}` gets replaced by the value of `a`, and `{'(['[j]}` gets replaced by `(` if j is 0 or `[` if j is 1.
[Answer]
# [SOGL V0.12](https://github.com/dzaima/SOGLOnline), 110 [bytes](https://github.com/dzaima/SOGL/blob/master/chartable.md)
```
<ŗŗ}”⁴
"{ŗ<ŗx³
W}↔b ,e++Κ+²
4∫2\f»¹Aa{Ƨ[(²a{Ƨ[]²ba{ =*}eο+++:³⁴;³&&x⁴a_beh+H⁶;!+ƨ.+Κο++++}⁰№Iā;0E{┼ē4=‽"δY↑æ‘┼
```
[Try it Here!](https://dzaima.github.io/SOGLOnline/?code=JTNDJXUwMTU3JXUwMTU3JTdEJXUyMDFEJXUyMDc0JTBBJTIyJTdCJXUwMTU3JTNDJXUwMTU3eCVCMyUwQVclN0QldTIxOTRiJTIwJTJDZSsrJXUwMzlBKyVCMiUwQTQldTIyMkIyJTVDZiVCQiVCOUFhJTdCJXUwMUE3JTVCJTI4JUIyYSU3QiV1MDFBNyU1QiU1RCVCMmJhJTdCJTIwJTNEKiU3RGUldTAzQkYrKyslM0ElQjMldTIwNzQlM0IlQjMlMjYlMjZ4JXUyMDc0YV9iZWgrSCV1MjA3NiUzQiUyMSsldTAxQTguKyV1MDM5QSV1MDNCRisrKyslN0QldTIwNzAldTIxMTZJJXUwMTAxJTNCMEUlN0IldTI1M0MldTAxMTM0JTNEJXUyMDNEJTIyJXUwM0I0WSV1MjE5MSVFNiV1MjAxOCV1MjUzQw__,inputs=LTUlMEExMA__,v=0.12)
[Answer]
# Python 3, 248 bytes
```
def f(a,b):
 l=[['(',')','[','<',1],['[',']',']','<=',0]]
 r=[0,1]
 for i in r:
  for j in r:
   print(('%s%d,%d%s='*2+'{%d%sx%s%d}={%d%sx&&x%s%d}=%d..%d')%((l[j][0],a,b,l[i][1],l[1-j][2],a,b,l[i][2])+(a,l[j][3],l[i][3],b)*2+(a+l[j][4],b-l[i][4])))
```
[Try it online!](https://tio.run/##TY89DsIwDIX3niJLcEzdqj@wIHISy0NRqCiq2qowgBBnLyYgxPDk9z5bjjPdr6dxqJclHFvTuoYOuEtM75nBAQGqWLUHKoU4evlq74EKkcTMngttJ6YdZ9OZbjCz7ojp/Etmmrvh6hzYiw1kg714WFcpPN729oZP//Gr1TfakOc2AFrnej4LF0J6H/XcCes1PZeZ0uqPVoKp/iFO1/JhWg@oL7kmjXyjOYudjSDi0rpsS2WByws)
]