feat(LocallyNameless/Untyped): generalize eta_subst_fvar#667
Open
lengyijun wants to merge 1 commit into
Open
Conversation
`step_subst_cong_l` is the more general version
eta_subst_fvar to eta_substeta_subst_fvar
chenson2018
reviewed
Jun 20, 2026
| induction steps with | ||
| | refl => rfl | ||
| | tail _ step ih => grind [step_subst_cong_l] | ||
| exact .single (Xi.abs {x} (by grind [step_subst_cong_l])) |
Collaborator
There was a problem hiding this comment.
It appears that (at the bottom of Properties) that we are missing a version of close_open_to_subst specialized to first openings, i.e. (m ^* x) ^ n = m [x := n] that if annotated with grind = would make the proof generated here better. Could you add this, please?
| s [ x := N ] ⭢ηᶠ s' [ x := N ] := by | ||
| induction step | ||
| case base h => cases h with | eta lc => exact Xi.base (.eta (subst_lc lc lc_N)) | ||
| case abs => grind [Xi.abs <| free_union Var, subst_open_var] |
Collaborator
There was a problem hiding this comment.
Probably better for performance:
Suggested change
| case abs => grind [Xi.abs <| free_union Var, subst_open_var] | |
| case abs => apply Xi.abs <| free_union Var; grind |
| /-- Abstracting then closing preserves a single η-reduction step. -/ | ||
| lemma step_abs_close {x} (step : M ⭢ηᶠ M') (lc_M : LC M) : (M ^* x).abs ⭢ηᶠ (M' ^* x).abs := by | ||
| grind [Xi.abs ∅] | ||
| grind [step_subst_cong_l, Xi.abs ∅] |
Collaborator
There was a problem hiding this comment.
Similarly here
Suggested change
| grind [step_subst_cong_l, Xi.abs ∅] | |
| apply Xi.abs ∅ | |
| grind [step_subst_cong_l] |
eta_subst_fvareta_subst_fvar
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.
step_subst_cong_lis the more general version