Documentation

LeanPool.FriezePatterns.Chapter2

LeanPool.FriezePatterns.Chapter2 #

Imported Lean Pool material for LeanPool.FriezePatterns.Chapter2.

structure flute (n : ) :

An n-flute: a positive integer sequence a with a 0 = 1, periodic with period n - 1, and satisfying the divisibility relation a (k + 1) ∣ a k + a (k + 2).

  • a :

    The underlying sequence of the flute.

  • pos (i : ) : self.a i > 0

    Every entry of the flute is positive.

  • hd : self.a 0 = 1

    The flute starts at 1.

  • period (k : ) : self.a k = self.a (k + (n - 1))

    The flute is periodic with period n - 1.

  • div (k : ) : self.a (k + 1) self.a k + self.a (k + 2)

    Each interior entry divides the sum of its neighbours.

Instances For
    @[reducible]
    def csteFlute (n : ) :

    The constant flute (the sequence identically equal to 1).

    Inhabited is preferred over Nonempty so that we can recover the explicit witness.

    Equations
    Instances For
      def fluteSet (n : ) :

      The set of all n-flutes.

      Equations
      Instances For
        @[irreducible]
        def aOdd (k i : ) :

        The underlying sequence of the Fibonacci-maximal (2k+1)-flute.

        Equations
        Instances For
          def fibFluteOdd (k : ) :
          flute (2 * k + 1)

          The Fibonacci-maximal (2k+1)-flute, built from aOdd.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            @[irreducible]
            def aEven (k i : ) :

            The underlying sequence of the Fibonacci-maximal (2k+2)-flute.

            Equations
            Instances For
              def fibFluteEven (k : ) :
              flute (2 * k + 2)

              The Fibonacci-maximal (2k+2)-flute, built from aEven.

              Equations
              Instances For
                @[irreducible]
                def a_1 (n : ) (f : flute (n + 3)) (k : ) :

                Reduction of an (n+3)-flute (assuming f.a 1 = 1) to an (n+2)-flute (underlying sequence).

                Equations
                Instances For
                  def aux_1 (n : ) (f : flute (n + 3)) (h : f.a 1 = 1) :
                  flute (n + 2)

                  Reduction of an (n+3)-flute with f.a 1 = 1 to an (n+2)-flute.

                  Equations
                  • aux_1 n f h = { a := a_1 n f, pos := , hd := , period := , div := }
                  Instances For
                    @[irreducible]
                    def a_2 (n : ) (f : flute (n + 3)) (k : ) :

                    Reduction of an (n+3)-flute (assuming f.a (n + 1) = 1) to an (n+2)-flute (underlying sequence).

                    Equations
                    Instances For
                      def aux_2 (n : ) (f : flute (n + 3)) (h : f.a (n + 1) = 1) :
                      flute (n + 2)

                      Reduction of an (n+3)-flute with f.a (n + 1) = 1 to an (n+2)-flute.

                      Equations
                      • aux_2 n f h = { a := a_2 n f, pos := , hd := , period := , div := }
                      Instances For
                        @[irreducible]
                        def a3 (n : ) (f : flute (n + 3)) (i : ) (hi : i n f.a (i + 1) = f.a i + f.a (i + 2)) (k : ) :

                        Reduction of an (n+3)-flute admitting a reducible index i to an (n+2)-flute (underlying sequence).

                        Equations
                        Instances For
                          def aux3 (n : ) (f : flute (n + 3)) (j : ) (hj : j n f.a (j + 1) = f.a j + f.a (j + 2)) :
                          flute (n + 2)

                          Reduction of an (n+3)-flute admitting a reducible index j to an (n+2)-flute.

                          Equations
                          • aux3 n f j hj = { a := a3 n f j hj, pos := , hd := , period := , div := }
                          Instances For
                            theorem fluteSetNonEmpty (n : ) :

                            The set of n-flutes is nonempty.

                            theorem FluteReduction (n : ) (f : flute n) :
                            (f.a 1 = 1 f.a (n - 2) = 1) in - 3, f.a (i + 1) = f.a i + f.a (i + 2)

                            Every n-flute either has f.a 1 = 1, has f.a (n-2) = 1, or admits a reducible index i where f.a (i+1) = f.a i + f.a (i+2).

                            theorem FluteBounded (n : ) (hn : n > 0) (f : flute n) (i : ) :
                            i n - 1f.a i Nat.fib n