Daily. Subobject Classifier in Dependent Lambek Calculus
Previously in Agda we had constructed equalizers in Lambek using sigma types. Further, equalizers form subobjects, which may be comprehended as maps from a type into a subobject classifier.
I believe in our formalization we want to generalize this idea to a broader class of subobjects, maybe even all of them. That is, we could define a subobject classifying grammar . Then we can internally define any predicate on a grammar via a term .
That is, forall we have , and
The code for this is nearly identical to the definition of equalizers as sigma types, and I have even built a translation of the equalizers code that is defined with this as its foundation. I have not yet tested if either implementation is preferable.
It isnβt yet clear how to best expose this sort of construct syntactically. I suppose you could assume some subobject classifying grammar, but then I donβt know if you can then reap the benefits of the propositions internally. That is, how do you reflect the proposition that two terms are equal in the internal language of propositions rather than the external one?
If nothing else, this code gives me a reusable interface to axiomatize smaller, sandboxed ways in which Iβd like to internalize certain types of propositions (such as βtwo terms are equalβ or βdoes not begin with the character β).
The hope for this code is that it lets me inductively prove the follow last soundness of Kleene star.