Documentation

ArkLib.ToMathlib.Data.IndexedBinaryTree.Equiv

Equivalences #

This section contains theorems about equivalences between different tree indexing types and data structures.

def BinaryTree.LeafData.ofFun {α : Type} (s : Skeleton) (f : SkeletonLeafIndex sα) :

Build LeafData from a function on leaf indices.

Equations
    Instances For
      @[simp]
      theorem BinaryTree.LeafData.ofFun_get {α : Type} {s : Skeleton} (tree : LeafData α s) :
      (ofFun s fun (idx : SkeletonLeafIndex s) => tree.get idx) = tree
      @[simp]
      theorem BinaryTree.LeafData.get_ofFun {α : Type} {s : Skeleton} (f : SkeletonLeafIndex sα) :
      (ofFun s f).get = f

      Build InternalData from a function on internal indices.

      Equations
        Instances For
          @[simp]
          theorem BinaryTree.InternalData.ofFun_get {α : Type} {s : Skeleton} (tree : InternalData α s) :
          (ofFun s fun (idx : SkeletonInternalIndex s) => tree.get idx) = tree
          @[simp]
          theorem BinaryTree.InternalData.get_ofFun {α : Type} {s : Skeleton} (f : SkeletonInternalIndex sα) :
          (ofFun s f).get = f
          def BinaryTree.FullData.ofFun {α : Type} (s : Skeleton) (f : SkeletonNodeIndex sα) :

          Build FullData from a function on all node indices.

          Equations
            Instances For
              @[simp]
              theorem BinaryTree.FullData.ofFun_get {α : Type} {s : Skeleton} (tree : FullData α s) :
              (ofFun s fun (idx : SkeletonNodeIndex s) => tree.get idx) = tree
              @[simp]
              theorem BinaryTree.FullData.get_ofFun {α : Type} {s : Skeleton} (f : SkeletonNodeIndex sα) :
              (ofFun s f).get = f

              LeafDatas are equivalent to functions from SkeletonLeafIndex to values

              Equations
                Instances For

                  InternalDatas are equivalent to functions from SkeletonInternalIndex to values

                  Equations
                    Instances For

                      FullDatas are equivalent to functions from SkeletonNodeIndex to values

                      Equations
                        Instances For

                          A LeafData can be interpreted as a function from SkeletonLeafIndex to values

                          Equations

                            An InternalData can be interpreted as a function from SkeletonInternalIndex to values

                            Equations

                              A FullData can be interpreted as a function from SkeletonNodeIndex to values

                              Equations

                                A function taking a SkeletonNodeIndex s to either a SkeletonInternalIndex s or a SkeletonLeafIndex s

                                Equations
                                  Instances For
                                    def BinaryTree.Equiv.precomp {α : Sort u_1} {β : Sort u_2} {γ : Sort u_3} (e : α β) :
                                    (βγ) (αγ)
                                    Equations
                                      Instances For
                                        def BinaryTree.SumFunEquivProd (α β γ : Type) :
                                        (α βγ) (αγ) × (βγ)
                                        Equations
                                          Instances For

                                            Equivalence between FullData and the product of InternalData and LeafData

                                            Equations
                                              Instances For