Documentation

CslibFrontier.Computability.PolyTime.CSP.Edge.Forest.Code

Positional codes for chronological forest results #

These codes represent the existing CSP.Forest.Result. Global occurrence indices reject when out of range. Logs are newest first; timestamps are the number of older expansions, so there is no independent timestamp to validate. No validity, edge-instance or reachability condition is imposed by the representation bridge.

Complete native forest-search input. Labels follow actual constraint-then-port order.

Instances For

    The explicit-table CSP is framed, followed by a framed Boolean list. Arity and variable names are binary; table rows and scopes are actual framed lists.

    Instances For
      theorem Cslib.Complexity.CSP.EdgeForest.encInput_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → Logic.PL.CSP Logic.PL.CSP.Table ℕ} {T0 S0 : γ → ℕ} {x1 : γ → List Bool} {T1 S1 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn (encCSP encTable Turing.MultiTapeTM.encNat) T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBool) T1 S1) :
      Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { body := x0 x, labels := x1 x }) encIn encInput (fun (x : γ) => T0 x + T1 x) fun (x : γ) => S0 x + S1 x
      theorem Cslib.Complexity.CSP.EdgeForest.encInput_body_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Input} :
      @[reducible, inline]

      The tuple of the fields of encInput.

      Instances For
        theorem Cslib.Complexity.CSP.EdgeForest.encInput_labels_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Input} :

        An expansion's input and ordered discovered output ports, as global positions.

        • input : ℕ

          Global input position.

        • outputs : List ℕ

          Ordered output positions.

        Instances For
          @[reducible, inline]

          The tuple of the fields of encExpansionCode.

          Instances For
            theorem Cslib.Complexity.CSP.EdgeForest.encExpansionCode_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 T0 S0 : γ → ℕ} {x1 : γ → List ℕ} {T1 S1 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn Turing.MultiTapeTM.encNat T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encNat) T1 S1) :
            Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { input := x0 x, outputs := x1 x }) encIn encExpansionCode (fun (x : γ) => T0 x + T1 x) fun (x : γ) => S0 x + S1 x
            theorem Cslib.Complexity.CSP.EdgeForest.encExpansionCode_input_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → ExpansionCode} :

            Binary input position, framed, followed by a framed list of binary output positions.

            Instances For

              A complete meeting, retaining original roots, older expansions and partial current copy.

              • roots : List ℕ

                Original root names in scan order.

              • Completed expansions, newest first.

              • current : ExpansionCode

                The current copy before the meeting output.

              • output : ℕ

                Global meeting-output position.

              Instances For

                Roots, older log and current expansion are framed in field order; the last position is binary. Each list element is framed, including the nested expansion output lists.

                Instances For
                  theorem Cslib.Complexity.CSP.EdgeForest.encMeetingCode_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → List ℕ} {T0 S0 : γ → ℕ} {x1 : γ → List ExpansionCode} {T1 S1 : γ → ℕ} {x2 : γ → ExpansionCode} {T2 S2 x3 T3 S3 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encNat) T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn (Turing.MultiTapeTM.encList encExpansionCode) T1 S1) (h2 : Turing.MultiTapeTM.ComputableInO x2 encIn encExpansionCode T2 S2) (h3 : Turing.MultiTapeTM.ComputableInO x3 encIn Turing.MultiTapeTM.encNat T3 S3) :
                  Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { roots := x0 x, older := x1 x, current := x2 x, output := x3 x }) encIn encMeetingCode (fun (x : γ) => T0 x + (T1 x + (T2 x + T3 x))) fun (x : γ) => S0 x + (S1 x + (S2 x + S3 x))
                  theorem Cslib.Complexity.CSP.EdgeForest.encMeetingCode_current_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → MeetingCode} :
                  theorem Cslib.Complexity.CSP.EdgeForest.encMeetingCode_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget : γ → ℕ} {x0 : γ → List ℕ} {x1 : γ → List ExpansionCode} {x2 : γ → ExpansionCode} {x3 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encNat) budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn (Turing.MultiTapeTM.encList encExpansionCode) budget) (h2 : Turing.MultiTapeTM.ComputableInSpace x2 encIn encExpansionCode budget) (h3 : Turing.MultiTapeTM.ComputableInSpace x3 encIn Turing.MultiTapeTM.encNat budget) :
                  Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { roots := x0 x, older := x1 x, current := x2 x, output := x3 x }) encIn encMeetingCode budget
                  theorem Cslib.Complexity.CSP.EdgeForest.encMeetingCode_output_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → MeetingCode} :
                  theorem Cslib.Complexity.CSP.EdgeForest.encMeetingCode_older_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → MeetingCode} :
                  @[reducible, inline]

                  Exhausted log, or augmentation meeting, or blossom meeting, in that order.

                  Instances For
                    @[reducible, inline]

                    One sum tag for exhaustion versus event; an event has a second tag for augment versus blossom. Expansion lists and meetings use their documented binary positional encodings.

                    Instances For

                      Encode an existing expansion by its actual incidence-list positions.

                      Instances For

                        Encode every field of an existing meeting, preserving the partial current expansion.

                        Instances For

                          Encode the existing result without making any mathematical assertion about its event.

                          Instances For

                            Decode an expansion, rejecting any invalid input or output position.

                            Instances For

                              Decode all positional fields of a meeting. Roots remain binary original names.

                              Instances For

                                Decode to the existing dependent forest result, rejecting malformed indices in every tag.

                                Instances For
                                  @[simp]

                                  Expansion codes are lossless even for externally supplied malformed forest histories.

                                  @[simp]

                                  Meeting codes retain the full log, roots and partial copy.

                                  @[simp]

                                  The complete result bridge is lossless, with no semantic or forest invariant premise.