anchor.diff:  
   To prevent such invalid rewrites, this CIP imposes a syntax restriction on RETURN and WITH clauses.
   
  -Given a set of <ProjectionItem>s _L_ = {_p_~1~, _p_~2~, ... _p~N~_}, let GROUPING_KEYS(_L_) be the set of all expressions and _ex_ and aliases _a_ in <ProjectionItem>s _p_ = `_ex_ AS _a_` in _L_ where _AGG_(_p_) is empty.
  -
  -For an expression _ex_ and projection list _L_, let CONSTANT(_ex_) hold
  +Given a list of <ProjectionItem>s _L_ = {_p_~1~, _p_~2~, ... _p~N~_}, let _GROUPING_KEYS_(_L_) be the set of all expressions and _ex_ and aliases _a_ in <ProjectionItem>s _p_ = `_ex_ AS _a_` in _L_ where _AGG_(_p_) is empty.
  +
  +For an expression _ex_ and projection list _L_, let _CONSTANT_(_ex_) hold
   
   * If _ex_ is either
   ** A aggregation function, i.e. of the form `_agg_(_subEx_)`,
  -** A grouping key (either expression or alias), i.e. _o_ ∈ GROUPING_KEYS(_L_),
  +** A grouping key (either expression or alias), i.e. _o_ ∈ _GROUPING_KEYS_(_L_),
   ** A constant,
  -** A parameter
  -* or if _ex_ comprises of sub-expression, it only comprises sub-expression _subEx_ for which CONSTANT(_subEx_) holds.
  +** A parameter,
  +* or if _ex_ comprises of sub-expression, it only comprises sub-expression _subEx_ for which _CONSTANT_(_subEx_) holds.
   
   [IMPORTANT]
   .Syntax restriction
   ====
  -For clauses `WITH _L_` and `RETURN _L_` and every _p_ = `_ex_ AS _a_` in _L_ where _AGG_(_p_) is not empty, CONSTANT(_ex_) shall hold.
  +For clauses `WITH _L_` and `RETURN _L_` and every _p_ = `_ex_ AS _a_` in _L_ where _AGG_(_p_) is not empty, _CONSTANT_(_ex_) shall hold.
   ====
   
   .Effect of the restriction
  
positive.code: 
  is not rewritten to valid query.
  
  .Aggregation *not* covered by the rewrite
  ====
  
  By the grouping and aggregation semantics, the RETURN clause
  
  .[[Q6]]Q6
  
negative.code: For a <ProjectionItem> _p_,
  
  * If _p_ is a grouping key of the form `_ex_ AS _al_`
  ** Let `_PROJ_(_p_)` be `_ex_ AS _al_` and
  ** Let `_AGGR_(_p_)` be `_al_ AS _al_`
  * If _p_ is an aggregate of the form `_agg_(_ex_) AS _al_`
  ** Let `_PROJ_(_p_)` be `_ex_ AS _al_` and
  ** Let `_AGGR_(_p_)` be `_agg_(_al_) AS _al_`
  
  With this, `RETURN _p_~1~, _p_~2~, ... _p~N~_` can be defined as effectively equivalent to
  
  [source, cypher, subs="quotes"]
  ----
  WITH _PROJ_(_p_~1~), _PROJ_(_p_~2~), ..., _PROJ_(_p~N~_)
  RETURN _AGGR_(_p_~1~), _AGGR_(_p_~2~), ..., _AGGR_(_p~N~_)
  ----
  
  Analogously, `WITH _p_~1~, _p_~2~, ... _p~N~_` can be defined as effectively equivalent to
  
  [source, cypher, subs="quotes"]
  ----
  WITH _PROJ_(_p_~1~), _PROJ_(_p_~2~), ..., _PROJ_(_p~N~_)
  WITH _AGGR_(_p_~1~), _AGGR_(_p_~2~), ..., _AGGR_(_p~N~_)
  ----
  
  We call this the _simple rewrite semantics_ for the WITH and RETURN clause.
  