Documentation

HexBerlekampZassenhausMathlib.Lattice.ProjectedRows

The reduced matrix stored in the BHKS projected-row trace generates the same integer row lattice as the original BHKS basis. This carries lllNative.shortVectors's .toArray output back to the certified LLL lattice-preservation theorem Hex.lllNative_memLattice_iff.

The projected integer rows of the executable BHKS cut as a Mathlib matrix.

Equations
Instances For

    The projected rational rows of the executable BHKS cut as a Mathlib matrix.

    Equations
    Instances For

      The integer row span represented by the executable projected BHKS rows. This is the proof-facing L' <= Z^r.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        The rational row space represented by the same executable projected rows. This is the row-space input used by the RREF equivalence-class stage.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Cast an integer vector over the lifted-factor indices to a rational vector.

          Equations
          Instances For
            noncomputable def HexBerlekampZassenhausMathlib.BHKS.indicatorVector {r : } (S : Set (Fin r)) :
            Fin r

            A 0/1 indicator vector for a support of lifted factor indices.

            Equations
            Instances For

              The integer lattice W generated by the indicator vectors of the true factor supports. This is the proof-facing counterpart of the retained projected row lattice projectedRowSpanInt.

              Equations
              Instances For
                theorem HexBerlekampZassenhausMathlib.BHKS.indicatorVector_mem_trueSupportSpanInt {r : } (trueSupports : Set (Set (Fin r))) (S : trueSupports) :

                Every true-support indicator is one of the generators of W.

                @[simp]

                The indicator is 1 on members.

                @[simp]

                The indicator is 0 off members.

                Each coordinate of an indicator vector has squared real norm at most one.

                The squared real norm of a 0/1 indicator vector is at most the ambient dimension.

                @[reducible, inline]

                A support of lifted local-factor indices for a BHKS lattice basis.

                Equations
                Instances For

                  Product of the lifted factors selected by a support, using the factor order stored in the BHKS lattice basis. The definition indexes by factorCount rather than the raw array size so it remains well-typed for abstract BhksLatticeBasis values; TrueFactorLift.basis_eq ties these together for the executable basis.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For

                    Sum of the per-selected-factor executable CLD quotients, taken over the same factor order as supportProduct. Its j-th coefficient is the pre-psiCut, pre-indicator column-j entry of the true-factor CLD vector; the centering (psiCut) and indicator weighting are layered on top by the tight-column work described later in this module.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      Proof-facing package for a true factor in the direct Hensel coordinate.

                      The selected monic local product represents the integer factor only up to the two constant scales inherent in the direct coordinate:

                      • leadingCoeff f converts the monic Hensel target back to the input coordinate;

                      • factorScale is the leading coefficient of the complementary integer factor.

                      scaledProduct_congr records precisely that proportionality modulo the Hensel modulus. inputScale_coprime says the input leading coefficient is a unit there, which is the exact scalar cancelled after the monic support product is cancelled in logarithmic derivatives. There is no dilation-coordinate recovery equation in this interface.

                      Instances For
                        theorem HexBerlekampZassenhausMathlib.BHKS.finRange_foldl_add_eq_sum {M : Type u_1} [AddCommMonoid M] {n : } (g : Fin nM) :
                        List.foldl (fun (acc : M) (i : Fin n) => acc + g i) 0 (List.finRange n) = i : Fin n, g i

                        A fold-sum over List.finRange n equals the finite sum over Fin n.

                        theorem HexBerlekampZassenhausMathlib.BHKS.vecMul_getElem_eq_sum {n m : } (M : Hex.Matrix n m) (c : Vector n) (k : Fin m) :
                        (Hex.Matrix.vecMul c M)[k] = i : Fin n, M[i][k] * c[i]

                        The entry of a row combination at column k is the explicit finite sum, over the row index, of the column-k matrix entries weighted by the coefficients.

                        Every matrix row belongs to the integer lattice generated by the matrix.

                        Certificate for an arbitrary short BHKS lattice vector whose first block is the indicator of a true lifted-factor support.

                        This is the projection surface needed by period-adjusted BHKS arguments: the short vector need not be the zero-period-row trueFactorCLDVector; it only has to lie in the BHKS row lattice, project to the support indicator, and satisfy the tight cut radius bound.

                        Instances For

                          Every coordinate of a support short vector is bounded by the BHKS cut radius. This deliberately uses the radius itself, rather than its square root, so that the later integral coefficient estimate stays elementary.

                          The BHKS block-form predicate: L.basis is the all-coefficients CLD row basis [ I | A_tilde; 0 | diag ] built by bhksLatticeEntry from L's own data. This holds definitionally for Hex.bhksLatticeBasis (see bhksLatticeBasis_blockForm) and is the only fact the canonical coordinate producers need about the basis.

                          Equations
                          Instances For

                            The executable bhksLatticeBasis has block form by construction.

                            The first block of a row combination of a BHKS block-form basis is exactly the first block of its row-coefficient vector.

                            The tail block of a row combination of a BHKS block-form basis is its CLD column combination plus the corresponding diagonal-period contribution.

                            A recovered lift package supplies the BHKS block form used by coordinate and norm-bound reducers.

                            The packaged basis carries exactly the lifted-factor array used to build the executable BHKS lattice.

                            The packaged basis carries exactly the cut thresholds computed from the input polynomial and prime.

                            The packaged basis carries exactly the CLD rows computed from the concrete lifted factors.

                            The packaged basis factor count is exactly the concrete lifted-factor array size.

                            The packaged basis coefficient width is exactly the input polynomial degree used by the executable CLD rows.

                            The packaged basis modulus base is exactly the recovered lift's prime.

                            The packaged basis precision is exactly the recovered lift's Hensel precision.

                            def HexBerlekampZassenhausMathlib.BHKS.supportEquivalent {r : } (trueSupports : Set (Set (Fin r))) (j k : Fin r) :

                            Two supports are equivalent when every projected row is constant across them.

                            Equations
                            Instances For

                              Nat-indexed form of supportEquivalent, convenient for filtering List.range r while retaining proof irrelevance for the bounds.

                              Equations
                              Instances For
                                theorem HexBerlekampZassenhausMathlib.BHKS.supportEquivalentAt_iff {r : } (trueSupports : Set (Set (Fin r))) {j k : } (hj : j < r) (hk : k < r) :
                                supportEquivalentAt trueSupports j k supportEquivalent trueSupports j, hj k, hk

                                The natural-index and finite-index forms of support equivalence agree in range.

                                theorem HexBerlekampZassenhausMathlib.BHKS.supportEquivalentAt_refl {r : } (trueSupports : Set (Set (Fin r))) {j : } (hj : j < r) :
                                supportEquivalentAt trueSupports j j

                                Support equivalence is reflexive on in-range indices.

                                theorem HexBerlekampZassenhausMathlib.BHKS.supportEquivalentAt_symm {r : } (trueSupports : Set (Set (Fin r))) {j k : } (h : supportEquivalentAt trueSupports j k) :
                                supportEquivalentAt trueSupports k j

                                Support equivalence is symmetric.

                                theorem HexBerlekampZassenhausMathlib.BHKS.supportEquivalentAt_trans {r : } (trueSupports : Set (Set (Fin r))) {i j k : } (hij : supportEquivalentAt trueSupports i j) (hjk : supportEquivalentAt trueSupports j k) :
                                supportEquivalentAt trueSupports i k

                                Support equivalence is transitive.

                                Minimum representatives of support-equivalence classes, emitted in ascending column order.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  noncomputable def HexBerlekampZassenhausMathlib.BHKS.supportClassMembers {r : } (trueSupports : Set (Set (Fin r))) (rep : ) :

                                  The support-equivalence class represented by rep, listed in ascending column order.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    noncomputable def HexBerlekampZassenhausMathlib.BHKS.supportPartitionByMinColumn {r : } (trueSupports : Set (Set (Fin r))) :

                                    Canonical partition of columns by true-support membership signatures.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For

                                      The executable indicator-array shape for a finite Nat-indexed class.

                                      Equations
                                      Instances For
                                        @[simp]

                                        A class indicator array has one entry per column.

                                        theorem HexBerlekampZassenhausMathlib.BHKS.classIndicatorArray_getD (r : ) (members : List ) (i : ) :
                                        (classIndicatorArray r members).getD i 0 = if i < r i members then 1 else 0

                                        Entries of a class indicator are one exactly at in-range class members.

                                        theorem HexBerlekampZassenhausMathlib.BHKS.classIndicatorArray_bits (r : ) (members : List ) (i : ) :
                                        i < (classIndicatorArray r members).size(classIndicatorArray r members).getD i 0 = 0 (classIndicatorArray r members).getD i 0 = 1

                                        Every entry of a class indicator is zero or one.

                                        theorem HexBerlekampZassenhausMathlib.BHKS.classIndicatorArray_has_one_of_mem (r : ) (members : List ) {i : } (hi : i < r) (hmem : i members) :
                                        (classIndicatorArray r members).getD i 0 = 1

                                        Every in-range class member has indicator entry one.

                                        theorem HexBerlekampZassenhausMathlib.BHKS.mem_supportRepresentativeColumns_iff {r : } (trueSupports : Set (Set (Fin r))) (rep : ) :
                                        rep supportRepresentativeColumns trueSupports rep < r k < rep, ¬supportEquivalentAt trueSupports k rep

                                        Support-class representatives are precisely the least indices in their classes.

                                        theorem HexBerlekampZassenhausMathlib.BHKS.supportRepresentativeColumns_lt {r : } (trueSupports : Set (Set (Fin r))) {rep : } (hrep : rep supportRepresentativeColumns trueSupports) :
                                        rep < r

                                        Every support-class representative is a valid column index.

                                        theorem HexBerlekampZassenhausMathlib.BHKS.supportRepresentativeColumns_min {r : } (trueSupports : Set (Set (Fin r))) {rep : } (hrep : rep supportRepresentativeColumns trueSupports) (k : ) :
                                        k < rep¬supportEquivalentAt trueSupports k rep

                                        No earlier column is support-equivalent to a representative.

                                        theorem HexBerlekampZassenhausMathlib.BHKS.mem_supportClassMembers_iff {r : } (trueSupports : Set (Set (Fin r))) (rep j : ) :
                                        j supportClassMembers trueSupports rep j < r supportEquivalentAt trueSupports j rep

                                        A column belongs to a representative's class exactly when it is equivalent and in range.

                                        theorem HexBerlekampZassenhausMathlib.BHKS.supportClassMembers_rep_mem {r : } (trueSupports : Set (Set (Fin r))) {rep : } (hrep : rep supportRepresentativeColumns trueSupports) :
                                        rep supportClassMembers trueSupports rep

                                        Every support-class representative belongs to its own class.

                                        Every retained-prefix index is at or before some Gram--Schmidt index that actually passes the executable cut. This is the converse direction needed to control the norms of rows kept only because a later row passes.

                                        A Gram-Schmidt index that passes the executable cut test lies strictly below the retained prefix length bhksCutPrefixCount, so its row is kept.

                                        theorem HexBerlekampZassenhausMathlib.BHKS.bhksWithinGramSchmidtCut_eq_true_of_le (L : Hex.BhksLatticeBasis) (dets : Vector (L.factorCount + L.coeffWidth + 1)) (i : Fin (L.factorCount + L.coeffWidth)) (hne : dets.get i, 0) (hle : 4 * ((dets.get i + 1, ) / (dets.get i, )) (Hex.bhksCutRadiusSq4 L)) :

                                        The executable cut test passes at index i once the stored leading Gram determinant at i is nonzero and the radius inequality on the consecutive determinant ratio holds.

                                        A successful executable cut test exposes its determinant-ratio inequality.

                                        Every row in the retained prefix has a certified norm bound. A retained row need not itself pass the cut: the witness may be a later passing Gram--Schmidt row. The generic reduced-row estimate accounts for precisely that prefix behavior.

                                        Executable-trace specialization of retainedRow_normSq_le: every source row selected by bhksProjectedRowsTrace satisfies the retained-prefix norm bound.

                                        Every coordinate of a retained LLL row is bounded by a deliberately coarse integral envelope for the retained-row norm estimate.

                                        BHKS prefix survivor-span (Lemma 5.7, forward).

                                        Any lattice vector v of the reduced BHKS basis whose squared length passes the cut test (4·‖v‖² ≤ bhksCutRadiusSq4) lies in the integer span of the retained prefix rows b_0 … b_{t-1}, where t = bhksCutPrefixCount.

                                        The cut keeps a row i iff 4·‖b*_i‖² ≤ bhksCutRadiusSq4, i.e. ‖b*_i‖² ≤ bhksCutRadiusSq4 / 4; the hypothesis is the matching tight bound on v (four times its squared norm within the radius), not the loose ‖v‖² ≤ bhksCutRadiusSq4.

                                        Cut hypotheses needed to connect the executable projected rows to the abstract true-factor supports. Later B4/B5 work discharges indicator_mem_projected from the BHKS norm bound and Gram-Schmidt cut soundness.

                                        Instances For

                                          The existing per-support cut theorem is exactly the forward lattice containment W ≤ L'.

                                          Reverse containment reduces to checking the retained projected generators. This is the proof-facing endpoint of the bad-vector contradiction: once every retained projected row is in W, its whole integer span is in W.

                                          Every projected matrix row belongs to the integer span of the projected rows.