Documentation

Complexitylib.Classes.PCP.Internal.AlgEdge

A composed edge's record #

An edge of the composed graph carries three numbers: its two endpoints and the code of its constraint. The first endpoint is arithmetic in the edge number; the second is a position, laid out by kind — an encoding block, a linear table or a quadratic one — and the third is the code the tester's verdict names.

This module writes the position's layout out as an algorithm.

Main definitions #

Main results #

noncomputable def Complexity.posBlk (cardB cardN cardNN cardD : ) (cardV kind block cube : List Bool) :

A position's number, from its kind, the block it lies in and the cube inside that block. Kind 0 is an encoding block, kind 1 a dart's linear table, and anything else a dart's quadratic table.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem Complexity.posBlk_eq (cardB cardN cardNN cardD k b c : ) (cardV kind block cube : List Bool) (hk : kind.length = k) (hb : block.length = b) (hc : cube = List.replicate c true) :
    posBlk cardB cardN cardNN cardD cardV kind block cube = List.replicate (RegCSP.posNum cardV.length cardD cardB cardN cardNN k b c) true

    The layout computes the position's number.

    theorem Complexity.posBlk_mem_FP {cardB cardN cardNN cardD : } {cardV kind block cube : List BoolList Bool} (hV : cardV FP) (hk : kind FP) (hb : block FP) (hc : cube FP) :
    (fun (w : List Bool) => posBlk cardB cardN cardNN cardD (cardV w) (kind w) (block w) (cube w)) FP

    The first endpoint #

    noncomputable def Complexity.tailBlk (posF : ) (r : Round) (w : List Bool) :

    An edge's first endpoint: the test vertex it belongs to, after all the positions.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem Complexity.tailBlk_mem_FP (posF : ) (r : Round) :
      tailBlk posF r FP
      theorem Complexity.tailBlk_eq {α : Type} [Fintype α] [DecidableEq α] (posF : ) (r : Round) (G : ConstraintGraph α) {w : List Bool} {t zN : } (hg : pairFst w = encGraph G) (ht : testFn r w = List.replicate t true) (hz : randFn r w = List.replicate zN true) :
      tailBlk posF r w = List.replicate (G.numEdges * posF + (t * r.cZ + zN)) true

      The first endpoint's algorithm computes it.

      Which block the second endpoint lies in #

      noncomputable def Complexity.blockBlk (F : FinBase) (pol : Polynomial ) (r : Round) (w : List Bool) :

      The block the second endpoint lies in: the dart's tail for the first input read, its head for the second, and the dart itself otherwise.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Complexity.blockBlk_eq {β : Type} [Fintype β] [DecidableEq β] [Nonempty β] {R : RegCSP β} [NumEnc R.graph.V] [NumEnc R.graph.D] (F : FinBase) (pol : Polynomial ) (r : Round) {w : List Bool} (p : R.Dart) (i : ReadIdx) (hread : readFn w = List.replicate (NumEnc.enc i) true) (hv : vertFn r w = List.replicate (NumEnc.enc p.1) true) (ht : testFn r w = List.replicate (NumEnc.enc p) true) (hrot : pairFst (killedRotFn F pol r.deg r.P r.T r.q (killArg r w)) = List.replicate (NumEnc.enc (R.graph.rot p).1) true) :

        The block is the one the read asks for.

        The second endpoint #

        noncomputable def Complexity.vertCount (w : List Bool) :

        How many vertices the powered graph has: twice the input's edge count.

        Equations
        Instances For
          noncomputable def Complexity.headBlk {α : Type} [Fintype α] [DecidableEq α] (F : FinBase) (pol : Polynomial ) (r : Round) (cardB cardN cardNN : ) {E : ExpanderFamily} {B : } (dflt : StepKey E r.T r.q B (Fintype.card (ααBool))) (encβ : (PreWalk E r.Tα)BooleanAnalysis.Cube B) (w : List Bool) :

          An edge's second endpoint.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem Complexity.headBlk_mem_FP {α : Type} [Fintype α] [DecidableEq α] (F : FinBase) (pol : Polynomial ) (r : Round) (cardB cardN cardNN : ) {E : ExpanderFamily} {B : } (hQ : 0 < r.cQ) (hD : 0 < r.cD) (hZ : 0 < r.cZ) (hC : 0 < r.C) (dflt : StepKey E r.T r.q B (Fintype.card (ααBool))) (encβ : (PreWalk E r.Tα)BooleanAnalysis.Cube B) :
            headBlk F pol r cardB cardN cardNN dflt encβ FP
            theorem Complexity.headBlk_eq {α : Type} [Fintype α] [DecidableEq α] (F : FinBase) (pol : Polynomial ) (r : Round) (cardB cardN cardNN : ) {E : ExpanderFamily} {B : } (dflt : StepKey E r.T r.q B (Fintype.card (ααBool))) (encβ : (PreWalk E r.Tα)BooleanAnalysis.Cube B) {w : List Bool} {V k b c : } (hV : vertCount w = List.replicate V true) (hk : kindBlk w = List.replicate k true) (hb : blockBlk F pol r w = List.replicate b true) (hc : cubeFn F pol r dflt encβ w = List.replicate c true) :
            headBlk F pol r cardB cardN cardNN dflt encβ w = List.replicate (RegCSP.posNum V r.cD cardB cardN cardNN k b c) true

            The second endpoint's algorithm computes its number.

            The label encoding, without the graph #

            noncomputable def Complexity.encPre (E : ExpanderFamily) (T : ) (σ : PreWalk E TDinurAlpha) :

            The encoding of a powered label, at a type that does not mention the graph.

            Equations
            Instances For

              It is the encoding the round uses.

              The round's constants #

              noncomputable def Complexity.dinurRound (F : FinBase) (hd : 1 < F.deg) (q C cZ : ) :

              The constants of a Dinur round at killing rate q, over the expander family a finite base generates. The alphabet's constraint count and the tester's string count are supplied, so that they carry the caller's own instances.

              Equations
              Instances For
                @[simp]
                theorem Complexity.dinurRound_deg (F : FinBase) (hd : 1 < F.deg) (q C cZ : ) :
                (dinurRound F hd q C cZ).deg = (F.toFamily hd).degree
                theorem Complexity.dinurRound_P (F : FinBase) (hd : 1 < F.deg) (q C cZ : ) (G : ConstraintGraph DinurAlpha) :
                (dinurRound F hd q C cZ).P = G.preDeg (F.toFamily hd)
                @[simp]
                theorem Complexity.dinurRound_T (F : FinBase) (hd : 1 < F.deg) (q C cZ : ) :
                (dinurRound F hd q C cZ).T = powT Dinur.K q
                @[simp]
                theorem Complexity.dinurRound_q (F : FinBase) (hd : 1 < F.deg) (q C cZ : ) :
                (dinurRound F hd q C cZ).q = q
                @[simp]
                theorem Complexity.dinurRound_C (F : FinBase) (hd : 1 < F.deg) (q C cZ : ) :
                (dinurRound F hd q C cZ).C = C
                @[simp]
                theorem Complexity.dinurRound_cZ (F : FinBase) (hd : 1 < F.deg) (q C cZ : ) :
                (dinurRound F hd q C cZ).cZ = cZ
                @[simp]
                theorem Complexity.dinurRound_cQ (F : FinBase) (hd : 1 < F.deg) (q C cZ : ) :
                (dinurRound F hd q C cZ).cQ = q ^ powT Dinur.K q

                The round's output #

                noncomputable def Complexity.edgeRule {α : Type} [Fintype α] [DecidableEq α] (F : FinBase) (pol : Polynomial ) (r : Round) (posF cardB cardN cardNN : ) {E : ExpanderFamily} {B : } (dflt : StepKey E r.T r.q B (Fintype.card (ααBool))) (encβ : (PreWalk E r.Tα)BooleanAnalysis.Cube B) (w : List Bool) :

                One edge's record: its two endpoints and the code of its constraint.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  theorem Complexity.edgeRule_mem_FP {α : Type} [Fintype α] [DecidableEq α] (F : FinBase) (pol : Polynomial ) (r : Round) (posF cardB cardN cardNN : ) {E : ExpanderFamily} {B : } (hQ : 0 < r.cQ) (hD : 0 < r.cD) (hZ : 0 < r.cZ) (hC : 0 < r.C) (dflt : StepKey E r.T r.q B (Fintype.card (ααBool))) (encβ : (PreWalk E r.Tα)BooleanAnalysis.Cube B) :
                  edgeRule F pol r posF cardB cardN cardNN dflt encβ FP
                  noncomputable def Complexity.stepFn {α : Type} [Fintype α] [DecidableEq α] (F : FinBase) (pol : Polynomial ) (r : Round) (vertF edgeF posF cardB cardN cardNN : ) {E : ExpanderFamily} {B : } (dflt : StepKey E r.T r.q B (Fintype.card (ααBool))) (encβ : (PreWalk E r.Tα)BooleanAnalysis.Cube B) :

                  The graph a round produces, from the graph it is given.

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

                    A count block is a constant multiple of the input's edge count.

                    theorem Complexity.stepFn_mem_FP {α : Type} [Fintype α] [DecidableEq α] (F : FinBase) (pol : Polynomial ) (r : Round) (vertF edgeF posF cardB cardN cardNN : ) {E : ExpanderFamily} {B : } (hQ : 0 < r.cQ) (hD : 0 < r.cD) (hZ : 0 < r.cZ) (hC : 0 < r.C) (dflt : StepKey E r.T r.q B (Fintype.card (ααBool))) (encβ : (PreWalk E r.Tα)BooleanAnalysis.Cube B) :
                    stepFn F pol r vertF edgeF posF cardB cardN cardNN dflt encβ FP
                    theorem Complexity.stepFn_eq (F : FinBase) (pol : Polynomial ) (hd : 1 < F.deg) (G : ConstraintGraph DinurAlpha) (r : Round) (hq : 0 < r.q) (vertF edgeF posF cardB cardN cardNN : ) (hrD : r.cD = NumEnc.card ((G.preprocess (F.toFamily hd)).killedPow r.q r.T hq).graph.D) (hrZ : r.cZ = 2 ^ Tester.ROf (Dinur.bits (F.toFamily hd) r.T)) (hdeg : r.deg = (F.toFamily hd).degree) (hP : r.P = G.preDeg (F.toFamily hd)) (hC : r.C = Fintype.card (DinurAlphaDinurAlphaBool)) (hpc : ∀ (u : Fin G.numVerts), F.fitLevel hd (G.cloudList u).length Polynomial.eval (G.cloudList u).length pol) (hpe : F.fitLevel hd (2 * G.numEdges) Polynomial.eval (2 * G.numEdges) pol) (hvertF : (RegCSP.compose (Dinur.enc (F.toFamily hd) G r.T) ((G.preprocess (F.toFamily hd)).killedPow r.q r.T hq)).toGraph.numVerts = vertF * G.numEdges) (hedgeF : (RegCSP.compose (Dinur.enc (F.toFamily hd) G r.T) ((G.preprocess (F.toFamily hd)).killedPow r.q r.T hq)).toGraph.numEdges = edgeF * G.numEdges) (hcardB : cardB = NumEnc.card (BooleanAnalysis.Cube (Dinur.bits (F.toFamily hd) r.T))) (hcardN : cardN = NumEnc.card (BooleanAnalysis.Cube (Tester.nOf (Dinur.bits (F.toFamily hd) r.T)))) (hcardNN : cardNN = NumEnc.card (BooleanAnalysis.Cube (Tester.nOf (Dinur.bits (F.toFamily hd) r.T) * Tester.nOf (Dinur.bits (F.toFamily hd) r.T)))) (hposF : Fintype.card ((G.preprocess (F.toFamily hd)).killedPow r.q r.T hq).Pos = G.numEdges * posF) (dflt : StepKey (F.toFamily hd) r.T r.q (Dinur.bits (F.toFamily hd) r.T) (Fintype.card (DinurAlphaDinurAlphaBool))) :
                    stepFn F pol r vertF edgeF posF cardB cardN cardNN dflt (Dinur.enc (F.toFamily hd) G r.T) (encGraph G) = encGraph (RegCSP.compose (Dinur.enc (F.toFamily hd) G r.T) ((G.preprocess (F.toFamily hd)).killedPow r.q r.T hq)).toGraph

                    One round of amplification, computed. The algorithm's output is the graph the round produces.