Documentation

LeanPool.FullyDynamicMatching.FD1D.Initialization

Initialization #

Refreshed inventory initialization #

The refreshed inventory is obtained from m labeled, independently uniform leaf assignments by forgetting the labels and retaining only the fiber cardinalities. The resulting law is invariant under every leaf relabeling.

@[reducible, inline]
abbrev FD1D.Assignment (ι : Type u_1) (m : ℕ) :
Type u_1

Assignments of m labeled inventory items to a finite set of locations.

Equations
Instances For
    @[reducible, inline]

    Assignments of m labeled inventory items to the depth-L leaves.

    Equations
    Instances For
      def FD1D.assignmentCount {ι : Type u_1} [DecidableEq ι] {m : ℕ} (ω : Assignment ι m) (i : ι) :

      Number of labels assigned to one location.

      Equations
      Instances For
        theorem FD1D.sum_assignmentCount {ι : Type u_1} [Fintype ι] [DecidableEq ι] {m : ℕ} (ω : Assignment ι m) :
        ∑ i : ι, assignmentCount ω i = m

        Fiber cardinalities partition all m assignment labels.

        def FD1D.assignmentState {ι : Type u_1} [Fintype ι] [DecidableEq ι] {m : ℕ} (ω : Assignment ι m) :

        The fixed-total inventory state formed from assignment fiber cardinalities.

        Equations
        Instances For
          @[simp]
          theorem FD1D.assignmentState_count {ι : Type u_1} [Fintype ι] [DecidableEq ι] {m : ℕ} (ω : Assignment ι m) (i : ι) :
          def FD1D.assignmentPerm {ι : Type u_1} {m : ℕ} (e : Equiv.Perm ι) :

          Postcompose every assignment with a location permutation.

          Equations
          Instances For
            @[simp]
            theorem FD1D.assignmentPerm_apply {ι : Type u_1} {m : ℕ} (e : Equiv.Perm ι) (ω : Assignment ι m) (j : Fin m) :
            (assignmentPerm e) ω j = e (ω j)
            def FD1D.inventoryStatePerm {ι : Type u_1} [Fintype ι] {m : ℕ} (e : Equiv.Perm ι) :

            Push a fixed-total count vector forward along a location permutation.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[simp]
              theorem FD1D.inventoryStatePerm_count {ι : Type u_1} [Fintype ι] {m : ℕ} (e : Equiv.Perm ι) (x : InventoryState ι m) (i : ι) :
              ↑((inventoryStatePerm e) x) i = ↑x ((Equiv.symm e) i)
              theorem FD1D.inventoryStatePerm_image_count {ι : Type u_1} [Fintype ι] {m : ℕ} (e : Equiv.Perm ι) (x : InventoryState ι m) (i : ι) :
              ↑((inventoryStatePerm e) x) (e i) = ↑x i
              @[simp]
              theorem FD1D.assignmentCount_perm {ι : Type u_1} [DecidableEq ι] {m : ℕ} (e : Equiv.Perm ι) (ω : Assignment ι m) (i : ι) :

              Relabeling an assignment relabels its fiber-count state.

              The assignment-to-state map is equivariant for the canonical lifts.

              theorem FD1D.uniform_map_lawInvariant {A : Type u_1} {B : Type u_2} [Fintype A] [Nonempty A] [Fintype B] [DecidableEq B] (f : A → B) (ea : Equiv.Perm A) (eb : Equiv.Perm B) (h : ∀ (a : A), f (ea a) = eb (f a)) :

              A uniform pushforward is invariant under any compatible permutations of its source and target.

              noncomputable def FD1D.refreshedLaw (L m : ℕ) :

              The refreshed inventory law: choose every labeled item's leaf uniformly and independently, then forget the labels and retain only fiber counts.

              Equations
              Instances For
                @[simp]
                theorem FD1D.refreshedLaw_mass (L m : ℕ) (x : InventoryState (DyadicNode L) m) :
                (refreshedLaw L m).mass x = ∑ ω : Assignment (DyadicNode L) m with assignmentState ω = x, 1 / ↑(Fintype.card (DyadicAssignment L m))
                theorem FD1D.refreshedLaw_lawInvariant_of_compatible {L m : ℕ} (leafPerm : Equiv.Perm (DyadicNode L)) (statePerm : Equiv.Perm (InventoryState (DyadicNode L) m)) (hcompat : ∀ (ω : DyadicAssignment L m), assignmentState ((assignmentPerm leafPerm) ω) = statePerm (assignmentState ω)) :

                A form parameterized by the target-state permutation, for clients that already define their own lift of a leaf permutation.

                The refreshed law is invariant under the canonical lift of every leaf permutation to inventory states.

                theorem FD1D.iterate_refreshedLaw_lawInvariant_of_compatible {L m : ℕ} (K : FiniteKernel (InventoryState (DyadicNode L) m)) (leafPerm : Equiv.Perm (DyadicNode L)) (statePerm : Equiv.Perm (InventoryState (DyadicNode L) m)) (hcompat : ∀ (ω : DyadicAssignment L m), assignmentState ((assignmentPerm leafPerm) ω) = statePerm (assignmentState ω)) (hK : K.Equivariant statePerm) (n : ℕ) :

                Kernel equivariance preserves refreshed-law invariance through every iterate, for any compatible state-space lift.

                If a kernel is equivariant under the canonical lift of a leaf permutation, every iterate from the refreshed law remains invariant.