Open
Conversation
Member
Contributor
Author
|
Thank you for the quick reply! I read the build error message, but it seems like that the error is irrelevant to change made in this PR. (#1129 also fails check with same error) |
Collaborator
|
Thank you @damhiya for this PR. I like your generalization. |
8092813 to
acf3a29
Compare
Contributor
Author
|
@jsiek Thank you, I recovered the original theorem as your suggestion! |
jsiek
requested changes
Sep 14, 2025
Collaborator
jsiek
left a comment
There was a problem hiding this comment.
Please change the uses of the lemma back to the old one. Thank you!
acf3a29 to
a79928b
Compare
jsiek
approved these changes
Sep 14, 2025
Collaborator
jsiek
left a comment
There was a problem hiding this comment.
Looks great, thanks again!
added definition: `Commute` added lemma: `Commute-S`, `Commute-ext`, `Commute-subst-rename`
a79928b to
07741de
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hello! I generalized the statement of
commute-subst-renameand added some definitions and lemmas in the Substitution appendix.Here is the previous statement of
commute-subst-rename:And suggested revision:
Old statement is an instance of the new one, where
σ₁ = exts σandσ₂ = σ.The motivation for this change is two folded. First, it is simply more general, so it has more applications in theory. Second and more importantly, the new proof can be naturally adapted to typed setting, while the older one is not. Consider the previous proof of
commute-subst-renamefor theƛ_case.commute-subst-rename {Γ}{Δ}{ƛ N}{σ}{ρ₁}{ρ₂} H = cong ƛ_ (commute-subst-rename{Γ , ★}{Δ , ★}{N} {exts σ}{ext ρ₁}{ext ρ₂} (λ {x} → H′ {x})) where H′ : {x : Γ , ★ ∋ ★} → exts (exts σ) (ext ρ₁ x) ≡ rename (ext ρ₂) (exts σ x) H′ = ...In the type of
H′,exts σon the LHS andexts σon the RHS may seem equal, but each occurrence ofextsoperations are responsible for different variables. If we annotateext/extsoperations with relatedness, the type would be something like the following:However the use of
H′incommute-subst-rename{Γ , ★}{Δ , ★}{N}{exts σ}{ext ρ₁}{ext ρ₂} (λ {x} → H′ {x})requiresexts₁ σandexts₂ σto be judgementally equal. This is the case in our untyped setting, but it could be false in general, for instance in intrinsically typed setting. The generalized version does not have this problem.I also fixed text according to changed proof structure.