Imports
/- Copyright (c) 2026 Andrea Pari. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrea Pari -/ module public import Physlib.Relativity.Tensors.Contraction.Basic public import Physlib.Relativity.Tensors.Contraction.Basis public import Physlib.Mathematics.ConjModule public import Mathlib.Algebra.Star.Basic public import Mathlib.LinearAlgebra.Finsupp.LSum

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.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

    ConjTensorSpecies is a tensor species bundled with its conjugation.

    ConjTensorSpecies.conjT is the conjugation of a tensor.

    ConjTensorSpecies.conjT_conjT proves that conjugation is an involution.

    ConjTensorSpecies.conjT_contrT proves that conjugation commutes with contraction.

    ConjTensorSpecies.conjT_eq_permT_iff is the componentwise criterion for conjT t = permT σ h t', the workhorse for proving reality and Hermiticity conditions.

    ConjTensorSpecies.conjEquiv is the single-slot conjugate-linear isomorphism V c ≃ₛₗ V (bar c).

    ConjTensorSpecies.IsHermitian is the structural conjugate-transpose condition on a metric slot.

iii. Table of contents

    A. The conjugation structure

    B. The conjugation of vectors

    C. Conjugation of tensors

    D. The involution law

    E. Commutation with contraction

    F. Hermitian pairings

@[expose] public section

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 δ = δ.

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).

The conjugate colour: the colour an index transforms in under complex conjugation; preserves variance (commutes with τ).

bar is an involution.

bar commutes with the variance dual τ.

Conjugation fixes the index set: the conjugate colour reuses the same basis labels. Conjugation conjugates components in an adapted basis; it never permutes labels, so the label sets of c and bar c coincide.

Conjugation is equivariant: it preserves the action of the group.

Conjugation is compatible with contraction at the basis level: star of the contraction coefficient at colour d equals the coefficient at the conjugate colour bar d, with basis labels carried over by barIdx_eq. For a real (δ) contraction this is star δ = δ.

structure ConjTensorSpecies (k : Type) [CommRing k] [StarRing k] (C : Type) (G : Type) [Group G] (V : C Type) [ c, AddCommGroup (V c)] [ c, Module k (V c)] (basisIdx : C Type) [ c, Fintype (basisIdx c)] [ c, DecidableEq (basisIdx c)] (rep : (c : C) Representation k G (V c)) (b : (c : C) Basis (basisIdx c) k (V c)) extends TensorSpecies k C G V basisIdx rep b where bar : C C bar_involution : Function.Involutive bar bar_tau : c, bar (toTensorSpecies.τ c) = toTensorSpecies.τ (bar c) barIdx_eq : c, basisIdx (bar c) = basisIdx c conj_basis_equivariant : (c : C) (g : G) (i j : basisIdx c), (b c).repr (rep c g (b c i)) j = star ((b (bar c)).repr (rep (bar c) g (b (bar c) (Equiv.cast (barIdx_eq c).symm i))) (Equiv.cast (barIdx_eq c).symm j)) conj_contrComm : (d : C) (x₁ : basisIdx d) (x₂ : basisIdx (toTensorSpecies.τ d)), star (toTensorSpecies.contr d (b d x₁ ⊗ₜ[k] b (toTensorSpecies.τ d) x₂)) = toTensorSpecies.contr (bar d) (b (bar d) ((Equiv.cast (barIdx_eq d)).symm x₁) ⊗ₜ[k] b (toTensorSpecies.τ (bar d)) (basisIdxCongr (bar_tau d) ((Equiv.cast (barIdx_eq (toTensorSpecies.τ d))).symm x₂)))
TODO "Extend `complexLorentzTensor` to a `ConjTensorSpecies`."TODO "Extend `realLorentzTensor` to a `ConjTensorSpecies`."

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.

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.

def conjEquiv {c : C} : V c ≃ₛₗ[starRingEnd k] V (S.bar c) := ((b c).repr.trans (ConjModule.starFinsupp (k := k))).trans ((Finsupp.domLCongr (Equiv.cast (S.barIdx_eq c).symm)).trans (b (S.bar c)).repr.symm)

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.

@[simp] lemma conjEquiv_basis {c : C} (i : basisIdx c) : S.conjEquiv (b c i) = b (S.bar c) (Equiv.cast (S.barIdx_eq c).symm i) := k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bc:Ci:basisIdx cS.conjEquiv ((b c) i) = (b (S.bar c)) ((Equiv.cast ) i) All goals completed! 🐙
lemma conjEquiv_basis_repr {c : C} (v : V c) (φ : basisIdx (S.bar c)) : (b (S.bar c)).repr (S.conjEquiv v) φ = star ((b c).repr v (Equiv.cast (S.barIdx_eq c) φ)) := k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bc:Cv:V cφ:basisIdx (S.bar c)((b (S.bar c)).repr (S.conjEquiv v)) φ = star (((b c).repr v) ((Equiv.cast ) φ)) k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bc:Cv:V cφ:basisIdx (S.bar c)({ toFun := fun f => Finsupp.mapRange star f, map_add' := , map_smul' := , invFun := fun f => Finsupp.mapRange star f, left_inv := , right_inv := } ((b c).repr v)) ((Equiv.cast ).symm φ) = star (((b c).repr v) ((Equiv.cast ) φ)) All goals completed! 🐙k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bc:Cg:Gv:V cS.conjEquiv (((rep c) g) (∑ i, ((b c).repr v) i (b c) i)) = ((rep (S.bar c)) g) (S.conjEquiv (∑ i, ((b c).repr v) i (b c) i)) k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bc:Cg:Gv:V c x, (starRingEnd k) (((b c).repr v) x) S.conjEquiv (((rep c) g) ((b c) x)) = x, (starRingEnd k) (((b c).repr v) x) ((rep (S.bar c)) g) ((b (S.bar c)) (cast x)) k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bc:Cg:Gv:V c(fun x => (starRingEnd k) (((b c).repr v) x) S.conjEquiv (((rep c) g) ((b c) x))) = fun x => (starRingEnd k) (((b c).repr v) x) ((rep (S.bar c)) g) ((b (S.bar c)) (cast x)) k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bc:Cg:Gv:V cx:basisIdx c(starRingEnd k) (((b c).repr v) x) S.conjEquiv (((rep c) g) ((b c) x)) = (starRingEnd k) (((b c).repr v) x) ((rep (S.bar c)) g) ((b (S.bar c)) (cast x)) k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bc:Cg:Gv:V cx:basisIdx cS.conjEquiv (((rep c) g) ((b c) x)) = ((rep (S.bar c)) g) ((b (S.bar c)) (cast x)) k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bc:Cg:Gv:V cx:basisIdx ch1:RingHomInvPair (starRingEnd k) (starRingEnd k)h2:basisIdx c = basisIdx (S.bar c)S.conjEquiv (((rep c) g) ((b c) x)) = ((rep (S.bar c)) g) ((b (S.bar c)) (cast h2 x)) k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bc:Cg:Gv:V cx:basisIdx ch1:RingHomInvPair (starRingEnd k) (starRingEnd k)h2:basisIdx c = basisIdx (S.bar c)(b (S.bar c)).repr (S.conjEquiv (((rep c) g) ((b c) x))) = (b (S.bar c)).repr (((rep (S.bar c)) g) ((b (S.bar c)) (cast h2 x))) k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bc:Cg:Gv:V cx:basisIdx ch1:RingHomInvPair (starRingEnd k) (starRingEnd k)h2:basisIdx c = basisIdx (S.bar c)j':basisIdx (S.bar c)((b (S.bar c)).repr (S.conjEquiv (((rep c) g) ((b c) x)))) j' = ((b (S.bar c)).repr (((rep (S.bar c)) g) ((b (S.bar c)) (cast h2 x)))) j' k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bc:Cg:Gv:V cx:basisIdx ch1:RingHomInvPair (starRingEnd k) (starRingEnd k)h2:basisIdx c = basisIdx (S.bar c)j:basisIdx c((b (S.bar c)).repr (S.conjEquiv (((rep c) g) ((b c) x)))) ((Equiv.cast ) j) = ((b (S.bar c)).repr (((rep (S.bar c)) g) ((b (S.bar c)) (cast h2 x)))) ((Equiv.cast ) j) All goals completed! 🐙

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.

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

def componentReindex {n : } (c : Fin n C) : ComponentIdx (S := S.toTensorSpecies) (fun i => S.bar (c i)) ComponentIdx (S := S.toTensorSpecies) c := Equiv.piCongrRight fun i => Equiv.cast (S.barIdx_eq (c i))

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

def conjT {n : } {c : Fin n C} : S.Tensor c →ₛₗ[starRingEnd k] S.Tensor (fun i => S.bar (c i)) where toFun t := ofComponents (fun i => S.bar (c i)) (fun b => star (componentMap c t (S.componentReindex c b))) map_add' t₁ t₂ := k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Ct₁:S.Tensor ct₂:S.Tensor c((ofComponents fun i => S.bar (c i)) fun b_1 => star ((componentMap c) (t₁ + t₂) ((S.componentReindex c) b_1))) = ((ofComponents fun i => S.bar (c i)) fun b_1 => star ((componentMap c) t₁ ((S.componentReindex c) b_1))) + (ofComponents fun i => S.bar (c i)) fun b_1 => star ((componentMap c) t₂ ((S.componentReindex c) b_1)) k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Ct₁:S.Tensor ct₂:S.Tensor c (b_1 : ComponentIdx fun i => S.bar (c i)), (componentMap fun i => S.bar (c i)) ((ofComponents fun i => S.bar (c i)) fun b_2 => star ((componentMap c) (t₁ + t₂) ((S.componentReindex c) b_2))) b_1 = (componentMap fun i => S.bar (c i)) (((ofComponents fun i => S.bar (c i)) fun b_2 => star ((componentMap c) t₁ ((S.componentReindex c) b_2))) + (ofComponents fun i => S.bar (c i)) fun b_2 => star ((componentMap c) t₂ ((S.componentReindex c) b_2))) b_1 k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Ct₁:S.Tensor ct₂:S.Tensor cb:ComponentIdx fun i => S.bar (c i)(componentMap fun i => S.bar (c i)) ((ofComponents fun i => S.bar (c i)) fun b => star ((componentMap c) (t₁ + t₂) ((S.componentReindex c) b))) b = (componentMap fun i => S.bar (c i)) (((ofComponents fun i => S.bar (c i)) fun b => star ((componentMap c) t₁ ((S.componentReindex c) b))) + (ofComponents fun i => S.bar (c i)) fun b => star ((componentMap c) t₂ ((S.componentReindex c) b))) b All goals completed! 🐙 map_smul' r t := k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Cr:kt:S.Tensor c((ofComponents fun i => S.bar (c i)) fun b_1 => star ((componentMap c) (r t) ((S.componentReindex c) b_1))) = (starRingEnd k) r (ofComponents fun i => S.bar (c i)) fun b_1 => star ((componentMap c) t ((S.componentReindex c) b_1)) k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Cr:kt:S.Tensor c (b_1 : ComponentIdx fun i => S.bar (c i)), (componentMap fun i => S.bar (c i)) ((ofComponents fun i => S.bar (c i)) fun b_2 => star ((componentMap c) (r t) ((S.componentReindex c) b_2))) b_1 = (componentMap fun i => S.bar (c i)) ((starRingEnd k) r (ofComponents fun i => S.bar (c i)) fun b_2 => star ((componentMap c) t ((S.componentReindex c) b_2))) b_1 k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Cr:kt:S.Tensor cb:ComponentIdx fun i => S.bar (c i)(componentMap fun i => S.bar (c i)) ((ofComponents fun i => S.bar (c i)) fun b => star ((componentMap c) (r t) ((S.componentReindex c) b))) b = (componentMap fun i => S.bar (c i)) ((starRingEnd k) r (ofComponents fun i => S.bar (c i)) fun b => star ((componentMap c) t ((S.componentReindex c) b))) b k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Cr:kt:S.Tensor cb:ComponentIdx fun i => S.bar (c i)star r * star ((componentMap c) t ((S.componentReindex c) b)) = (starRingEnd k) r * star ((componentMap c) t ((S.componentReindex c) b)) All goals completed! 🐙
lemma conjT_apply {n : } {c : Fin n C} (t : S.Tensor c) : S.conjT t = ofComponents (fun i => S.bar (c i)) (fun b => star (componentMap c t (S.componentReindex c b))) := rfl

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

@[simp] lemma componentMap_conjT {n : } {c : Fin n C} (t : S.Tensor c) (b : ComponentIdx (S := S.toTensorSpecies) (fun i => S.bar (c i))) : componentMap (fun i => S.bar (c i)) (S.conjT t) b = star (componentMap c t (S.componentReindex c b)) := k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep b✝n:c:Fin n Ct:S.Tensor cb:ComponentIdx fun i => S.bar (c i)(componentMap fun i => S.bar (c i)) (S.conjT t) b = star ((componentMap c) t ((S.componentReindex c) b)) All goals completed! 🐙
lemma conjT_basis {n : } {c : Fin n C} (i : ComponentIdx (S := S.toTensorSpecies) c) : S.conjT (basis c i) = basis (fun i => S.bar (c i)) ((S.componentReindex c).symm i) := k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Ci:ComponentIdx cS.conjT ((basis c) i) = (basis fun i => S.bar (c i)) ((S.componentReindex c).symm i) k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Ci:ComponentIdx c (b_1 : ComponentIdx fun i => S.bar (c i)), (componentMap fun i => S.bar (c i)) (S.conjT ((basis c) i)) b_1 = (componentMap fun i => S.bar (c i)) ((basis fun i => S.bar (c i)) ((S.componentReindex c).symm i)) b_1 k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Ci:ComponentIdx cb:ComponentIdx fun i => S.bar (c i)(componentMap fun i => S.bar (c i)) (S.conjT ((basis c) i)) b = (componentMap fun i => S.bar (c i)) ((basis fun i => S.bar (c i)) ((S.componentReindex c).symm i)) b k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Ci:ComponentIdx cb:ComponentIdx fun i => S.bar (c i)star ((componentMap c) ((basis c) i) ((S.componentReindex c) b)) = (componentMap fun i => S.bar (c i)) ((basis fun i => S.bar (c i)) ((S.componentReindex c).symm i)) b k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Ci:ComponentIdx cb:ComponentIdx fun i => S.bar (c i)star (if i = (Equiv.piCongrRight fun i => Equiv.cast ) b then 1 else 0) = if (Equiv.piCongrRight fun i => Equiv.cast ).symm i = b then 1 else 0 k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Ci:ComponentIdx cb:ComponentIdx fun i => S.bar (c i)h:i = (Equiv.piCongrRight fun i => Equiv.cast ) bh2:(Equiv.piCongrRight fun i => Equiv.cast ).symm i = bstar 1 = 1k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Ci:ComponentIdx cb:ComponentIdx fun i => S.bar (c i)h:i = (Equiv.piCongrRight fun i => Equiv.cast ) bh2:¬(Equiv.piCongrRight fun i => Equiv.cast ).symm i = bstar 1 = 0k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Ci:ComponentIdx cb:ComponentIdx fun i => S.bar (c i)h:¬i = (Equiv.piCongrRight fun i => Equiv.cast ) bh3:(Equiv.piCongrRight fun i => Equiv.cast ).symm i = bstar 0 = 1k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Ci:ComponentIdx cb:ComponentIdx fun i => S.bar (c i)h:¬i = (Equiv.piCongrRight fun i => Equiv.cast ) bh3:¬(Equiv.piCongrRight fun i => Equiv.cast ).symm i = bstar 0 = 0 k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Ci:ComponentIdx cb:ComponentIdx fun i => S.bar (c i)h:i = (Equiv.piCongrRight fun i => Equiv.cast ) bh2:(Equiv.piCongrRight fun i => Equiv.cast ).symm i = bstar 1 = 1 All goals completed! 🐙 k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Ci:ComponentIdx cb:ComponentIdx fun i => S.bar (c i)h:i = (Equiv.piCongrRight fun i => Equiv.cast ) bh2:¬(Equiv.piCongrRight fun i => Equiv.cast ).symm i = bstar 1 = 0 k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Cb:ComponentIdx fun i => S.bar (c i)h2:¬(Equiv.piCongrRight fun i => Equiv.cast ).symm ((Equiv.piCongrRight fun i => Equiv.cast ) b) = bstar 1 = 0 All goals completed! 🐙 k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Ci:ComponentIdx cb:ComponentIdx fun i => S.bar (c i)h:¬i = (Equiv.piCongrRight fun i => Equiv.cast ) bh3:(Equiv.piCongrRight fun i => Equiv.cast ).symm i = bstar 0 = 1 k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Ci:ComponentIdx ch:¬i = (Equiv.piCongrRight fun i => Equiv.cast ) ((Equiv.piCongrRight fun i => Equiv.cast ).symm i)star 0 = 1 All goals completed! 🐙 k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Ci:ComponentIdx cb:ComponentIdx fun i => S.bar (c i)h:¬i = (Equiv.piCongrRight fun i => Equiv.cast ) bh3:¬(Equiv.piCongrRight fun i => Equiv.cast ).symm i = bstar 0 = 0 All goals completed! 🐙k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Cp:Tensor.Pure S.toTensorSpecies cφ:ComponentIdx fun i => S.bar (c i)x:Fin nstar (((b (c x)).repr (p x)) ((S.componentReindex c) φ x)) = star (((b (c x)).repr (p x)) ((Equiv.cast ) (φ x))) All goals completed! 🐙

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.

k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:m:c:Fin n Cc':Fin m Cσ:Fin n Fin mh:IsReindexing c' (fun i => S.bar (c i)) σt:S.Tensor ct':S.Tensor c'H: (φ : ComponentIdx fun i => S.bar (c i)), star ((componentMap c) t ((S.componentReindex c) φ)) = ((basis fun i => S.bar (c i)).repr ((permT σ h) t')) φφ:ComponentIdx fun i => S.bar (c i)star ((componentMap c) t ((S.componentReindex c) φ)) = (componentMap fun i => S.bar (c i)) ((permT σ h) t') φ All goals completed! 🐙
lemma conjT_equivariant {n : } {c : Fin n C} (g : G) (t : S.Tensor c) : S.conjT (g t) = g S.conjT t := k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Cg:Gt:S.Tensor cS.conjT (g t) = g S.conjT t k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Cg:Gb:ComponentIdx cS.conjT (g (basis c) b) = g S.conjT ((basis c) b)k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Cg:GS.conjT (g 0) = g S.conjT 0k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Cg:Gr:kt:S.Tensor cht:S.conjT (g t) = g S.conjT tS.conjT (g r t) = g S.conjT (r t)k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Cg:Gt1:S.Tensor ct2:S.Tensor cht1:S.conjT (g t1) = g S.conjT t1ht2:S.conjT (g t2) = g S.conjT t2S.conjT (g (t1 + t2)) = g S.conjT (t1 + t2) k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b✝:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Cg:Gb:ComponentIdx cS.conjT (g (basis c) b) = g S.conjT ((basis c) b) All goals completed! 🐙 k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Cg:GS.conjT (g 0) = g S.conjT 0 All goals completed! 🐙 k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Cg:Gr:kt:S.Tensor cht:S.conjT (g t) = g S.conjT tS.conjT (g r t) = g S.conjT (r t) All goals completed! 🐙 k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin n Cg:Gt1:S.Tensor ct2:S.Tensor cht1:S.conjT (g t1) = g S.conjT t1ht2:S.conjT (g t2) = g S.conjT t2S.conjT (g (t1 + t2)) = g S.conjT (t1 + t2) All goals completed! 🐙

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.

Undoing the two cast reindexings (at bar c then at c) on a label of the doubly-conjugated colour returns the bar_involution cast. Free from barIdx_eq by cast_cast + proof irrelevance, with no coherence field needed.

private lemma barIdx_involutive_symm (c : C) (y : basisIdx (S.bar (S.bar c))) : Equiv.cast (S.barIdx_eq c) (Equiv.cast (S.barIdx_eq (S.bar c)) y) = basisIdxCongr (S.bar_involution c) y := k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bc:Cy:basisIdx (S.bar (S.bar c))(Equiv.cast ) ((Equiv.cast ) y) = (basisIdxCongr ) y All goals completed! 🐙

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

lemma isReindexing_bar_bar {n : } (c : Fin n C) : IsReindexing c (fun i => S.bar (S.bar (c i))) (id : Fin n Fin n) := Function.bijective_id, fun i => (S.bar_involution (c i)).symm

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

All goals completed! 🐙)

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.

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

All goals completed! 🐙

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

k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin (n + 1 + 1) Ci:Fin (n + 1 + 1)j:Fin (n + 1 + 1)h:i j S.τ (c i) = c jt:S.Tensor cφ:ComponentIdx fun i_1 => S.bar ((c i.succSuccAbove j) i_1)hrhs:((basis ((fun i => S.bar (c i)) i.succSuccAbove j)).repr ((contrT n i j ) (S.conjT t))) φ = b', ((basis fun i => S.bar (c i)).repr (S.conjT t)) b' * (S.contr (S.bar (c i))) ((b (S.bar (c i))) (b' i) ⊗ₜ[k] (b (S.τ (S.bar (c i)))) ((basisIdxCongr ) (b' j)))hmem: (a : ComponentIdx (S.bar c)), a φ.DropPairSection (S.componentReindex c) a ((S.componentReindex (c i.succSuccAbove j)) φ).DropPairSectionb'':φ.DropPairSectiona✝:b'' Finset.univ(S.contr (S.bar (c i))) ((b (S.bar (c i))) (b'' i) ⊗ₜ[k] (b (S.τ (S.bar (c i)))) ((basisIdxCongr ) (b'' j))) = (S.contr (S.bar (c i))) ((b (S.bar (c i))) (b'' i) ⊗ₜ[k] (b (S.τ (S.bar (c i)))) ((basisIdxCongr ) ((Equiv.cast ).symm ((basisIdxCongr ) ((Equiv.cast ) (b'' j)))))) k:Typeinst✝⁶:CommRing kinst✝⁵:StarRing kC:TypeG:Typeinst✝⁴:Group GV:C Typeinst✝³:(c : C) AddCommGroup (V c)inst✝²:(c : C) Module k (V c)basisIdx:C Typeinst✝¹:(c : C) Fintype (basisIdx c)inst✝:(c : C) DecidableEq (basisIdx c)rep:(c : C) Representation k G (V c)b:(c : C) Basis (basisIdx c) k (V c)S:ConjTensorSpecies k C G V basisIdx rep bn:c:Fin (n + 1 + 1) Ci:Fin (n + 1 + 1)j:Fin (n + 1 + 1)h:i j S.τ (c i) = c jt:S.Tensor cφ:ComponentIdx fun i_1 => S.bar ((c i.succSuccAbove j) i_1)hrhs:((basis ((fun i => S.bar (c i)) i.succSuccAbove j)).repr ((contrT n i j ) (S.conjT t))) φ = b', ((basis fun i => S.bar (c i)).repr (S.conjT t)) b' * (S.contr (S.bar (c i))) ((b (S.bar (c i))) (b' i) ⊗ₜ[k] (b (S.τ (S.bar (c i)))) ((basisIdxCongr ) (b' j)))hmem: (a : ComponentIdx (S.bar c)), a φ.DropPairSection (S.componentReindex c) a ((S.componentReindex (c i.succSuccAbove j)) φ).DropPairSectionb'':φ.DropPairSectiona✝:b'' Finset.univ(b (S.τ (S.bar (c i)))) ((basisIdxCongr ) (b'' j)) = (b (S.τ (S.bar (c i)))) ((basisIdxCongr ) ((Equiv.cast ).symm ((basisIdxCongr ) ((Equiv.cast ) (b'' j))))) All goals completed! 🐙

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.