Determinant transformation laws, evaluation, and determinants of updated rows #
Precomposing an alternating form of top degree with an endomorphism φ multiplies it by
LinearMap.det φ, and — the direction that is actually used — a nonzero form merely known to be
scaled by some d thereby identifies d as the determinant, without computing it, as soon as
scalars cancel against nonzero vectors of the codomain (IsCancelMulZero R and
Module.IsTorsionFree R N; see the implementation notes, where ω ≠ 0 alone is shown to be
insufficient). This file records that law in three vocabularies: for
an AlternatingMap indexed by a basis' index type, for an alternating bilinear form on a rank-two
module, and for the standard-basis determinant form under matrix multiplication. It also
identifies evaluation of the row determinant form on a family of linear functionals with the
determinant of their evaluation matrix. Ideal membership of these determinants extends from
a set of rows to its linear span.
Mathlib's Module.Basis.det_comp is the case ω = b.det of the first statement. The step taken
here is that every top-degree alternating form is a multiple of b.det
(AlternatingMap.eq_basis_det_smulRight), so the same law holds for all of them; that is what
makes the converse available for a form supplied by something other than a basis, such as a
pairing.
The file also records one identity for the determinant of a matrix with one row replaced,
alongside Mathlib's Matrix.det_updateRow_add and Matrix.det_updateRow_smul: Jacobi's formula
in row form, that rescaling one row entry by entry along a fixed vector of factors and summing the
results over the rows multiplies the determinant by the total of the factors.
It also records facts used to compute ideals of maximal minors: the determinant in a product basis of a block-diagonal family, and of a family that becomes block diagonal after a permutation, and Cramer's rule for an endomorphism of a free module of finite rank. On a free module of rank one, every endomorphism is multiplication by its determinant.
Finally, it records the Weinstein–Aronszajn identity det (1 + X ∘ₗ Y) = det (1 + Y ∘ₗ X) for
linear maps X and Y between two free modules of finite rank, possibly of different ranks.
Main results #
AlternatingMap.eq_basis_det_smulRight:ω = b.det.smulRight (ω b)forωof top degree.AlternatingMap.compLinearMap_eq_det_smul:ω ∘ φ = det φ • ωforωof top degree.LinearMap.det_eq_of_compLinearMap_eq_smul: ifω ≠ 0andω ∘ φ = d • ωthendet φ = d, forRcancellative andNtorsion-free.LinearMap.IsAlt.compl₁₂_self_eq_det_smulandLinearMap.det_eq_of_compl₁₂_self_eq_smul: the same two statements for an alternating bilinear form on a module of rank two.LinearMap.det_eq_of_compl₁₂_self_eq_smul_of_separatingLeft: the recovery statement over any commutative ring, for a left-separating form.Matrix.detRowAlternating_mulVec: multiplication by a square matrix scales the standard-basis determinant form by the matrix determinant.Matrix.detRowAlternating_pi_apply: evaluating the row determinant form on a family of linear functionals gives the determinant of their evaluation matrix.Matrix.detRowAlternating_compLinearMap_pi_apply: the same evaluation in multilinear-map vocabulary after precomposition with the family of functionals.TauCeti.det_mem_of_mem_span: ideal membership of evaluation determinants extends from a set of rows to its linear span.Matrix.sum_det_updateRow_mul_row: Jacobi's formula for a determinant, in row form.Matrix.det_mul_column_intCast: scaling every rowiof an integer matrix byd imultiplies the determinant by∏ i, d i, over any commutative ring.LinearMap.det_one_add_comp_comm: the Weinstein–Aronszajn identitydet (1 + X ∘ₗ Y) = det (1 + Y ∘ₗ X)for linear maps between free modules of finite rank.LinearEquiv.det_eq_pow_of_forall_eq_smul: an automorphism acting as multiplication by a unitchas determinantc ^ finrank R V.LinearEquiv.det_ker_eq_bot_of_finrank_le_one: the determinant kernel is trivial in dimension at most one.Module.Basis.prod_det_sumElim: the determinant in a product basis of a family split between the two factors is the product of the two determinants.Module.Basis.exists_prod_det_eq_sign_smul_mul: the same up to sign for a family with exactly as many members in the first factor as the rank of the first factor.Module.Basis.det_smul_smul_vecCons: rescaling the first two of three vectors byrandr'multiplies their determinant byr * r'.Module.Basis.det_equivFun_symm_trans_equivFun: the coordinate change from a basisbto a basisb'has determinantb'.det b.Module.Basis.det_map_eq_det_toMatrix: evaluatingb'.deton the imageb.map eof a basisbunder a linear equivalenceegives the determinant ofLinearMap.toMatrix b b' e.LinearMap.det_smul_mem_range: Cramer's rule,det φ • x ∈ range φ.LinearMap.apply_eq_det_smul_of_finrank_eq_one: on a free module of rank one, an endomorphism is multiplication by its determinant.
Implementation notes #
The forms are valued in an arbitrary module N, not in R. Mathlib's
AlternatingMap.eq_smul_basis_det is the N = R case of the first result here; the codomain plays
no part in the argument, only the coordinates do, so the N-valued statement is what is proved.
The recovery statements need cancellation hypotheses, not just ω ≠ 0, and neither of the two
assumed can be dropped:
- without
IsCancelMulZero R: overR = ZMod 4, withN = R(which is torsion-free over itself), the formω = 2 • b.detis nonzero and satisfiesω ∘ id = 3 • ω, whiledet id = 1; - without
Module.IsTorsionFree R N: overR = ℤ, withM = ℤ²andN = ZMod 2, the determinant form reduced mod2,(x, y) ↦ x₀ y₁ - x₁ y₀, is nonzero and alternating, andφ = 3 • idscales it by9, that is by1, whiledet φ = 9.
IsCancelMulZero R and Module.IsTorsionFree R N are assumed for these recovery statements, and
for nothing else; together they let a nonzero form, an element of a torsion-free module of
alternating or bilinear maps, cancel from det φ • ω = d • ω. A left-separating form needs neither:
a scalar killing it kills a basis vector, so vanishes, and
LinearMap.det_eq_of_compl₁₂_self_eq_smul_of_separatingLeft holds over every commutative ring. The
examples above are not left-separating: 2 • b.det pairs 2 • b 0 to zero, and the reduced
determinant form pairs 2 • e₀ to zero.
None of the transformation laws stated for a basis is a simp lemma: the basis is a hypothesis
and does not occur in the conclusion, so simp could not infer it.
The bilinear statements use LinearMap.IsAlt.toAlternatingMap to read an alternating bilinear form
as an AlternatingMap on Fin 2.
Provenance #
The four transformation and recovery laws are ported from the AINTLIB HasseWeil project
(Apache-2.0), revision 513e83879e2f, file HasseWeil/WeilPairing/PairingDet.lean, declarations
alternating_comp_eq_det_smul and det_eq_of_alternating_scaling. The source states them over a
field, for a scalar-valued form, evaluated at a basis, and proves the first by expanding φ (b j)
in coordinates; none of that is reproduced here. Matrix.detRowAlternating_mulVec predates
that port and is not from the source, nor is the left-separating recovery statement.
A top-degree alternating form is its basis determinant times its value on the basis. This
is Mathlib's AlternatingMap.eq_smul_basis_det with the codomain an arbitrary module rather than
R.
An endomorphism scales a top-degree alternating form by its determinant. Here ω is of
top degree in the sense that its index type indexes a basis of M; that basis is a hypothesis and
does not occur in the conclusion, which is an equality of alternating maps.
The determinant in a product basis of a family whose first arguments lie in the first factor and whose last arguments lie in the second factor is the product of the two determinants.
If the members of a family satisfying P lie in the first factor, the others lie in the
second factor, and exactly card ι members satisfy P, then, after a permutation σ moving the
former to the front, the determinant of the family in a product basis is, up to the sign of σ,
the product of the determinants of the two blocks of components.
Rescaling the first two of three vectors by r and r' multiplies their determinant in a
basis by r * r'.
The coordinate change from the basis b to the basis b', which sends the coordinates x of
∑ i, x i • b i in b to its coordinates in b', has determinant b'.det b.
Evaluating the determinant form of a basis b' on the image b.map e of a basis b under a
linear equivalence e gives the determinant of the matrix of e with respect to b and b'.
The multiplier of a nonzero top-degree alternating form is the determinant. An
endomorphism which scales ω by d has det φ = d; the scaling identifies the determinant
without computing it, and only the one endomorphism is involved.
The cancellation hypotheses on R and N are required, not incidental: dropping either one
leaves the multiplier of a nonzero ω ambiguous, as the two examples in the module docstring show.
An endomorphism of a rank-two module scales an alternating bilinear form by its determinant. The basis is a hypothesis witnessing that the rank is two; it does not occur in the conclusion, which is an equality of bilinear maps.
The multiplier of a nonzero alternating bilinear form on a rank-two module is the determinant. This is the form the additivised Weil pairing supplies: its scaling by an isogeny's degree identifies that degree as a determinant.
As above, neither cancellation hypothesis can be dropped; the module docstring's ZMod 2 example
is itself an alternating bilinear form on a rank-two module.
The multiplier of a left-separating alternating bilinear form on a rank-two module is the
determinant, over any commutative ring. Left separation of ω takes the place of the
cancellation hypotheses of LinearMap.det_eq_of_compl₁₂_self_eq_smul; this is the form that
applies to the Weil pairing on N-torsion, a module over ZMod N, which is not a domain for
composite N.
The Weinstein–Aronszajn identity for linear maps: for linear maps X : F' →ₗ[R] F and
Y : F →ₗ[R] F' between free modules of finite rank, det (1 + X ∘ₗ Y) = det (1 + Y ∘ₗ X). This
is Mathlib's Matrix.det_one_add_mul_comm, read through the matrices of X and Y in bases.
Cramer's rule for an endomorphism. The determinant of an endomorphism φ of a free
module of finite rank multiplies every vector into the range of φ: det φ • x = φ (adj φ x),
for the adjugate adj φ of φ.
An endomorphism of a free module of rank one is multiplication by its determinant.
An automorphism of a free module acting as multiplication by a unit c has determinant
c ^ finrank R V.
The determinant kernel on a finite free module of rank at most one is trivial.
Evaluating the row determinant form after a family of linear functionals gives the matrix of those functionals evaluated on the input vectors.
The multilinear form obtained by precomposing the row determinant with a family of linear functionals evaluates to the determinant of their evaluation matrix.
If an ideal contains all evaluation determinants whose rows lie in a set, it also contains those whose rows lie in the linear span of that set. The row and functional families may be indexed by any finite type.
Multiplication by a square matrix scales the standard-basis determinant form by its
determinant. This is AlternatingMap.compLinearMap_eq_det_smul at ω = (Pi.basisFun R ι).det,
in matrix vocabulary.
Jacobi's formula for a determinant, in row form. Rescale one row of a matrix entry by entry along a fixed vector of factors, and sum the resulting determinants over the rows: the answer is the determinant multiplied by the total of the factors.
The determinant of a scaled integer matrix. Scaling every row i of an integer
matrix M by d i, with the entries cast into a commutative ring R, multiplies the
determinant by ∏ i, d i.