Skip to content

Elimination constraints for bounded sort polymorphism#111

Open
jrosain wants to merge 1 commit intorocq-prover:masterfrom
jrosain:elimination-constraints
Open

Elimination constraints for bounded sort polymorphism#111
jrosain wants to merge 1 commit intorocq-prover:masterfrom
jrosain:elimination-constraints

Conversation

@jrosain
Copy link

@jrosain jrosain commented Sep 26, 2025

@jfehrle
Copy link
Member

jfehrle commented Oct 14, 2025

Since Roq uses the concept of polymorphism in many ways, perhaps it would be better to have a more descriptive string than just "poly" in nonterminal names in the grammar. "sort_poly" would be much clearer and it only makes names a little bit longer on the doc.

@jrosain
Copy link
Author

jrosain commented Oct 22, 2025

That's a good point, it'll be done.

@yannl35133
Copy link

What properties is "eliminates to" expected to have? Reflexivity and transitivity are somewhat implicit here, but I mostly wonder about antisymmetry wrt. sort conversion, similar to universe level comparison being antisymmetric wrt. level conversion.

@jrosain
Copy link
Author

jrosain commented Jan 13, 2026

What properties is "eliminates to" expected to have? Reflexivity and transitivity are somewhat implicit here, but I mostly wonder about antisymmetry wrt. sort conversion, similar to universe level comparison being antisymmetric wrt. level conversion.

Right! Note that we may have non-reflexive sorts, iirc @tabareau has some examples of this.

About antisymmetry: if s eliminates to s' and conversely, every type of s is also a type of s', and every type of s' is a type of s so s and s' cannot be distinguished. We believe that it makes two sorts equal for conversion, but we don't have a strong theoretical justification for this yet.

@ppedrot
Copy link
Member

ppedrot commented Jan 13, 2026

I'm planning to actually change that before the release, not only because there is no justification for that, but also because this is basically an implementation leak.

@jrosain
Copy link
Author

jrosain commented Jan 13, 2026

Yes, I agree that it was premature, and it makes sense to remove this for the time being.

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.

4 participants