Documentation

Physlib.Relativity.Tensors.Conjugation.Basic

Conjugation structure on a tensor species #

i. Overview #

Each index of a tensor carries a colour naming the representation it transforms in. A species already has the variance dual τ c, the colour an index must meet to contract. Conjugation adds a second involution, the conjugate colour bar c: the colour an index transforms in after complex conjugation. A spinor index is the textbook example: complex conjugation sends a left-handed Weyl spinor to a right-handed one, (ψ_α)* = ψ̄_α̇, so bar swaps the left- and right-handed colours while fixing a real vector colour. Variance is untouched, so bar commutes with τ. In an N=1 chiral sector bar swaps chiral and anti-chiral indices.

conjT conjugates a tensor at the basis level: star each coordinate in the species basis and place it at the conjugate colour. Reality and Hermiticity are stated through it: a tensor is real when conjugation fixes it, and a metric is Hermitian when conjugating it swaps its two indices.

Conjugation is intrinsic species data, not a detachable add-on: a ConjTensorSpecies is a TensorSpecies bundled (extends) with the conjugate-colour involution bar and the coherence the recipe needs. bar c shares basis labels with c (barIdx_eq) and the contraction coefficients survive star (conj_contrComm), which together make conjugation commute with contraction. conjT is then conj-semilinear, involutive, and commutes with contraction; the last makes reality and Hermiticity compatible with raising and lowering indices.

At the single-index level, conjEquiv : V c ≃ₛₗ V (bar c) realises this conjugation: it reads a vector's coordinates, conjugates them with ConjModule.starFinsupp, and re-seats them at the conjugate colour. It rests on the conjugate module ConjModule (Physlib.Mathematics.Modules.ConjModule), the same vectors with the scalar action twisted by conjugation (i acts as −i). Equipping the conjugate colours with such conjugate-module carriers is what makes a metric V c ⊗ V (bar c) → k genuinely bilinear and IsHermitian an honest conjugate-transpose.

ii. Key results #

iii. Table of contents #

A. The conjugation structure #

A ConjTensorSpecies bundles a TensorSpecies (extends) with the conjugation data. Conjugation is defined at the basis level, where it is "star the components" (§B). Four of the new fields are bookkeeping on colours and index sets, trivial to supply per instance: bar (the conjugate-colour involution), bar_involution, bar_tau (it commutes with τ), and barIdx_eq (a colour and its conjugate share basis labels). The one substantive field is conj_contrComm, that the contraction coefficients are unchanged by star; this is what makes conjugation commute with contraction (§D), and for a real (δ) contraction it is star δ = δ.

structure ConjTensorSpecies (k : Type) [CommRing k] [StarRing k] (C G : Type) [Group G] (V : C → Type) [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] (basisIdx : C → Type) [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] (rep : (c : C) → Representation k G (V c)) (b : (c : C) → Module.Basis (basisIdx c) k (V c)) extends TensorSpecies k C G V basisIdx rep b :

A tensor species bundled with a conjugation. Beyond the TensorSpecies it extends, it carries the conjugate-colour involution bar, the index-set identification barIdx_eq, and the contraction-coherence conj_contrComm. Also carries bar_involution and bar_tau (that bar is involutive and commutes with the variance dual).

Instances For
    theorem ConjTensorSpecies.bar_tau_of_bar {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {a d : C} (hbar : S.bar a = d) :
    S.bar (S.τ d) = S.τ a

    If bar a = d, then bar (τ d) = τ a.

    B. The conjugation of vectors #

    conjEquiv is the conjugate-linear isomorphism V c ≃ₛₗ[starRingEnd k] V (bar c): read off the coordinates of a vector in the species basis, conjugate them (star), and re-seat them as the coordinates at the conjugate colour (the index sets agree by barIdx_eq). It is the single-slot shadow of conjT, packaged as a bundled equivalence so the Hermitian-metric layer can apply it to a metric slot. Semilinearity is built in via the coordinate star; invertibility is star's involutivity together with bar's.

    noncomputable def ConjTensorSpecies.conjEquiv {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {c : C} :
    V c ≃ₗ⋆[k] V (S.bar c)

    The conjugate-linear slot isomorphism V c ≃ₛₗ[starRingEnd k] V (bar c): conjugate the coordinates in the species basis and relabel to the conjugate colour via barIdx_eq.

    Equations
    Instances For
      @[simp]
      theorem ConjTensorSpecies.conjEquiv_basis {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {c : C} (i : basisIdx c) :
      S.conjEquiv ((b c) i) = (b (S.bar c)) ((Equiv.cast ⋯) i)

      conjEquiv on a basis vector: b c i ↦ b (bar c) i (relabelled through barIdx_eq), since the basis coordinates of b c i are the indicator at i and star fixes 0 and 1.

      theorem ConjTensorSpecies.conjEquiv_basis_repr {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {c : C} (v : V c) (φ : basisIdx (S.bar c)) :
      ((b (S.bar c)).repr (S.conjEquiv v)) φ = star (((b c).repr v) ((Equiv.cast ⋯) φ))
      theorem ConjTensorSpecies.conjEquiv_equivariant {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {c : C} (g : G) (v : V c) :
      S.conjEquiv (((rep c) g) v) = ((rep (S.bar c)) g) (S.conjEquiv v)

      C. Conjugation of tensors #

      We define the conjugation map conjT through its action on components, record that it conjugates components in place (componentMap_conjT), and show it is conj-semilinear and additive.

      Conventions for the index notation in this file. Indices are written in slot order: in M_{IJ̄}, I is the first slot (Lean slot 0, colour c 0) and J̄ the second (slot 1, colour c 1 = bar (c 0)). As a tensor, g = g_{IJ̄} dφᴵ ⊗ dφ̄^J̄ takes a holomorphic vector in its first slot and an antiholomorphic one in its second: g(u, v̄) = g_{IJ̄} uᴵ v̄^J̄. An index of a conjugate colour carries a bar or a dot (Ī, α̇), and conjugation adds a bar to each index, removing it from an index that already has one.

      For chiral scalar fields φᴵ, the basis vectors are the derivatives e_I = ∂/∂φᴵ, and their conjugates ē_Ī = ∂/∂φ̄^Ī. A Kähler metric is g_{IJ̄} = ∂_I ∂_J̄ K = g(e_I, ē_J̄). Holomorphic index first is the standard convention, used throughout; it is a choice, since ∂_I ∂_J̄ K = ∂_J̄ ∂_I K (Schwarz's theorem).

      def ConjTensorSpecies.componentReindex {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {n : ℕ} (c : Fin n → C) :

      Reindex component labels of bar ∘ c back to c, slotwise via the cast barIdx_eq.

      Equations
      Instances For
        noncomputable def ConjTensorSpecies.conjT {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {n : ℕ} {c : Fin n → C} :
        S.Tensor c →ₗ⋆[k] S.Tensor fun (i : Fin n) => S.bar (c i)

        Conjugation of a tensor: conjugate the components and reindex the basis to the conjugate colours.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem ConjTensorSpecies.conjT_apply {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {n : ℕ} {c : Fin n → C} (t : S.Tensor c) :
          S.conjT t = (TensorSpecies.Tensor.ofComponents fun (i : Fin n) => S.bar (c i)) fun (b_1 : TensorSpecies.Tensor.ComponentIdx fun (i : Fin n) => S.bar (c i)) => star ((TensorSpecies.Tensor.componentMap c) t ((S.componentReindex c) b_1))
          @[simp]
          theorem ConjTensorSpecies.componentMap_conjT {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {n : ℕ} {c : Fin n → C} (t : S.Tensor c) (b✝ : TensorSpecies.Tensor.ComponentIdx fun (i : Fin n) => S.bar (c i)) :

          Components of a conjugated tensor: the star of the original components, reindexed.

          theorem ConjTensorSpecies.toMatrix_conjT {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {cs : Fin 2 → C} (t : S.Tensor cs) :

          Conjugating a rank-two tensor conjugates each component and bars both indices: (T̄)_{ĪJ̄} = (T_{IJ})*, where barring a barred index removes the bar. For example, ψ_α χ_β goes to ψ̄_α̇ χ̄_β̇, and a tensor M_{IJ̄} goes to (M̄)_{ĪJ} = (M_{IJ̄})*.

          theorem ConjTensorSpecies.conjT_basis {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {n : ℕ} {c : Fin n → C} (i : TensorSpecies.Tensor.ComponentIdx c) :
          noncomputable def ConjTensorSpecies.conjSingleT {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) (x : C) :

          Conjugation of a vector, vᴵ ↦ v̄^Ī = (vᴵ)*, landing at the conjugate colour. For example, a left-handed Weyl spinor ψ_α goes to the right-handed ψ̄_α̇.

          Equations
          Instances For
            theorem ConjTensorSpecies.conjSingleT_basis {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) (x : C) (z : basisIdx x) :

            Conjugation sends the basis vector e_I to ē_Ī, the basis vector of the conjugate colour with the same label.

            theorem ConjTensorSpecies.conjT_pure {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {n : ℕ} {c : Fin n → C} (p : TensorSpecies.Tensor.Pure S.toTensorSpecies c) :
            theorem ConjTensorSpecies.conjT_eq_permT_iff {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {n m : ℕ} {c : Fin n → C} {c' : Fin m → C} {σ : Fin n → Fin m} (h : TensorSpecies.Tensor.IsReindexing c' (fun (i : Fin n) => S.bar (c i)) σ) (t : S.Tensor c) (t' : S.Tensor c') :

            Componentwise criterion for conjT t = permT σ h t'. The conjugate of t equals the recolouring permT σ h t' exactly when, at every component, the star-conjugated reindexed component of t matches the corresponding component of permT σ h t'. This packages the componentMap_conjT expansion and the repr/componentMap bridge that the reality and Hermiticity proofs downstream would otherwise repeat by hand; the caller is left only with the species-specific permutation bookkeeping on the right-hand side.

            theorem ConjTensorSpecies.conjT_equivariant {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {n : ℕ} {c : Fin n → C} (g : G) (t : S.Tensor c) :
            S.conjT (g • t) = g • S.conjT t

            D. The involution law #

            We prove conjT_conjT: conjugating a tensor twice returns it, up to the identity recolouring bar ∘ bar ∘ c = c. The supporting lemmas reconcile the iterated basis-label casts.

            theorem ConjTensorSpecies.isReindexing_bar_bar {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {n : ℕ} (c : Fin n → C) :
            TensorSpecies.Tensor.IsReindexing c (fun (i : Fin n) => S.bar (S.bar (c i))) id

            The identity permutation satisfies IsReindexing from c to bar ∘ bar ∘ c, as bar is an involution.

            theorem ConjTensorSpecies.conjT_conjT {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {n : ℕ} {c : Fin n → C} (t : S.Tensor c) :

            Conjugation is an involution: conjugating twice returns the original tensor, up to the bar_involution recolouring (the identity permutation permT).

            E. Commutation with contraction #

            We prove conjT_contrT: conjugation commutes with contracting two dual-coloured slots. The contraction expands as a sum over the contracted index pair, and conj_contrComm matches the conjugated coefficients to those on the bar-images.

            theorem ConjTensorSpecies.contrCond_bar {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {n : ℕ} {c : Fin (n + 1 + 1) → C} {i j : Fin (n + 1 + 1)} (h : i ≠ j ∧ S.τ (c i) = c j) :
            i ≠ j ∧ S.τ ((S.bar ∘ c) i) = (S.bar ∘ c) j

            Slots with dual colour in c have dual colour in bar ∘ c, as bar commutes with τ.

            theorem ConjTensorSpecies.conjT_contrT {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {n : ℕ} {c : Fin (n + 1 + 1) → C} (i j : Fin (n + 1 + 1)) (h : i ≠ j ∧ S.τ (c i) = c j) (t : S.Tensor c) :

            Conjugation commutes with contraction: conjugating a contracted tensor equals contracting the conjugate on the bar-images of the same two slots.

            F. Hermitian pairings #

            A metric slot pairs a colour c with its conjugate bar c. IsHermitian is the structural form of g_{IJ̄} = conj g_{JĪ}: conjugating and swapping the two slots through conjEquiv returns g's star. Because V c and V (bar c) are genuinely different modules this is the honest conjugate-transpose, not a bare g = g.flip. The condition is fixed here as IsHermitian; a downstream metric layer instantiates it for a concrete pairing.

            A tensor M_{IJ̄} with one index and one conjugate index, such as a Kähler metric g_{IJ̄}, has the matrix of components (M_{IJ̄}) (toSquareMatrix), regarded as a square matrix over the labels of I. Its entries are the components themselves. Lean needs this step because the labels of a colour and of its conjugate are different types, identified by barIdx_eq, and Hermiticity, positive-definiteness and the inverse are defined only for square matrices. M is Hermitian, (M_{IJ̄})* = M_{JĪ}, exactly when this matrix is.

            def ConjTensorSpecies.IsHermitian {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {c : C} (g : TensorProduct k (V c) (V (S.bar c)) →ₗ[k] k) :

            A pairing g : V c ⊗ V (bar c) → k is Hermitian when conjugating and swapping its two slots via conjEquiv returns its star: g (x ⊗ y) = star (g (conjEquiv.symm y ⊗ conjEquiv x)).

            Equations
            Instances For
              noncomputable def ConjTensorSpecies.toSquareMatrix {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {c : Fin 2 → C} (M : S.Tensor c) (hbar : S.bar (c 0) = c 1 := by rfl) :
              Matrix (basisIdx (c 0)) (basisIdx (c 0)) k

              The matrix (M_{IJ̄}), with entries unchanged, regarded as a square matrix over the labels of I. Lean needs this step because the labels of a colour and of its conjugate are different types, identified by barIdx_eq; only for a square matrix are Hermiticity, positive-definiteness and the inverse defined. Convention: the unbarred index is the row and the barred index the column, entry (I, J) being M_{IJ̄}, as physicists write the matrix. For a Kähler metric g_{IJ̄} it is the usual matrix (g_{IJ̄}).

              Equations
              Instances For
                theorem ConjTensorSpecies.toSquareMatrix_apply {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {c : Fin 2 → C} (hbar : S.bar (c 0) = c 1) (M : S.Tensor c) (i j : basisIdx (c 0)) :
                S.toSquareMatrix M hbar i j = M.toMatrix i ((Equiv.cast ⋯).symm j)
                theorem ConjTensorSpecies.toMatrix_eq_submatrix_toSquareMatrix {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {c : Fin 2 → C} (hbar : S.bar (c 0) = c 1) (M : S.Tensor c) :

                toMatrix M is toSquareMatrix M with its columns labelled by J̄ instead of J.

                theorem ConjTensorSpecies.conjT_eq_permT_swap_iff_toSquareMatrix_isHermitian {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) {c : Fin 2 → C} (hbar : S.bar (c 0) = c 1) (M : S.Tensor c) :

                For M_{IJ̄}, the conjugate (M̄)_{ĪJ} = (M_{IJ̄})* and the swapped tensor M_{JĪ} have the same index types, a barred index then an ordinary one. They are equal, (M_{IJ̄})* = M_{JĪ}, exactly when the matrix (M_{IJ̄}) is Hermitian. A Kähler metric satisfies this.

                theorem ConjTensorSpecies.toMatrix_contractInnerT_eq_toSquareMatrix_mul {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) [S.HasContrDualBases] {cs ds : Fin 2 → C} (hbar : S.bar (cs 0) = cs 1) (h : S.τ (cs 1) = ds 0) (M : S.Tensor cs) (t : S.Tensor ds) :

                The matrix of g_{IJ̄} t^{J̄K} is the product of the square matrix (g_{IJ̄}) and the matrix (t^{J̄K}), with the rows of (t^{J̄K}) labelled by J.

                G. Dual bases under conjugation #

                A lower index contracts with an upper one, and the bases are dual: e_α contracted with e^β gives δ_α^β. This section shows that the conjugate bases are dual in the same way: ē_α̇ contracted with ē^β̇ gives δ_α̇^β̇. For example, for a vector vᴵ and a covector w_I, (vᴵ w_I)* = v̄^Ī w̄_Ī: the conjugate contraction pairs the same labels. This follows because contraction commutes with conjugation (conj_contrComm).

                theorem ConjTensorSpecies.isContrDualMatching_bar {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) [S.HasContrDualBases] (d : C) :

                The conjugate bases are dual: if e_α contracted with e^β is δ_α^β, then ē_α̇ contracted with ē^β̇ is δ_α̇^β̇.

                theorem ConjTensorSpecies.dualIdxEquiv_bar {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) [Nontrivial k] [S.HasContrDualBases] {c1 c2 c3 : C} (h : S.τ c1 = c2) (h' : S.τ (S.bar c1) = c3) (hbar : S.bar c2 = c3) (x : basisIdx c1) :

                dualIdxEquiv sends a lower label α to the upper label α it contracts with to 1. Conjugation commutes with this: the dotted label α̇ pairs with the dotted upper label α̇.

                theorem ConjTensorSpecies.dualIdxEquiv_bar_tau {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) [Nontrivial k] [S.HasContrDualBases] {a d : C} (hbar : S.bar a = d) (j : basisIdx (S.τ d)) :

                Removing a bar and lowering an index commute on labels. From a label of the upper barred index J̄, removing the bar and then lowering gives the same label of the lower index J as lowering and then removing the bar.

                upper J̄ (τ d)  → remove bar →  upper J (τ a)
                      ↓ lower                        ↓ lower
                lower J̄ (d)    → remove bar →  lower J (a)
                

                The left-hand side of the statement goes across the top and down, the right-hand side down and across the bottom.

                H. The sesquilinear form of a tensor #

                A tensor g_{IJ̄} with one index and one conjugate index, such as a Kähler metric, defines a Hermitian form on vectors of one colour. By the slot conventions of §C, g takes a holomorphic vector u in its first slot and an antiholomorphic vector in its second, g(u, v̄) = g_{IJ̄} uᴵ v̄^J̄. To pair two vectors s, t of the same colour, one of them is conjugated so that it fits the second slot.

                Convention. We use Mathlib's sesquilinear forms, so that Mathlib's results on Hermitian and positive-definite forms apply. A Mathlib form ⟨s, t⟩ is conjugate-linear in its left argument s. So s is the vector that is conjugated: s̄ goes into the second, barred slot of g, and t goes unchanged into the first slot,

                ⟨s, t⟩ = g(t, s̄) = g_{IJ̄} tᴵ s̄^J̄.

                The order of the arguments of ⟨s, t⟩ is thus opposite to the order of the slots of g. Physics usually writes the form the other way round, g_{IJ̄} uᴵ v̄^J̄, conjugate-linear in its right argument v. This does not change norms or Hermiticity: ⟨t, t⟩ = g_{IJ̄} tᴵ t̄^J̄ is the norm squared of the kinetic term g_{IJ̄} ∂φᴵ ∂φ̄^J̄. It does change the matrix: on the basis e_I = ∂/∂φᴵ, ⟨e_I, e_J⟩ = g(e_J, ē_I) = g_{JĪ}, the transpose of (g_{IJ̄}).

                g is Hermitian, (g_{IJ̄})* = g_{JĪ}, exactly when its form is (LinearMap.IsSymm, ⟨s, t⟩* = ⟨t, s⟩), and positive-definite, ⟨t, t⟩ > 0 for t ≠ 0, exactly when its form is (LinearMap.IsPosDef). On a concrete species the colour conditions hold by rfl, so the form of g on vectors of colour x is written S.toSesqForm x g.

                noncomputable def ConjTensorSpecies.toSesqForm {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) (x : C) {c : Fin 2 → C} (M : S.Tensor c) (hbar : S.bar (c 0) = c 1 := by rfl) (hx : S.τ x = c 0 := by rfl) :

                The Hermitian form ⟨s, t⟩ = M(t, s̄) = M_{IJ̄} tᴵ s̄^J̄ of a tensor M_{IJ̄}, on vectors s, t. Convention: as in Mathlib it is conjugate-linear in its left argument s; s̄ fills the second, barred slot of M and t the first, so the argument order is opposite to the slot order.

                Equations
                Instances For
                  theorem ConjTensorSpecies.toMatrix₂_toSesqForm {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) [S.HasContrDualBases] {x : C} {c : Fin 2 → C} (hbar : S.bar (c 0) = c 1) (hx : S.τ x = c 0) (M : S.Tensor c) :

                  Since the left argument of the form fills the second slot of M (toSesqForm), ⟨e_I, e_J⟩ = M(e_J, ē_I) = M_{JĪ}: the matrix of the form is the transpose of (M_{IJ̄}). For a Kähler metric, ⟨∂_I, ∂_J⟩ = ∂_J ∂_Ī K = g_{JĪ}.

                  theorem ConjTensorSpecies.isSymm_toSesqForm_iff_toSquareMatrix_isHermitian {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) [S.HasContrDualBases] {x : C} {c : Fin 2 → C} (hbar : S.bar (c 0) = c 1) (hx : S.τ x = c 0) (M : S.Tensor c) :
                  (S.toSesqForm x M hbar hx).IsSymm ↔ (S.toSquareMatrix M hbar).IsHermitian

                  ⟨s, t⟩* = ⟨t, s⟩ for all s, t exactly when (M_{IJ̄})* = M_{JĪ}.

                  theorem ConjTensorSpecies.isSymm_toSesqForm_iff_conjT_eq_permT {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) [S.HasContrDualBases] {x : C} {c : Fin 2 → C} (hbar : S.bar (c 0) = c 1) (hx : S.τ x = c 0) (M : S.Tensor c) :
                  (S.toSesqForm x M hbar hx).IsSymm ↔ S.conjT M = (TensorSpecies.Tensor.permT ![1, 0] ⋯) M

                  ⟨s, t⟩* = ⟨t, s⟩ for all s, t exactly when the conjugate of M equals M with its two indices swapped, (M_{IJ̄})* = M_{JĪ}.

                  I. Positive-definite tensors #

                  theorem ConjTensorSpecies.isPosDef_toSesqForm_iff_toSquareMatrix_posDef {k : Type} [CommRing k] [StarRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) [PartialOrder k] [S.HasContrDualBases] {x : C} {c : Fin 2 → C} (hbar : S.bar (c 0) = c 1) (hx : S.τ x = c 0) (M : S.Tensor c) :
                  (S.toSesqForm x M hbar hx).IsPosDef ↔ (S.toSquareMatrix M hbar).PosDef

                  The form is positive-definite, Hermitian with M_{IJ̄} tᴵ t̄^J̄ > 0 for every t ≠ 0, exactly when the matrix (M_{IJ̄}) is. A Kähler metric is positive-definite, which makes kinetic terms positive.

                  theorem ConjTensorSpecies.isUnit_det_toSquareMatrix_of_isPosDef {k : Type} [Field k] [StarRing k] [PartialOrder k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} (S : ConjTensorSpecies k C G V basisIdx rep b) [S.HasContrDualBases] {x : C} {c : Fin 2 → C} (hbar : S.bar (c 0) = c 1) (hx : S.τ x = c 0) {M : S.Tensor c} (hM : (S.toSesqForm x M hbar hx).IsPosDef) :

                  Over a field, the matrix (M_{IJ̄}) of a positive-definite tensor is invertible.