QuantumComputinglib learn · inspect · formalize
Checked on this commit 4,524 public declarations commit c681192368c2 Build record

Lean source module

QuantumBlockEncoding/ConstructiveThinLQ.lean

8 explicit public declarations in source order.

Back to Library Explorer

structure · line 20

QuantumBlockEncoding.ConstructiveThinLQ.Factorization

Compiled Partial route

This record groups the data and proof fields needed for “factorization”. A proposition-valued field is a requirement until a constructor supplies it. Actual factors together with the same two equations as 'ThinLQ'.

structure Factorization {m n : ℕ} (A : _root_.Matrix (Fin m) (Fin n) ℝ) (r : ℕ) where
  R : _root_.Matrix (Fin m) (Fin r) ℝ
  Q : _root_.Matrix (Fin r) (Fin n) ℝ
  factorization : A = R * Q
  orthogonal : Q * Q.transpose = 1

commit-pinned source · Verso Blueprint panel

def · line 26

QuantumBlockEncoding.ConstructiveThinLQ.wideR

Compiled Compiled

This definition gives the library's named construction or computation for “wide r”.

noncomputable def wideR {m n : ℕ} (hmn : m ≤ n)
    (A : _root_.Matrix (Fin m) (Fin n) ℝ) : _root_.Matrix (Fin m) (Fin m) ℝ :=
  fun i k => reduced A.transpose (Fin.castLE hmn k) i

commit-pinned source · Verso Blueprint panel

def · line 30

QuantumBlockEncoding.ConstructiveThinLQ.wideQ

Compiled Compiled

This definition gives the library's named construction or computation for “wide q”.

noncomputable def wideQ {m n : ℕ} (hmn : m ≤ n)
    (A : _root_.Matrix (Fin m) (Fin n) ℝ) : _root_.Matrix (Fin m) (Fin n) ℝ :=
  fun k j => transform A.transpose (Fin.castLE hmn k) j

commit-pinned source · Verso Blueprint panel

theorem · line 34

QuantumBlockEncoding.ConstructiveThinLQ.wide_factorization

Compiled Compiled

Lean checks the proposition indexed as “wide factorization”; the hypotheses and conclusion in the code panel fix its exact scope.

theorem wide_factorization {m n : ℕ} (hmn : m ≤ n)
    (A : _root_.Matrix (Fin m) (Fin n) ℝ) : A = wideR hmn A * wideQ hmn A := by

commit-pinned source · Verso Blueprint panel

theorem · line 51

QuantumBlockEncoding.ConstructiveThinLQ.wide_orthogonal

Compiled Compiled

Lean checks the proposition indexed as “wide orthogonal”; the hypotheses and conclusion in the code panel fix its exact scope.

theorem wide_orthogonal {m n : ℕ} (hmn : m ≤ n)
    (A : _root_.Matrix (Fin m) (Fin n) ℝ) : wideQ hmn A * (wideQ hmn A).transpose = 1 := by

commit-pinned source · Verso Blueprint panel

def · line 61

QuantumBlockEncoding.ConstructiveThinLQ.factorOfLE

Compiled Compiled

This definition gives the library's named construction or computation for “factor of le”. A deterministic wide-matrix supplier, including zero and repeated rows.

noncomputable def factorOfLE {m n : ℕ} (hmn : m ≤ n)
    (A : _root_.Matrix (Fin m) (Fin n) ℝ) : Factorization A m where
  R := wideR hmn A
  Q := wideQ hmn A
  factorization := wide_factorization hmn A
  orthogonal := wide_orthogonal hmn A

/-- All shapes are handled by an explicit dimension comparison and recursion. -/

commit-pinned source · Verso Blueprint panel

def · line 69

QuantumBlockEncoding.ConstructiveThinLQ.factor

Compiled Compiled

This definition gives the library's named construction or computation for “factor”. All shapes are handled by an explicit dimension comparison and recursion.

noncomputable def factor {m n : ℕ} (A : _root_.Matrix (Fin m) (Fin n) ℝ) :
    Factorization A (min m n) := by

commit-pinned source · Verso Blueprint panel

theorem · line 78

QuantumBlockEncoding.ConstructiveThinLQ.factor_correct

Compiled Compiled

Lean checks the proposition indexed as “factor correct”; the hypotheses and conclusion in the code panel fix its exact scope. The concrete output satisfies the existing all-shape thin-LQ contract.

theorem factor_correct {m n : ℕ} (A : _root_.Matrix (Fin m) (Fin n) ℝ) :
    A = (factor A).R * (factor A).Q ∧ (factor A).Q * (factor A).Q.transpose = 1 :=
  ⟨(factor A).factorization, (factor A).orthogonal⟩

commit-pinned source · Verso Blueprint panel