More: fixes the syntax of substitution in a wrong translation of case× (#532)
* More: fixes the syntax of substitution in a wrong translation of case× * More: fixes the names of projection functions in an intentionally wrong translation
This commit is contained in:
parent
753029e3ad
commit
a9ecf866c2
1 changed files with 4 additions and 4 deletions
|
@ -271,14 +271,14 @@ One might think that we could instead use a more compact translation:
|
|||
-- WRONG
|
||||
(case× L [⟨ x , y ⟩⇒ N ]) †
|
||||
=
|
||||
(N †) [ x := proj₁ (L †) ][ y := proj₂ (L †) ]
|
||||
(N †) [ x := `proj₁ (L †) ] [ y := `proj₂ (L †) ]
|
||||
|
||||
But this behaves differently. The first term always reduces `L`
|
||||
before `N`, and it computes `proj₁` and `proj₂` exactly once. The
|
||||
before `N`, and it computes ```proj₁`` and ```proj₂`` exactly once. The
|
||||
second term does not reduce `L` to a value before reducing `N`, and
|
||||
depending on how many times and where `x` and `y` appear in `N`, it
|
||||
may reduce `L` many times or not at all, and it may compute `proj₁`
|
||||
and `proj₂` many times or not at all.
|
||||
may reduce `L` many times or not at all, and it may compute ```proj₁``
|
||||
and ```proj₂`` many times or not at all.
|
||||
|
||||
We can also translate back the other way:
|
||||
|
||||
|
|
Loading…
Reference in a new issue