Documentation

LeanPool.BrillNoetherGraphs.Utilities.Subdivision.DegenerateRamp

Ramp (cut-march) scripts on the CLOSED length orthant #

This is the DegSpec counterpart of the Ramp section of MarkedGraphs/GenusFourCore100.lean, which is stated over SubdivisionGraph.Spec and is therefore available only on the interior of the length orthant. Nothing in GenusFourCore100 is touched; these are separate statements about DegSpec.graph, so the strictly positive path keeps working verbatim.

What a ramp is #

A ramp moves a chip across a cut of the core. It is the firing script whose value at path position k of slot e is

pot (tail e) + sgn e * min (k - lo e) t ,

i.e. the script is flat until path position lo e, then rises with slope sgn e ∈ {-1, 0, 1} for t unit steps, then is flat again. RampData records the two consistency conditions: the core potential must actually change by sgn e * t across each slot, and the rising window must fit inside the slot (unless the slot is flat).

The one new field: repInv #

On the open orthant a ramp needs only potential and window. On the closed orthant the script is a function on the contracted graph, where a vanishing slot has already identified its two endpoints, so the core potential must be constant on each rep-class. That is the third field repInv.

It is not an extra assumption in practice. potential and window together already force pot (head e) = pot (tail e) on every vanishing slot: a vanishing slot has lo e + t ≤ 0 or sgn e = 0, and either way sgn e * t = 0 (RampData.pot_head_eq_tail_of_zero). So as soon as rep is generated by the vanishing slots — which is exactly DegenerateCoreVertexCut.DegSpec .RepIsContraction, and is true by construction for RowProof.censusSpec, whose rep is a compFold — repInv follows; see RampData.of_reachIn.

Why this is stated generically #

Both catalog row 100 and catalog row 097 march across cuts of a six-vertex, nine-slot core, and row 097's open proof imports row 100's solely to reuse the open RampData. Stating the closed analogue here, on an arbitrary DegSpec n p, means the two closed ports share it rather than each growing a copy.

The data #

def Utilities.Certificate.DegenerateSpec.DegSpec.rampValue {n p : ℕ} (d : DegSpec n p) (pot : Fin n → ℤ) (sgn : Fin p → ℤ) (lo : Fin p → ℕ) (t : ℕ) :
Fin p → ℕ → ℤ

Path values of a ramp script: flat, then rising with slope sgn e across the t unit steps starting at path position lo e, then flat again.

Equations
Instances For
    def Utilities.Certificate.DegenerateSpec.DegSpec.rampSlope {p : ℕ} (sgn : Fin p → ℤ) (lo : Fin p → ℕ) (t : ℕ) :
    Fin p → ℕ → ℤ

    Unit-step slopes of a ramp script.

    Equations
    Instances For
      structure Utilities.Certificate.DegenerateSpec.DegSpec.RampData {n p : ℕ} (d : DegSpec n p) (pot : Fin n → ℤ) (sgn : Fin p → ℤ) (lo : Fin p → ℕ) (t : ℕ) :

      Consistency of the ramp data with the core potential, on the closed orthant. The first two fields are the open-orthant conditions verbatim; see the module docstring for repInv.

      • potential (e : Fin p) : pot (d.core.head e) = pot (d.core.tail e) + sgn e * ↑t
      • window (e : Fin p) : lo e + t ≤ d.length e ∨ sgn e = 0
      • repInv (v : Fin n) : pot (d.rep v) = pot v

        The core potential is constant on each contracted class.

      Instances For
        def Utilities.Certificate.DegenerateSpec.DegSpec.rampScript {n p : ℕ} (d : DegSpec n p) (pot : Fin n → ℤ) (sgn : Fin p → ℤ) (lo : Fin p → ℕ) (t : ℕ) :

        The ramp firing script.

        Equations
        Instances For

          repInv is free once rep is generated by the vanishing slots #

          theorem Utilities.Certificate.DegenerateSpec.DegSpec.RampData.pot_head_eq_tail_of_zero {n p : ℕ} {d : DegSpec n p} {pot : Fin n → ℤ} {sgn : Fin p → ℤ} {lo : Fin p → ℕ} {t : ℕ} (hpot : ∀ (e : Fin p), pot (d.core.head e) = pot (d.core.tail e) + sgn e * ↑t) (hwin : ∀ (e : Fin p), lo e + t ≤ d.length e ∨ sgn e = 0) (e : Fin p) (hzero : d.length e = 0) :
          pot (d.core.head e) = pot (d.core.tail e)

          A vanishing slot carries no potential difference: its window has collapsed (lo + t ≤ 0) or its slope is zero, and either way sgn e * t = 0.

          theorem Utilities.Certificate.DegenerateSpec.DegSpec.RampData.pot_eq_of_reachIn {n p : ℕ} {d : DegSpec n p} {pot : Fin n → ℤ} {sgn : Fin p → ℤ} {lo : Fin p → ℕ} {t : ℕ} (hpot : ∀ (e : Fin p), pot (d.core.head e) = pot (d.core.tail e) + sgn e * ↑t) (hwin : ∀ (e : Fin p), lo e + t ≤ d.length e ∨ sgn e = 0) {u v : Fin n} (h : ContractionForestCensusGeneral.ReachIn d.core {e : Fin p | d.length e = 0} u v) :
          pot u = pot v

          The potential is constant along any chain of vanishing slots.

          theorem Utilities.Certificate.DegenerateSpec.DegSpec.RampData.of_reachIn {n p : ℕ} {d : DegSpec n p} {pot : Fin n → ℤ} {sgn : Fin p → ℤ} {lo : Fin p → ℕ} {t : ℕ} (hpot : ∀ (e : Fin p), pot (d.core.head e) = pot (d.core.tail e) + sgn e * ↑t) (hwin : ∀ (e : Fin p), lo e + t ≤ d.length e ∨ sgn e = 0) (hrep : ∀ (u v : Fin n), d.rep u = d.rep v → ContractionForestCensusGeneral.ReachIn d.core {e : Fin p | d.length e = 0} u v) :
          d.RampData pot sgn lo t

          repInv for free. If rep-equality is witnessed by a chain of vanishing slots — DegenerateCoreVertexCut.DegSpec.RepIsContraction, which holds definitionally whenever rep is a compFold of the vanishing set, as it is for RowProof.censusSpec — then the two open-orthant conditions already build a closed-orthant RampData.

          Compatibility and the step slopes #

          theorem Utilities.Certificate.DegenerateSpec.DegSpec.rampCompatible {n p : ℕ} {d : DegSpec n p} {pot : Fin n → ℤ} {sgn : Fin p → ℤ} {lo : Fin p → ℕ} {t : ℕ} (h : d.RampData pot sgn lo t) :
          d.SlotValueCompatible pot (d.rampValue pot sgn lo t)
          @[simp]
          theorem Utilities.Certificate.DegenerateSpec.DegSpec.rampScript_coreVertex {n p : ℕ} {d : DegSpec n p} {pot : Fin n → ℤ} {sgn : Fin p → ℤ} {lo : Fin p → ℕ} {t : ℕ} (h : d.RampData pot sgn lo t) (v : Fin n) :
          d.rampScript pot sgn lo t (d.coreVertex v) = pot v
          @[simp]
          theorem Utilities.Certificate.DegenerateSpec.DegSpec.rampScript_interiorVertex {n p : ℕ} {d : DegSpec n p} {pot : Fin n → ℤ} {sgn : Fin p → ℤ} {lo : Fin p → ℕ} {t : ℕ} (e : Fin p) (o : Fin (d.length e - 1)) :
          d.rampScript pot sgn lo t (d.interiorVertex e o) = d.rampValue pot sgn lo t e (↑o + 1)
          theorem Utilities.Certificate.DegenerateSpec.DegSpec.isStepSlope_ramp {n p : ℕ} {d : DegSpec n p} {pot : Fin n → ℤ} {sgn : Fin p → ℤ} {lo : Fin p → ℕ} {t : ℕ} (h : d.RampData pot sgn lo t) :
          d.IsStepSlope (d.rampScript pot sgn lo t) (rampSlope sgn lo t)

          The Laplacian of a ramp #

          theorem Utilities.Certificate.DegenerateSpec.DegSpec.prin_ramp_coreVertex {n p : ℕ} {d : DegSpec n p} {pot : Fin n → ℤ} {sgn : Fin p → ℤ} {lo : Fin p → ℕ} {t : ℕ} (h : d.RampData pot sgn lo t) (r : Fin n) :
          (prin d.graph) (d.rampScript pot sgn lo t) (d.coreVertex r) = ∑ e : Fin p, ((if d.rep (d.core.tail e) = d.rep r then rampSlope sgn lo t e 0 else 0) + if d.rep (d.core.head e) = d.rep r then -rampSlope sgn lo t e (d.length e - 1) else 0)

          At a contracted core class the Laplacian of a ramp is the endpoint sum over all slots of the uncontracted core, vanishing slots included; this is DegSpec.prin_coreVertex_eq_endpointSum specialised to a ramp.

          theorem Utilities.Certificate.DegenerateSpec.DegSpec.prin_ramp_coreVertex_classSum {n p : ℕ} {d : DegSpec n p} {pot : Fin n → ℤ} {sgn : Fin p → ℤ} {lo : Fin p → ℕ} {t : ℕ} (h : d.RampData pot sgn lo t) (r : Fin n) :
          (prin d.graph) (d.rampScript pot sgn lo t) (d.coreVertex r) = ∑ v : Fin n with d.rep v = d.rep r, ∑ e : Fin p, ((if d.core.tail e = v then rampSlope sgn lo t e 0 else 0) + if d.core.head e = v then -rampSlope sgn lo t e (d.length e - 1) else 0)

          The form a row proof reads. The Laplacian of a ramp at a contracted class is the sum, over the members of the class, of the uncontracted per-core-vertex endpoint formula — the same expression the open-orthant prin_ramp_coreVertex produces on a SubdivisionGraph.Spec. A row therefore proves its per-core-vertex value lemmas once and reads every face off by summing.

          theorem Utilities.Certificate.DegenerateSpec.DegSpec.prin_ramp_interiorVertex {n p : ℕ} {d : DegSpec n p} {pot : Fin n → ℤ} {sgn : Fin p → ℤ} {lo : Fin p → ℕ} {t : ℕ} (h : d.RampData pot sgn lo t) (e : Fin p) (o : Fin (d.length e - 1)) :
          (prin d.graph) (d.rampScript pot sgn lo t) (d.interiorVertex e o) = rampSlope sgn lo t e (↑o + 1) - rampSlope sgn lo t e ↑o

          Endpoint slopes #

          The two lemmas that read the slope at the two ends of a slot. Unlike the open orthant these must survive length e = 0, where length e - 1 is 0 rather than the last step; both statements are still true there, and the proofs no longer need length_pos.

          theorem Utilities.Certificate.DegenerateSpec.DegSpec.rampSlope_zero {p : ℕ} (sgn : Fin p → ℤ) (lo : Fin p → ℕ) (t : ℕ) (e : Fin p) :
          rampSlope sgn lo t e 0 = if lo e = 0 ∧ 0 < t then sgn e else 0
          theorem Utilities.Certificate.DegenerateSpec.DegSpec.rampSlope_last {n p : ℕ} {d : DegSpec n p} {pot : Fin n → ℤ} {sgn : Fin p → ℤ} {lo : Fin p → ℕ} {t : ℕ} (h : d.RampData pot sgn lo t) (e : Fin p) :
          rampSlope sgn lo t e (d.length e - 1) = if lo e + t = d.length e ∧ 0 < t then sgn e else 0
          theorem Utilities.Certificate.DegenerateSpec.DegSpec.rampSlope_zero_t {p : ℕ} (sgn : Fin p → ℤ) (lo : Fin p → ℕ) (e : Fin p) (k : ℕ) :
          rampSlope sgn lo 0 e k = 0
          theorem Utilities.Certificate.DegenerateSpec.DegSpec.rampSlope_diff {p : ℕ} (sgn : Fin p → ℤ) (lo : Fin p → ℕ) (t : ℕ) (e : Fin p) (k : ℕ) (hk : 0 < k) :
          rampSlope sgn lo t e k - rampSlope sgn lo t e (k - 1) = (if k = lo e ∧ 0 < t then sgn e else 0) - if k = lo e + t ∧ 0 < t then sgn e else 0

          Divergence of a ramp along one slot: a chip is created at path position lo and destroyed at lo + t, up to the sign.

          Agreement with the open orthant #

          At a strictly positive length vector rep is the identity, so repInv is vacuous and RampData is exactly the open-orthant structure of GenusFourCore100.RampData read on DegSpec.toSpec.

          theorem Utilities.Certificate.DegenerateSpec.DegSpec.RampData.of_pos {n p : ℕ} {d : DegSpec n p} {pot : Fin n → ℤ} {sgn : Fin p → ℤ} {lo : Fin p → ℕ} {t : ℕ} (hpos : ∀ (e : Fin p), 0 < d.length e) (hpot : ∀ (e : Fin p), pot (d.core.head e) = pot (d.core.tail e) + sgn e * ↑t) (hwin : ∀ (e : Fin p), lo e + t ≤ d.length e ∨ sgn e = 0) :
          d.RampData pot sgn lo t
          theorem Utilities.Certificate.DegenerateSpec.DegSpec.prin_ramp_coreVertex_of_pos {n p : ℕ} {d : DegSpec n p} {pot : Fin n → ℤ} {sgn : Fin p → ℤ} {lo : Fin p → ℕ} {t : ℕ} (h : d.RampData pot sgn lo t) (hpos : ∀ (e : Fin p), 0 < d.length e) (r : Fin n) :
          (prin d.graph) (d.rampScript pot sgn lo t) (d.coreVertex r) = ∑ e : Fin p, ((if d.core.tail e = r then rampSlope sgn lo t e 0 else 0) + if d.core.head e = r then -rampSlope sgn lo t e (d.length e - 1) else 0)

          On the interior the class sum of prin_ramp_coreVertex_classSum collapses to a single term, giving literally the open-orthant formula.

          Pointwise bookkeeping on the degenerate subdivision #

          Everything below is the closed-orthant replacement for the "divisor_ext plus oneChip at a path position" bookkeeping of GenusFourCore100.lean. The one structural change is that a value at a core class is the class sum of the uncontracted per-core-vertex value; that is stated once here, and a row then never has to mention classes again.

          theorem Utilities.Certificate.DegenerateSpec.DegSpec.divisor_ext {n p : ℕ} {d : DegSpec n p} {D E : CFDiv d.graph} (hcore : ∀ (v : Fin n), D (d.coreVertex v) = E (d.coreVertex v)) (hint : ∀ (e : Fin p) (o : Fin (d.length e - 1)), D (d.interiorVertex e o) = E (d.interiorVertex e o)) :
          D = E

          One chip, read at a class and at an interior vertex #

          def Utilities.Certificate.DegenerateSpec.DegSpec.chipCore {n p : ℕ} (d : DegSpec n p) (e : Fin p) (k : ℕ) (v : Fin n) :

          The per-core-vertex indicator of a chip at path position k of slot e. The uncontracted formula: the value at a contracted class is its class sum, by one_chip_pathVertex_coreVertex. Written as a nested if rather than a sum of two indicators because on the closed orthant k = 0 and k = length e can coincide.

          Equations
          Instances For
            def Utilities.Certificate.DegenerateSpec.DegSpec.chipInt {n p : ℕ} (_d : DegSpec n p) (e : Fin p) (k : ℕ) (e' : Fin p) (o : ℕ) :

            The value of a chip at path position k of slot e at the interior vertex (e', o).

            Equations
            Instances For
              theorem Utilities.Certificate.DegenerateSpec.DegSpec.interiorVertex_eq_iff {n p : ℕ} {d : DegSpec n p} (e e' : Fin p) (o : Fin (d.length e - 1)) (o' : Fin (d.length e' - 1)) :
              d.interiorVertex e o = d.interiorVertex e' o' ↔ e = e' ∧ ↑o = ↑o'

              Distinct interior vertices are distinguished by their slot and offset.

              theorem Utilities.Certificate.DegenerateSpec.DegSpec.sum_class_indicator {n p : ℕ} {d : DegSpec n p} (r u : Fin n) (c : ℤ) :
              (∑ v : Fin n with d.rep v = d.rep r, if u = v then c else 0) = if d.rep u = d.rep r then c else 0

              Summing a single-vertex indicator over a contracted class.

              theorem Utilities.Certificate.DegenerateSpec.DegSpec.one_chip_pathVertex_coreVertex {n p : ℕ} {d : DegSpec n p} (e : Fin p) (k : d.PathPosition e) (r : Fin n) :
              oneChip (d.pathVertex e k) (d.coreVertex r) = ∑ v : Fin n with d.rep v = d.rep r, d.chipCore e (↑k) v
              theorem Utilities.Certificate.DegenerateSpec.DegSpec.one_chip_pathVertex_interiorVertex {n p : ℕ} {d : DegSpec n p} (e : Fin p) (k : d.PathPosition e) (e' : Fin p) (o : Fin (d.length e' - 1)) :
              oneChip (d.pathVertex e k) (d.interiorVertex e' o) = d.chipInt e (↑k) e' ↑o

              The divisor of a ramp #

              prin_ramp_eq is the closed-orthant replacement for the per-march prin_*_eq divisor identities a row proves on the open orthant. It is stated once, generically, and in the slot-indexed form: a ramp lifts one chip from path position lo e + t back to lo e on every slot, weighted by sgn e. A row instantiates it and expands the nine-term sum, rather than reproving the identity per march.

              theorem Utilities.Certificate.DegenerateSpec.DegSpec.ramp_slot_core {n p : ℕ} {d : DegSpec n p} {pot : Fin n → ℤ} {sgn : Fin p → ℤ} {lo : Fin p → ℕ} {t : ℕ} (h : d.RampData pot sgn lo t) (e : Fin p) (v : Fin n) :
              ((if d.core.tail e = v then rampSlope sgn lo t e 0 else 0) + if d.core.head e = v then -rampSlope sgn lo t e (d.length e - 1) else 0) = sgn e * (d.chipCore e (min (lo e) (d.length e)) v - d.chipCore e (min (lo e + t) (d.length e)) v)

              The per-slot core identity behind prin_ramp_eq.

              theorem Utilities.Certificate.DegenerateSpec.DegSpec.ramp_slot_interior {n p : ℕ} {d : DegSpec n p} {pot : Fin n → ℤ} {sgn : Fin p → ℤ} {lo : Fin p → ℕ} {t : ℕ} (h : d.RampData pot sgn lo t) (e' : Fin p) (o : Fin (d.length e' - 1)) :
              rampSlope sgn lo t e' (↑o + 1) - rampSlope sgn lo t e' ↑o = ∑ e : Fin p, sgn e * (d.chipInt e (min (lo e) (d.length e)) e' ↑o - d.chipInt e (min (lo e + t) (d.length e)) e' ↑o)

              The per-slot interior identity behind prin_ramp_eq.

              theorem Utilities.Certificate.DegenerateSpec.DegSpec.prin_ramp_eq {n p : ℕ} {d : DegSpec n p} {pot : Fin n → ℤ} {sgn : Fin p → ℤ} {lo : Fin p → ℕ} {t : ℕ} (h : d.RampData pot sgn lo t) :
              (prin d.graph) (d.rampScript pot sgn lo t) = ∑ e : Fin p, sgn e • (oneChip (d.pathAt e (lo e)) - oneChip (d.pathAt e (lo e + t)))

              The divisor of a ramp, on the closed orthant. Every slot contributes sgn e chips moved from path position lo e + t back to lo e; slots with sgn e = 0 contribute nothing, which is why the clamped positions are harmless.

              Chips at a clamped position, read at the two kinds of vertex #

              theorem Utilities.Certificate.DegenerateSpec.DegSpec.one_chip_pathAt_coreVertex {n p : ℕ} {d : DegSpec n p} (e : Fin p) (k : ℕ) (r : Fin n) :
              oneChip (d.pathAt e k) (d.coreVertex r) = ∑ v : Fin n with d.rep v = d.rep r, d.chipCore e (min k (d.length e)) v
              theorem Utilities.Certificate.DegenerateSpec.DegSpec.one_chip_pathAt_interiorVertex {n p : ℕ} {d : DegSpec n p} (e : Fin p) (k : ℕ) (e' : Fin p) (o : Fin (d.length e' - 1)) :
              oneChip (d.pathAt e k) (d.interiorVertex e' o) = d.chipInt e (min k (d.length e)) e' ↑o