Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace term reducibility in the logical relation by the diagonal of reducible term conversion #63

Merged
merged 8 commits into from
Jan 21, 2025

Conversation

kyoDralliam
Copy link
Contributor

This PR removes the term reducibility predicate [ Γ ||- t : A | RA ] and replaces it with reflexive instance of the reducible term conversion [ Γ ||- t ≅ t : A | RA ]. Since we can show quite early on that the latter relation is a PER, witnesses of [ Γ ||- t ≅ u : A | RA ] imply both [ Γ ||- t ≅ t : A | RA ] and [ Γ ||- u ≅ u : A | RA ]. Overall, removing this component does remove a lot of redundancies present in the proofs.

@MevenBertrand
Copy link
Member

Is this ready for merging? Should I try to rebase my refactoring branch on top of this one first, just to check I can survive it? (It should be fine since I almost don't touch the logical relation, but…)

@MevenBertrand
Copy link
Member

Also, have thought about/tried removing reducibility of types? A priori, you could say that a pair of terms are reducibly convertible wrt. a proof that two types are reducibly convertible, rather than a proof that a given type is reducible?

@kyoDralliam
Copy link
Contributor Author

Is this ready for merging? Should I try to rebase my refactoring branch on top of this one first, just to check I can survive it? (It should be fine since I almost don't touch the logical relation, but…)

I could do more cleanups, but unless anyone disagree with the changes in this PR, I think it can be merged.

@kyoDralliam
Copy link
Contributor Author

Also, have thought about/tried removing reducibility of types? A priori, you could say that a pair of terms are reducibly convertible wrt. a proof that two types are reducibly convertible, rather than a proof that a given type is reducible?

I tried, and got stuck because the definition of reducibility and reducible conversion on terms employed reducible conversion of types in a way that wouldn't be strictly positive if I were to just replace reducibility of types by reducible conversion of the diagonal.

However, I have now a branch that does remove these depencies at the price of weakening slightly the logical relation (and it does not impact the end theorems), so I'll try again to remove the reducibility of types next.

Copy link
Member

@MevenBertrand MevenBertrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't looked at the proofs in details, but

  • I'm sympathetic with the high-level goal
  • a -2kLoC change seems like a good sign
  • you're the expert in the logical relation anyway
    If there are clean-ups needed we can defer that later, I'd rather avoid bitrot.

@MevenBertrand MevenBertrand merged commit 168786b into coq-8.20 Jan 21, 2025
1 check passed
@MevenBertrand MevenBertrand deleted the onlytermrel branch January 21, 2025 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants