Meta-Theory: Clarify transitive coherence #173
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I tried to prove the “weak transitive coherence” that we claim in Coq:
where [= allows more null on the left than on the right. I believed this
holds, but the proof doesn't go through.
A counter example is
bool <: opt bool <: opt opt bool
.Coercing
true
in two steps goes viaopt true
toopt opt true
.Coercing directly goes to
null
, because the “constituent-to-opt” rulet <: opt t'
requires thatt'
is a non-opt type.We added that restriction in 30f719f for the reasons discussed
in #135 (comment)
This PR just updates the prose to not claim wrong things.
(This is a good humbling reminder about how easy it is to go wrong when
one does not do formal proofs.)