feat: Tagged InferenceSystem#518
Conversation
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
| is a derivable value. | ||
| -/ | ||
| class InferenceSystem (α : Type u) where | ||
| class InferenceSystem (S : Type) (α : Type*) where |
There was a problem hiding this comment.
is there a reason this isn't S : Type*
There was a problem hiding this comment.
That's what it was originally, but it gave me type errors, I don't clearly remember where (maybe DerivationsIn).
There was a problem hiding this comment.
okay, it does seem very restrictive to have it Type 0 — can you fix it with explicit universes?
There was a problem hiding this comment.
Oh, actually, I tried again and it worked now. It must've been something weird with a previous version.
Thanks for catching this.
chenson2018
left a comment
There was a problem hiding this comment.
Just a few style questions/suggestions.
| derivation (a : α) : Sort v | ||
|
|
||
| /-- Default tag for inference system instances. `⇓a` is short for `Default⇓a`. -/ | ||
| inductive InferenceSystem.Default |
There was a problem hiding this comment.
It took me a moment to understand why this was an empty inductive. I feel like I have more often seen something like
def InferenceSystem.Default := Unitin these situations. I think this is functionally identical, but maybe easier to understand the intent for the next person like me who was confused.
There was a problem hiding this comment.
My purpose was to do the simplest possible thing, which is an empty type.
What's the point of making Default inhabited?
There was a problem hiding this comment.
It doesn't matter that it's inhabited, you could use Empty just as easily. My point is that it doesn't really matter: we could pick any existing type and say that by convention this represents the default.
So I'd personally find def InferenceSystem.Default := Empty the more readable exact equivalent I suppose. Maybe a short comment is warranted in either case.
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
chenson2018
left a comment
There was a problem hiding this comment.
Approving, as my last comment about InferenceSystem.Default seems fine either way, maybe a matter of personal taste.
|
(I removed from the auto merge so you can decide what you prefer writing, and maybe leave a comment.) |
|
Thanks. I've made it an |
Adds a tagged version of
InferenceSystem, so that multiple inference systems for the same type can be instantiated and distinguished by means of a tag. Usage is exemplified with the multiplicative fragment of classical linear logic.