It seems to me that conjecture should yield True for any possible string str, where
In[]:=
conjecture@str_:=Module[{q=SyntaxLength@str},If[q>0,SyntaxQ@StringTake[str,q],True]]
For example,
In[]:=
conjecture@"]"
Out[]=
True
But it turns out there is a counterexample consisting of only 3 characters :
In[]:=
counterexample=FromCharacterCode@{34,125,93}
Out[]=
"}]
In[]:=
conjecture@counterexample
Out[]=
False
In[]:=
conjecture/@FromCharacterCode/@Tuples[{34,125,93},4]//Tally
Out[]=
{{True,69},{False,12}}
Getting rid of 34 produces expected results :
In[]:=
conjecture/@FromCharacterCode/@Tuples[{91,125,93},15]//Tally
Out[]=
{{True,14348907}}
What is going on?