Documentation

CharacteristicSet.TriangulatedSet

Triangulated Set #

This file defines the structure of a Triangulated Set of multivariate polynomials. A Triangulated Set is a finite ordered sequence of non-zero polynomials [P₁, P₂, ..., Pₘ] such that their main variables (main variables) are strictly increasing: mainVariable(P₁) < mainVariable(P₂) < ... < mainVariable(Pₘ).

Main Definitions #

Main Results #

structure TriangulatedSet (σ : Type u_1) (R : Type u_2) [CommSemiring R] [LinearOrder σ] :
Type (max u_1 u_2)

A Triangulated Set is a finite sequence of polynomials with strictly increasing main variables.

  • length' :

    The number of polynomials in the set.

  • seq : MvPolynomial σ R

    The sequence of polynomials, indexed by .

  • elements_ne_zero (n : ) : n < self.length' self.seq n 0

    Elements within the length bound are non-zero.

  • ascending_mainVariable (n : ) : n < self.length' - 1(self.seq n).mainVariable < (self.seq (n + 1)).mainVariable

    The main variables of the polynomials are strictly increasing.

Instances For
    Equations
    def TriangulatedSet.length {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) :

    The length of the triangulated set.

    Equations
    Instances For
      theorem TriangulatedSet.ext {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} (h : ∀ (i : ), S i = T i) :
      S = T
      theorem TriangulatedSet.ext_iff {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
      S = T ∀ (i : ), S i = T i
      theorem TriangulatedSet.elements_ne_zero_iff {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {n : } :
      n < S.length S n 0
      theorem TriangulatedSet.elements_eq_zero_iff {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {n : } :
      S.length n S n = 0
      theorem TriangulatedSet.ext' {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} (h1 : S.length = T.length) (h2 : i < S.length, S i = T i) :
      S = T
      @[simp]
      theorem TriangulatedSet.apply_length_eq_zero {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} :
      S S.length = 0
      theorem TriangulatedSet.mainVariable_lt_mainVariable_next {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {n : } :
      n < S.length - 1(S n).mainVariable < (S (n + 1)).mainVariable
      theorem TriangulatedSet.mainVariable_lt_mainVariable_next' {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {n : } :
      n + 1 < S.length(S n).mainVariable < (S (n + 1)).mainVariable
      theorem TriangulatedSet.mainVariable_lt_mainVariable_next'' {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {n : } :
      0 < nn < S.length(S (n - 1)).mainVariable < (S n).mainVariable
      theorem TriangulatedSet.mainVariable_lt_of_index_lt {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {m n : } :
      m < nn < S.length(S m).mainVariable < (S n).mainVariable
      theorem TriangulatedSet.false_of_mainVariable_ge_of_index_lt {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {m n : } :
      m < nn < S.length(S n).mainVariable (S m).mainVariableFalse
      theorem TriangulatedSet.mainVariable_le_of_index_le {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {m n : } :
      m nn < S.length(S m).mainVariable (S n).mainVariable
      theorem TriangulatedSet.le_of_index_le {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {m n : } :
      m nn < S.lengthS m S n
      theorem TriangulatedSet.index_eq_of_mainVariable_eq {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {m n : } :
      m < S.lengthn < S.length(S m).mainVariable = (S n).mainVariablem = n
      theorem TriangulatedSet.index_eq_of_apply_eq {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {m n : } :
      m < S.lengthn < S.lengthS m = S nm = n
      theorem TriangulatedSet.apply_lt_of_index_lt {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {m n : } :
      m < nn < S.lengthS m < S n
      theorem TriangulatedSet.index_lt_of_apply_lt {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {m n : } (h : m < S.length) :
      S m < S nm < n
      theorem TriangulatedSet.index_eq_zero_of_mainVariable_eq_bot {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {n : } :
      n < S.length(S n).mainVariable = n = 0

      Set-like behavior #

      Equations
      theorem TriangulatedSet.mem_def {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {p : MvPolynomial σ R} :
      p S n < S.length, S n = p
      @[simp]
      theorem TriangulatedSet.zero_notMem {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) :
      0S
      theorem TriangulatedSet.ne_zero_of_mem {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {p : MvPolynomial σ R} :
      p Sp 0
      theorem TriangulatedSet.apply_mem {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {n : } :
      n < S.lengthS n S
      theorem TriangulatedSet.forall_mem_iff_forall_index {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {a : MvPolynomial σ RProp} :
      (∀ pS, a p) i < S.length, a (S i)
      theorem TriangulatedSet.forall_mem_iff_forall_index' {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {a : MvPolynomial σ RProp} {n : } (h : n = S.length) :
      (∀ pS, a p) ∀ (i : Fin n), a (S i)
      theorem TriangulatedSet.exists_mem_iff_exists_index {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {a : MvPolynomial σ RProp} :
      (∃ pS, a p) i < S.length, a (S i)
      theorem TriangulatedSet.exists_mem_iff_exists_index' {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {a : MvPolynomial σ RProp} {n : } (h : n = S.length) :
      (∃ pS, a p) ∃ (i : Fin n), a (S i)
      Equations
      Equations
      @[simp]
      theorem TriangulatedSet.Subset.refl {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) :
      S S
      theorem TriangulatedSet.Subset.trans {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T U : TriangulatedSet σ R} :
      S TT US U
      theorem TriangulatedSet.subset_def {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
      S T ∀ ⦃x : MvPolynomial σ R⦄, x Sx T
      theorem TriangulatedSet.mem_of_subset {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} (p : MvPolynomial σ R) (h : S T) :
      p Sp T
      theorem TriangulatedSet.ssubset_def {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
      S T S T ¬T S
      def TriangulatedSet.toFinset {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) :
      Equations
      Instances For
        @[simp]
        theorem TriangulatedSet.card_toFinset {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) :
        @[simp]
        theorem TriangulatedSet.mem_toFinset_iff {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {p : MvPolynomial σ R} :
        @[simp]
        theorem TriangulatedSet.toFinset_eq_iff_eq {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
        theorem TriangulatedSet.toFinset_eq_coe_set {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) :
        S.toFinset = S
        theorem TriangulatedSet.length_le_of_subset {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
        S TS.length T.length
        theorem TriangulatedSet.length_lt_of_ssubset {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
        S TS.length < T.length
        def TriangulatedSet.toList {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) :
        Equations
        Instances For
          @[simp]
          theorem TriangulatedSet.length_toList {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) :
          @[simp]
          theorem TriangulatedSet.mem_toList_iff {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {p : MvPolynomial σ R} :
          p S.toList p S
          @[simp]
          theorem TriangulatedSet.toList_eq_iff_eq {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
          S.toList = T.toList S = T
          theorem TriangulatedSet.toList_getElem {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {n : } (h : n < S.toList.length) :
          S.toList[n] = S n
          theorem TriangulatedSet.toList_non_zero {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} p : MvPolynomial σ R :
          p S.toListp 0
          noncomputable instance TriangulatedSet.instInhabited {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] :
          Equations
          @[simp]
          theorem TriangulatedSet.length_empty {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] :
          @[simp]
          theorem TriangulatedSet.empty_apply {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {n : } :
          n = 0
          theorem TriangulatedSet.notMem_empty {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (p : MvPolynomial σ R) :
          p
          theorem TriangulatedSet.eq_empty_of_forall_notMem {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} :
          (∀ (p : MvPolynomial σ R), pS)S =

          Rank and Ordering #

          noncomputable def TriangulatedSet.rank {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) :
          Lex (WithTop (Lex (WithBot σ × )))

          The rank of a Triangulated Set is a lexicographic sequence of ranks of its polynomials. A more intuitive definition is rank_lt_iff, S < T if one of the following two occurs:

          1. There exists some k < S.length such that S₀ ≈ T₀, S₁ ≈ T₁, ..., Sₖ₋₁ ≈ Tₖ₋₁ and Sₖ < Tₖ.
          2. S.length > T.length and ∀ i < T.length, Sᵢ ≈ Tᵢ
          Equations
          Instances For
            theorem TriangulatedSet.rank_def {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} :
            S.rank = fun (i : ) => if i < S.length then (S i).rank else
            theorem TriangulatedSet.rank_apply {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {i : } (h : i < S.length) :
            S.rank i = (S i).rank
            theorem TriangulatedSet.rank_apply' {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {i : } (h : S.length i) :
            S.rank i =
            theorem TriangulatedSet.rank_lt_iff {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            S.rank < T.rank (∃ k < S.length, S k < T k i < k, S i T i) T.length < S.length i < T.length, S i T i
            theorem TriangulatedSet.rank_eq_iff {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            S.rank = T.rank S.length = T.length ∀ (k : ), S k T k
            theorem TriangulatedSet.rank_le_iff {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            S.rank T.rank (∃ k < S.length, S k < T k i < k, S i T i) T.length S.length k < T.length, S k T k
            Equations
            • One or more equations did not get rendered due to their size.
            theorem TriangulatedSet.le_def' {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            S T S.rank T.rank
            noncomputable instance TriangulatedSet.instDecidableLE {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] :
            Equations
            theorem TriangulatedSet.le_def {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            S T (∃ k < S.length, S k < T k i < k, S i T i) T.length S.length k < T.length, S k T k
            theorem TriangulatedSet.lt_def' {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            S < T S.rank < T.rank
            theorem TriangulatedSet.lt_def {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            S < T (∃ k < S.length, S k < T k i < k, S i T i) T.length < S.length i < T.length, S i T i
            theorem TriangulatedSet.lt_empty {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} :
            S S <
            theorem TriangulatedSet.le_empty {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) :
            @[simp]
            theorem TriangulatedSet.not_lt_iff_ge {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            ¬S < T T S
            @[simp]
            theorem TriangulatedSet.not_le_iff_gt {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            ¬S T T < S
            theorem TriangulatedSet.ge_of_forall_equiv {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            (∀ n < S.length, i < T.length, T i S n)T S
            theorem TriangulatedSet.ge_of_subset {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            S TT S
            noncomputable instance TriangulatedSet.instDecidableRelEquiv {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] :
            DecidableRel fun (x1 x2 : TriangulatedSet σ R) => x1 x2
            Equations
            theorem TriangulatedSet.equiv_def'' {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            S T S T T S
            theorem TriangulatedSet.equiv_def' {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            S T S.rank = T.rank
            theorem TriangulatedSet.equiv_def {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            S T ¬S < T ¬T < S
            theorem TriangulatedSet.equiv_iff {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            S T S.length = T.length ∀ (k : ), S k T k
            theorem TriangulatedSet.equiv_iff' {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            S T S.length = T.length k < S.length, S k T k
            theorem TriangulatedSet.le_iff_lt_or_equiv {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            S T S < T S T
            theorem TriangulatedSet.lt_of_equiv_of_lt {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T U : TriangulatedSet σ R} :
            S TT < US < U
            theorem TriangulatedSet.lt_of_lt_of_equiv {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T U : TriangulatedSet σ R} :
            S < TT US < U
            theorem TriangulatedSet.equiv_of_le_of_ge {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            S TT SS T
            theorem TriangulatedSet.gt_of_ssubset {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S T : TriangulatedSet σ R} :
            S TT < S
            noncomputable def TriangulatedSet.single_of_ne_zero {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {p : MvPolynomial σ R} (hp : p 0) :
            Equations
            Instances For
              theorem TriangulatedSet.single_of_ne_zero_apply {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {p : MvPolynomial σ R} {n : } (hp : p 0) :
              (single_of_ne_zero hp) n = if n = 0 then p else 0

              Well-Foundedness #

              theorem TriangulatedSet.length_le {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} [Fintype σ] :
              instance TriangulatedSet.instIsWellFoundedRankLT {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [Finite σ] :
              IsWellFounded (TriangulatedSet σ R) (InvImage (fun (x1 x2 : Lex (WithTop (Lex (WithBot σ × )))) => x1 < x2) rank)

              The set of Triangulated Sets is well-founded under the lexicographic rank ordering. This is a crucial result that guarantees the termination of the Characteristic Set Algorithm.

              Equations
              theorem TriangulatedSet.Set.has_min {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [Finite σ] (S' : Set (TriangulatedSet σ R)) (h : S'.Nonempty) :
              SS', TS', S T
              noncomputable def TriangulatedSet.Set.min {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [Finite σ] (S' : Set (TriangulatedSet σ R)) (h : S'.Nonempty) :
              Equations
              Instances For
                theorem TriangulatedSet.Set.min_mem {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [Finite σ] (S' : Set (TriangulatedSet σ R)) (h : S'.Nonempty) :
                min S' h S'
                theorem TriangulatedSet.Set.min_le {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [Finite σ] (S' : Set (TriangulatedSet σ R)) (h : S'.Nonempty) (T : TriangulatedSet σ R) :
                T S'min S' h T
                noncomputable def TriangulatedSet.take {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) (n : ) :
                Equations
                Instances For
                  @[simp]
                  theorem TriangulatedSet.length_take {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) (n : ) :
                  (S.take n).length = min n S.length
                  theorem TriangulatedSet.take_apply {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) (n m : ) :
                  (S.take n) m = if m < n then S m else 0
                  theorem TriangulatedSet.take_apply' {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {n m : } (h : m < min n S.length) :
                  (S.take n) m = S m
                  theorem TriangulatedSet.lt_take {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {n : } :
                  n < S.lengthS < S.take n
                  @[simp]
                  theorem TriangulatedSet.take_zero {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) :
                  S.take 0 =
                  @[simp]
                  theorem TriangulatedSet.take_length {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) :
                  S.take S.length = S
                  theorem TriangulatedSet.take_subset {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) (n : ) :
                  S.take n S
                  theorem TriangulatedSet.toList_take_comm {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) (n : ) :
                  def TriangulatedSet.drop {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) (n : ) :
                  Equations
                  • S.drop n = { length' := S.length - n, seq := fun (m : ) => S (m + n), elements_ne_zero := , ascending_mainVariable := }
                  Instances For
                    @[simp]
                    theorem TriangulatedSet.length_drop {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) (n : ) :
                    (S.drop n).length = S.length - n
                    @[simp]
                    theorem TriangulatedSet.drop_apply {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) (n m : ) :
                    (S.drop n) m = S (m + n)
                    @[simp]
                    theorem TriangulatedSet.drop_zero {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) :
                    S.drop 0 = S
                    theorem TriangulatedSet.drop_eq_empty_of_ge_length {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {n : } :
                    S.length nS.drop n =
                    @[simp]
                    theorem TriangulatedSet.drop_length {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) :
                    theorem TriangulatedSet.toList_drop_comm {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) (n : ) :
                    theorem TriangulatedSet.lt_drop {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {n : } :
                    S 0 < nS < S.drop n
                    @[reducible, inline]
                    abbrev TriangulatedSet.canConcat {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) (p : MvPolynomial σ R) :

                    The condition required to append p to S while maintaining the Triangulated Set property. p must be non-zero and its main variable must be strictly greater than the main variable of the last element of S.

                    Equations
                    Instances For
                      theorem TriangulatedSet.canConcat_def {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {p : MvPolynomial σ R} :
                      S.canConcat p p 0 (0 < S.length(S (S.length - 1)).mainVariable < p.mainVariable)
                      theorem TriangulatedSet.empty_canConcat {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {p : MvPolynomial σ R} :
                      p 0.canConcat p
                      noncomputable def TriangulatedSet.concat {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (S : TriangulatedSet σ R) (p : MvPolynomial σ R) (h : S.canConcat p := by assumption) :

                      Appends a polynomial p to the end of S. Requires S.canConcat p.

                      Equations
                      Instances For
                        @[simp]
                        theorem TriangulatedSet.length_concat {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {p : MvPolynomial σ R} (h : S.canConcat p) :
                        (S.concat p h).length = S.length + 1
                        theorem TriangulatedSet.concat_apply {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {p : MvPolynomial σ R} (h : S.canConcat p) (n : ) :
                        (S.concat p h) n = if n < S.length then S n else if n = S.length then p else 0
                        theorem TriangulatedSet.concat_apply_length {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {p : MvPolynomial σ R} (h : S.canConcat p) :
                        (S.concat p h) S.length = p
                        theorem TriangulatedSet.concat_lt {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {p : MvPolynomial σ R} (h : S.canConcat p) :
                        S.concat p h < S
                        theorem TriangulatedSet.mem_concat {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {p : MvPolynomial σ R} (h : S.canConcat p) :
                        p S.concat p h
                        theorem TriangulatedSet.subset_concat {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {p : MvPolynomial σ R} (h : S.canConcat p) :
                        S S.concat p h
                        theorem TriangulatedSet.mem_concat_iff {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {p q : MvPolynomial σ R} (h : S.canConcat p) :
                        q S.concat p h q = p q S
                        theorem TriangulatedSet.coe_concat_eq_insert {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {p : MvPolynomial σ R} (h : S.canConcat p) :
                        (S.concat p h) = Set.insert p S
                        noncomputable def TriangulatedSet.list {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] (l : List (MvPolynomial σ R)) (h1 : pl, p 0 := by assumption) (h2 : List.Pairwise (fun (p q : MvPolynomial σ R) => p.mainVariable < q.mainVariable) l := by assumption) :

                        Converts a list to a TriangulatedSet. Requires the list to be non-zero and pairwise strictly ascending in main variable.

                        Equations
                        Instances For
                          theorem TriangulatedSet.length_list {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {l : List (MvPolynomial σ R)} (h1 : pl, p 0) (h2 : List.Pairwise (fun (p q : MvPolynomial σ R) => p.mainVariable < q.mainVariable) l) :
                          (list l h1 h2).length = l.length
                          theorem TriangulatedSet.list_nil_eq_empty {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {l : List (MvPolynomial σ R)} (h1 : pl, p 0) (h2 : List.Pairwise (fun (p q : MvPolynomial σ R) => p.mainVariable < q.mainVariable) l) (h3 : l = []) :
                          list l h1 h2 =
                          theorem TriangulatedSet.list_apply {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {l : List (MvPolynomial σ R)} (h1 : pl, p 0) (h2 : List.Pairwise (fun (p q : MvPolynomial σ R) => p.mainVariable < q.mainVariable) l) {n : } (hn : n < l.length) :
                          (list l h1 h2) n = l[n]
                          theorem TriangulatedSet.toList_list_eq {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {l : List (MvPolynomial σ R)} (h1 : pl, p 0) (h2 : List.Pairwise (fun (p q : MvPolynomial σ R) => p.mainVariable < q.mainVariable) l) :
                          (list l h1 h2).toList = l
                          theorem TriangulatedSet.list_eq_of_eq_toList {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {S : TriangulatedSet σ R} {l : List (MvPolynomial σ R)} (h1 : pl, p 0) (h2 : List.Pairwise (fun (p q : MvPolynomial σ R) => p.mainVariable < q.mainVariable) l) (heq : l = S.toList) :
                          list l h1 h2 = S
                          theorem TriangulatedSet.mem_list_iff {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {l : List (MvPolynomial σ R)} (h1 : pl, p 0) (h2 : List.Pairwise (fun (p q : MvPolynomial σ R) => p.mainVariable < q.mainVariable) l) {p : MvPolynomial σ R} :
                          p list l h1 h2 p l
                          noncomputable def TriangulatedSet.list! {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [DecidableEq R] (l : List (MvPolynomial σ R)) :

                          Unsafely construct a TriangulatedSet from a list. Panics if preconditions are not met. This should be used with caution, primarily for computation where inputs are guaranteed correct.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            theorem TriangulatedSet.list!_eq_list {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [DecidableEq R] (l : List (MvPolynomial σ R)) (h1 : pl, p 0) (h2 : List.Pairwise (fun (p q : MvPolynomial σ R) => p.mainVariable < q.mainVariable) l) :
                            list! l = list l h1 h2
                            noncomputable def TriangulatedSet.single {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [DecidableEq R] (p : MvPolynomial σ R) :
                            Equations
                            Instances For
                              @[simp]
                              theorem TriangulatedSet.single_zero {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [DecidableEq R] :
                              theorem TriangulatedSet.length_single {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [DecidableEq R] {p : MvPolynomial σ R} :
                              p 0(single p).length = 1
                              theorem TriangulatedSet.length_single_zero {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [DecidableEq R] {p : MvPolynomial σ R} :
                              p = 0(single p).length = 0
                              theorem TriangulatedSet.single_apply_zero {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [DecidableEq R] (p : MvPolynomial σ R) :
                              (single p) 0 = p
                              theorem TriangulatedSet.single_apply_nonzero {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] {n : } [DecidableEq R] (p : MvPolynomial σ R) :
                              n 0(single p) n = 0
                              theorem TriangulatedSet.mem_single_of_ne_zero {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [DecidableEq R] {p : MvPolynomial σ R} :
                              p 0p single p
                              theorem TriangulatedSet.notMem_single_of_ne {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [DecidableEq R] {p q : MvPolynomial σ R} :
                              q pqsingle p
                              theorem TriangulatedSet.single_lt_empty {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [DecidableEq R] {p : MvPolynomial σ R} :
                              p 0single p <
                              theorem TriangulatedSet.gt_single_of_first_gt {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [DecidableEq R] {S : TriangulatedSet σ R} {p : MvPolynomial σ R} :
                              p 0p < S 0single p < S
                              theorem TriangulatedSet.single_of_length_le_one {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [DecidableEq R] {S : TriangulatedSet σ R} :
                              S.length 1S = single (S 0)
                              noncomputable def TriangulatedSet.takeConcat {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [DecidableEq R] (S : TriangulatedSet σ R) (p : MvPolynomial σ R) :

                              takeConcat S p tries to construct a new Triangulated Set by taking a prefix of S and appending p. This is a key operation in constructing the Characteristic Set. If p fits naturally at the end of S, it behaves like S.concat p. If p conflicts with some element in S (in terms of main variable order), takeConcat finds the first element in S that has a higher or equal main variable than p, truncates S before that element, and appends p.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                theorem TriangulatedSet.mem_takeConcat {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [DecidableEq R] (S : TriangulatedSet σ R) {p : MvPolynomial σ R} (h : p 0) :
                                theorem TriangulatedSet.takeConcat_subset {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [DecidableEq R] {S : TriangulatedSet σ R} {p : MvPolynomial σ R} (q : MvPolynomial σ R) :
                                q S.takeConcat pq pq S
                                theorem TriangulatedSet.reducedToSet_iff {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [DecidableEq R] {S : TriangulatedSet σ R} {q : MvPolynomial σ R} :
                                q.reducedToSet S i < S.length, q.reducedTo (S i)
                                theorem TriangulatedSet.takeConcat_lt_of_reducedToSet {R : Type u_1} {σ : Type u_2} [CommSemiring R] [LinearOrder σ] [DecidableEq R] {S : TriangulatedSet σ R} {p : MvPolynomial σ R} (p_ne_zero : p 0) (hp : p.reducedToSet S) :

                                Key Lemma for the Basic Set Algorithm: If p is non-zero and reduced with respect to S, then modifying S by appending p (using takeConcat) strictly decreases the rank of the triangulated set. This rank decrease is what guarantees the termination of the characteristic set computation.