Documentation

Init.Data.Nat.Internal.Linear

Helper definitions and theorems for constructing linear arithmetic proofs.

@[reducible, inline]
Equations
Instances For
    @[reducible, inline]
    Equations
    Instances For
      @[reducible, inline]

      When encoding polynomials. We use fixedVar for encoding numerals. The denotation of fixedVar is always 1.

      Equations
      Instances For
        @[reducible, inline]
        noncomputable abbrev Nat.Internal.Linear.Var.denote (ctx : Context) (v : Var) :
        Equations
        Instances For
          Instances For
            @[reducible, inline]
            noncomputable abbrev Nat.Internal.Linear.Poly.denote (ctx : Context) (p : Poly) :
            Equations
            Instances For
              Equations
              Instances For
                def Nat.Internal.Linear.Poly.cancelAux (fuel : Nat) (m₁ m₂ r₁ r₂ : Poly) :
                Equations
                Instances For
                  Instances For
                    Equations
                    Instances For
                      Instances For
                        Equations
                        Instances For
                          Equations
                          Instances For
                            @[reducible, inline]
                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              Equations
                              Instances For
                                Equations
                                Instances For
                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    Equations
                                    Instances For
                                      theorem Nat.Internal.Linear.Poly.denote_insert (ctx : Context) (k : Nat) (v : Var) (p : Poly) :
                                      denote ctx (insert k v p) = denote ctx p + k * Var.denote ctx v
                                      theorem Nat.Internal.Linear.Poly.denote_append (ctx : Context) (p q : Poly) :
                                      denote ctx (p ++ q) = denote ctx p + denote ctx q
                                      theorem Nat.Internal.Linear.Poly.denote_cons (ctx : Context) (k : Nat) (v : Var) (p : Poly) :
                                      denote ctx ((k, v) :: p) = k * Var.denote ctx v + denote ctx p
                                      theorem Nat.Internal.Linear.Poly.denote_eq_cancelAux (ctx : Context) (fuel : Nat) (m₁ m₂ r₁ r₂ : Poly) (h : denote_eq ctx (List.reverse r₁ ++ m₁, List.reverse r₂ ++ m₂)) :
                                      denote_eq ctx (cancelAux fuel m₁ m₂ r₁ r₂)
                                      theorem Nat.Internal.Linear.Poly.of_denote_eq_cancelAux (ctx : Context) (fuel : Nat) (m₁ m₂ r₁ r₂ : Poly) (h : denote_eq ctx (cancelAux fuel m₁ m₂ r₁ r₂)) :
                                      denote_eq ctx (List.reverse r₁ ++ m₁, List.reverse r₂ ++ m₂)
                                      theorem Nat.Internal.Linear.Poly.denote_eq_cancel {ctx : Context} {m₁ m₂ : Poly} (h : denote_eq ctx (m₁, m₂)) :
                                      denote_eq ctx (m₁.cancel m₂)
                                      theorem Nat.Internal.Linear.Poly.of_denote_eq_cancel {ctx : Context} {m₁ m₂ : Poly} (h : denote_eq ctx (m₁.cancel m₂)) :
                                      denote_eq ctx (m₁, m₂)
                                      theorem Nat.Internal.Linear.Poly.denote_eq_cancel_eq (ctx : Context) (m₁ m₂ : Poly) :
                                      denote_eq ctx (m₁.cancel m₂) = denote_eq ctx (m₁, m₂)
                                      theorem Nat.Internal.Linear.Poly.denote_le_cancelAux (ctx : Context) (fuel : Nat) (m₁ m₂ r₁ r₂ : Poly) (h : denote_le ctx (List.reverse r₁ ++ m₁, List.reverse r₂ ++ m₂)) :
                                      denote_le ctx (cancelAux fuel m₁ m₂ r₁ r₂)
                                      theorem Nat.Internal.Linear.Poly.of_denote_le_cancelAux (ctx : Context) (fuel : Nat) (m₁ m₂ r₁ r₂ : Poly) (h : denote_le ctx (cancelAux fuel m₁ m₂ r₁ r₂)) :
                                      denote_le ctx (List.reverse r₁ ++ m₁, List.reverse r₂ ++ m₂)
                                      theorem Nat.Internal.Linear.Poly.denote_le_cancel {ctx : Context} {m₁ m₂ : Poly} (h : denote_le ctx (m₁, m₂)) :
                                      denote_le ctx (m₁.cancel m₂)
                                      theorem Nat.Internal.Linear.Poly.of_denote_le_cancel {ctx : Context} {m₁ m₂ : Poly} (h : denote_le ctx (m₁.cancel m₂)) :
                                      denote_le ctx (m₁, m₂)
                                      theorem Nat.Internal.Linear.Poly.denote_le_cancel_eq (ctx : Context) (m₁ m₂ : Poly) :
                                      denote_le ctx (m₁.cancel m₂) = denote_le ctx (m₁, m₂)
                                      theorem Nat.Internal.Linear.Expr.denote_toPoly_go {k : Nat} {p : Poly} (ctx : Context) (e : Expr) :
                                      Poly.denote ctx (toPoly.go k e p) = k * denote ctx e + Poly.denote ctx p
                                      theorem Nat.Internal.Linear.Expr.of_cancel_eq (ctx : Context) (a b c d : Expr) (h : a.toNormPoly.cancel b.toNormPoly = (c.toPoly, d.toPoly)) :
                                      (denote ctx a = denote ctx b) = (denote ctx c = denote ctx d)
                                      theorem Nat.Internal.Linear.Expr.of_cancel_le (ctx : Context) (a b c d : Expr) (h : a.toNormPoly.cancel b.toNormPoly = (c.toPoly, d.toPoly)) :
                                      (denote ctx a denote ctx b) = (denote ctx c denote ctx d)
                                      theorem Nat.Internal.Linear.Expr.of_cancel_lt (ctx : Context) (a b c d : Expr) (h : a.inc.toNormPoly.cancel b.toNormPoly = (c.inc.toPoly, d.toPoly)) :
                                      (denote ctx a < denote ctx b) = (denote ctx c < denote ctx d)
                                      theorem Nat.Internal.Linear.Poly.of_isZero (ctx : Context) {p : Poly} (h : p.isZero = true) :
                                      denote ctx p = 0
                                      def Nat.Internal.elimOffset {α : Sort u} (a b k : Nat) (h₁ : a + k = b + k) (h₂ : a = bα) :
                                      α
                                      Equations
                                      Instances For