Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

feat(linear_algebra/clifford): make clifford_algebra irreducible in a Lean4 compatible way #18179

Closed
wants to merge 4 commits into from

Conversation

sgouezel
Copy link
Collaborator

@sgouezel sgouezel commented Jan 15, 2023

clifford_algebra is a complicated object (building on tensor_algebra which builds on free_algebra), which means Lean has difficulties working with it unless it is irreducible. In the current version, it is marked as irreducible after the fact, which is not Lean4-compatible. Instead, we switch to a construction as a one-field structure, which is genuinally irreducible (modelled on what is done for real numbers).

Part of #18164


Open in Gitpod

@sgouezel sgouezel added awaiting-review The author would like community review of the PR mathport For compatibility with Lean 4 changes, to simplify porting t-algebra Algebra (groups, rings, fields etc) labels Jan 15, 2023
@eric-wieser
Copy link
Member

We're currently hundreds of dependencies away from being able to port this file. I'd be curious to see whether we run into trouble with the reducible definition in Lean 4, before committing to all the boilerplate this entails; so would be tempted to leave this PR sitting around for a while until we get closer.

@sgouezel
Copy link
Collaborator Author

We can definitely keep this around and only use it if necessary. Note however that in Lean 3, unmarking clifford_algebra as irreducible breaks a lot -- which is not surprising to me, since the construction is a three-fold scaffolding around free_algebra, so whenever Lean thinks it's a good idea to unfold the definition of multiplication, say, to see if it's defeq to something, then you're doomed to failure because things get exponentially big. I have the impression that making things genuinely irreducible can only help here, by adding an abstraction barrier even for the kernel (after all, we don't care at all about the inner workings of the definition, we only want its universal property).

@jcommelin
Copy link
Member

Thanks 🎉

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Mar 8, 2023
@eric-wieser
Copy link
Member

@jcommelin, I'd prefer to leave this PR open until this file gets closer to being portable

bors r-

bors d+

@bors
Copy link

bors bot commented Mar 8, 2023

✌️ sgouezel can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@bors
Copy link

bors bot commented Mar 8, 2023

Canceled.

@github-actions github-actions bot added the delegated The PR author may merge after reviewing final suggestions. label Mar 8, 2023
@eric-wieser eric-wieser removed the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Apr 20, 2023
@eric-wieser
Copy link
Member

We're now on the cusp of being able to port this; I've left a note on the port comment page remarking that if we run intro trouble while porting, these changes might be useful.

@kim-em kim-em added the too-late This PR was ready too late for inclusion in mathlib3 label Jul 16, 2023
@sgouezel sgouezel closed this Aug 28, 2023
@sgouezel sgouezel deleted the SG_irred_clifford branch August 28, 2023 11:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
delegated The PR author may merge after reviewing final suggestions. mathport For compatibility with Lean 4 changes, to simplify porting t-algebra Algebra (groups, rings, fields etc) too-late This PR was ready too late for inclusion in mathlib3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants