Documentation

Starlib.Data.CodingTheory.Prelims

Coding-Theory Preliminaries #

def multilinearWeight {F : Type u_1} [CommRing F] {ϑ : } (r : Fin ϑF) (i : Fin (2 ^ ϑ)) :
F

The tensor product weight ⊗_{i=0}^{ϑ-1}(1 - rᵢ, rᵢ) for a specific index i given randomness r. Corresponds to eq(i, r) in multilinear polynomial literature.

Instances For
    def multilinearCombine {F : Type u_1} [CommRing F] {A : Type u_2} [AddCommMonoid A] [Module F A] {ϑ : } {ι : Type u_3} (u : Fin (2 ^ ϑ)ιA) (r : Fin ϑF) :
    ιA

    Linear combination of the rows of u according to the tensor product of r: [tensor_product r i] ·|u₀| |u₁| |⋮| |u_{2^ϑ-1}| = ∑_{i=0}^{2^ϑ-1} (multilinearWeight r i) • u_i

    Instances For
      def Matrix.neqCols {F : Type u_1} {ι : Type u_2} [Fintype ι] {ι' : Type u_3} [Fintype ι'] [DecidableEq F] (U V : Matrix ι ι' F) :
      Finset ι'

      The set of column indices where two matrices differ.

      Instances For
        def Matrix.rowSpan {F : Type u_1} {ι : Type u_2} {ι' : Type u_3} [Semiring F] (U : Matrix ι ι' F) :
        Submodule F (ι'F)

        The submodule spanned by the rows of a matrix.

        Instances For
          noncomputable def Matrix.rowRank {F : Type u_1} {ι : Type u_2} {ι' : Type u_3} [Semiring F] (U : Matrix ι ι' F) :

          The row rank of a matrix (dimension of the row span).

          Instances For
            def Matrix.colSpan {F : Type u_1} {ι : Type u_2} {ι' : Type u_3} [Semiring F] (U : Matrix ι ι' F) :
            Submodule F (ιF)

            The submodule spanned by the columns of a matrix.

            Instances For
              noncomputable def Matrix.colRank {F : Type u_1} {ι : Type u_2} {ι' : Type u_3} [Semiring F] (U : Matrix ι ι' F) :

              The column rank of a matrix (dimension of the column span).

              Instances For
                def Matrix.subUpFull {F : Type u_1} {m n : } (U : Matrix (Fin m) (Fin n) F) (r_reindex : Fin nFin m) :
                Matrix (Fin n) (Fin n) F

                Extract an n×n submatrix from an m×n matrix by selecting n rows.

                Instances For
                  def Matrix.subLeftFull {F : Type u_1} {m n : } (U : Matrix (Fin m) (Fin n) F) (c_reindex : Fin mFin n) :
                  Matrix (Fin m) (Fin m) F

                  Extract an m×m submatrix from an m×n matrix by selecting m columns.

                  Instances For
                    theorem Matrix.rank_eq_if_subUpFull_eq {F : Type u_1} {m n : } [CommRing F] [Nontrivial F] {U : Matrix (Fin m) (Fin n) F} (h : n m) :
                    (U.subUpFull (Fin.castLE h)).rank = nU.rank = n

                    An m×n matrix has full rank if the submatrix consisting of rows 1 through n has rank n.

                    theorem Matrix.cRank_rank_conversion {F : Type u_1} {m n : } [CommRing F] [Nontrivial F] {U : Matrix (Fin m) (Fin n) F} :
                    U.rank = U.cRank

                    cRank and Rank agree for a finite matirx

                    theorem Matrix.full_row_rank_via_rank_subLeftFull {F : Type u_1} {m n : } [CommRing F] [Nontrivial F] {U : Matrix (Fin m) (Fin n) F} (h : m n) :
                    (U.subLeftFull (Fin.castLE h)).rank = mU.rank = m

                    An m×n matrix has full rank if the submatrix consisting of columns 1 through m has rank m.

                    theorem Matrix.rank_eq_if_det_ne_zero {F : Type u_1} {n : } [CommRing F] [Nontrivial F] {U : Matrix (Fin n) (Fin n) F} [IsDomain F] :
                    U.det 0U.rank = n

                    A square matrix over an integral domain has full rank if its determinant is nonzero.

                    theorem Matrix.rank_eq_iff_det_ne_zero {F : Type u_1} {n : } [Field F] {U : Matrix (Fin n) (Fin n) F} :
                    U.rank = n U.det 0

                    A square matrix has full rank iff the determinant is nonzero.

                    theorem Matrix.rank_eq_colRank {F : Type u_1} {m n : } [Field F] {U : Matrix (Fin m) (Fin n) F} :

                    The rank of a matrix equals the column rank.

                    theorem Matrix.rowRank_eq_colRank {F : Type u_1} {m n : } [Field F] {U : Matrix (Fin m) (Fin n) F} :

                    The row rank of a matrix equals the column rank.

                    theorem Matrix.rank_eq_rowRank {F : Type u_1} {m n : } [Field F] {U : Matrix (Fin m) (Fin n) F} :

                    The rank of a matrix equals the row rank.

                    theorem Matrix.rank_eq_min_row_col_rank {F : Type u_1} {m n : } [Field F] {U : Matrix (Fin m) (Fin n) F} :

                    The rank of a matrix equals the minimum of its row rank and column rank.

                    @[reducible]
                    def Affine.affineLineAtOrigin {ι : Type u_1} {F : Type u_2} {A : Type u_3} [Ring F] [AddCommGroup A] [Module F A] (origin direction : ιA) :
                    AffineSubspace F (ιA)

                    Affine line at origin u: {u + α • v : α ∈ F}, the line through u with direction v. This definition is used in Theorems 1.4, 4.1, 5.1, [BCIKS20] and Lemma 4.4, [AHIV22].

                    Instances For
                      theorem Affine.mem_affineLineAtOrigin_iff {ι : Type u_1} {F : Type u_2} {A : Type u_3} [Ring F] [AddCommGroup A] [Module F A] (origin direction x : ιA) :
                      x affineLineAtOrigin origin direction ∃ (α : F), x = origin + α direction
                      @[reducible]
                      def Affine.affineSubspaceAtOrigin {ι : Type u_1} [Fintype ι] {F : Type u_2} {A : Type u_3} {k : } [Ring F] [AddCommGroup A] [DecidableEq A] [Module F A] (origin : ιA) (directions : Fin kιA) :
                      AffineSubspace F (ιA)

                      Affine subspace from base origin and direction generators. Constructs the affine subspace {origin + span{directions}}. Used in Theorem 1.6, [BCIKS20].

                      Instances For
                        theorem Affine.mem_affineSubspaceFrom_iff {ι : Type u_1} [Fintype ι] {F : Type u_2} {A : Type u_3} {k : } [Ring F] [AddCommGroup A] [DecidableEq A] [Module F A] (origin : ιA) (directions : Fin kιA) (x : ιA) :
                        x affineSubspaceAtOrigin origin directions ∃ (β : Fin kF), x = origin + i : Fin k, β i directions i
                        @[implicit_reducible]
                        instance Affine.instVAddForallAffineSubspace_starlib {ι : Type u_1} {F : Type u_2} [Ring F] :
                        VAdd (ιF) (AffineSubspace F (ιF))

                        Vector addition action on affine subspaces.

                        @[implicit_reducible]
                        noncomputable instance Affine.instFintypeSubtypeForallMemAffineSubspaceHVAdd_starlib {ι : Type u_1} [Fintype ι] {F : Type u_2} [Ring F] [Fintype F] {v : ιF} {s : AffineSubspace F (ιF)} [Fintype s] :
                        Fintype ↥(v +ᵥ s)

                        A translate of a finite affine subspace is finite.

                        @[implicit_reducible]
                        noncomputable instance Affine.instFintypeSubtypeForallMemAffineSubspaceAffineSpan_starlib {ι : Type u_1} [Fintype ι] {F : Type u_2} [Ring F] [Fintype F] {s : Set (ιF)} :

                        The affine span of a set is finite over a finite field.

                        instance Affine.instNonemptySubtypeForallMemFinsetImageFinUniv_starlib {ι : Type u_1} [Fintype ι] {F : Type u_2} {k : } [DecidableEq F] [NeZero k] {f : Fin kιF} :

                        The image of a function Fin k → α over Finset.univ is nonempty when k ≠ 0.

                        instance Affine.instNonemptySubtypeForallMemAffineSubspaceHVAdd_starlib {ι : Type u_1} {F : Type u_2} [Ring F] {v : ιF} {s : AffineSubspace F (ιF)} [inst : Nonempty s] :
                        Nonempty ↥(v +ᵥ s)

                        A translate of a nonempty affine subspace is nonempty.

                        @[reducible, inline]
                        abbrev Affine.AffSpanSet {ι : Type u_1} [Fintype ι] {F : Type u_2} {k : } [DecidableEq F] [Ring F] [NeZero k] (U : Fin kιF) :
                        Set (ιF)

                        The carrier set of the affine span of the image of a function U : Fin k → ι → F. This is the set of all affine combinations of U 0, U 1, ..., U (k-1).

                        Instances For
                          noncomputable def Affine.AffSpanFinset {ι : Type u_1} [Fintype ι] {F : Type u_2} {k : } [DecidableEq F] [Ring F] [Fintype F] [NeZero k] (U : Fin kιF) :
                          Finset (ιF)

                          The affine span as a Finset, using AffSpanFinite to convert from the set.

                          Instances For
                            noncomputable def Affine.AffSpanFinsetCollection {ι : Type u_1} [Fintype ι] {F : Type u_2} {k : } [DecidableEq F] [Ring F] [Fintype F] {t : } [NeZero k] [NeZero t] (C : Fin tFin kιF) :
                            Set (Finset (ιF))

                            A collection of affine subspaces in F^ι.

                            Instances For
                              instance Affine.instNonemptyElemCoeFinsetOfSubtypeMem_starlib {α : Type u_4} {s : Finset α} [inst : Nonempty s] :
                              Nonempty s

                              The carrier set of a nonempty finset is nonempty.

                              @[implicit_reducible]
                              noncomputable instance Affine.instFintypeAffineSubspace {F : Type u_2} [Ring F] {V : Type u_4} [AddCommGroup V] [Module F V] [Fintype V] (S : AffineSubspace F V) :
                              Fintype S

                              Affine subspace carriers are Fintype when the ambient space is Fintype

                              instance Affine.instNonemptyAffineSubspace_mk' {F : Type u_2} [Ring F] {V : Type u_4} [AddCommGroup V] [Module F V] (p : V) (direction : Submodule F V) :
                              Nonempty (AffineSubspace.mk' p direction)

                              Affine subspaces constructed with mk' are always nonempty

                              @[reducible]
                              def Curve.polynomialCurveEval {ι : Type u_1} {F : Type u_2} {A : Type u_3} [Semiring F] [AddCommMonoid A] [Module F A] {k : } (u : Fin kιA) (r : F) :
                              ιA

                              Evaluate the polynomial curve generated by u at parameter r.

                              Instances For
                                @[reducible]
                                def Curve.polynomialCurve {ι : Type u_1} {F : Type u_2} {A : Type u_3} [Semiring F] [AddCommMonoid A] [Module F A] {k : } (u : Fin kιA) :
                                Set (ιA)

                                (Parameterised) polynomial curve, Thm 1.5, [BCIKS20]: Let u := {u₀, ..., u_{k-1}} be a collection of vectors with coefficients in a semiring. The polynomial curve of degree k-1 generated by u is the set of linear combinations of the form {∑ i ∈ k, r ^ i • u_i | r ∈ F}.

                                Instances For
                                  def Curve.polynomialCurveFinite {ι : Type u_1} [Fintype ι] [DecidableEq ι] {F : Type u_2} {A : Type u_3} [Semiring F] [Fintype F] [AddCommMonoid A] [Module F A] [Fintype A] [DecidableEq A] {k : } (u : Fin kιA) :
                                  Finset (ιA)

                                  A polynomial curve over a finite field, as a Finset. Requires DecidableEq ι and DecidableEq F to be able to construct the Finset.

                                  Instances For
                                    instance Curve.instNonemptySubtypeForallMemFinsetPolynomialCurveFinite {ι : Type u_1} [Fintype ι] [DecidableEq ι] {F : Type u_2} {A : Type u_3} [Semiring F] [Fintype F] [AddCommMonoid A] [Module F A] [Fintype A] [DecidableEq A] [Nonempty F] {k : } (u : Fin kιA) :

                                    A polynomial curve over a nonempty finite field contains at least one point.

                                    instance Curve.instNonemptySubtypeForallMemFinsetPolynomialCurveFinite_1 {ι : Type u_1} [Fintype ι] [DecidableEq ι] {F : Type u_2} {A : Type u_3} [Semiring F] [Fintype F] [AddCommMonoid A] [Module F A] [Fintype A] [DecidableEq A] {k : } {u : Fin kιA} :
                                    theorem sInf.sInf_UB_of_le_UB {S : Set } {i : } :
                                    (∀ sS, s i)sInf S i

                                    If every element of a set is bounded above by i, then the infimum is also bounded by i.

                                    theorem sInf.le_sInf_of_LB {S : Set } (hne : S.Nonempty) {i : } (hLB : sS, i s) :
                                    i sInf S

                                    If i is a lower bound for all elements in a nonempty set, then i is at most the infimum.

                                    @[simp]
                                    theorem Fintype.zero_lt_card {ι : Type u_1} [Fintype ι] [Nonempty ι] :
                                    0 < card ι

                                    A nonempty fintype has positive cardinality.

                                    @[simp]
                                    theorem Finset.card_filter_prod_self_eq {α : Type u_1} [DecidableEq α] {s : Finset α} :
                                    {xs ×ˢ s | x.1 = x.2}.card = s.card

                                    The diagonal of s × s has the same cardinality as s.

                                    @[simp]
                                    theorem Finset.card_univ_filter_eq {α : Type u_1} [DecidableEq α] [Fintype α] {e : α} :
                                    {x : α | x e}.card = univ.card - 1

                                    The number of elements different from a fixed element e is one less than the total.

                                    @[simp]
                                    theorem Finset.card_prod_self_eq {α : Type u_1} [DecidableEq α] {s : Finset α} [Fintype α] :
                                    (s ×ˢ s {x : α × α | x.1 = x.2}).card = s.card

                                    The diagonal of s × s (intersection form) has the same cardinality as s.