Documentation

LeanPool.BKARForestFormula.BKAR.Forest

Forests on a finite vertex set #

Combinatorial foundation for the BKAR forest interpolation formula (see BKAR.Formula). Defines Edge V, the off-diagonal unordered pairs of a finite vertex type V (edges of the complete graph on V); simple paths along an edge set; the acyclicity predicate IsAcyclicEdgeSet; the acyclicity API AcyclicEdgeSetData (component relation, canonical simple paths, path uniqueness); the index type ForestIndex V of acyclic edge sets, over which the final forest sum ranges; and the working type Forest V, an acyclic edge set packaged with its path API and the one-edge extension characterization.

@[reducible, inline]
abbrev BKAR.Edge (V : Type u_1) :
Type u_1

Edges of the complete graph on V, represented as off-diagonal unordered pairs.

Equations
Instances For
    @[instance_reducible]
    noncomputable instance BKAR.instFintypeEdge {V : Type u_1} [Fintype V] :
    Equations
    def BKAR.Edge.mk {V : Type u_1} (i j : V) (hij : i ≠ j) :

    The edge with endpoints i and j.

    Equations
    Instances For
      @[simp]
      theorem BKAR.Edge.mk_val {V : Type u_1} (i j : V) (hij : i ≠ j) :
      ↑(mk i j hij) = s(i, j)
      theorem BKAR.Edge.not_isDiag {V : Type u_1} (e : Edge V) :
      ¬(↑e).IsDiag
      def BKAR.Edge.Between {V : Type u_1} (e : Edge V) (i j : V) :

      e.Between i j says that e is the unordered pair {i, j}.

      Equations
      Instances For
        theorem BKAR.Edge.mk_between {V : Type u_1} (i j : V) (hij : i ≠ j) :
        (mk i j hij).Between i j
        theorem BKAR.Edge.mk_comm {V : Type u_1} (i j : V) (hij : i ≠ j) :
        mk i j hij = mk j i ⋯
        noncomputable def BKAR.Edge.left {V : Type u_1} (e : Edge V) :
        V

        A fixed first endpoint of an unordered edge.

        Equations
        Instances For
          noncomputable def BKAR.Edge.right {V : Type u_1} (e : Edge V) :
          V

          A fixed second endpoint of an unordered edge.

          Equations
          Instances For
            theorem BKAR.Edge.mk_left_right_eq {V : Type u_1} (e : Edge V) :
            s(e.left, e.right) = ↑e
            theorem BKAR.Edge.left_ne_right {V : Type u_1} (e : Edge V) :
            theorem BKAR.Edge.not_between_self {V : Type u_1} (e : Edge V) (i : V) :
            ¬e.Between i i
            theorem BKAR.Edge.Between.symm {V : Type u_1} {e : Edge V} {i j : V} (h : e.Between i j) :
            e.Between j i
            inductive BKAR.EdgePath.IsPath {V : Type u_1} (S : Finset (Edge V)) :
            List (Edge V) → V → V → Prop

            A list of edges forms an oriented walk from i to j inside S.

            Instances For
              def BKAR.EdgePath.IsSimplePath {V : Type u_1} (S : Finset (Edge V)) (γ : List (Edge V)) (i j : V) :

              A graph-level simple path: an edge walk with no repeated edges.

              Equations
              Instances For
                theorem BKAR.EdgePath.IsPath.mono {V : Type u_1} {S T : Finset (Edge V)} (hsub : S ⊆ T) {γ : List (Edge V)} {i j : V} :
                IsPath S γ i j → IsPath T γ i j
                theorem BKAR.EdgePath.IsPath.mono_of_forall_mem {V : Type u_1} {S T : Finset (Edge V)} {γ : List (Edge V)} {i j : V} :
                IsPath S γ i j → (∀ e ∈ γ, e ∈ T) → IsPath T γ i j
                theorem BKAR.EdgePath.IsPath.edge_mem {V : Type u_1} {S : Finset (Edge V)} {γ : List (Edge V)} {i j : V} :
                IsPath S γ i j → ∀ e ∈ γ, e ∈ S
                theorem BKAR.EdgePath.IsPath.append {V : Type u_1} {S : Finset (Edge V)} {γ₁ γ₂ : List (Edge V)} {i j k : V} :
                IsPath S γ₁ i j → IsPath S γ₂ j k → IsPath S (γ₁ ++ γ₂) i k
                theorem BKAR.EdgePath.IsPath.reverse {V : Type u_1} {S : Finset (Edge V)} {γ : List (Edge V)} {i j : V} :
                IsPath S γ i j → IsPath S γ.reverse j i
                theorem BKAR.EdgePath.IsSimplePath.mono {V : Type u_1} {S T : Finset (Edge V)} (hsub : S ⊆ T) {γ : List (Edge V)} {i j : V} (h : IsSimplePath S γ i j) :
                IsSimplePath T γ i j
                theorem BKAR.EdgePath.IsSimplePath.mono_of_forall_mem {V : Type u_1} {S T : Finset (Edge V)} {γ : List (Edge V)} {i j : V} (h : IsSimplePath S γ i j) (hmem : ∀ e ∈ γ, e ∈ T) :
                IsSimplePath T γ i j
                theorem BKAR.EdgePath.IsSimplePath.edge_mem {V : Type u_1} {S : Finset (Edge V)} {γ : List (Edge V)} {i j : V} (h : IsSimplePath S γ i j) (e : Edge V) :
                e ∈ γ → e ∈ S
                theorem BKAR.EdgePath.IsSimplePath.reverse {V : Type u_1} {S : Finset (Edge V)} {γ : List (Edge V)} {i j : V} (h : IsSimplePath S γ i j) :
                theorem BKAR.EdgePath.isSimplePath_empty_iff {V : Type u_1} {γ : List (Edge V)} {i j : V} :
                IsSimplePath ∅ γ i j ↔ γ = [] ∧ i = j
                theorem BKAR.EdgePath.isPath_singleton_tail_nil {V : Type u_1} {e₀ : Edge V} {γ : List (Edge V)} {i j : V} :
                IsSimplePath {e₀} γ i j → γ = [] ∨ γ = [e₀]
                theorem BKAR.EdgePath.isSimplePath_singleton_iff {V : Type u_1} {e₀ : Edge V} {γ : List (Edge V)} {i j : V} :
                IsSimplePath {e₀} γ i j ↔ γ = [] ∧ i = j ∨ γ = [e₀] ∧ e₀.Between i j
                structure BKAR.AcyclicEdgeSetData {V : Type u_1} [Fintype V] [DecidableEq V] (S : Finset (Edge V)) :
                Type u_1

                Data carried by an acyclic edge set.

                The primitive representation is intentionally thin: later files consume the component relation, the canonical simple path, and path uniqueness, so these are the API exposed by the acyclicity certificate.

                Instances For
                  def BKAR.IsAcyclicEdgeSet {V : Type u_1} [Fintype V] [DecidableEq V] (S : Finset (Edge V)) :

                  A custom acyclicity predicate for finite edge sets.

                  Equations
                  Instances For
                    theorem BKAR.IsAcyclicEdgeSet.mono {V : Type u_1} [Fintype V] [DecidableEq V] {S T : Finset (Edge V)} (hS : IsAcyclicEdgeSet S) (hsub : T ⊆ S) :

                    Acyclicity is inherited by finite edge subsets.

                    theorem BKAR.AcyclicEdgeSetData.inSameComponent_symm {V : Type u_1} [Fintype V] [DecidableEq V] {S : Finset (Edge V)} (data : AcyclicEdgeSetData S) {i j : V} (h : data.inSameComponent i j) :

                    Adding an absent edge whose endpoints are already connected cannot preserve acyclicity: the old component path and the new singleton edge would be two distinct simple paths.

                    structure BKAR.ForestIndex (V : Type u_1) [Fintype V] [DecidableEq V] :
                    Type u_1

                    The finite edge-set index over which the final BKAR forest sum ranges.

                    Instances For
                      @[instance_reducible]
                      noncomputable instance BKAR.ForestIndex.instFintype {V : Type u_1} [Fintype V] [DecidableEq V] :
                      Equations
                      • One or more equations did not get rendered due to their size.
                      theorem BKAR.ForestIndex.ext {V : Type u_1} [Fintype V] [DecidableEq V] {I J : ForestIndex V} (h : I.edges = J.edges) :
                      I = J
                      theorem BKAR.ForestIndex.ext_iff {V : Type u_1} [Fintype V] [DecidableEq V] {I J : ForestIndex V} :
                      I = J ↔ I.edges = J.edges
                      structure BKAR.Forest (V : Type u_1) [Fintype V] [DecidableEq V] :
                      Type u_1

                      A forest is a finite edge set with the path API needed for BKAR interpolation.

                      Instances For

                        Acyclicity data for the empty edge set.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For

                          Acyclicity data for a singleton edge set.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            The empty forest, with equality as its component relation.

                            Equations
                            Instances For

                              Forget the path data of a Forest representative, retaining only its finite edge-set index.

                              Equations
                              Instances For
                                theorem BKAR.Forest.empty_support {V : Type u_1} [Fintype V] [DecidableEq V] :
                                (empty V).support = { edges := ∅, acyclic := ⋯ }
                                def BKAR.Forest.inSameComponent {V : Type u_1} [Fintype V] [DecidableEq V] (F : Forest V) (i j : V) :

                                The component relation of a forest.

                                Equations
                                Instances For
                                  @[instance_reducible]
                                  noncomputable instance BKAR.Forest.instDecidableInSameComponent {V : Type u_1} [Fintype V] [DecidableEq V] (F : Forest V) (i j : V) :
                                  Equations
                                  def BKAR.Forest.pathInF {V : Type u_1} [Fintype V] [DecidableEq V] (F : Forest V) (i j : V) (h : F.inSameComponent i j) :

                                  The canonical path between vertices known to be in the same component.

                                  Equations
                                  Instances For
                                    def BKAR.IsSimplePath {V : Type u_1} [Fintype V] [DecidableEq V] (F : Forest V) (γ : List (Edge V)) (i j : V) :

                                    Simple paths in a forest, as exposed by its acyclicity certificate.

                                    Equations
                                    Instances For
                                      theorem BKAR.Forest.pathInF_isSimple {V : Type u_1} [Fintype V] [DecidableEq V] (F : Forest V) {i j : V} (h : F.inSameComponent i j) :
                                      IsSimplePath F (F.pathInF i j h) i j
                                      theorem BKAR.Forest.inSameComponent_of_isSimplePath {V : Type u_1} [Fintype V] [DecidableEq V] (F : Forest V) {i j : V} {γ : List (Edge V)} (hγ : IsSimplePath F γ i j) :
                                      theorem BKAR.Forest.edge_mem_of_isSimplePath {V : Type u_1} [Fintype V] [DecidableEq V] (F : Forest V) {i j : V} {γ : List (Edge V)} (hγ : IsSimplePath F γ i j) (e : Edge V) :
                                      e ∈ γ → e ∈ F.edges
                                      theorem BKAR.Forest.edge_isSimplePath {V : Type u_1} [Fintype V] [DecidableEq V] (F : Forest V) {e : Edge V} (he : e ∈ F.edges) :
                                      theorem BKAR.Forest.edge_inSameComponent {V : Type u_1} [Fintype V] [DecidableEq V] (F : Forest V) {e : Edge V} (he : e ∈ F.edges) :
                                      theorem BKAR.Forest.pathInF_unique {V : Type u_1} [Fintype V] [DecidableEq V] (F : Forest V) {i j : V} (h : F.inSameComponent i j) (γ : List (Edge V)) (hγ : IsSimplePath F γ i j) :
                                      γ = F.pathInF i j h

                                      Lemma A1: the simple path in a forest is unique.

                                      theorem BKAR.Forest.pathInF_eq_singleton_of_edge_mem {V : Type u_1} [Fintype V] [DecidableEq V] (F : Forest V) {e : Edge V} (he : e ∈ F.edges) :
                                      F.pathInF e.left e.right ⋯ = [e]
                                      theorem BKAR.Forest.isSimplePath_of_edges_eq {V : Type u_1} [Fintype V] [DecidableEq V] (F G : Forest V) (hedges : F.edges = G.edges) {γ : List (Edge V)} {i j : V} (hγ : IsSimplePath F γ i j) :
                                      IsSimplePath G γ i j

                                      Simple paths are invariant under replacing the Forest representative data by another forest with the same underlying edge set.

                                      theorem BKAR.Forest.inSameComponent_of_edges_eq {V : Type u_1} [Fintype V] [DecidableEq V] (F G : Forest V) (hedges : F.edges = G.edges) {i j : V} (h : F.inSameComponent i j) :

                                      The component relation is invariant under changing only the auxiliary path data.

                                      theorem BKAR.Forest.inSameComponent_iff_of_edges_eq {V : Type u_1} [Fintype V] [DecidableEq V] (F G : Forest V) (hedges : F.edges = G.edges) {i j : V} :
                                      theorem BKAR.Forest.pathInF_eq_of_edges_eq {V : Type u_1} [Fintype V] [DecidableEq V] (F G : Forest V) (hedges : F.edges = G.edges) {i j : V} (hF : F.inSameComponent i j) (hG : G.inSameComponent i j) :
                                      F.pathInF i j hF = G.pathInF i j hG

                                      Canonical paths are invariant under changing only the Forest representative data, once the underlying edge set is fixed.

                                      theorem BKAR.Forest.acyclic_insert_iff {V : Type u_1} [Fintype V] [DecidableEq V] (F : Forest V) {i j : V} (hij : i ≠ j) (he : Edge.mk i j hij ∉ F.edges) :

                                      Lemma A2: adding an absent edge preserves acyclicity exactly across components.

                                      structure BKAR.Forest.EdgeExtension {V : Type u_1} [Fintype V] [DecidableEq V] (F F' : Forest V) (e₀ : Edge V) :

                                      Certificate that F' is obtained from F by adding one edge and that the canonical paths behave as expected under this extension.

                                      Instances For
                                        theorem BKAR.Forest.EdgeExtension.new_mem {V : Type u_1} [Fintype V] [DecidableEq V] {F F' : Forest V} {e₀ : Edge V} (h : F.EdgeExtension F' e₀) :
                                        e₀ ∈ F'.edges
                                        theorem BKAR.Forest.EdgeExtension.old_mem {V : Type u_1} [Fintype V] [DecidableEq V] {F F' : Forest V} {e₀ e : Edge V} (h : F.EdgeExtension F' e₀) (he : e ∈ F.edges) :
                                        e ∈ F'.edges
                                        theorem BKAR.Forest.EdgeExtension.mem_old_of_mem_of_ne {V : Type u_1} [Fintype V] [DecidableEq V] {F F' : Forest V} {e₀ e : Edge V} (h : F.EdgeExtension F' e₀) (he : e ∈ F'.edges) (hne : e ≠ e₀) :

                                        The finite forest index consisting of one edge.

                                        Equations
                                        Instances For