Definitions for A Multigraph Approach for Performing the Quantum Schur Transform
DefinitionQAlgorithms_Papers_Independent_Intake100_P91The objects the formalized statements of A Multigraph Approach for Performing the Quantum Schur Transform (arXiv:2204.10694) are stated in. Each was checked against the paper by a blind read-back and a moderator.
WeylTableau: Standard Weyl tableaux, PDF pp.6-7: source letter j is Fin value j-1. For d=2 these values are the source's qubit letters 0 and 1.ShapedYoungTableau: Standard Young tableaux of a fixed shape, PDF pp.3,5. Reuse the frozen label-to-box tableau: Fin value i denotes source label i+1, and every prefix is a lower ideal. Only the endpoint shape is restricted here; tableau standardness is reused unchanged.ShapePath: A path of SHAPES from the unique empty diagram to lambda, PDF p.8, (13). Consecutive sizes differ by one, so cell inclusion adds exactly one box.youngPrefixCells: The occupied cells of the first k Young labels, PDF pp.3,5. The canonical path is computed from these exact prefixes.IsYoungPath: The path associated to a Young tableau keeps exactly its first i boxes, PDF pp.5,8. This pins the bijection, rather than just equating cardinalities.SchurLabels: Triples with the paper's ordering: shape, Weyl tableau, Young tableau (PDF p.7). At level zero all three components have exactly one possibility.GraphLabels: A Weyl ENDPOINT paired with a Young shape path, PDF pp.8,11. This deliberately does not count individual paths of Weyl vertices.LabelsCorrespond: The simultaneous labelling preserves the actual Weyl endpoint and assigns the Young tableau its own prefix path, PDF pp.8,11. HEq only transports the Weyl tableau across the equality of its shape, without changing any entry.tableauGT: The source GT entry m_(i,j), PDF pp.6-7: count row-i boxes with source letter at most j. Indices i,j are one-based; the empty subalphabet is j=0.GTStep: Exact GT addition (16), PDF p.11. Starting at the inserted symbol k, one entry tau(j) increases in each row j; all rows below k stay fixed. This allows rearrangement of entries in a Weyl tableau, not just cell deletion.WeylEdge: The graph edge of PDF pp.8,11, with addition/removal pinned to (16).HasWeylLift: A multipath label has at least one compatible Weyl-vertex history. All histories are retained by the predicate; none is selected as a basis label.partialHook: Lower-pattern partial hook p_(i,j)=m_(i,j)+j-i, PDF p.11 and (32), p.18. All differences are in the reals, with no truncated natural subtraction.comparisonSign: Comparison sign in (17), PDF p.11. Equality has sign +1, as fixed by Appendix A, Rule 1b, p.18; Lean's sign(0) would give the wrong amplitude.louck: Louck's independent product (17) times (18), PDF p.11. The original PDF has an absolute value around EACH quotient under a square root. Both products use the lower pattern. Empty first product (k=d) and second factor (k=1) are exactly 1. Only valid GT edges are used in the statements below.qubitGT: A two-level GT array with top row (r,s) and lower entry a (PDF pp.12-13). All other entries are padding and are never used by the d=2 product.QubitPattern: Interlacing for a qubit GT array, PDF (5), p.6. This also forces r≥s.QubitEdge: All qubit graph edges, using (16), rather than content change alone. The two endpoint arrays must both interlace (PDF pp.11-13).qubitLouck: The d=2 specialization of the independent product, not a Pattern Rule. On a valid edge b=a inserts letter 1 (k=2), while b=a+1 inserts 0 (k=1). The changed top-row entry is read from the two shapes (PDF pp.11,18-20).patternAmplitude: The coefficient obtained from the four Pattern Rules: remove all shared full columns, then use Rule 1 or Rule 2. This independent short expression is compared to louck, never used to define it (PDF pp.12-13).
import Mathlib
import Definitions.Def_QAlgorithms_Defs_SchurWeylDecomposition
import Definitions.Def_QAlgorithms_Papers_Independent_Renew46_P26
noncomputable section
namespace QAlgorithms.Papers.Independent.Intake100.P91
open scoped BigOperators
attribute [local instance] Classical.propDecidable
/-- Standard Weyl tableaux, PDF pp.6-7: source letter j is Fin value j-1.
For d=2 these values are the source's qubit letters 0 and 1. -/
def WeylTableau {d n : ℕ} (lambda : QAlgorithms.Schur.Partition d n) :=
{t : lambda.val.cells → Fin d // QAlgorithms.Schur.IsSemistandardFilling lambda t}
/-- Standard Young tableaux of a fixed shape, PDF pp.3,5. Reuse the frozen
label-to-box tableau: Fin value i denotes source label i+1, and every prefix
is a lower ideal. Only the endpoint shape is restricted here; tableau
standardness is reused unchanged. -/
abbrev ShapedYoungTableau {d n : ℕ} (lambda : QAlgorithms.Schur.Partition d n) :=
{y : QAlgorithms.Papers.Independent.Renew46.P26.YoungTableau n //
QAlgorithms.Papers.Independent.Renew46.P26.tableauShape y = lambda.val}
/-- A path of SHAPES from the unique empty diagram to lambda, PDF p.8, (13).
Consecutive sizes differ by one, so cell inclusion adds exactly one box. -/
def ShapePath {d n : ℕ} (lambda : QAlgorithms.Schur.Partition d n) :=
{p : (i : Fin (n+1)) → QAlgorithms.Schur.Partition d i.val //
(∀ i : Fin n, (p i.castSucc).val.cells ⊆ (p i.succ).val.cells) ∧
(p (Fin.last n)).val = lambda.val}
/-- The occupied cells of the first k Young labels, PDF pp.3,5.
The canonical path is computed from these exact prefixes. -/
def youngPrefixCells {d n : ℕ} {lambda : QAlgorithms.Schur.Partition d n}
(y : ShapedYoungTableau lambda) (k : ℕ) : Finset (ℕ × ℕ) :=
(Finset.univ.filter fun i : Fin n => i.val < k).image y.val.val
/-- The path associated to a Young tableau keeps exactly its first i boxes,
PDF pp.5,8. This pins the bijection, rather than just equating cardinalities. -/
def IsYoungPath {d n : ℕ} {lambda : QAlgorithms.Schur.Partition d n}
(y : ShapedYoungTableau lambda) (p : ShapePath lambda) : Prop :=
∀ i : Fin (n+1), (p.val i).val.cells = youngPrefixCells y i.val
/-- Triples with the paper's ordering: shape, Weyl tableau, Young tableau
(PDF p.7). At level zero all three components have exactly one possibility. -/
abbrev SchurLabels (d n : ℕ) :=
(lambda : QAlgorithms.Schur.Partition d n) × (WeylTableau lambda × ShapedYoungTableau lambda)
/-- A Weyl ENDPOINT paired with a Young shape path, PDF pp.8,11.
This deliberately does not count individual paths of Weyl vertices. -/
abbrev GraphLabels (d n : ℕ) :=
(lambda : QAlgorithms.Schur.Partition d n) × (WeylTableau lambda × ShapePath lambda)
/-- The simultaneous labelling preserves the actual Weyl endpoint and assigns
the Young tableau its own prefix path, PDF pp.8,11. HEq only transports the
Weyl tableau across the equality of its shape, without changing any entry. -/
def LabelsCorrespond {d n : ℕ} (a : SchurLabels d n) (b : GraphLabels d n) : Prop :=
a.1 = b.1 ∧ HEq a.2.1 b.2.1 ∧
∀ i : Fin (n+1), (b.2.2.val i).val.cells = youngPrefixCells a.2.2 i.val
/-- The source GT entry m_(i,j), PDF pp.6-7: count row-i boxes with source
letter at most j. Indices i,j are one-based; the empty subalphabet is j=0. -/
def tableauGT {d n : ℕ} {lambda : QAlgorithms.Schur.Partition d n}
(t : WeylTableau lambda) (i j : ℕ) : ℕ :=
(Finset.univ.filter fun c : lambda.val.cells =>
c.val.1 + 1 = i ∧ (t.val c).val < j).card
/-- Exact GT addition (16), PDF p.11. Starting at the inserted symbol k,
one entry tau(j) increases in each row j; all rows below k stay fixed.
This allows rearrangement of entries in a Weyl tableau, not just cell deletion. -/
def GTStep (d : ℕ) (lower upper : ℕ → ℕ → ℕ) (k : ℕ) (tau : ℕ → ℕ) : Prop :=
1 ≤ k ∧ k ≤ d ∧ ∀ j, 1 ≤ j → j ≤ d →
(j < k → ∀ i, 1 ≤ i → i ≤ j → upper i j = lower i j) ∧
(k ≤ j → 1 ≤ tau j ∧ tau j ≤ j ∧ ∀ i, 1 ≤ i → i ≤ j →
upper i j = lower i j + if i = tau j then 1 else 0)
/-- The graph edge of PDF pp.8,11, with addition/removal pinned to (16). -/
def WeylEdge {d m n : ℕ} {mu : QAlgorithms.Schur.Partition d m}
{lambda : QAlgorithms.Schur.Partition d n}
(t : WeylTableau mu) (u : WeylTableau lambda) : Prop :=
n = m+1 ∧ mu.val.cells ⊆ lambda.val.cells ∧
∃ k tau, GTStep d (tableauGT t) (tableauGT u) k tau
/-- A multipath label has at least one compatible Weyl-vertex history.
All histories are retained by the predicate; none is selected as a basis label. -/
def HasWeylLift {d n : ℕ} (label : GraphLabels d n) : Prop :=
∃ v : (i : Fin (n+1)) →
(lambda : QAlgorithms.Schur.Partition d i.val) × WeylTableau lambda,
(∀ i, (v i).1.val = (label.2.2.val i).val) ∧
v (Fin.last n) = ⟨label.1, label.2.1⟩ ∧
∀ i : Fin n, WeylEdge (v i.castSucc).2 (v i.succ).2
/-- Empty Young prefix, including the unique vacuum tableau. -/
example {d n : ℕ} {lambda : QAlgorithms.Schur.Partition d n}
(y : ShapedYoungTableau lambda) : youngPrefixCells y 0 = ∅ := by
simp [youngPrefixCells]
/-- The zero-letter subtableau has no occupied cells. -/
example {d n : ℕ} {lambda : QAlgorithms.Schur.Partition d n}
(t : WeylTableau lambda) (i : ℕ) : tableauGT t i 0 = 0 := by
simp [tableauGT]
/-- The path and tableau types are actually finite; Nat.card has no infinite
fallback on these concrete labels. -/
example (d n : ℕ) : Finite (GraphLabels d n) := by
unfold GraphLabels WeylTableau ShapePath
infer_instance
/-- Lower-pattern partial hook p_(i,j)=m_(i,j)+j-i, PDF p.11 and (32), p.18.
All differences are in the reals, with no truncated natural subtraction. -/
def partialHook (m : ℕ → ℕ → ℕ) (i j : ℕ) : ℝ :=
(m i j : ℝ) + (j : ℝ) - (i : ℝ)
/-- Comparison sign in (17), PDF p.11. Equality has sign +1, as fixed by
Appendix A, Rule 1b, p.18; Lean's sign(0) would give the wrong amplitude. -/
def comparisonSign (a b : ℕ) : ℝ := if b ≤ a then 1 else -1
/-- Louck's independent product (17) times (18), PDF p.11. The original PDF
has an absolute value around EACH quotient under a square root. Both products
use the lower pattern. Empty first product (k=d) and second factor (k=1)
are exactly 1. Only valid GT edges are used in the statements below. -/
def louck (d : ℕ) (m : ℕ → ℕ → ℕ) (k : ℕ) (tau : ℕ → ℕ) : ℝ :=
Finset.prod (Finset.Icc (k+1) d) (fun j =>
comparisonSign (tau (j-1)) (tau j) *
Real.sqrt (abs (
((Finset.prod ((Finset.Icc 1 (j-1)).erase (tau (j-1))) (fun i =>
partialHook m (tau j) j - partialHook m i (j-1))) *
(Finset.prod ((Finset.Icc 1 j).erase (tau j)) (fun i =>
partialHook m (tau (j-1)) (j-1) - partialHook m i j + 1))) /
((Finset.prod ((Finset.Icc 1 j).erase (tau j)) (fun i =>
partialHook m (tau j) j - partialHook m i j)) *
(Finset.prod ((Finset.Icc 1 (j-1)).erase (tau (j-1))) (fun i =>
partialHook m (tau (j-1)) (j-1) - partialHook m i (j-1) + 1)))))) *
(if k = 1 then 1 else
Real.sqrt (abs (
(Finset.prod (Finset.Icc 1 (k-1)) (fun i =>
partialHook m (tau k) k - partialHook m i (k-1))) /
(Finset.prod ((Finset.Icc 1 k).erase (tau k)) (fun i =>
partialHook m (tau k) k - partialHook m i k)))))
/-- A two-level GT array with top row (r,s) and lower entry a (PDF pp.12-13).
All other entries are padding and are never used by the d=2 product. -/
def qubitGT (r s a : ℕ) (i j : ℕ) : ℕ :=
if j = 1 ∧ i = 1 then a
else if j = 2 ∧ i = 1 then r
else if j = 2 ∧ i = 2 then s
else 0
/-- Interlacing for a qubit GT array, PDF (5), p.6. This also forces r≥s. -/
def QubitPattern (r s a : ℕ) : Prop := s ≤ a ∧ a ≤ r
/-- All qubit graph edges, using (16), rather than content change alone.
The two endpoint arrays must both interlace (PDF pp.11-13). -/
def QubitEdge (r s a R S b : ℕ) : Prop :=
QubitPattern r s a ∧ QubitPattern R S b ∧
∃ k tau, GTStep 2 (qubitGT r s a) (qubitGT R S b) k tau
/-- The d=2 specialization of the independent product, not a Pattern Rule.
On a valid edge b=a inserts letter 1 (k=2), while b=a+1 inserts 0 (k=1).
The changed top-row entry is read from the two shapes (PDF pp.11,18-20). -/
def qubitLouck (r s a R S b : ℕ) : ℝ :=
louck 2 (qubitGT r s a) (if b = a then 2 else 1)
(fun j => if j = 1 then 1 else if R = r+1 ∧ S = s then 1 else 2)
/-- The coefficient obtained from the four Pattern Rules: remove all shared
full columns, then use Rule 1 or Rule 2. This independent short expression
is compared to louck, never used to define it (PDF pp.12-13). -/
def patternAmplitude (r s a R S b : ℕ) : ℝ :=
if S = s then
if a = b then Real.sqrt (((R : ℝ) - b) / ((R : ℝ) - s))
else Real.sqrt (((b : ℝ) - s) / ((R : ℝ) - s))
else
if a = b then Real.sqrt (((b : ℝ) - S + 1) / ((R : ℝ) - S + 2))
else -Real.sqrt (((R : ℝ) - b + 1) / ((R : ℝ) - S + 2))
/-- Equality in the comparison sign is positive (Appendix A, Rule 1b). -/
example : comparisonSign 1 1 = 1 := by norm_num [comparisonSign]
/-- With a one-letter alphabet, both coefficient factors are empty/one. -/
example (m : ℕ → ℕ → ℕ) (tau : ℕ → ℕ) : louck 1 m 1 tau = 1 := by
norm_num [louck]
/-- The empty two-row pattern interlaces; no positive tensor degree is required. -/
example : QubitPattern 0 0 0 := by norm_num [QubitPattern]
/-- Padding, top row and zero count of a two-row array are independent entries. -/
example (r s a : ℕ) :
qubitGT r s a 1 1 = a ∧ qubitGT r s a 1 2 = r ∧ qubitGT r s a 2 2 = s := by
simp [qubitGT]
end QAlgorithms.Papers.Independent.Intake100.P91
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Intake100.P91.GTStep
For a natural number , functions , a natural number , and a function , means that and, for every , the following conditions hold: if , then for every ; if , then and, for every , when , while otherwise. The values of outside , and the values of outside , are unrestricted. No additional inequalities among the entries of either array are required. For , the proposition is false because is impossible.
QAlgorithms.Papers.Independent.Intake100.P91.GraphLabels
For natural numbers , is the type of triples , where is a Young diagram with exactly cells and at most rows; weakly increases along rows and strictly increases down columns; and is a sequence of Young diagrams such that has exactly cells and at most rows, each cell set is contained in the next, and . A Young diagram here is a finite coordinatewise downward-closed subset of . No further compatibility between and is required. When , there is one label consisting of the empty diagram, empty filling, and its single-stage path; when , there are no labels.
QAlgorithms.Papers.Independent.Intake100.P91.HasWeylLift
For natural numbers , let , where is a Young diagram with cells and at most rows, weakly increases along rows and strictly increases down columns, and consists of nested Young diagrams with having cells and at most rows and with . The proposition means that there exists a sequence of pairs , for , where has cells and at most rows and weakly increases along rows and strictly increases down columns, such that for every , the final pair is exactly , and every consecutive pair satisfies the following condition. Its cell sets are included, its sizes differ by one, and there exist and , which may depend on the consecutive pair, such that the counts satisfy, for every and , if , while if , one has and . When , there are no consecutive-pair conditions, and the unique empty label has such a lift, including when .
QAlgorithms.Papers.Independent.Intake100.P91.IsYoungPath
For natural numbers , a Young diagram with cells and at most rows, a labeling of its cells, and a sequence , the proposition means that, for every , the cell set of equals . The labeling is assumed injective, has image exactly , and has coordinatewise downward-closed initial images. The sequence is assumed to consist of Young diagrams with having exactly cells and at most rows, with successive cell sets included in one another and . When , the sole required equality identifies two empty cell sets.
QAlgorithms.Papers.Independent.Intake100.P91.LabelsCorrespond
For natural numbers , let and , where are Young diagrams with cells and at most rows; are fillings by , weakly increasing along rows and strictly increasing down columns; is an injective labeling of by whose initial images are coordinatewise downward closed; and consists of nested Young diagrams with having cells and at most rows and with . The proposition means that , that and are equal after identifying their domains using this equality of shapes, and that for every , the cell set of is exactly . For , these conditions hold for the unique empty labels.
QAlgorithms.Papers.Independent.Intake100.P91.QubitEdge
For arbitrary natural numbers , this predicate requires and , together with the existence of and such that and the following holds: for each , the entries at positions are unchanged when , and when , one has and the upper entry equals the lower entry plus exactly at . Here the lower entries are , , , and the upper entries are , , . Equivalently, besides the two pattern inequalities, it requires
The values of outside are unrestricted, and no positivity of the six parameters is required.
QAlgorithms.Papers.Independent.Intake100.P91.QubitPattern
For arbitrary natural numbers , this predicate means precisely
Both inequalities are non-strict, and zero values and equality throughout are allowed.
QAlgorithms.Papers.Independent.Intake100.P91.SchurLabels
For natural numbers , is the type of triples , where is a finite coordinatewise downward-closed subset of with exactly cells and at most rows; weakly increases along rows and strictly increases down columns; and is injective, has image exactly , and has a coordinatewise downward-closed initial image for every natural number . No further relation between and is required. For , all three components are empty and determine a unique label; for , there are no labels.
QAlgorithms.Papers.Independent.Intake100.P91.ShapePath
For natural numbers and a Young diagram with exactly cells and at most rows, is the type of sequences of Young diagrams such that has exactly cells and at most rows, the cell set of is contained in that of for every , and . Each Young diagram is a finite coordinatewise downward-closed subset of . In particular, is empty and each successive cell-set difference has exactly one cell. When , the sequence consists only of the empty diagram .
QAlgorithms.Papers.Independent.Intake100.P91.ShapedYoungTableau
For natural numbers and a Young diagram with exactly cells and at most rows, is the type of injective maps whose image is exactly the cell set of and for which, for every natural number , the set is closed downward in the coordinatewise order on . Thus labels are indexed starting at , and each initial set of labels occupies a Young diagram. When , the map and its image are empty, and all these conditions hold.
QAlgorithms.Papers.Independent.Intake100.P91.WeylEdge
For natural numbers , Young diagrams having respectively cells and at most rows, and fillings and weakly increasing along rows and strictly increasing down columns, means that , the cell set of is contained in that of , and there exist a natural number and a function with satisfying the following conditions. Write for the number of cells of in row whose -entry is less than , and for the corresponding count in using . For every , all entries remain unchanged when ; when , one has and for every . These conditions impose no further restrictions on the arrays outside this triangular index range or on outside . The proposition cannot hold when .
QAlgorithms.Papers.Independent.Intake100.P91.WeylTableau
For natural numbers and a Young diagram with exactly cells and at most rows, is the type of fillings such that entries weakly increase from left to right along each row and strictly increase from top to bottom along each column. Here a Young diagram is a finite subset of closed downward in the coordinatewise order, with the first coordinate denoting the row and the second the column. The inequalities apply to every pair of cells in the same row or column, respectively. When , the empty filling is allowed, including when ; when , there is no diagram satisfying the stated requirements.
QAlgorithms.Papers.Independent.Intake100.P91.comparisonSign
For any natural numbers , this defines the real number
Equality belongs to the case, and zero values of either argument are allowed.
QAlgorithms.Papers.Independent.Intake100.P91.louck
For arbitrary natural numbers , an arbitrary function , and an arbitrary function , put , with arithmetic in , and . This defines the real number
where if , and otherwise. Every product is over natural-number indices, every empty product is , and predecessor indices use natural subtraction, so when . No interlacing, positivity, index-range, or nonzero-denominator assumptions are required: may lie outside , deleting an absent index has no effect, and a quotient with zero denominator is defined to be zero. In particular, , , and are included.
QAlgorithms.Papers.Independent.Intake100.P91.partialHook
For any function and any natural numbers , this defines the real number
where all three natural-number values are converted to real numbers before addition and subtraction. No restrictions on are imposed; in particular, the result may be negative.
QAlgorithms.Papers.Independent.Intake100.P91.patternAmplitude
For arbitrary natural numbers , this defines the real number
Every subtraction and division displayed here is in ; the parameter does not enter the value. No inequalities or edge conditions are assumed. Consequently, zero denominators and negative radicands are included: a quotient with zero denominator is zero, and the real square-root function is zero on negative inputs.
QAlgorithms.Papers.Independent.Intake100.P91.qubitGT
For arbitrary natural numbers , this defines a function by
There are no inequalities assumed between , and all other indices, including indices equal to zero, receive value zero.
QAlgorithms.Papers.Independent.Intake100.P91.qubitLouck
For arbitrary natural numbers , this defines the value of the stated product with , lower array , , and all other entries zero, starting level when and otherwise, and index function , with for every when and , and for every otherwise. Explicitly, writing for the condition and , the resulting real number is
All arithmetic inside these fractions is real arithmetic. No pattern or edge assumptions are imposed, need not mean , and division by zero gives zero.
QAlgorithms.Papers.Independent.Intake100.P91.tableauGT
For natural numbers , a Young diagram with cells and at most rows, a filling weakly increasing along rows and strictly increasing down columns, and arbitrary natural numbers , is the number of cells of satisfying and . Thus the row argument is numbered starting at , while filling values start at . No bounds on are assumed: the count is zero if , if , or if the indicated row is empty; if , it counts every cell in the indicated row.
QAlgorithms.Papers.Independent.Intake100.P91.youngPrefixCells
For natural numbers , a Young diagram with cells and at most rows, an injective labeling whose image is and whose first images form a coordinatewise downward-closed set for every , and any natural number , is the finite set . There is no requirement that : the result is empty when and is the entire cell set of whenever . For , it is empty for every .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.