Documentation

Complexity.Language.Buffer.Prod.GetD

Defaulted reads from scalar-pair arrays #

Each source function checks the first column's length before executing two actual reads. A product-array observation supplies the equal column lengths. Out-of-bounds access returns the entire supplied pair without reading either column. All branches preserve the complete heap, including aliased views.

The returned scalar pair uses the ordinary pure identity representation, as does the fallback argument. Only the array input has a heap-backed column representation. Fixed input loading and represented frontend selection are separate from these source functions and their correctness contracts.

The named function's actual partial source action, with ordinary typed arguments and an explicitly supplied shared heap.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    @[reducible, inline]

    The source program's declared first-order signatures.

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

      The named function's actual independently interpreted source body.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        @[reducible, inline]

        Budget-free total correctness with ordinary source parameters and relational initial/final heap postconditions. This is the existing source function contract.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[reducible, inline]

          This named source function's index in its declared signature table.

          Equations
          Instances For
            @[reducible, inline]

            Apply a predicate, postcondition or bound with ordinary source parameters to the actual argument environment. No new contract or execution is introduced.

            Equations
            Instances For
              theorem Complexity.Language.Buffer.Prod.GetD.getBoolBool_total_iff (pre✝ : Buffer CellTy.bool × Buffer CellTy.bool → ℕ → Bool × Bool → Heap → Prop) (post✝ : Buffer CellTy.bool × Buffer CellTy.bool → ℕ → Bool × Bool → Heap → Bool × Bool → Heap → Prop) :
              getBoolBool_contract pre✝ post✝ ↔ ∀ (columns : Buffer CellTy.bool × Buffer CellTy.bool) (index : ℕ) (fallback : Bool × Bool) (initialHeap : Heap), pre✝ columns index fallback initialHeap → ∃ (value : Bool × Bool) (finalHeap : Heap), getBoolBool columns index fallback initialHeap = Part.some (Except.ok value, finalHeap) ∧ post✝ columns index fallback initialHeap value finalHeap

              The source contract is equivalent to ordinary curried preconditions and successful result/heap postconditions, including termination and absence of faults.

              The finite table of actual named source bodies.

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

                The named function's actual partial source action, with ordinary typed arguments and an explicitly supplied shared heap.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  @[reducible, inline]

                  Budget-free total correctness with ordinary source parameters and relational initial/final heap postconditions. This is the existing source function contract.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    theorem Complexity.Language.Buffer.Prod.GetD.getNatNat_total_iff (pre✝ : Buffer CellTy.nat × Buffer CellTy.nat → ℕ → ℕ × ℕ → Heap → Prop) (post✝ : Buffer CellTy.nat × Buffer CellTy.nat → ℕ → ℕ × ℕ → Heap → ℕ × ℕ → Heap → Prop) :
                    getNatNat_contract pre✝ post✝ ↔ ∀ (columns : Buffer CellTy.nat × Buffer CellTy.nat) (index : ℕ) (fallback : ℕ × ℕ) (initialHeap : Heap), pre✝ columns index fallback initialHeap → ∃ (value : ℕ × ℕ) (finalHeap : Heap), getNatNat columns index fallback initialHeap = Part.some (Except.ok value, finalHeap) ∧ post✝ columns index fallback initialHeap value finalHeap

                    The source contract is equivalent to ordinary curried preconditions and successful result/heap postconditions, including termination and absence of faults.

                    Fold an actual source invocation back to its named ordinary-argument observation.

                    The named function's actual independently interpreted source body.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      @[reducible, inline]

                      The actual declared argument environment, constructed from ordinary source parameters. This is proof-side parameter transport, not an additional runtime operation.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        theorem Complexity.Language.Buffer.Prod.GetD.getNatNat_contract_iff_triple (pre✝ : Buffer CellTy.nat × Buffer CellTy.nat → ℕ → ℕ × ℕ → Heap → Prop) (post✝ : Buffer CellTy.nat × Buffer CellTy.nat → ℕ → ℕ × ℕ → Heap → ℕ × ℕ → Heap → Prop) :
                        getNatNat_contract pre✝ post✝ ↔ ∀ (columns : Buffer CellTy.nat × Buffer CellTy.nat) (index : ℕ) (fallback : ℕ × ℕ) (initialHeap : Heap), ⦃fun (currentHeap : Heap) => { down := currentHeap = initialHeap ∧ pre✝ columns index fallback initialHeap }⦄ getNatNat columns index fallback ⦃(fun (value : ℕ × ℕ) (finalHeap : Heap) => { down := post✝ columns index fallback initialHeap value finalHeap }, fun (x : Fault) (x_1 : Heap) => { down := False }, PUnit.unit)⦄

                        Prove the ordinary-parameter source contract with a total-correctness triple for the same action. The ghost initial heap equals the actual entry heap; successful results use the actual final heap, and faults are excluded.

                        @[reducible, inline]

                        The actual declared argument environment, constructed from ordinary source parameters. This is proof-side parameter transport, not an additional runtime operation.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          theorem Complexity.Language.Buffer.Prod.GetD.getNatNat_spec {pre✝ : Env [(Ty.buffer CellTy.nat).prod (Ty.buffer CellTy.nat), Ty.nat, Ty.nat.prod Ty.nat] → Heap → Prop} {post✝ : Env [(Ty.buffer CellTy.nat).prod (Ty.buffer CellTy.nat), Ty.nat, Ty.nat.prod Ty.nat] → Heap → ℕ × ℕ → Heap → Prop} :
                          FunctionTotal program getNatNatId pre✝ post✝ → ∀ (columns : Buffer CellTy.nat × Buffer CellTy.nat) (index : ℕ) (fallback : ℕ × ℕ) (continuation : Std.Do.PostCond (ℕ × ℕ) (Std.Do.PostShape.except Fault (Std.Do.PostShape.arg Heap Std.Do.PostShape.pure))), ⦃fun (initialHeap : Heap) => { down := pre✝ (Env.cons columns (Env.cons index (Env.cons fallback Env.empty))) initialHeap ∧ ∀ (value : ℕ × ℕ) (finalHeap : Heap), post✝ (Env.cons columns (Env.cons index (Env.cons fallback Env.empty))) initialHeap value finalHeap → (continuation.1 value finalHeap).down }⦄ getNatNat columns index fallback ⦃continuation⦄

                          Apply a supplied source contract with ordinary named arguments and its actual returned value and final heap. No callee body or new contract is inferred.

                          @[reducible, inline]

                          Apply a predicate, postcondition or bound with ordinary source parameters to the actual argument environment. No new contract or execution is introduced.

                          Equations
                          Instances For
                            @[reducible, inline]

                            Budget-free total correctness with ordinary source parameters and relational initial/final heap postconditions. This is the existing source function contract.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              theorem Complexity.Language.Buffer.Prod.GetD.getBoolNat_spec {pre✝ : Env [(Ty.buffer CellTy.bool).prod (Ty.buffer CellTy.nat), Ty.nat, Ty.bool.prod Ty.nat] → Heap → Prop} {post✝ : Env [(Ty.buffer CellTy.bool).prod (Ty.buffer CellTy.nat), Ty.nat, Ty.bool.prod Ty.nat] → Heap → Bool × ℕ → Heap → Prop} :
                              FunctionTotal program getBoolNatId pre✝ post✝ → ∀ (columns : Buffer CellTy.bool × Buffer CellTy.nat) (index : ℕ) (fallback : Bool × ℕ) (continuation : Std.Do.PostCond (Bool × ℕ) (Std.Do.PostShape.except Fault (Std.Do.PostShape.arg Heap Std.Do.PostShape.pure))), ⦃fun (initialHeap : Heap) => { down := pre✝ (Env.cons columns (Env.cons index (Env.cons fallback Env.empty))) initialHeap ∧ ∀ (value : Bool × ℕ) (finalHeap : Heap), post✝ (Env.cons columns (Env.cons index (Env.cons fallback Env.empty))) initialHeap value finalHeap → (continuation.1 value finalHeap).down }⦄ getBoolNat columns index fallback ⦃continuation⦄

                              Apply a supplied source contract with ordinary named arguments and its actual returned value and final heap. No callee body or new contract is inferred.

                              @[reducible, inline]

                              Budget-free total correctness with ordinary source parameters and relational initial/final heap postconditions. This is the existing source function contract.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                theorem Complexity.Language.Buffer.Prod.GetD.getNatBool_spec {pre✝ : Env [(Ty.buffer CellTy.nat).prod (Ty.buffer CellTy.bool), Ty.nat, Ty.nat.prod Ty.bool] → Heap → Prop} {post✝ : Env [(Ty.buffer CellTy.nat).prod (Ty.buffer CellTy.bool), Ty.nat, Ty.nat.prod Ty.bool] → Heap → ℕ × Bool → Heap → Prop} :
                                FunctionTotal program getNatBoolId pre✝ post✝ → ∀ (columns : Buffer CellTy.nat × Buffer CellTy.bool) (index : ℕ) (fallback : ℕ × Bool) (continuation : Std.Do.PostCond (ℕ × Bool) (Std.Do.PostShape.except Fault (Std.Do.PostShape.arg Heap Std.Do.PostShape.pure))), ⦃fun (initialHeap : Heap) => { down := pre✝ (Env.cons columns (Env.cons index (Env.cons fallback Env.empty))) initialHeap ∧ ∀ (value : ℕ × Bool) (finalHeap : Heap), post✝ (Env.cons columns (Env.cons index (Env.cons fallback Env.empty))) initialHeap value finalHeap → (continuation.1 value finalHeap).down }⦄ getNatBool columns index fallback ⦃continuation⦄

                                Apply a supplied source contract with ordinary named arguments and its actual returned value and final heap. No callee body or new contract is inferred.

                                theorem Complexity.Language.Buffer.Prod.GetD.getBoolNat_total_iff (pre✝ : Buffer CellTy.bool × Buffer CellTy.nat → ℕ → Bool × ℕ → Heap → Prop) (post✝ : Buffer CellTy.bool × Buffer CellTy.nat → ℕ → Bool × ℕ → Heap → Bool × ℕ → Heap → Prop) :
                                getBoolNat_contract pre✝ post✝ ↔ ∀ (columns : Buffer CellTy.bool × Buffer CellTy.nat) (index : ℕ) (fallback : Bool × ℕ) (initialHeap : Heap), pre✝ columns index fallback initialHeap → ∃ (value : Bool × ℕ) (finalHeap : Heap), getBoolNat columns index fallback initialHeap = Part.some (Except.ok value, finalHeap) ∧ post✝ columns index fallback initialHeap value finalHeap

                                The source contract is equivalent to ordinary curried preconditions and successful result/heap postconditions, including termination and absence of faults.

                                theorem Complexity.Language.Buffer.Prod.GetD.getNatBool_contract_iff_triple (pre✝ : Buffer CellTy.nat × Buffer CellTy.bool → ℕ → ℕ × Bool → Heap → Prop) (post✝ : Buffer CellTy.nat × Buffer CellTy.bool → ℕ → ℕ × Bool → Heap → ℕ × Bool → Heap → Prop) :
                                getNatBool_contract pre✝ post✝ ↔ ∀ (columns : Buffer CellTy.nat × Buffer CellTy.bool) (index : ℕ) (fallback : ℕ × Bool) (initialHeap : Heap), ⦃fun (currentHeap : Heap) => { down := currentHeap = initialHeap ∧ pre✝ columns index fallback initialHeap }⦄ getNatBool columns index fallback ⦃(fun (value : ℕ × Bool) (finalHeap : Heap) => { down := post✝ columns index fallback initialHeap value finalHeap }, fun (x : Fault) (x_1 : Heap) => { down := False }, PUnit.unit)⦄

                                Prove the ordinary-parameter source contract with a total-correctness triple for the same action. The ghost initial heap equals the actual entry heap; successful results use the actual final heap, and faults are excluded.

                                The named function's actual independently interpreted source body.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  @[reducible, inline]

                                  The actual declared argument environment, constructed from ordinary source parameters. This is proof-side parameter transport, not an additional runtime operation.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    @[reducible, inline]

                                    Apply a predicate, postcondition or bound with ordinary source parameters to the actual argument environment. No new contract or execution is introduced.

                                    Equations
                                    Instances For
                                      theorem Complexity.Language.Buffer.Prod.GetD.getNatBool_eq (columns : Buffer CellTy.nat × Buffer CellTy.bool) (index : ℕ) (fallback : ℕ × Bool) :
                                      getNatBool columns index fallback = have left := columns.1; have operand := left.length; have condition := decide (index < operand); if condition = true then have right := columns.2; do let first ← left.readM index let second ← right.readM index pure (first, second) else pure fallback

                                      One source-body equation in ordinary monadic notation; named callees remain opaque.

                                      theorem Complexity.Language.Buffer.Prod.GetD.getBoolNat_contract_iff_triple (pre✝ : Buffer CellTy.bool × Buffer CellTy.nat → ℕ → Bool × ℕ → Heap → Prop) (post✝ : Buffer CellTy.bool × Buffer CellTy.nat → ℕ → Bool × ℕ → Heap → Bool × ℕ → Heap → Prop) :
                                      getBoolNat_contract pre✝ post✝ ↔ ∀ (columns : Buffer CellTy.bool × Buffer CellTy.nat) (index : ℕ) (fallback : Bool × ℕ) (initialHeap : Heap), ⦃fun (currentHeap : Heap) => { down := currentHeap = initialHeap ∧ pre✝ columns index fallback initialHeap }⦄ getBoolNat columns index fallback ⦃(fun (value : Bool × ℕ) (finalHeap : Heap) => { down := post✝ columns index fallback initialHeap value finalHeap }, fun (x : Fault) (x_1 : Heap) => { down := False }, PUnit.unit)⦄

                                      Prove the ordinary-parameter source contract with a total-correctness triple for the same action. The ghost initial heap equals the actual entry heap; successful results use the actual final heap, and faults are excluded.

                                      The named function's actual independently interpreted source body.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        @[reducible, inline]

                                        This named source function's index in its declared signature table.

                                        Equations
                                        Instances For

                                          The named function's actual partial source action, with ordinary typed arguments and an explicitly supplied shared heap.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            theorem Complexity.Language.Buffer.Prod.GetD.getBoolBool_eq (columns : Buffer CellTy.bool × Buffer CellTy.bool) (index : ℕ) (fallback : Bool × Bool) :
                                            getBoolBool columns index fallback = have left := columns.1; have operand := left.length; have condition := decide (index < operand); if condition = true then have right := columns.2; do let first ← left.readM index let second ← right.readM index pure (first, second) else pure fallback

                                            One source-body equation in ordinary monadic notation; named callees remain opaque.

                                            Fold an actual source invocation back to its named ordinary-argument observation.

                                            The named function's actual partial source action, with ordinary typed arguments and an explicitly supplied shared heap.

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

                                              Fold an actual source invocation back to its named ordinary-argument observation.

                                              theorem Complexity.Language.Buffer.Prod.GetD.getBoolNat_eq (columns : Buffer CellTy.bool × Buffer CellTy.nat) (index : ℕ) (fallback : Bool × ℕ) :
                                              getBoolNat columns index fallback = have left := columns.1; have operand := left.length; have condition := decide (index < operand); if condition = true then have right := columns.2; do let first ← left.readM index let second ← right.readM index pure (first, second) else pure fallback

                                              One source-body equation in ordinary monadic notation; named callees remain opaque.

                                              @[reducible, inline]

                                              This named source function's index in its declared signature table.

                                              Equations
                                              Instances For
                                                theorem Complexity.Language.Buffer.Prod.GetD.getBoolBool_spec {pre✝ : Env [(Ty.buffer CellTy.bool).prod (Ty.buffer CellTy.bool), Ty.nat, Ty.bool.prod Ty.bool] → Heap → Prop} {post✝ : Env [(Ty.buffer CellTy.bool).prod (Ty.buffer CellTy.bool), Ty.nat, Ty.bool.prod Ty.bool] → Heap → Bool × Bool → Heap → Prop} :
                                                FunctionTotal program getBoolBoolId pre✝ post✝ → ∀ (columns : Buffer CellTy.bool × Buffer CellTy.bool) (index : ℕ) (fallback : Bool × Bool) (continuation : Std.Do.PostCond (Bool × Bool) (Std.Do.PostShape.except Fault (Std.Do.PostShape.arg Heap Std.Do.PostShape.pure))), ⦃fun (initialHeap : Heap) => { down := pre✝ (Env.cons columns (Env.cons index (Env.cons fallback Env.empty))) initialHeap ∧ ∀ (value : Bool × Bool) (finalHeap : Heap), post✝ (Env.cons columns (Env.cons index (Env.cons fallback Env.empty))) initialHeap value finalHeap → (continuation.1 value finalHeap).down }⦄ getBoolBool columns index fallback ⦃continuation⦄

                                                Apply a supplied source contract with ordinary named arguments and its actual returned value and final heap. No callee body or new contract is inferred.

                                                Fold an actual source invocation back to its named ordinary-argument observation.

                                                theorem Complexity.Language.Buffer.Prod.GetD.getNatBool_total_iff (pre✝ : Buffer CellTy.nat × Buffer CellTy.bool → ℕ → ℕ × Bool → Heap → Prop) (post✝ : Buffer CellTy.nat × Buffer CellTy.bool → ℕ → ℕ × Bool → Heap → ℕ × Bool → Heap → Prop) :
                                                getNatBool_contract pre✝ post✝ ↔ ∀ (columns : Buffer CellTy.nat × Buffer CellTy.bool) (index : ℕ) (fallback : ℕ × Bool) (initialHeap : Heap), pre✝ columns index fallback initialHeap → ∃ (value : ℕ × Bool) (finalHeap : Heap), getNatBool columns index fallback initialHeap = Part.some (Except.ok value, finalHeap) ∧ post✝ columns index fallback initialHeap value finalHeap

                                                The source contract is equivalent to ordinary curried preconditions and successful result/heap postconditions, including termination and absence of faults.

                                                @[reducible, inline]

                                                The actual declared argument environment, constructed from ordinary source parameters. This is proof-side parameter transport, not an additional runtime operation.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  theorem Complexity.Language.Buffer.Prod.GetD.getNatNat_eq (columns : Buffer CellTy.nat × Buffer CellTy.nat) (index : ℕ) (fallback : ℕ × ℕ) :
                                                  getNatNat columns index fallback = have left := columns.1; have operand := left.length; have condition := decide (index < operand); if condition = true then have right := columns.2; do let first ← left.readM index let second ← right.readM index pure (first, second) else pure fallback

                                                  One source-body equation in ordinary monadic notation; named callees remain opaque.

                                                  theorem Complexity.Language.Buffer.Prod.GetD.getBoolBool_contract_iff_triple (pre✝ : Buffer CellTy.bool × Buffer CellTy.bool → ℕ → Bool × Bool → Heap → Prop) (post✝ : Buffer CellTy.bool × Buffer CellTy.bool → ℕ → Bool × Bool → Heap → Bool × Bool → Heap → Prop) :
                                                  getBoolBool_contract pre✝ post✝ ↔ ∀ (columns : Buffer CellTy.bool × Buffer CellTy.bool) (index : ℕ) (fallback : Bool × Bool) (initialHeap : Heap), ⦃fun (currentHeap : Heap) => { down := currentHeap = initialHeap ∧ pre✝ columns index fallback initialHeap }⦄ getBoolBool columns index fallback ⦃(fun (value : Bool × Bool) (finalHeap : Heap) => { down := post✝ columns index fallback initialHeap value finalHeap }, fun (x : Fault) (x_1 : Heap) => { down := False }, PUnit.unit)⦄

                                                  Prove the ordinary-parameter source contract with a total-correctness triple for the same action. The ghost initial heap equals the actual entry heap; successful results use the actual final heap, and faults are excluded.

                                                  @[reducible, inline]

                                                  Apply a predicate, postcondition or bound with ordinary source parameters to the actual argument environment. No new contract or execution is introduced.

                                                  Equations
                                                  Instances For
                                                    theorem Complexity.Language.Buffer.Prod.GetD.getNatNat_eval (values : Array (ℕ × ℕ)) (index : ℕ) (fallback : ℕ × ℕ) (columns : Buffer CellTy.nat × Buffer CellTy.nat) (heap : Heap) (observed : ((Representation.array CellTy.nat).arrayProd (Representation.array CellTy.nat)).Rel values columns heap) :
                                                    getNatNat columns index fallback heap = Part.some (Except.ok (values.getD index fallback), heap)

                                                    The actual two-column lookup returns the ordinary pair or its whole default.

                                                    Pair-array input with identity-represented index, fallback and returned pair.

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

                                                      This source entry refines total Lean array access, with no supplied index bound.

                                                      theorem Complexity.Language.Buffer.Prod.GetD.getNatNat_eval_exists_preserving (values : Array (ℕ × ℕ)) (index : ℕ) (fallback : ℕ × ℕ) (columns : Buffer CellTy.nat × Buffer CellTy.nat) (heap : Heap) (observed : ((Representation.array CellTy.nat).arrayProd (Representation.array CellTy.nat)).Rel values columns heap) :
                                                      ∃ (returned : ℕ × ℕ) (finish : Heap), getNatNat columns index fallback heap = Part.some (Except.ok returned, finish) ∧ (Representation.ofEmbedding (Function.Embedding.refl (ℕ × ℕ))).Rel (values.getD index fallback) returned finish ∧ heap.ShapeExtends finish ∧ PreservesContents heap finish

                                                      Every previously observed buffer retains its contents, including aliases.

                                                      theorem Complexity.Language.Buffer.Prod.GetD.getNatNat_eval_exists (values : Array (ℕ × ℕ)) (index : ℕ) (fallback : ℕ × ℕ) (columns : Buffer CellTy.nat × Buffer CellTy.nat) (heap : Heap) (observed : ((Representation.array CellTy.nat).arrayProd (Representation.array CellTy.nat)).Rel values columns heap) :
                                                      ∃ (returned : ℕ × ℕ) (finish : Heap), getNatNat columns index fallback heap = Part.some (Except.ok returned, finish) ∧ (Representation.ofEmbedding (Function.Embedding.refl (ℕ × ℕ))).Rel (values.getD index fallback) returned finish ∧ heap.ShapeExtends finish

                                                      The standard represented-call frame for a pure pair returned by a real read.

                                                      theorem Complexity.Language.Buffer.Prod.GetD.getNatBool_eval (values : Array (ℕ × Bool)) (index : ℕ) (fallback : ℕ × Bool) (columns : Buffer CellTy.nat × Buffer CellTy.bool) (heap : Heap) (observed : ((Representation.array CellTy.nat).arrayProd (Representation.array CellTy.bool)).Rel values columns heap) :
                                                      getNatBool columns index fallback heap = Part.some (Except.ok (values.getD index fallback), heap)

                                                      The actual two-column lookup returns the ordinary pair or its whole default.

                                                      Pair-array input with identity-represented index, fallback and returned pair.

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

                                                        This source entry refines total Lean array access, with no supplied index bound.

                                                        theorem Complexity.Language.Buffer.Prod.GetD.getNatBool_eval_exists_preserving (values : Array (ℕ × Bool)) (index : ℕ) (fallback : ℕ × Bool) (columns : Buffer CellTy.nat × Buffer CellTy.bool) (heap : Heap) (observed : ((Representation.array CellTy.nat).arrayProd (Representation.array CellTy.bool)).Rel values columns heap) :
                                                        ∃ (returned : ℕ × Bool) (finish : Heap), getNatBool columns index fallback heap = Part.some (Except.ok returned, finish) ∧ (Representation.ofEmbedding (Function.Embedding.refl (ℕ × Bool))).Rel (values.getD index fallback) returned finish ∧ heap.ShapeExtends finish ∧ PreservesContents heap finish

                                                        Every previously observed buffer retains its contents, including aliases.

                                                        theorem Complexity.Language.Buffer.Prod.GetD.getNatBool_eval_exists (values : Array (ℕ × Bool)) (index : ℕ) (fallback : ℕ × Bool) (columns : Buffer CellTy.nat × Buffer CellTy.bool) (heap : Heap) (observed : ((Representation.array CellTy.nat).arrayProd (Representation.array CellTy.bool)).Rel values columns heap) :
                                                        ∃ (returned : ℕ × Bool) (finish : Heap), getNatBool columns index fallback heap = Part.some (Except.ok returned, finish) ∧ (Representation.ofEmbedding (Function.Embedding.refl (ℕ × Bool))).Rel (values.getD index fallback) returned finish ∧ heap.ShapeExtends finish

                                                        The standard represented-call frame for a pure pair returned by a real read.

                                                        theorem Complexity.Language.Buffer.Prod.GetD.getBoolNat_eval (values : Array (Bool × ℕ)) (index : ℕ) (fallback : Bool × ℕ) (columns : Buffer CellTy.bool × Buffer CellTy.nat) (heap : Heap) (observed : ((Representation.array CellTy.bool).arrayProd (Representation.array CellTy.nat)).Rel values columns heap) :
                                                        getBoolNat columns index fallback heap = Part.some (Except.ok (values.getD index fallback), heap)

                                                        The actual two-column lookup returns the ordinary pair or its whole default.

                                                        Pair-array input with identity-represented index, fallback and returned pair.

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

                                                          This source entry refines total Lean array access, with no supplied index bound.

                                                          theorem Complexity.Language.Buffer.Prod.GetD.getBoolNat_eval_exists_preserving (values : Array (Bool × ℕ)) (index : ℕ) (fallback : Bool × ℕ) (columns : Buffer CellTy.bool × Buffer CellTy.nat) (heap : Heap) (observed : ((Representation.array CellTy.bool).arrayProd (Representation.array CellTy.nat)).Rel values columns heap) :
                                                          ∃ (returned : Bool × ℕ) (finish : Heap), getBoolNat columns index fallback heap = Part.some (Except.ok returned, finish) ∧ (Representation.ofEmbedding (Function.Embedding.refl (Bool × ℕ))).Rel (values.getD index fallback) returned finish ∧ heap.ShapeExtends finish ∧ PreservesContents heap finish

                                                          Every previously observed buffer retains its contents, including aliases.

                                                          theorem Complexity.Language.Buffer.Prod.GetD.getBoolNat_eval_exists (values : Array (Bool × ℕ)) (index : ℕ) (fallback : Bool × ℕ) (columns : Buffer CellTy.bool × Buffer CellTy.nat) (heap : Heap) (observed : ((Representation.array CellTy.bool).arrayProd (Representation.array CellTy.nat)).Rel values columns heap) :
                                                          ∃ (returned : Bool × ℕ) (finish : Heap), getBoolNat columns index fallback heap = Part.some (Except.ok returned, finish) ∧ (Representation.ofEmbedding (Function.Embedding.refl (Bool × ℕ))).Rel (values.getD index fallback) returned finish ∧ heap.ShapeExtends finish

                                                          The standard represented-call frame for a pure pair returned by a real read.

                                                          theorem Complexity.Language.Buffer.Prod.GetD.getBoolBool_eval (values : Array (Bool × Bool)) (index : ℕ) (fallback : Bool × Bool) (columns : Buffer CellTy.bool × Buffer CellTy.bool) (heap : Heap) (observed : ((Representation.array CellTy.bool).arrayProd (Representation.array CellTy.bool)).Rel values columns heap) :
                                                          getBoolBool columns index fallback heap = Part.some (Except.ok (values.getD index fallback), heap)

                                                          The actual two-column lookup returns the ordinary pair or its whole default.

                                                          Pair-array input with identity-represented index, fallback and returned pair.

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

                                                            This source entry refines total Lean array access, with no supplied index bound.

                                                            theorem Complexity.Language.Buffer.Prod.GetD.getBoolBool_eval_exists_preserving (values : Array (Bool × Bool)) (index : ℕ) (fallback : Bool × Bool) (columns : Buffer CellTy.bool × Buffer CellTy.bool) (heap : Heap) (observed : ((Representation.array CellTy.bool).arrayProd (Representation.array CellTy.bool)).Rel values columns heap) :
                                                            ∃ (returned : Bool × Bool) (finish : Heap), getBoolBool columns index fallback heap = Part.some (Except.ok returned, finish) ∧ (Representation.ofEmbedding (Function.Embedding.refl (Bool × Bool))).Rel (values.getD index fallback) returned finish ∧ heap.ShapeExtends finish ∧ PreservesContents heap finish

                                                            Every previously observed buffer retains its contents, including aliases.

                                                            theorem Complexity.Language.Buffer.Prod.GetD.getBoolBool_eval_exists (values : Array (Bool × Bool)) (index : ℕ) (fallback : Bool × Bool) (columns : Buffer CellTy.bool × Buffer CellTy.bool) (heap : Heap) (observed : ((Representation.array CellTy.bool).arrayProd (Representation.array CellTy.bool)).Rel values columns heap) :
                                                            ∃ (returned : Bool × Bool) (finish : Heap), getBoolBool columns index fallback heap = Part.some (Except.ok returned, finish) ∧ (Representation.ofEmbedding (Function.Embedding.refl (Bool × Bool))).Rel (values.getD index fallback) returned finish ∧ heap.ShapeExtends finish

                                                            The standard represented-call frame for a pure pair returned by a real read.