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

Universal property of list-based polynomials #917

Merged
merged 23 commits into from
Oct 18, 2022

Conversation

felixwellen
Copy link
Collaborator

The aim of this PR, is to show that the UnivariatePolyList - polynomials have the correct universal property.
This is a missing piece, connecting all definitions of polynomials in the library (see #781).

@mortberg
Copy link
Collaborator

Don't we already have that the list polynomials are equivalent to some of the other polynomials? Then this could just be transported over?

@felixwellen
Copy link
Collaborator Author

As far as I know, only the CommAlgebra.FreeCommAlgebra has the universal property. And the aim of #781 is to show that the definitions in Algebra.Polynomials are equivalent to FreeCommAlgebra. @thomas-lamiaux suggested, that it is probably easier to construct directly an equivalence of types, which I also tried, but ultimately realized I need the parts of the universal property I formalized now here anyway.

@felixwellen
Copy link
Collaborator Author

I grepped for 'universal' in the algebra part of the library and didn't find a universal property for any of the definitions of polynomials (except the FreeCommAlgebra). Let me know, if you think there is one I missed.

@felixwellen
Copy link
Collaborator Author

Done, but depends on #916 -> still draft

…omials

# Conflicts:
#	Cubical/Algebra/CommAlgebra/UnivariatePolyList.agda
# Conflicts:
#	Cubical/Algebra/CommAlgebra/UnivariatePolyList.agda
#	Cubical/Algebra/Polynomials/UnivariateList/Properties.agda
@felixwellen felixwellen marked this pull request as ready for review September 13, 2022 15:08
@felixwellen
Copy link
Collaborator Author

Thought this might be something for @MatthiasHu , if you agree, please assign the PR to yourself.

@MatthiasHu MatthiasHu self-assigned this Sep 27, 2022
Cubical/Algebra/Algebra/Properties.agda Outdated Show resolved Hide resolved
Cubical/Algebra/CommAlgebra/UnivariatePolyList.agda Outdated Show resolved Hide resolved
Cubical/Algebra/CommAlgebra/UnivariatePolyList.agda Outdated Show resolved Hide resolved

ListPolyCommAlgebra : CommAlgebra R ℓ
ListPolyCommAlgebra =
Iso.inv (CommAlgChar.CommAlgIso R)
(ListPoly ,
constantPolynomialHom R)

{- Universal Property -}
module _ (A : Algebra (CommRing→Ring R) ℓ') where
Copy link
Contributor

Choose a reason for hiding this comment

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

It is a bit strange to me that we're in Algebra.CommAlgebra but actually consider not-necessarily commutative algebras...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I feel with you ;-)
But: We are proving the universal property of an CommAlgebra, which happens to quantify over Algebras. An analogous example where this is completely okay, would be the universal property of the abelianisation of a group. There it feels completely natural, that the ump quantifies over something more general. I think the ump of the CommAlgebra of Polynomials should also naturally quantify over something more general (e.g. Algebras), the situation is just more complex.

@@ -0,0 +1,8 @@
{-# OPTIONS --safe #-}
module Cubical.Algebra.Polynomials.UnivariateList.UniversalProperty where
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why you didn't want to prove the universal property here? That would resolve the issue about having a statement about Algebras in CommAlgebras.

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 my reasoning was, that it would be good to be consistent about where things are. So 'Polynomials' could just contain a lot of pointers to Instances of CommRings and CommAlgebras and their Properties and theorems on the relations between different implementations of polynomials. But we are actually far away from that now, so I could move the ump as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough, I hadn't looked at the Polynomials/ too much but that seems to be more or less the standard, so let's try to keep it that way.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A notable exception seems to be the UnivariateList polynomials, which have their ring structure defined in Polynomials.UniveriateList.Properties. I'll make an issue with the suggestion to move that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done, #944

@felixwellen
Copy link
Collaborator Author

@mzeuner : Do you think it can be merged?

@mzeuner
Copy link
Contributor

mzeuner commented Oct 18, 2022

Yeah, I think I can live with the Algebra vs. CommAlgebra issue regarding the universal property, let's merge it.

@felixwellen felixwellen merged commit 600898a into agda:master Oct 18, 2022
@felixwellen felixwellen deleted the ump_list_polynomials branch October 20, 2022 12:29
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