Skip to content

feat: UHomSeq el, code, Pi, lam, Sigma #120

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

Merged
merged 46 commits into from
Aug 21, 2025
Merged

feat: UHomSeq el, code, Pi, lam, Sigma #120

merged 46 commits into from
Aug 21, 2025

Conversation

Jlh18
Copy link
Collaborator

@Jlh18 Jlh18 commented Aug 13, 2025

  • I changed the definition of UHom so that top map in the pullback square defining the universe is not merely propositional. @Vtec234 and I discussed this a while back I remember - and we agreed that it should be data.

  • I defined el and code, and proved their basic properties, including the fact that el (code A) = A and code (el a) = a

  • @u5943321 defined the universe max operations needed for Pi, Sigma, lamda

@Jlh18 Jlh18 requested a review from Vtec234 August 13, 2025 23:49
@Jlh18 Jlh18 changed the title feat: UHomSeq el and code feat: UHomSeq el, code, Pi, lam, Sigma Aug 14, 2025
@Jlh18 Jlh18 added I-crit Impact: critical C-model Component: abstract natural model labels Aug 14, 2025
@Jlh18 Jlh18 mentioned this pull request Aug 14, 2025
@Jlh18
Copy link
Collaborator Author

Jlh18 commented Aug 18, 2025

@digama0 is it okay that mkPair is written in tactic mode? Maybe we don't ever need to unfold that definition so it's okay? And also it should follow from a more general (and maybe less confusing?) statement about polynomial endofunctors.

@digama0
Copy link
Collaborator

digama0 commented Aug 21, 2025

@digama0 is it okay that mkPair is written in tactic mode? Maybe we don't ever need to unfold that definition so it's okay? And also it should follow from a more general (and maybe less confusing?) statement about polynomial endofunctors.

Tactic mode is just another way of writing terms, it makes no difference for definitions. What actually matters is whether you use tactics like rw and simp outside of proof contexts, and in this code the rw is called only after zooming in on ?_ that is a proof goal in:

by
  refine compDomEquiv.mk _ t (ym(eqToHom congr(s[i].ext $t_tp)) ≫ B) u ?_ ≫ s.pair ilen jlen
  rw [u_tp, ← Functor.map_comp_assoc]; subst A; simp

This is just the same as

compDomEquiv.mk _ t (ym(eqToHom congr(s[i].ext $t_tp)) ≫ B) u
  (by rw [u_tp, ← Functor.map_comp_assoc]; subst A; simp)
  ≫ s.pair ilen jlen

but easier to format.

Comment on lines +184 to +188
/- It is useful to be able to talk about the underlying sequence of Homs in a UHomSeq.
For such a sequence, we can loosen the condition i < j to i <= j
without creating Type in Type.
This is helpful for defining `s[i] → s[max i j]` for Pi and Sigma below.
-/
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/- It is useful to be able to talk about the underlying sequence of Homs in a UHomSeq.
For such a sequence, we can loosen the condition i < j to i <= j
without creating Type in Type.
This is helpful for defining `s[i] → s[max i j]` for Pi and Sigma below.
-/
/-- The composite natural model `Hom` from `s[i]` to `s[j]`, where `i ≤ j`.
This is helpful for defining `s[i] → s[max i j]` for Pi and Sigma below.
Note that a `UHom` only exists when `i < j`. -/

I think UHom is probably just a bad concept, it's not a hom at all (because Type : Type). But we can leave changing that for later.

Copy link
Collaborator

Choose a reason for hiding this comment

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

What makes it not a hom? It's just a special kind of hom, the actual category structure is over Hom (which is reflexive). It could be expressed as a property or extra data on a hom, but as it says it is bundled for convenience.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I moved NaturalModel.Hom things up because that structure is general and well-behaved and often the definitions we want for UHomSeq can be defined at that generality. We could also consider making it even more general, for cartesian squares between UvPolys.

Copy link
Collaborator

Choose a reason for hiding this comment

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

What makes it not a hom?

It's not reflexive.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think is quite a strange thing to consider category-theoretically. So it is probably not worth thinking of it as structure on a hom

Copy link
Collaborator

Choose a reason for hiding this comment

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

I mean a UHom is a Hom just like an abelian group is a group, there is an additional property on top of another thing which has the base name. An example from category theory would be something like an epimorphism or a projective object, just because it's an epimorphism doesn't mean it's not a morphism anymore, and not all categorical properties are closed under id and comp.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree with all of that. My point is that I don't see a way to phrase this definition in a way that is invariant under equivalence of categories Cart C ~~ E. Maybe there is, I don't know

Copy link
Collaborator

Choose a reason for hiding this comment

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

The notion doesn't really make sense; this is not a pure categorical definition, it comes with additional data. In any case, that is by no means a requirement for something to be a valid notion

@digama0 digama0 merged commit 012393a into master Aug 21, 2025
1 check passed
@Vtec234 Vtec234 deleted the UHomSeq branch August 21, 2025 19:23
digama0 added a commit that referenced this pull request Aug 21, 2025
Co-Authored-By: Joseph Hua <[email protected]>
Co-Authored-By: Yiming Xu <[email protected]>
Co-Authored-By: Wojciech Nawrocki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-model Component: abstract natural model I-crit Impact: critical
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants