Documentation

PolygonalNumbers.Polygonal

def IsTriangular (n : ) :
Equations
Instances For
    def IsnPolygonal (m : ) :
    m 3(n : ) → Prop
    Equations
    Instances For
      def IsnPolygonal' (m : ) :
      m 3(n : ) → Prop
      Equations
      Instances For
        def IsnPolygonal'' (m : ) :
        m 3(n : ) → Prop
        Equations
        Instances For
          def IsnPolygonal₀ (m : ) :
          m 3(n : ) → Prop
          Equations
          Instances For
            Equations
            Instances For
              def Polygonal (m : ) (hm : m 3) :
              Equations
              Instances For
                def foldrfun (m : ) (hm : m 3) (x1 : Polygonal m hm) (x2 : ) :
                Equations
                Instances For
                  def sumPolyToInt (m : ) (hm : m 3) (S : List (Polygonal m hm)) :
                  Equations
                  Instances For
                    theorem kfactq (k : ) :
                    k * (k - 1) = k ^ 2 - k

                    Both conditions IsnPolygonal and IsnPolygonal' are equivalent.

                    instance instBEqPolygonal {m : } {hm : m 3} :
                    BEq (Polygonal m hm)
                    Equations
                    instance instLawfulBEqPolygonal {m : } {hm : m 3} :
                    instance instDecidableEqPolygonal {n : } {hm : n 3} :
                    Equations
                    instance instLEPolygonal {m : } {hm : m 3} :
                    LE (Polygonal m hm)
                    Equations
                    • instLEPolygonal = { le := fun (a b : Polygonal m hm) => a b }
                    theorem Polyrw (m : ) (n : ) (hm : m 3) :
                    theorem one_is_poly (m : ) (hm : m 3) :
                    theorem zero_is_poly (m : ) (hm : m 3) :
                    def PolyOne (m : ) (hm : m 3) :
                    Equations
                    Instances For
                      def PolyZero (m : ) (hm : m 3) :
                      Equations
                      Instances For
                        instance instDecidableIsnPolygonal₀ {m : } {n : m 3} {h : } :
                        Equations
                        • instDecidableIsnPolygonal₀ = id instDecidableOr
                        instance instDecidableIsnPolygonal {m : } {n : m 3} {h : } :
                        Equations
                        theorem polyform (m : ) (r : ) (hm2geq3 : m + 2 3) :
                        m / 2 * (r ^ 2 - r) + r = |m / 2 * (r ^ 2 - r) + r|
                        theorem polyformval (m : ) (r : ) (hm2geq3 : m + 2 3) :
                        IsnPolygonal (m + 2) hm2geq3 m / 2 * (r ^ 2 - r) + r.natAbs
                        def getnthpoly (m : ) (hm : m 3) (n : ) :
                        Equations
                        Instances For
                          theorem getnthpoly_monotone (m : ) (hm : m 3) (n : ) :
                          (getnthpoly m hm n) (getnthpoly m hm (n + 1))
                          theorem getnthpoly_polyone (m : ) (hm : m 3) :
                          getnthpoly m hm 1 = PolyOne m hm
                          theorem getnthpoly_intone (m : ) (hm : m 3) :
                          (getnthpoly m hm 1) = 1
                          theorem getnthpoly_geq (m : ) (n : ) (hm : m 3) :
                          (getnthpoly m hm n) n
                          theorem poly_set (m : ) (hm : m 3) :
                          {x : | IsnPolygonal m hm x} = {x : | ∃ (n : ), (getnthpoly m hm n) = x}
                          def getnthpolyfun (m : ) (hm : m 3) (x : ) :
                          Equations
                          Instances For
                            def getlepoly₀ (m : ) (hm : m 3) (b : ) :
                            Equations
                            Instances For
                              def finCaseDec (p : Prop) (n : ) [DecidablePred p] :
                              Decidable (∃ a < n + 1, p a)
                              Equations
                              Instances For
                                theorem getlepoly₀Correct (m : ) (n : ) (hm : m 3) :
                                (getlepoly₀ m hm n) = {x : Polygonal m hm | x n}
                                def IsNKPolygonal (m : ) (hm : m 3) (k n : ) :
                                Equations
                                Instances For
                                  Equations
                                  instance instDecidablePredNatIsNKPolygonal (m : ) (hm : m 3) (k : ) :
                                  Equations
                                  • One or more equations did not get rendered due to their size.