💎 Reusable layer
← all 82R0038

Integer orthonormal columns are signed unit vectors

API

Use this theorem

  1. Create a project

    Shell
    lake +leanprover/lean4:v4.35.0 new myproject std.toml
    cd myproject

    Standard template, not math: the math template adds its own Mathlib requirement pinned to the Lean release tag, not to the Mathlib commit this package is built and tested with, so you would get a second, different Mathlib. Mathlib comes in through this package. Skip this step in an existing project with the same Lean and Mathlib.

  2. Add the dependency to lakefile.toml

    TOML
    [[require]]
    name = "formalizations"
    git = "https://github.com/karlesmarin/formalizations"
    rev = "v0.15.0"
  3. Import the minimal module

    Lean 4
    import Formalizations.Reusable.LinearAlgebra

    In a file of the project, e.g. Example.lean.

  4. Paste the example

    Lean 4
    open Formalizations.Reusable Matrix
    open scoped Kronecker
    open PowerSeries in
    open scoped PowerSeries in
    
    /-- Integer orthonormal columns are signed unit vectors in distinct rows. -/
    example (A : Matrix (Fin 3) (Fin 2) ℤ) (hA : Aᵀ * A = 1) :
        ∃ f : Fin 2 → Fin 3, Function.Injective f ∧
          ∀ j, (fun i => A i j) = Pi.single (f j) 1 ∨ (fun i => A i j) = Pi.single (f j) (-1) :=
      int_columns_of_transpose_mul_self hA

    Steps 3 and 4 together are a complete Lean file:FormalizationsTest/ReusableLinearAlgebraExample.lean at v0.15.0, compiled by the CI.

  5. Fetch and check

    Shell
    lake update
    lake lean Example.lean

    lake update fetches this package and Mathlib, and Mathlib's update hook downloads the compiled Mathlib (lake exe cache get). lake lean Example.lean builds the imports of the file (steps 3 and 4) and checks it. If the file belongs to a lean_lib of your project, lake build <lib> does the same. Avoid a bare lake build in a project from the standard template: its default target is the executable, whose link compiles every imported Mathlib module to native code. Same versions required: Lean v4.35.0, Mathlib f0b4c81.

Alternative: import Formalizations.Reusable imports the whole layer (all areas).

If an integer m × n matrix A satisfies AᵀA = I, every column j is \(±e_{f(j)}\) for an injective f : n → m (signed unit vectors in distinct rows); in particular an integer vector with v·v = 1 is ±e_i. False over ℚ.

Lean statement

Lean 4
theorem int_columns_of_transpose_mul_self {m n : Type*} [Fintype m] [DecidableEq m] [Fintype n]
    [DecidableEq n] {A : Matrix m n ℤ} (hA : Aᵀ * A = 1) :
    ∃ f : n → m, Function.Injective f ∧
      ∀ j, (fun i => A i j) = Pi.single (f j) 1 ∨ (fun i => A i j) = Pi.single (f j) (-1)
Name
Formalizations.Reusable.int_columns_of_transpose_mul_self
Import
import Formalizations.Reusable.LinearAlgebra
Version
formalizations 0.15.0Lean v4.35.0Mathlib f0b4c81
Role
API a lemma to import and build other proofs on
Provenance
IntOrthonormal.columns_of_transpose_mul_self, IntOrthonormal.eq_single_of_dotProduct_self_eq_one in Formalizations.LinearAlgebra.Matrix.IntOrthonormal
Paper: none (piece of the design table: integer lengths of P_H, signed graphs)
Classical reference
textbook (sums of integer squares; signed permutation matrices)
Trust
standard axioms only propext, Classical.choice, Quot.sound
#print axioms in FormalizationsTest/Axioms.lean, audited by scripts/check_axioms.sh (2758 results), which the CI build workflow runs and passed at this commit.
Status
reusable upstream candidate
Area
Linear Algebra

Links

Lean docstring

Integer orthonormal columns are signed unit vectors. If an integer m × n matrix satisfies Aᵀ A = 1, then every column j is ± Pi.single (f j) 1 for an injective f : n → m: the nonzero entries of distinct columns lie in distinct rows. The one-vector case (an integer vector with v ⬝ᵥ v = 1 is ± Pi.single i 1) is IntOrthonormal.eq_single_of_dotProduct_self_eq_one. False over ℚ: (3/5, 4/5) has norm one.

  • Archive: IntOrthonormal.columns_of_transpose_mul_self (Formalizations.LinearAlgebra.Matrix.IntOrthonormal; also IntOrthonormal.eq_single_of_dotProduct_self_eq_one); a piece of the design table (first step of the integer lengths of P_H, signed graphs).
  • Classical reference: textbook (sums of integer squares).
  • Example: the columns of !![0, 1; -1, 0] are -e₁ and e₀.

Upstream

Mathlib has signed permutation matrices but not this characterization of integer matrices with orthonormal columns

Depends on, in this repository

None besides the archive module (repo_dependencies = []).