[Question]
  [
A "simple circular" word is a word whose chords do not intersect. The chords of a word may be seen by laying out the alphabet in a circle, and then connecting the word's consecutive letters. 
## Examples of Simple Circular Words
**ROLE**
[![ROLE](https://i.stack.imgur.com/v0Flm.png)](https://i.stack.imgur.com/v0Flm.png)
**LAKE**
[![LAKE](https://i.stack.imgur.com/DDGCh.png)](https://i.stack.imgur.com/DDGCh.png)
**BALMY**
[![BALMY](https://i.stack.imgur.com/XbBqr.png)](https://i.stack.imgur.com/XbBqr.png)
## Failing Example
A word fails to be simple circular if any of its chords intersect:
[![BONES](https://i.stack.imgur.com/fFdeL.png)](https://i.stack.imgur.com/fFdeL.png)
## The Challenge
Write a program or function that takes a word and returns true if it's simple circular, false otherwise.
* Code golf, fewest bytes wins.
* Standard rules.
* You may assume there are *no repeated letters* in the word.
* You may assume every word has at least 2 letters
* You may assume the word is all uppercase, or all lowercase, whichever you prefer.
* You may output any two consistent values for true and false.
## Test Cases
### True
ROLE, LAKE, BALMY, AEBDC, ABZCYDXE, AZL, ZA
### False
BONES, ACDB, ALBZ, EGDF
  
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 46 bytes
```
{!/[(.).*]**4<?{[+^] $0 Xeq[...] ~<<$0[^2]}>/}
```
[Try it online!](https://tio.run/##DcxNC4IwAAbgv/IGEmUwJaJLy9jXqZVQF3VM6DAhMEqrwxD768vrc3herm@34eExb7APwywxC7IksY3jDT0MZlVbRCkK1xlCiMWP0ig19dqOWTKG7nt3n9bjffMgU9A8e9BLrhU0Oypwpk8lmOJSgPFKlLKYMD@rK5iQHEzzKtuFPw "Perl 6 – Try It Online")
A regex solution that finds if there are four characters in the string such that the two later characters are in different sections of the circle, as defined by the first two characters.
### Explanation
```
{                                           }   # Anonymous code block returning
 !/                                        /    # If the input does not match
   [(.).*]**4                                     # Any 4 characters
             <?{                          }       # Where
                           [...]                    # The range from
                                 ~<<$0[^2]          # The first character to the second
                        Xeq                         # Contains which of  
                     $0                             # The four characters
                [+^]                                # Reduce the list of booleans by xor
                 # Effectively, if only one of the 3rd or 4th character is in that range
```
[Answer]
# [K (ngn/k)](https://bitbucket.org/ngn/k), ~~26~~ 24 bytes
```
{&/|/x=&\'x:-:\|26!x-*x}
```
[Try it online!](https://tio.run/##y9bNS8/7/z/NqlpNv0a/wlYtRr3CStcqpsbITLFCV6ui9n@JVbVKdGVdkVWaQoV1Qn62tUZCWmJmjnWFdaV1kWZsLVdJtFKQv4@rkrVhLIjt4@gNZzs5@vhGwjiOrk4uznCOU5RzpEsEQqW/n2uwkrUBRNLZxQnO9nGKArH/AwA "K (ngn/k) – Try It Online")
`*x` first letter of the argument `x`
`x-` subtract it from each of `x` as ascii code
`26!` mod 26
`|` reverse
`-:\` make a pair of the list and its negation
`x:` assign to `x`
`&\'` cumulative minima and maxima (max is min under negation)
`|/x=` boolean mask for where `x[i]` is the current minimum or maximum
`&/` all (and-reduce)
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~14~~ 13 bytes
*Fixed a bug thanks to NickKennedy*
```
Ç.sεć-ć/ï_Ë}P
```
[Try it online!](https://tio.run/##yy9OTMpM/V9TVmmvpGBrp6BkX/n/cLte8bmtR9p1j7TrH14ff7i7NuC/zv8gfx9XLh9Hb1cuJ0cf30guR1cnF2cuR6co50iXCFcuxygfrihHIN/fzzWYC0I6Ors4cTn6OEVxubq7uAEA "05AB1E – Try It Online")
```
Ç               # convert each letter to its codepoint
 .s             # suffixes of this list
   ε       }    # for each suffix:
    ć-          #  subtract first from others: [b-a, c-a, d-a, ...]
      ć/        #  divide others by first: [(c-a)/(b-a), (d-a)/(b-a), ...]
        ï       #  round down
         _      #  compare with 0
          Ë     #  all equal?
            P   # after the loop, product (1 iff the list is all 1s)
```
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 91 bytes
Returns \$false\$ for simple circular, or \$true\$ for non-simple circular.
```
s=>Buffer(s).some((o,i,a,j=i)=>a.some(_=>((g=i=>x=(a[i]-o%26)%26)(j)-g(i+1))*(x-g(++j))>0))
```
[Try it online!](https://tio.run/##hc49C8IwEAbg3V/hIrmzraiDWwJN28mqoItai4SalpTaSKPiv69fi2LA4eB43uPlSnEVJmvU6ezV@iDbnLaGMn7Jc9mAwYHRRwmgXeUKt6QKKRNv21MGUFBF2Y2CSFTq6d54gs@BEr0ClDNC7MPtsTpOiciGiG2ma6MrOah0ASRZqeOpkt1MNdmlEk1KsPN5kANZLuKI4A/H/tTG3I9nG4v7EQ8Dm/NtsAnXr6qvjOzqZK5rz/x9kC/m0cpWHYTcxjHfPri9Aw "JavaScript (Node.js) – Try It Online")
### Commented
```
s =>                            // s = input string
  Buffer(s)                     // turn s into a Buffer
  .some((o, i, a,               // for each ASCII code o at position i in a[]
                  j = i) =>     // and starting with j = i:
    a.some(_ =>                 //   for each entry in a[]:
      (                         //
        ( g = i =>              //     g is a helper function taking a position i
            x = (a[i] - o % 26) //       return (a[i] - (o mod 26)) mod 26
                % 26            //       and assign the result to x
                                //       NB: if a[i] is undefined, this gives NaN
                                //           and forces the forthcoming test to fail
        )(j) -                  //     compute the difference between g(j)
        g(i + 1)                //     and g(i + 1)
      ) * (                     //     multiply it by the difference
        x - g(++j)              //     between g(i + 1) and g(j + 1) (and increment j)
      ) > 0                     //     if it's positive, the chords are intersecting
                                //     inside the circle (i.e. s is not simple circular)
    )                           //   end of inner some()
  )                             // end of outer some()
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~21~~ 20 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
Ask¬-₂%.sD€ß¥s€à¥+ĀP
```
Port of [*@ngn*'s K (ngn/k) answer](https://codegolf.stackexchange.com/a/198554/52210), so make sure to upvote them!!
Input as a lowercase list of characters.
[Try it online](https://tio.run/##yy9OTMpM/f/fsTj70BrdR01NqnrFLo@a1hyef2hpMYhecGip9pGGgP//o5WSlHSUEoE4B4hzgbhSKRYA) or [verify all test cases](https://tio.run/##yy9OTMpM/V9WGexir6TwqG2SgpL9f8fi7ENrdB81NanqFbs8alpzeP6hpcUgesGhpdpHGgL@6/yPVirKz0lV0lHKScwGUUmJObmVQDoxNSklGUQnVSVXplQApRSUkvLzUotBYskpSSAqJ6lKKRYA).
**Explanation:**
```
A          # Push the lowercase alphabet: "abcdefghijklmnopqrstuvwxyz"
 sk        # Get the (0-based) index of each characters of the input-list in this alphabet
           #  i.e. ["b","a","l","m","y"] → [1,0,11,12,24]
¬          # Push the first index (without popping)
 -         # And subtract it from each index
           #  i.e. [1,0,11,12,24] - 1 → [0,-1,10,11,23]
  ₂%       # Then take modulo-26 to make the negative values positive
           #  i.e [0,-1,10,11,23] → [0,25,10,11,23]
.s         # Take the suffices of this list
           #  i.e. [0,25,10,11,23] → [[23],[11,23],[10,11,23],[25,10,11,23],[0,25,10,11,23]]
  D        # Duplicate it
   €ß      # Take the minimum of each suffix
           #  i.e. [[23],[11,23],[10,11,23],[25,10,11,23],[0,25,10,11,23]]
           #   → [23,11,10,10,0]
     ¥     # And take the deltas (forward differences) of those
           #  i.e. [23,11,10,10,0] → [-12,-1,0,-10]
  s        # Swap to get the suffices again
   €à      # Take the maximum of each suffix this time
           #  i.e. [[23],[11,23],[10,11,23],[25,10,11,23],[0,25,10,11,23]]
           #   → [23,23,23,25,25]
     ¥     # And take the deltas (forward differences) of those as well
           #  i.e. [23,23,23,25,25] → [0,0,2,0]
      +    # Add the values at the same indices in the two lists together
           #  i.e. [-12,-1,0,-10] + [0,0,2,0] → [-12,1,2,-10]
       Ā   # Python-style truthify each (0→0; everything else → 1)
           #  i.e. [-12,1,2,-10] → [1,1,1,1]
        P  # And take the product of that to check if all are truthy
           #  i.e. [1,1,1,1] → 1
           # (after which this is output implicitly as result)
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 29 bytes
```
⬤θ⬤…θκ⬤…θμ⬤…θξ⁼⁼‹ιν‹νλ⁼‹ιπ‹πλ
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z@gKDOvRMMxJ0ejUEcBRPnm56SA2NmaqPxcNH4FkO9aWJqYU6wBpXxSi4s1MnUU8oAyYHaejkKOJkIZTL4AJl8AlgcD6///nRx9fCP/65blAAA "Charcoal – Try It Online") Takes input in consistent case and outputs a Charcoal boolean (`-` for true, nothing for false). This has a rare use of the `p` variable. Explanation:
```
 θ                              Input string
⬤                               All characters satisfy
    θ                           Input string
   …                            Truncated to
     κ                          Current index
  ⬤                             All characters satisfy
        θ                       Input string
       …                        Truncated to
         μ                      Current index
      ⬤                         All characters satisfy
            θ                   Input string
           …                    Truncated to
             ξ                  Current index
          ⬤                     All characters satisfy
                 ι              Fourth character
                ‹               Is less than
                  ν             Second character
               ⁼                Equals
                    ν           Second character
                   ‹            Is less than
                     λ          Third character
              ⁼                 Equals
                        ι       Fourth character
                       ‹        Is less than
                         π      First character
                      ⁼         Equals
                           π    First character
                          ‹     Is less than
                            λ   Third character
```
For each subsequence of four characters in the input word, the first two comparisons check whether the second character is between the third and fourth while the other comparisons check whether the first character is between the third and fourth. If the results of these comparisons is different then it means that the chord between the first two characters crosses the chord between the third and fourth characters and the whole expression therefore evaluates to false.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 12 bytes
```
O_Ṫ$:Ṫ$¬EƲƤẠ
```
[Try it online!](https://tio.run/##y0rNyan8/98//uHOVSpWIOLQGtdjm44tebhrwX/rRw1zFHTtFB41zLU@3P5w5z4Vroe7txxuf9S0JvK//8Mdi@L9VY3MQg@tjtE5tDvmWJdnMEhXkL@PK5ePo7crl5Ojj28kl6Ork4szl6NTlHOkSwRQ0N/PNZjL0dnFicvRxykKAA "Jelly – Try It Online")
A Jelly translation of [Grimy’s 05AB1E answer](https://codegolf.stackexchange.com/a/198564/42248); be sure to upvote that one too! A monadic link taking a Jelly string as its argument and returning a Jelly boolean.
## Explanation
```
O            | Convert to Unicode codepoints
         ƲƤ  | Following applied to each prefix:
 _Ṫ$         | - Subtract tail (after popping tail)
    :Ṫ$      | - Integer divide by tail (after popping tail)
       ¬     | - Not
        E    | - All equal
           Ạ | All
```
[Answer]
# [J](http://jsoftware.com/), ~~40~~ ~~36~~ 33 bytes
```
10(e.,)[:(/:~@,#.@e.])"1/~2]\3&u:
```
[Try it online!](https://tio.run/##Vcy9DoIwGEbhnat4g4mFpBYqW40JX39wsEqCi1SJg4EYFydXbr2yOpzxOe@YCjZhr8DAUUItbQRM55soy2wUPL@prFBzzVeiHsWQp7KYt8O9Wn9VzJNkfL4@mHbiIZdD13oHT0cHTf7Ug5y2BqSD6e3VgYJHIPZvdHt2F5CxGuR1gDvYhsUf "J – Try It Online")
Decided to play my own game.
Still golfing...
But the idea is just to try all possible combinations of pairs of points, and check if their lines intersect, which, if the segements are AB and CD, happens when the letters' numerical values are arranged like:
```
      _____
     /     \
A...C...B...D
\______/
```
[Answer]
# Haskell, ~~135~~ 99 bytes
*Thanks @JoKing for saving 36 bytes!*
Almost certain its not the optimal way to go, so please feel free to improve it.
```
x(a:b:c:d:_)|s<- \z->min a b>z||z>max a b=s c/=s d;x _=1<0;y s=or$map(x.concat)$mapM(\a->[[a],[]])s
```
## Explanation
However, I loved doing some propositional calculus. First, `x` tests if a given sequence of four letters form a non-circular word. Let \$I\$ be the interval defined by \$a\$ and \$b\$, so \$a,b,c\$ and \$d\$ form a circular word only if:
$$
p\equiv(c\in I)\iff q\equiv(d\in I)\\
(p\Rightarrow q)\wedge(q\Rightarrow p)\\
(\neg p\lor q)\wedge(\neg q\lor p)\\
\left[(\neg p\lor q)\wedge \neg q\right]\lor\left[(\neg p\lor q)\wedge p\right]\\
\left[(\neg p\wedge\neg q)\lor(q\wedge\neg q)\right]\lor\left[(\neg p\wedge p)\lor(q\wedge p)\right]\\
(\neg p\wedge\neg q)\lor(q\wedge p)\\
\neg(p\lor q)\lor(q\wedge p)
$$
Negating this proposition gives us
$$
(p\lor q)\wedge\neg(q\wedge p)
$$
which is equivalent to \$p\veebar q\$, in haskell `p/=q`. Finally, `y` tests if any subsequence with length 4 from the original word is non-circular.
Here's a spaned version:
```
import Data.List
-- x
cuts (a:b:c:d:rest)
 | s <- \z-> min a b > z || z > max a b
 = s c /= s d
x _ = False
-- y
isNonCircular word = or $ map (cuts . concat) $ mapM (\a -> [[a],[]]) word
```
```
[Answer]
# [Ruby](https://www.ruby-lang.org/) `-nl`, 70 bytes
An adaptation of the Perl answer, but Perl is apparently black magic with... whatever they're doing that lets them tersely get any 4 characters.
```
p$_.chars.combination(4).all?{|*m,c,d|(c=~r=/[#{m.sort*?-}]/)==(d=~r)}
```
[Try it online!](https://tio.run/##Fc09DsIwDEDh3deAIa3adGGNehCEkO1EoiKJq6RI9I@jE8r6vuGlF82ljOe75gemrFkCDRGnQaK6VBq979etDg03dlNsPsl019MadJY01X2737rKGGUPqPZSkNhCEu/A49MBoQ8zoCPLgLTwbN9HlOgyRLEuJ0C2BOhp@cr4f@bSRv8D "Ruby – Try It Online")
[Answer]
# [C (clang)](http://clang.llvm.org/), ~~119~~ 114 bytes
```
c,n,b,j,o;g(char*w){for(int l[92]={j=o=c=0};n=*w;c=l[*w++])for(b=l[n],o|=b|c-j++&&c+~b&&b-c;n;)l[n--]++;return!o;}
```
[Try it online!](https://tio.run/##RY7LToNAFIb3PMWIKRmYwRh3Ok4Tbt1I20S7sK0sYLhnnDFcQkyLr46QWtz9X853/nOYyXgosmFgWOAIl1iSDLI8rIxOP6WygoVoAD8@PgT0VFJJGb3viaBGRxjlR6NDKNAnLRpJBFieaXRmZomQpjH0E2laZDIiiD5OTTNAiFRJ01biRpJ@uC0E422cgOe6iQt5ly@VdL6tgK9qvJ0CqC5qQJdgEX8IFXc4g52uE6VXps8@w0JAHUx229RQBbuqbfK05eBJHSWQQvV163vX7Fsvc7Ytf72/guXZrjMCuJB9cPbu@0X9K16FvE7493@vvd14b/O@49pz9u3DnN31ajdBP/wC "C (clang) – Try It Online")
```
We use an array representing the circle points ( we start from \0 instad of 'A' because it doesn't care)
We increment by 1 each point from current letter to 0.
The next point is valid if
 next == curr or
 next == curr - 1 or 
 next == 0 and curr == j( iteration / left value )
LAKE
ABCDEFGHIJKLMN.. j   curr  next
00000000000000.. 0   0     L 0
11111111111*00.. 1   1     A 1
*1111111111100.. 2   2     K 2
3222222222*100.. 3   2     E 2
4333*222222100.. 
```
Thanks to @ceilingcat for saving 5
]