cs3110 / textbook

The CS 3110 Textbook, "OCaml Programming: Correct + Efficient + Beautiful"
Other
740 stars 134 forks source link

Issue on page /chapters/interp/substitution.html #95

Closed Luv2C0d3 closed 2 years ago

Luv2C0d3 commented 2 years ago

This rules seem to be missing something, specifically a mention to e':

e -->* e

e -->* e''
  if e --> e' and e' -->* e''

The first step is basically saying that e "steps to itself in 0 or more steps". In fact as you shown previously it steps in 0 steps to itself, but the intent here seems to be to reinforce the role of e' being a single step, so possibly the rules are:

e --> e'

e -->* e''
  if e --> e' and e' -->* e''

Although, that would render the first one somewhat redundant.

clarksmr commented 2 years ago

Actually this is correct and as intended.

The first part, which is the one at issue here, is: e -->* e.

That simply says that -->* is reflexive.

By analogy, if we were defining an equivalent relation ==, we'd write x == x.