Skip to content

[Overview] feat(Tensors): a tensor library on general index types, with the Pauli matrices as a test - #2014

Draft
pariandrea wants to merge 244 commits into
leanprover-community:masterfrom
pariandrea:tensors/mathematics-tensors-v2
Draft

pariandrea wants to merge 244 commits into
leanprover-community:masterfrom
pariandrea:tensors/mathematics-tensors-v2

Conversation

@pariandrea

@pariandrea pariandrea commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

This draft follows the discussion in #1950. It adds a tensor library in Physlib/Mathematics/Tensors/ next to the existing one in Physlib/Relativity/Tensors/, and proves the Pauli matrix identities on it in Physlib/Relativity/Bispinors/Pauli/Tensor.lean. The existing Pauli/Relations.lean is untouched, so the two can be compared side by side. No existing declaration is removed or changed.

This code was written with AI assistance, specifically Claude and ChatGPT.

This draft is not for merging. It shows the whole library and the Pauli example in one place. It is reviewed and merged as the stack below, in the order of the imports. Each piece builds on master and the pieces before it, and together the pieces are exactly this branch.

Stack

Motivation

The existing tensor layer numbers indices with Fin n and gets the dual of a color from a function τ whose involution τ (τ c) = c holds only up to a proof. Both choices cost casts and index arithmetic in almost every statement about products and contractions, which makes tensor proofs long and fragile.

The Pauli matrices, which #1950 proposed as a test, serve as the example of the machinery. In Pauli/Tensor.lean each identity is a rewrite with an earlier identity followed by tensor_regroup, where Pauli/Relations.lean evaluates components.

Main changes against the existing layer

  • A color is a kind (such as the Lorentz vector index) and a variance, up or down. Its dual flips the variance, so c.dual.dual = c holds by rfl.
  • A species gives each color a space over k = ℝ or ℂ (RCLike k), a representation and a basis, with one condition. The contraction is not a field. It multiplies the components in the bases of a color and its dual, so the bases are dual by definition, and the condition is that this contraction is invariant. The contraction is a perfect pairing in Mathlib's sense, and the space of the dual color is Mathlib's dual representation.
  • A tensor of two factors is a linear map, through Mathlib's dualTensorHomEquivOfBasis, and it is invariant exactly when its linear map commutes with the group action (isIntertwiningMap_toLin_iff).
  • Tensors are indexed by any type, not Fin n. A product lives on ι₁ ⊕ ι₂, and a contraction puts the remaining indices on a type chosen by the reindexing.
  • One contraction Tensor.contr σ contracts any set of pairs at once. Two contractions in sequence are one (contr_contr), contraction commutes with products (tmulEquiv_contr_left, tmulEquiv_contr_right), and two contractions of the same pairs are equal in any order (contr_eq_of_samePair).
  • The group acts on tensors through Representation.piTprod, the representation on the tensor product of a family of representations, which Mathlib has only for two factors. Mathlib's maps of PiTensorProduct (map, reindex, tmulEquivDep, subsingletonEquiv) and the new contrPairs are proved to commute with it.
  • The maps that commute with the group action (reindexing, products, contraction, lowering) are Mathlib's Representation.Equiv and IntertwiningMap. The invariance of a tensor built from invariant pieces follows from composition (IntertwiningMap.map_invariant).
  • Proofs about maps of tensors use extensionality on pure tensors (ext_pure, an ext lemma) rather than induction.
  • An invariant form is an element of V c ⊗ V c that is invariant and has an inverse. Symmetry and antisymmetry are stated on the tensor, and Mathlib's bilinear form properties IsSymm and IsAlt are lemmas (isSymm_formBilin, isAlt_formBilin). Lowering is one linear equivalence toDual, and toDualAt lowers at one index. The Schouten identity is proved once for any form on a kind with two labels.
  • Components are coordinates in Mathlib's Basis.piTensorProduct, (S.tensorBasis c).repr T.
  • The index notation keeps the existing syntax. ↓μ and ↑μ lower and raise. Three tactics work on it. tensor_components reduces an equation to components. tensor_regroup proves an equation of sums of contractions of the same factors, however they are grouped or ordered, inserting deltas, cancelling a form against its inverse and swapping symmetric or antisymmetric forms where needed. tensor_regroup using e₁, … first rewrites with known identities. tensor_indices proves equations of chains of lowerings and raisings.
  • Types such as Lorentz.Vector d and the Weyl spinors enter the notation through the class Tensorial.

The Pauli matrices

The Pauli matrices are the invariant tensor pauliTensor : ℂT[up, upL, upR]. No proof in Pauli/Tensor.lean splits into cases over components. The components of σ come from ComplexVector.pauliVal, and lowering both Weyl indices gives the adjugate matrix, σ̄^μ = adj σ^μ (adjugate_pauliMatrix). The trace identity tr(σ̄_μ σ_ν) = 2 η_μν comes from the existing matrix lemma trace_pauliMatrix_mul_pauliMatrix. Contracting with σ gives maps vectorToBispinor and bispinorToVector between tensors with a vector index and tensors with two Weyl indices. bispinorToVector ∘ vectorToBispinor = 2 is the trace identity, and since both spaces have dimension 16, vectorToBispinor ∘ bispinorToVector = 2 as well, which is the Fierz identity. The two anticommutators follow from the traces and the Schouten identity of ε.

Each piece of the stack lists its declarations and has its own reviewer map.

pariandrea and others added 8 commits November 1, 2026 20:07
…involutive by rfl

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…hrough a pairing, with pairingToLinearMap_apply and lTensor_pairingToLinearMap_apply

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…t and pairingToLinearMap_contr_injective, its tensors, group action, map_smul_of_pure, tensorBasis and contr_tmul_eq_sum_basis

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…smul and tensorBasis_repr_reindex

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…quiv with twoSlotEquiv_map_rep, deltaTensor and their components

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…uiv_contr, contr_matMul and tensorBasis_repr_contr

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…rmTensor, with toDualAt_toDualAt, formTensor_invariant, contr_formTensor_formTensor and toDualAt_eq_contr_formTensor

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
… with conj_conj, conj_smul and conj_contr

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
@github-actions github-actions Bot added the large label Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Thank you for this pull-request (PR). If this is your first PR, welcome to the community!

While you wait for a review, note that you can review PRs too; reviewing is not restricted to maintainers. Our review guidelines explain what to look for.

Over time, contributions such as reviews, maintenance and documentation are recorded on contributions.physlib.io.

Three main points:

  • Comment -awaiting-author on its own line to remove that label from your PR.
  • Comment blocked-by-PR or -blocked-by-PR on its own line to add or remove that label, respectively.
  • The first review might take several days to arrive. If in doubt message on the Zulip.

For the author: Please read

Below is what will happen next. Please read carefully if you are not familiar with the process. You may open other PRs while this one is being reviewed, and can stack PRs on top of each other, so don't let these steps slow you down.

  1. Some automated checks will be run on your PR. You can see the results of these checks at the buttom of your PR page. If any of these checks fail, you will need to fix the issues before your PR can be merged. You can learn more about these here, including how to run them locally, which is sometimes quicker than relying on the GitHub Actions. If you have never had a PR merged before, you may have to wait for a reviewer to manually start these checks (this is for security).

  2. A reviewer will look at your PR and may ask you to make changes. This may happen a couple of days after you submit your PR, so you may need to be patient. But it should not be longer than that - if it is please bring it to the attention of the community on the Zulip. The level of review will depend on where your PR is submitted. If it is submitted to ./Physlib or ./QuantumInfo, the review will be more thorough than if it is submitted to ./PhyslibAlpha. You can find out more about what the review process is looking for in our review guidelines. If a reviewer adds an awaiting-author label to your PR, address the review comments, then please remove that label by adding a comment with -awaiting-author. This helps us keep track of reviews.

  3. The reviewer will either approve your PR, or request more changes (in which case we return to step 2). Once your PR is approved, it will be merged by a maintainer, this should happen shortly after approval, though you may get more comments at this stage.

Tip: The easiest way to get a fast review is to submit a PR that is small and self-contained, and has clear documentation explaining why things are the way they are in your changes.

If you have any problems or questions, please reach out to the community on the Zulip.

For reviewers: Summary of your PR

Found differences:
@@ Physlib.Mathematics.ForMathlib.CoordTensorHom @@
+ module added Physlib.Mathematics.ForMathlib.CoordTensorHom (+394 -0)
  namespaces Module.Basis
+ added def coordDelta
+ added def coordInverse
+ added def coordTensorHomEquiv
+ added def coordToDual
+ added lemma bijective_coordTensorHomEquiv_coordInverse
+ added lemma bijective_coordTensorHomEquiv_map_rep
+ added lemma comm_coordDelta
+ added lemma comp_coordTensorHomEquiv_coordInverse
+ added lemma coordDelta_invariant
+ added lemma coordInverse_coordInverse
+ added lemma coordInverse_eq_of_comp_eq_id
+ added lemma coordInverse_map_rep
+ added lemma coordPairing_coordTensorHomEquiv_comm
+ added lemma coordTensorHomEquiv_comm_comp_comm
+ added lemma coordTensorHomEquiv_comp_of_mul_eq_one
+ added lemma coordTensorHomEquiv_coordDelta
+ added lemma coordTensorHomEquiv_coordInverse
+ added lemma coordTensorHomEquiv_coordInverse_comp
+ added lemma coordTensorHomEquiv_lTensor
+ added lemma coordTensorHomEquiv_map_rep
+ added lemma coordTensorHomEquiv_tmul
+ added lemma isAlt_coordTensorHomEquiv_of_comm_eq_neg
+ added lemma isIntertwiningMap_coordTensorHomEquiv_iff
+ added lemma isSymm_coordTensorHomEquiv_of_comm_eq
+ added lemma repr_coordTensorHomEquiv
+ added lemma repr_coordToDual
+ added lemma tensorProduct_repr_coordDelta
+ added lemma toMatrix_coordTensorHomEquiv
@@ Physlib.Mathematics.ForMathlib.EquivPairs @@
+ module added Physlib.Mathematics.ForMathlib.EquivPairs (+120 -0)
  namespaces Equiv
+ added def SamePair
+ added instance [DecidableEq ι] (σ : ι ≃ κ ⊕ (J ⊕ J)) (τ : ι ≃ κ ⊕ (J' ⊕ J')) (j : J) (j' : J') :
+ added lemma SamePair.bijective
+ added lemma SamePair.left_unique
+ added lemma SamePair.right_unique
+ added lemma exists_samePair_left
@@ Physlib.Mathematics.ForMathlib.FiniteDimensional @@
+ module added Physlib.Mathematics.ForMathlib.FiniteDimensional (+74 -0)
+ added lemma LinearMap.comp_apply_eq_smul_of_comp_apply_eq_smul_of_finrank_eq
+ added lemma LinearMap.comp_eq_id_of_comp_eq_id_of_finrank_eq
@@ Physlib.Mathematics.ForMathlib.PiTensorProduct @@
+ module added Physlib.Mathematics.ForMathlib.PiTensorProduct (+182 -0)
+ added def PiTensorProduct.contrPairs
+ added lemma Module.finrank_piTensorProduct
+ added lemma PiTensorProduct.contrPairs_tprod
+ added lemma PiTensorProduct.map_eq_id_of_isEmpty
+ added lemma PiTensorProduct.toMatrix_map_apply
@@ Physlib.Mathematics.ForMathlib.Representation @@
+ module added Physlib.Mathematics.ForMathlib.Representation (+311 -0)
+ added def Representation.Equiv.piTprodCongr
+ added def Representation.Equiv.piTprodOfSubsingleton
+ added def Representation.Equiv.piTprodReindex
+ added def Representation.Equiv.piTprodSum
+ added def Representation.Equiv.tensorCongr
+ added def Representation.piTprod
+ added lemma Representation.Equiv.piTprodCongr_tprod
+ added lemma Representation.Equiv.piTprodReindex_tprod
+ added lemma Representation.Equiv.piTprodSum_tmul
+ added lemma Representation.Equiv.tensorCongr_tmul
+ added lemma Representation.IntertwiningMap.map_invariant
+ added lemma Representation.IntertwiningMap.map_one_invariant
+ added lemma Representation.IsIntertwiningMap.contrPairs
+ added lemma Representation.IsIntertwiningMap.piTprodMap
+ added lemma Representation.map_piTprod_of_tprod
+ added lemma Representation.piTprod_apply
+ added lemma Representation.piTprod_tprod
@@ Physlib.Mathematics.ForMathlib.Schouten @@
+ module added Physlib.Mathematics.ForMathlib.Schouten (+79 -0)
  namespaces LinearMap.IsAlt
+ added lemma schouten
+ added lemma schouten_basis
@@ Physlib.Mathematics.ForMathlib.SemilinearMaps @@
+ module added Physlib.Mathematics.ForMathlib.SemilinearMaps (+252 -0)
  namespaces PiTensorProduct, Module.Basis, LinearEquiv
+ added def congrₛₗ
+ added def mapₛₗ
+ added def starEquiv
+ added lemma congrₛₗ_congrₛₗ
+ added lemma congrₛₗ_tprod
+ added lemma eq_starEquiv
+ added lemma finrank_eqₛₗ
+ added lemma map_rep_of_star_coordPairing
+ added lemma mapₛₗ_tprod
+ added lemma repr_starEquiv
+ added lemma starEquiv_apply_self
+ added lemma starEquiv_map_of_repr
+ added lemma starEquiv_starEquiv
+ added lemma star_coordPairing_starEquiv
@@ Physlib.Mathematics.ForMathlib.TensorProductMatrix @@
+ module added Physlib.Mathematics.ForMathlib.TensorProductMatrix (+135 -0)
  namespaces Module.Basis
+ added def tensorProductToMatrix
+ added lemma comm_eq_smul_iff
+ added lemma tensorProductToMatrix_apply
+ added lemma tensorProductToMatrix_map
+ added lemma tensorProductToMatrix_symm_apply
+ added lemma tensorProductToMatrix_symm_diagonal
+ added lemma tensorProductToMatrix_tmul
+ added lemma tensorProduct_repr_comm
@@ Physlib.Mathematics.Tensors.Conjugation @@
+ module added Physlib.Mathematics.Tensors.Conjugation (+313 -0)
  namespaces Tensor, Tensor.Species
+ added abbrev Color.bar
+ added class HasConjugation
+ added class IsEquivariantConjugation
+ added def ColorEquiv.barContr
+ added def HasConjugation.ofBasis
+ added def conj
+ added def conjEquiv
+ added lemma Color.bar_bar
+ added lemma Color.dual_eq_bar_dual
+ added lemma HasConjugation.isEquivariantConjugation_ofBasis
+ added lemma HasConjugation.ofBasis_conjEquiv_basis
+ added lemma basis_repr_conjEquiv_of_basis
+ added lemma cast_conjEquiv
+ added lemma conjEquiv_cast
+ added lemma conjEquiv_conjEquiv
+ added lemma conjEquiv_rep
+ added lemma conj_conj
+ added lemma conj_contr
+ added lemma conj_pure
+ added lemma conj_smul
+ added lemma star_contr_conjEquiv
+ added lemma tensorBasis_repr_conj_of_basis
+ added structure ConjLabels
@@ Physlib.Mathematics.Tensors.Contraction @@
+ module added Physlib.Mathematics.Tensors.Contraction (+422 -0)
  namespaces Tensor, Tensor.ColorEquiv
+ added abbrev contrColors
+ added def chain
+ added def contr
+ added def contrStd
+ added def noPairs
+ added def tmulLeft
+ added def tmulRight
+ added lemma contrStd_pure
+ added lemma contr_contr
+ added lemma contr_eq_of_samePair
+ added lemma contr_eq_zero_of_reindex_eq_neg
+ added lemma contr_noPairs
+ added lemma contr_pure
+ added lemma contr_reindex
+ added lemma contr_tmulEquiv_eq_zero_of_antisymm_symm
+ added lemma reindex_contr
+ added lemma tensorBasis_repr_contr
+ added lemma tensorBasis_repr_contrStd
+ added lemma tensorBasis_repr_contr_one_pair
+ added lemma tensorBasis_repr_contr_two_pairs
+ added lemma tmulEquiv_contr_left
+ added lemma tmulEquiv_contr_right
@@ Physlib.Mathematics.Tensors.Elab @@
+ module added Physlib.Mathematics.Tensors.Elab (+480 -0)
  namespaces Tensor.Notation, Tensor
+ added def Indices.elem
+ added def Indices.elems
+ added def Indices.fn
+ added def Indices.ofType?
+ added def Indices.size
+ added def Indices.toExpr
+ added def Indices.type
+ added def Node.reindex
+ added def Node.toDualAt
+ added def Node.toFin
+ added def build
+ added def buildFor
+ added def buildTo
+ added def colorList?
+ added def colorsTerm
+ added def contract
+ added def elabTensorIndex
+ added def indexEquiv
+ added def indexName
+ added def leaf
+ added def literalTensorType?
+ added def reorder
+ added def tensorOf
+ added def tensorTypeArgs?
+ added def uncontracted
+ added inductive Indices
+ added structure Node
@@ Physlib.Mathematics.Tensors.ElabExamples @@
+ module added Physlib.Mathematics.Tensors.ElabExamples (+483 -0)
  namespaces Tensor.Notation
@@ Physlib.Mathematics.Tensors.ElabTactics @@
+ module added Physlib.Mathematics.Tensors.ElabTactics (+904 -0)
  namespaces Tensor.Notation
+ added def arrange
+ added def bundledArg?
+ added def contractedProducts
+ added def deltaColor?
+ added def deltaOrientations
+ added def embeddings
+ added def factors
+ added def firstSuccess
+ added def flattenContractions
+ added def flattenTerm
+ added def flipForm
+ added def flipOneForm
+ added def formArgs?
+ added def goalEq
+ added def goalField
+ added def hasLowering
+ added def indexElems
+ added def indexNumber
+ added def insertDelta
+ added def insertDeltaAnywhere
+ added def isDefEqGoal
+ added def isEqFactor
+ added def isLeftNested
+ added def isSummandError
+ added def leadingProduct
+ added def leftover
+ added def matchFactors
+ added def matchFormPair
+ added def matchSummand
+ added def matchings
+ added def maxMatchings
+ added def normalizeSums
+ added def productFactors?
+ added def proveAside
+ added def readContraction
+ added def regroup
+ added def regroupContractions
+ added def regroupSummand
+ added def regroupUsing
+ added def regroupWithLowerings
+ added def regroupedFun
+ added def replaceLeaf
+ added def rewriteSubterm
+ added def sumCongr
+ added def summandErrorTag
+ added def summands
+ added def swapFactors
+ added def tensorArgs
+ added def tensorLeaves
+ added def throwSummandError
+ added def wrapSides
+ added structure ReadContraction
@@ Physlib.Mathematics.Tensors.HermitianForm @@
+ module added Physlib.Mathematics.Tensors.HermitianForm (+127 -0)
  namespaces Tensor, Tensor.Species
+ added def sesqForm
+ added lemma isPosDef_sesqForm_inverse
+ added lemma isSymm_sesqForm_inverse
+ added lemma sesqForm_apply
+ added lemma sesqForm_inverse_toLin
+ added lemma toLin_bijective_of_isPosDef
+ added lemma toLin_injective_of_isPosDef
@@ Physlib.Mathematics.Tensors.Inverse @@
+ module added Physlib.Mathematics.Tensors.Inverse (+159 -0)
  namespaces Tensor, Tensor.Species
+ added def inverse
+ added lemma contr_formTensor_formTensor
+ added lemma contr_inverse_mul
+ added lemma contr_mul_inverse
+ added lemma inverse_eq_of_comp_eq_id
+ added lemma inverse_form
+ added lemma inverse_invariant
+ added lemma inverse_map_rep
+ added lemma reindex_contr_formTensor_formTensor
+ added lemma toLin_inverse
@@ Physlib.Mathematics.Tensors.LinearMap @@
+ module added Physlib.Mathematics.Tensors.LinearMap (+307 -0)
  namespaces Tensor, Tensor.ColorEquiv, Tensor.Species
+ added abbrev delta
+ added abbrev toLin
+ added def deltaTensor
+ added def matMul
+ added def matMulAt
+ added lemma contr_deltaTensor
+ added lemma contr_deltaTensor_swap
+ added lemma contr_matMul
+ added lemma contr_matMulAt
+ added lemma contr_matMulAt_pure
+ added lemma contr_matMul_eq_deltaTensor_iff
+ added lemma coordPairing_basis
+ added lemma coordPairing_basis_dual
+ added lemma deltaTensor_invariant
+ added lemma delta_invariant
+ added lemma isIntertwiningMap_toLin_iff
+ added lemma tensorBasis_repr_deltaTensor
+ added lemma tensorBasis_repr_deltaTensor_eq_one
@@ Physlib.Mathematics.Tensors.Metric @@
+ module added Physlib.Mathematics.Tensors.Metric (+362 -0)
  namespaces Tensor, Tensor.Species
+ added class HasForm
+ added class IsAntisymmetricForm
+ added class IsSymmetricForm
+ added def form
+ added def formBilin
+ added def formMatrix
+ added def formTensor
+ added def toDual
+ added def toDualAt
+ added lemma basis_repr_toDual
+ added lemma comm_form_eq_smul
… and 279 further lines, left out to keep this short.
521 differences

The declarations are found by reading the diff as text, without regard for namespaces, so a declaration whose keyword and name are on different lines is missed, and two declarations of the same name in different namespaces are listed as one. A change to a proof, or to the body of a definition, does not appear. See scripts/alpha/github/pr_summary.lean.

Summary of commit 87928e5, remade whenever a commit is pushed.

@pariandrea
pariandrea force-pushed the tensors/mathematics-tensors-v2 branch from eede431 to ac66505 Compare November 2, 2026 15:19
pariandrea and others added 2 commits November 2, 2026 15:39
…per product chain, ↓μ and ↑μ by toDualAt

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…r_basis, tensorBasis_repr_formTensor and the scoped notation ℝT[d, up, down]

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
@pariandrea
pariandrea force-pushed the tensors/mathematics-tensors-v2 branch from ac66505 to bedd51b Compare November 2, 2026 15:49
pariandrea and others added 15 commits November 7, 2026 09:35
Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…sorial, the structural laws, tensor_regroup); realLorentz on it

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…ar map (snake, toLin_tmul, toLin_map, basis_repr_toLin); invariant_of_contr, invariant_of_up; Module.Basis.lTensor_pairingToLinearMap_coevaluation; cast_apply_congr

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…_eq_of_samePair without its second hypothesis (ColorEquiv.exists_samePair_left); tmulEquiv_contr_left with ColorEquiv.tmulRight and tmulLeft; tensorBasis_repr_contr_one_pair and two_pairs; contr_congr and contr_reindex_pairs removed; mapAt, mapAt_pure, congrAt_eq_mapAt, toLin_lTensor

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…l, toDualAt_eq_mapAt, toDualAt_eq_contr from contr_matMulAt; formBilin with isSymm_formBilin, isAlt_formBilin and formMatrix_eq_toMatrix; schouten; formTensor_symm and formTensor_antisymm as reindex σ g = ±g; toDualAt_comm, congrAt_comm, toDualAt_twoSlotEquiv and toDualAt_eq_contr_formTensor removed

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…lots for chains of lowerings and raisings

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…twiningMap; tensorRep, equivOfPure, intertwiningMapOfPure, congrSlots, equiv_smul, intertwiningMap_smul, cast_apply; ForMathlib Representation.Equiv.tensorCongr and IntertwiningMap.map_invariant; toDual_rep, congrAt_smul, toDualAt_smul, reindex_smul, oneSlotEquiv_rep, twoSlotEquiv_map_rep and contr_smul removed

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…or.metricVal_invariant, coordPairing_complexVector_coVector, dotProduct_SL2CRep

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
… on either side; tensor_regroup reads equations through metadata

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…rs; ForMathlib LinearMap.comp_eq_id_comm_of_finrank_eq

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…xt_pure; remove tensorBasis_repr_smul_tensorBasis, smul_tensorBasis_eq_sum

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…pSlots_id_apply; congrAt from mapAt; remove congrAt_pure

mapAt is mapSlots of slotMapsAt, and congrAt is the equivalence of
representations whose linear map is mapAt, so congrAt_eq_mapAt and
congrAt_symm hold by rfl. mapSlots_id is now an equality of maps.
toDualAt_pure uses mapAt_pure, and tensor_slots uses the slotMapsAt
lemmas.

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
pariandrea and others added 29 commits November 12, 2026 18:02
…verview

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
… index (D.3) in the Tensor overview

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…c and docstrings

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…nsorReindex and IsIntertwiningMap.piTensorMap to piTprodCongr, piTprodReindex and piTprodMap

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…ection descriptions and subsections C.1 to C.4

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…s, without the list of additions

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…e square, in the Representation overview and section A

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…an intertwining map, in section A of Representation

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
… and the tensor example with Lorentz tensors

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…_piTprod_of_tprod next to piTprod

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…ned by Lorentz examples in Representation

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…hat do not commute in C.2 of Representation

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…mily of representations is explained, in the Representation overview

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…rom its matrix Λ, in the Representation overview

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
… products η Λ = (Λ⁻¹)ᵀ η, and ∘ is explained, in the Representation overview

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…lains tensorCongr by lowering both indices

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…ρ g v and g • v and why map_smul_ofDistribMulAction restates intertwining with the notation

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…p_smul and equiv_smul use Mathlib's IntertwiningMap.isIntertwining

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…s with Lorentz examples, and sections A-D are described

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
… Kronecker product of one matrix per index

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…mpty, and a tensor with no indices is a scalar

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…κ ⊕ (J ⊕ J) of contrPairs, with the T^μ_μρ example

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
… ⊕ (J ⊕ J), with the Ricci tensor and Ricci scalar examples

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…kes only the standard arrangement and the dimension needs a well-defined rank

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…ection B of Representation

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>
…on (Λ⁻¹)ᵀα, smul_pure docstring, tensorCongr in key results

Co-authored-by: Claude Opus 5.5 <no-reply+claude-opus-5-5@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant