Documentation

LeanPool.BKARForestFormula.Audit.ForestFormula.SolutionBasic

BKAR forest formula — Challenge → repository bridges #

Shared statement vocabulary adapted from Audit/ForestFormula/Challenge.lean in scottnarmstrong/bkarforestformula at commit a07f44a534240fe6339558951dd78a19e4ef7c51, together with the bridge lemmas connecting the Mathlib-based mirror to the repository flagship BKAR.bkar_formula_forestIndex_cube_contributions.

Solution.lean proves the formula using this local vocabulary. The upstream challenge placeholder is omitted from Lean Pool; no automated comparison with that upstream statement is maintained here.

Bridge outline #

Mirror vocabulary adapted from the pinned upstream challenge #

@[reducible, inline]
abbrev BKARMirror.Edge (V : Type u_2) :
Type u_2

Off-diagonal unordered pairs = edges of the complete graph on V.

Equations
Instances For
    @[instance_reducible]
    noncomputable instance BKARMirror.instFintypeEdge {V : Type u_1} [Fintype V] :
    Equations
    noncomputable def BKARMirror.Edge.left {V : Type u_1} (e : Edge V) :
    V

    A fixed orientation of an edge (Mathlib Sym2.out).

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

      The second endpoint in the chosen representative of an unordered edge.

      Equations
      Instances For
        def BKARMirror.edgeGraph {V : Type u_1} (S : Finset (Edge V)) :

        The simple graph carried by a finite edge set.

        Equations
        Instances For
          structure BKARMirror.ForestIndex (V : Type u_2) [Fintype V] [DecidableEq V] :
          Type u_2

          Q1: the forest index, indexed by an edge set whose carried graph is acyclic.

          Instances For
            @[instance_reducible]
            noncomputable instance BKARMirror.ForestIndex.instFintype {V : Type u_1} [Fintype V] [DecidableEq V] :

            ForestIndex V is a Fintype (mirrors the repo's Classical-decidable route).

            Equations
            • One or more equations did not get rendered due to their size.
            def BKARMirror.paramValue {V : Type u_1} [Fintype V] [DecidableEq V] (J : ForestIndex V) (u : ↥J.edges → ℝ) (e : Edge V) :

            Look up an edge parameter, defaulting to 1 off the forest.

            Equations
            Instances For
              def BKARMirror.thresholdGraph {V : Type u_1} [Fintype V] [DecidableEq V] (J : ForestIndex V) (u : ↥J.edges → ℝ) (s : ℝ) :

              The threshold subgraph: edges of J whose parameter is ≥ s.

              Equations
              Instances For
                noncomputable def BKARMirror.standardInterp {V : Type u_1} [Fintype V] [DecidableEq V] (J : ForestIndex V) (u : ↥J.edges → ℝ) :
                Edge V → ℝ

                Q2: the BKAR interpolation point x^F(u)_e, as the largest threshold s ∈ [0,1] at which the endpoints of e remain connected using only couplings ≥ s (the bottleneck / max-min connectivity value; sSup ∅ = 0 handles disconnection).

                Equations
                Instances For
                  def BKARMirror.updateCoord {V : Type u_1} [DecidableEq V] (x : Edge V → ℝ) (e : Edge V) (t : ℝ) :
                  Edge V → ℝ

                  Replace one edge coordinate (verbatim).

                  Equations
                  Instances For
                    noncomputable def BKARMirror.partialDeriv {V : Type u_1} [DecidableEq V] (e : Edge V) (ρ : (Edge V → ℝ) → ℝ) (x : Edge V → ℝ) :

                    Partial derivative along one edge coordinate (verbatim).

                    Equations
                    Instances For
                      def BKARMirror.mixedPartialList {V : Type u_1} [DecidableEq V] :
                      List (Edge V) → ((Edge V → ℝ) → ℝ) → (Edge V → ℝ) → ℝ

                      Q3: iterated mixed partial along a list of edges (verbatim).

                      Equations
                      Instances For
                        noncomputable def BKARMirror.mixedPartial {V : Type u_1} [Fintype V] [DecidableEq V] (J : ForestIndex V) (ρ : (Edge V → ℝ) → ℝ) :
                        (Edge V → ℝ) → ℝ

                        The forest-indexed mixed partial (verbatim: over Finset.toList).

                        Equations
                        Instances For
                          def BKARMirror.unitCube {V : Type u_1} [Fintype V] [DecidableEq V] (J : ForestIndex V) :
                          Set (↥J.edges → ℝ)

                          Q4: the unit cube [0,1]^{E(J)}.

                          Equations
                          Instances For
                            noncomputable def BKARMirror.cubeContribution {V : Type u_1} [Fintype V] [DecidableEq V] (J : ForestIndex V) (ρ : (Edge V → ℝ) → ℝ) :

                            Q4: the ordinary BKAR cube contribution of a forest index (direct, choice-free).

                            Equations
                            Instances For
                              def BKARMirror.ContDiffHyp {V : Type u_1} [Fintype V] (ρ : (Edge V → ℝ) → ℝ) :

                              BKAR smoothness hypothesis (mirror of BKARContDiff).

                              Equations
                              Instances For

                                Q1 bridge: mirror graph acyclicity ↔ repository certificate #

                                The mirror graph on an edge set is definitionally equal to the repository's EdgePath.edgeSetGraph.

                                Q1 bridge. Mirror graph acyclicity ↔ repository acyclicity certificate.

                                The forest-index types are equivalent (from the acyclicity iff).

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

                                  Q2 bridge: threshold sSup interpolation ↔ repository path-minimum #

                                  Reachability in edgeSetGraph S is the existence of a simple edge path.

                                  theorem BKARMirror.thresholdConnected_iff_exists_isSimplePath {V : Type u_1} [Fintype V] [DecidableEq V] (G : BKAR.Forest V) (u : G.EdgeParam → ℝ) (s : ℝ) (i j : V) :

                                  Threshold connectivity is the existence of a simple path in the threshold edge set.

                                  The mirror threshold graph coincides with the repository threshold-edge graph.

                                  Threshold-graph reachability matches repository threshold connectivity.

                                  theorem BKARMirror.standardInterp_bridge {V : Type u_1} [Fintype V] [DecidableEq V] (J : ForestIndex V) (data : BKAR.AcyclicEdgeSetData J.edges) (u : ↥J.edges → ℝ) (hu : ∀ (e : ↥J.edges), 0 ≤ u e ∧ u e ≤ 1) :

                                  Q2 bridge. The mirror threshold / sSup interpolation point agrees with the repository path-minimum Forest.standardInterp, on the unit cube.

                                  Q3/Q4 bridges and choice removal #

                                  theorem BKARMirror.mixedPartialList_bridge {V : Type u_1} [DecidableEq V] (l : List (Edge V)) (ρ : (Edge V → ℝ) → ℝ) :

                                  Q3: the mirror iterated mixed partial coincides with the repository one.

                                  theorem BKARMirror.mixedPartial_bridge {V : Type u_1} [Fintype V] [DecidableEq V] (J : ForestIndex V) (data : BKAR.AcyclicEdgeSetData J.edges) (ρ : (Edge V → ℝ) → ℝ) :

                                  The forest mixed partial agrees with the mirror mixed partial.

                                  theorem BKARMirror.cubeContribution_bridge {V : Type u_1} [Fintype V] [DecidableEq V] (J : ForestIndex V) (ρ : (Edge V → ℝ) → ℝ) (hρ : ContDiffHyp ρ) :

                                  Q2 + Q3 + Q4 bridge. The mirror direct cube contribution equals the repository choice-routed ForestIndex.cubeContribution.

                                  Configuration and sum bridges #

                                  theorem BKARMirror.oneConfig_bridge {V : Type u_1} :
                                  (fun (x : Edge V) => 1) = BKAR.oneConfig

                                  The all-ones config agrees (definitional).

                                  theorem BKARMirror.sum_bridge {V : Type u_1} [Fintype V] [DecidableEq V] (ρ : (Edge V → ℝ) → ℝ) (hρ : ContDiffHyp ρ) :

                                  Sum bridge. Transport the mirror sum to the repository sum via indexEquiv.