Zulip Chat Archive

Stream: new members

Topic: Nontrivial algebras


Richard Copley (Oct 27 2023 at 08:54):

[Edit: rewrite] What is the classy proof of this example? (Is there an NeZero (1) instance for the algebra?)

import Mathlib.Data.Real.Basic
import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic

open ExteriorAlgebra

variable (V : Type*) [AddCommGroup V] [Module  V]

example : (1 : ExteriorAlgebra  V)  0 := by
  let f := algebraMap  (ExteriorAlgebra  V)
  intro h
  rw [ RingHom.map_one f,  RingHom.map_zero f, algebraMap_inj] at h
  exact one_ne_zero h

Damiano Testa (Oct 27 2023 at 09:52):

Maybe Nontrivial?

Eric Rodriguez (Oct 27 2023 at 09:58):

@loogle Nontrivial, ExteriorAlgebra

loogle (Oct 27 2023 at 09:58):

:search: ExteriorAlgebra.ι_ne_one

Eric Rodriguez (Oct 27 2023 at 10:04):

I'm now confused about the maths going on here [why are iota and algebraMap completely different?) but I think it's totally fine to put a Nontrivial instance on ExteriorAlgebra depending on R being nontrivial, which should give this result for free? Or maybe it needs to be a lemma, as R isn't an outparam based on V....

Eric Rodriguez (Oct 27 2023 at 10:04):

It could be added for R/C explicitly, of course

Richard Copley (Oct 27 2023 at 10:05):

CliffordAlgebra.ι is from the module (V), Algebra.algebraMap from the base ring ()

Eric Wieser (Oct 27 2023 at 10:07):

I thought I added this result...

Eric Wieser (Oct 27 2023 at 10:08):

It should be trivial from docs#ExteriorAlgebra.algebraMap_leftInverse

Eric Wieser (Oct 27 2023 at 10:11):

.injective.nontrivial should do it

Richard Copley (Oct 27 2023 at 10:11):

Is there something broken with casting? Shouldn't the following work, by Algebra.cast?

#check ((1 : ) : ExteriorAlgebra  V)
-- type mismatch
--   1
-- has type
--   ℝ : Type
-- but is expected to have type
--   ExteriorAlgebra ℝ V : Type u_1

Eric Wieser (Oct 27 2023 at 10:11):

I think Eric is confused, this would be fine as an instance (please PR it!)

Eric Wieser (Oct 27 2023 at 10:12):

I thought we eliminated docs#Algebra.cast during porting

Eric Wieser (Oct 27 2023 at 10:12):

Ah, we just de-instanced it

Eric Wieser (Oct 27 2023 at 10:13):

The correct spelling is unfortunately the rather clunky algebraMap _ _ (1 : ℝ)

Richard Copley (Oct 27 2023 at 10:15):

Eric Wieser said:

I think Eric is confused, this would be fine as an instance (please PR it!)

instance (V : Type*) [AddCommGroup V] [CommRing R] [Module R V]
: NeZero (1 : ExteriorAlgebra R V) := sorry

?

Richard Copley (Oct 27 2023 at 10:17):

No,

instance (V : Type*) [AddCommGroup V] [CommRing R] [Nontrivial R] [Module R V] :
  Nontrivial (ExteriorAlgebra R V) := sorry

Eric Rodriguez (Oct 27 2023 at 10:22):

Eric Wieser said:

I think Eric is confused, this would be fine as an instance (please PR it!)

ah, as R and V are explicit in the definition of exterior algebra... clearly low on the awakeness part :)

Eric Rodriguez (Oct 27 2023 at 10:22):

Richard Copley said:

Eric Wieser said:

I think Eric is confused, this would be fine as an instance (please PR it!)

instance (V : Type*) [AddCommGroup V] [CommRing R] [Module R V]
: NeZero (1 : ExteriorAlgebra R V) := sorry

?

this will come from docs#NeZero.one

Richard Copley (Oct 27 2023 at 10:27):

Ugh, is this true in a CliffordAlgebra too? I'll think about that.

Eric Wieser (Oct 27 2023 at 10:31):

In characteristic not two, yes

Eric Wieser (Oct 27 2023 at 10:31):

(go via docs#CliffordAlgebra.equivExterior)

Eric Wieser (Oct 27 2023 at 10:53):

Or even more generally when you can write Q as B.toQuadraticForm (which would be easy to generalize to, but maybe isn't worth the awkwardness it creates)

Eric Wieser (Oct 27 2023 at 11:13):

You might find #6657 interesting

Richard Copley (Oct 27 2023 at 11:26):

Richard Copley said:

Ugh, is this true in a CliffordAlgebra too? I'll think about that.

@Eric Wieser, thank you for not letting me start thinking about that :sweat_smile:

Richard Copley (Oct 27 2023 at 13:22):

Eric Wieser said:

I think Eric is confused, this would be fine as an instance (please PR it!)

#7985

Eric Wieser (Oct 27 2023 at 13:38):

Thanks!

Richard Copley (Oct 27 2023 at 14:53):

Thank you for the help and encouragement. Works for me:

import Mathlib.Data.Real.Basic
import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic
import Mathlib.LinearAlgebra.CliffordAlgebra.Contraction

variable (V : Type*) [AddCommGroup V] [Module  V]

example : (1 : ExteriorAlgebra  V)  0 := by
  exact? says exact one_ne_zero

example (Q : QuadraticForm  V) : (1 : CliffordAlgebra Q)  0 := by
  haveI : Invertible (2 : ) := invertibleOfNonzero two_ne_zero
  exact? says exact one_ne_zero

Eric Wieser (Oct 27 2023 at 14:58):

Nice! I'd be curious to know what applications of docs#CliffordAlgebra you have in mind; especially since I might have some results in other branches that I could try to prioritize.

Richard Copley (Oct 27 2023 at 15:08):

It's a bit round-about. I want the inner product on the exterior algebra (which you will recall is defined in terms of the Gram determinant), so I can define the Hodge star operator, because I want the cross product on a real inner product space, because I want to check an old draft of a (fairly silly) argument about rotations in three-dimensional space. Low-brow stuff, ultimately, but I'd like to do it nicely.

I might one day try to get some of the theory of spinors clear in my mind, for which Clifford algebra will be needed. But I'm not about to start that soon.

Eric Wieser (Oct 27 2023 at 15:09):

I think the inner product on the exterior algebra is probably hiding in Mathlib.LinearAlgebra.CliffordAlgebra.Contraction somewhere

Eric Wieser (Oct 27 2023 at 15:10):

Note that we have docs#crossProduct already, but I assume you want to stay in general n-dimensional space as long as possible

Richard Copley (Oct 27 2023 at 15:19):

Yes, I saw that, thanks. That and a few positively oriented orthonormal bases would almost certainly do everything I need. I suppose I just feel it's less expressive, and not as much fun.

Heather Macbeth (Oct 27 2023 at 22:13):

Richard Copley said:

I want the inner product on the exterior algebra (which you will recall is defined in terms of the Gram determinant), so I can define the Hodge star operator, because I want the cross product on a real inner product space,

@Richard Copley I did the cross product for the sphere eversion project but it didn't make it to mathlib yet. It is morally by the method you describe, although not literally. You can see the code (it's only ~100 lines) at
https://github.com/leanprover-community/sphere-eversion/blob/lean4/SphereEversion/ToMathlib/Analysis/InnerProductSpace/CrossProduct.lean

Richard Copley (Oct 27 2023 at 22:54):

Lovely! I think that is all I need.

Under those appropriate hypotheses (for instance, if E is an oriented three-dimensional real inner product space), the map f=crossProduct taking u∈E to an element f(u)=(u × ·) of 𝔰𝔬(E) is not only an isomorphism of Lie algebras, but also an equivalence of representations from the standard representation id of the Lie algebra 𝔰𝔬(E)to the adjoint representation: f(f(u)v) = (ad_{f(u)})(f(v)) = f(u)f(v)-f(v)f(u) (the Jacobi identity).

Just wanted to get that off my chest :smile:

Richard Copley (Oct 27 2023 at 23:01):

(f(u×v)=[f(u),f(v)] is a nicer way to put it.)


Last updated: Dec 20 2023 at 11:08 UTC