Documentation

Examples.Language.Program

Typed mathematical contracts for existing source programs #

The existing bounded-increment implementation is presented as a Complexity.Program (Nat × Nat) Nat. Its fixed input convention passes two natural arguments, and its correctness theorem uses the existing generated source correspondence and ordinary mathematical minimum equation. program% directly selects that source function's unchanged entry, and program_correct reuses its generated represented mathematical model. No second algorithm, packing entry or additional correspondence declaration is supplied. Time and backend realization remain independent of this source correctness statement.

The same selector also selects the original effectful allocating make without requiring a pure model. Its standard state contract proves the ordinary Array.replicate result through Correct.of_triple at the same fixed interface. The existing allocating singleton is selected with an ordinary List Nat result, using the fixed linked-node output representation.

The array-append consumer uses ordinary closed input and output records with derived fixed interfaces. Its native source reads record fields and returns a record containing the appended array. program% selects that same source through an executable packing entry, and program_correct transports the ordinary mathematical equation through its generated source correspondence.

Select the existing source function with its two ordinary natural inputs.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem Complexity.Examples.TypedProgram.boundedIncrement_correct :
    boundedIncrement.Correct (fun (x : ℕ × ℕ) => True) fun (input : ℕ × ℕ) (result : ℕ) => result = min (input.1 + 1) input.2

    The generated source correspondence and existing mathematical equation establish successful source correctness for every pair of natural inputs.

    Select an allocating source function without first deriving a total pure model. The fixed output observes the returned buffer as an ordinary array.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem Complexity.Examples.TypedProgram.replicate_correct :
      replicate.Correct (fun (x : ℕ × ℕ) => True) fun (input : ℕ × ℕ) (result : Array ℕ) => result = Array.replicate input.1 input.2

      A standard state contract proves the same mathematical program boundary. No separate native implementation, input adapter or heap decoder is supplied.

      theorem Complexity.Examples.TypedProgram.replicate_correctVector :
      replicate.CorrectVector (fun (x : ℕ × ℕ) => True) Prod.fst fun (input : ℕ × ℕ) (result : Vector ℕ input.1) => result = Vector.replicate input.1 input.2

      The same allocating program has its exact input-dependent Vector result; the source implementation and its array storage are not changed.

      Select the existing allocating list constructor with its mathematical result type.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Complexity.Examples.TypedProgram.singleton_correct :
        singleton.Correct (fun (x : ℕ) => True) fun (head : ℕ) (result : List ℕ) => result = [head]

        The generated source correspondence observes the newly allocated linked node.

        Two ordinary arrays, using the shared derived source and RAM input layout.

        Instances For

          Observe the returned array's actual contents through an ordinary record.

          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

              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

                Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                Ordinary mathematical function generated from the same represented source block.

                Equations
                Instances For

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

                  Automatic correspondence for the same generated source function, without a machine budget.

                  Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

                  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.

                    Automatic correspondence for the same generated source function, without a machine budget.

                    The named function's actual independently interpreted source body.

                    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

                        Ordinary mathematical function generated from the same represented source block.

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

                          Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                          @[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]

                            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]

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

                              Equations
                              Instances For

                                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.

                                Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                @[reducible, inline]

                                Signature-preserving positions of this imported source program.

                                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
                                  Instances For

                                    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]

                                      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

                                        The named function's actual independently interpreted source body.

                                        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.

                                          Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                          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

                                            Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                            Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                            theorem Complexity.Examples.TypedProgram.NativeAppend.Source.append_eq (input : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat) :
                                            append input = have operand := input.1; have operand_1 := input.2; do let sourceValue ← Language.Buffer.Copy.append operand operand_1 pure sourceValue

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

                                            Automatic correspondence for the same generated source function, without a machine budget.

                                            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 source program's declared first-order signatures.

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

                                                Added function bodies already typed against the complete linked table.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  theorem Complexity.Examples.TypedProgram.NativeAppend.Source.boundedLength_contract_iff_triple (pre✝ : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat → Language.Heap → Prop) (post✝ : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat → Language.Heap → ℕ → Language.Heap → Prop) :
                                                  boundedLength_contract pre✝ post✝ ↔ ∀ (input : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat) (initialHeap : Language.Heap), ⦃fun (currentHeap : Language.Heap) => { down := currentHeap = initialHeap ∧ pre✝ input initialHeap }⦄ boundedLength input ⦃(fun (value : ℕ) (finalHeap : Language.Heap) => { down := post✝ input initialHeap value finalHeap }, fun (x : Language.Fault) (x_1 : Language.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]

                                                  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

                                                    Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      theorem Complexity.Examples.TypedProgram.NativeAppend.Source.shorterFirst_eq (input : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat) :
                                                      shorterFirst input = have operand := input.1; have operand := operand.length; have operand_1 := input.2; have operand_2 := operand_1.length; have condition := decide (operand ≤ operand_2); if condition = true then do let result ← append input pure result else have operand := input.2; have operand_3 := input.1; have swapped := (operand, operand_3); do let result ← append swapped pure result

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

                                                      @[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

                                                        The same source execution returns the encoded mathematical result without changing its supplied heap, under the actual input representations.

                                                        @[reducible, inline]

                                                        Signature-preserving positions of this imported source program.

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

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

                                                          Automatic correspondence for the same generated source function, without a machine budget.

                                                          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.

                                                          The finite table of actual named source bodies.

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

                                                            Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

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

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

                                                              Ordinary mathematical function generated from the same represented source block.

                                                              Equations
                                                              • One or more equations did not get rendered due to their size.
                                                              Instances For
                                                                theorem Complexity.Examples.TypedProgram.NativeAppend.Source.boundedLength_eq (input : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat) :
                                                                boundedLength input = have operand := input.1; have operand := operand.length; have operand_1 := input.2; have operand_2 := operand_1.length; do let limit ← Language.Examples.Scalar.Implementation.boundedIncrement operand operand_2 pure limit

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

                                                                @[reducible, inline]

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

                                                                Equations
                                                                Instances For

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

                                                                  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.

                                                                  Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                  @[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.Examples.TypedProgram.NativeAppend.Source.appendInOrder_eq (input : Bool × Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat) :
                                                                    appendInOrder input = have arrays_join := none; have condition := input.1; have __do_jp := fun (arrays_join : Option (Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat)) (y : Unit) => have __do_jp := fun (y : Unit) => throw Language.Fault.missingReturn; match arrays_join with | none => do let y ← pure () __do_jp y | some payload => do let result ← append payload pure result; if condition = true then have operand := input.2; have operand := operand.2; have operand_1 := input.2; have operand_2 := operand_1.1; have arrays_join := some (operand, operand_2); do let y ← pure () __do_jp arrays_join y else have arrays_join := some input.2; do let y ← pure () __do_jp arrays_join y

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

                                                                    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

                                                                      Ordinary mathematical function generated from the same represented source block.

                                                                      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

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

                                                                          @[reducible, inline]

                                                                          Signatures of the functions added by this source declaration.

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

                                                                            Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

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

                                                                              Mathematical reasoning uses the ordinary generated record-valued function.

                                                                              A previously verified pure function is called directly on represented data without another implementation or a caller-written correspondence lemma.

                                                                              Ordinary conditions and tail branches use the same represented call path.

                                                                              Select the native record-valued function through the fixed input interface.

                                                                              Equations
                                                                              • One or more equations did not get rendered due to their size.
                                                                              Instances For
                                                                                theorem Complexity.Examples.TypedProgram.append_correct :
                                                                                append.Correct (fun (x : AppendInput) => True) fun (input : AppendInput) (output : AppendOutput) => output.values = input.left ++ input.right

                                                                                The ordinary mathematical equation and generated source correspondence establish the contract without a private heap or machine adapter.

                                                                                Branches select actual array-valued records before one common append call.

                                                                                The same fixed input and output interfaces apply to a structured branch.

                                                                                Equations
                                                                                • One or more equations did not get rendered due to their size.
                                                                                Instances For
                                                                                  theorem Complexity.Examples.TypedProgram.appendInOrder_correct :
                                                                                  appendInOrder.Correct (fun (x : Bool × AppendInput) => True) fun (input : Bool × AppendInput) (output : AppendOutput) => output.values = if input.1 = true then input.2.right ++ input.2.left else input.2.left ++ input.2.right

                                                                                  Generated branch correspondence supplies the source proof, including the selected record's heap-backed fields and their subsequent use by append.

                                                                                  Two observed arrays and ordinary lookup parameters; the Boolean mask may have a different length from the values array.

                                                                                  Instances For

                                                                                    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]

                                                                                    Signatures of the functions added by this source declaration.

                                                                                    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

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

                                                                                        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

                                                                                          Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                                          @[reducible, inline]

                                                                                          Signature-preserving positions of this imported source program.

                                                                                          Equations
                                                                                          • One or more equations did not get rendered due to their size.
                                                                                          Instances For
                                                                                            theorem Complexity.Examples.TypedProgram.NativeLookup.Source.lookup_contract_iff_triple (pre✝ : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool × ℕ × ℕ → Language.Heap → Prop) (post✝ : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool × ℕ × ℕ → Language.Heap → ℕ → Language.Heap → Prop) :
                                                                                            lookup_contract pre✝ post✝ ↔ ∀ (input : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool × ℕ × ℕ) (initialHeap : Language.Heap), ⦃fun (currentHeap : Language.Heap) => { down := currentHeap = initialHeap ∧ pre✝ input initialHeap }⦄ lookup input ⦃(fun (value : ℕ) (finalHeap : Language.Heap) => { down := post✝ input initialHeap value finalHeap }, fun (x : Language.Fault) (x_1 : Language.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.

                                                                                            Ordinary mathematical function generated from the same represented source block.

                                                                                            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

                                                                                                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]

                                                                                                  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

                                                                                                      Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

                                                                                                      Equations
                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                      Instances For
                                                                                                        theorem Complexity.Examples.TypedProgram.NativeLookup.Source.lookup_eq (input : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool × ℕ × ℕ) :
                                                                                                        lookup input = have operand := input.2; have operand := operand.1; have operand_1 := input.2; have operand_2 := operand_1.2; have operand_3 := operand_2.1; do let enabled ← Language.Buffer.GetD.getBool operand operand_3 false have operand : Language.Buffer Language.CellTy.nat := input.1 have operand_4 : Language.Buffer Language.CellTy.bool × ℕ × ℕ := input.2 have operand_5 : ℕ × ℕ := operand_4.2 have operand_6 : ℕ := operand_5.1 have operand_7 : Language.Buffer Language.CellTy.bool × ℕ × ℕ := input.2 have operand_8 : ℕ × ℕ := operand_7.2 have operand_9 : ℕ := operand_8.2 let selected ← Language.Buffer.GetD.getNat operand operand_6 operand_9 if enabled = true then pure selected else have operand := input.2; have operand := operand.2; pure operand.2

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

                                                                                                        Automatic correspondence for the same generated source function, without a machine budget.

                                                                                                        Defaulted reads use ordinary array mathematics, including missing mask entries and out-of-bounds value indices.

                                                                                                        The fixed interface selects the same two real buffer reads.

                                                                                                        Equations
                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                        Instances For
                                                                                                          theorem Complexity.Examples.TypedProgram.lookup_correct :
                                                                                                          lookup.Correct (fun (x : LookupInput) => True) fun (input : LookupInput) (result : ℕ) => result = if input.enabled.getD input.index false = true then input.values.getD input.index input.fallback else input.fallback

                                                                                                          No index bound or private heap adapter is needed in the mathematical contract. The generated correspondence preserves the first read's heap for the second.

                                                                                                          Pair-valued arrays remain ordinary fields; their fixed layout has two real columns per array, including when an array is empty.

                                                                                                          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]

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

                                                                                                              Equations
                                                                                                              Instances For

                                                                                                                Automatic correspondence for the same generated source function, without a machine budget.

                                                                                                                @[reducible, inline]

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

                                                                                                                Equations
                                                                                                                Instances For

                                                                                                                  Ordinary mathematical function generated from the same represented source block.

                                                                                                                  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

                                                                                                                      Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

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

                                                                                                                        Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                                                                        Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

                                                                                                                        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

                                                                                                                            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.Examples.TypedProgram.NativePairLookup.Source.lookup_eq (input : (Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat) × (Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.bool) × ℕ) :
                                                                                                                              lookup input = have operand := input.1; have operand_1 := input.2; have operand_2 := operand_1.2; have operand_3 := (0, 0); do let selected ← Language.Buffer.Prod.GetD.getNatNat operand operand_2 operand_3 have operand : (Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.bool) × ℕ := input.2 have operand : Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.bool := operand.1 have operand_4 : (Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.bool) × ℕ := input.2 have operand_5 : ℕ := operand_4.2 have operand_6 : Bool × Bool := (false, false) let flags ← Language.Buffer.Prod.GetD.getBoolBool operand operand_5 operand_6 have operand : Bool := flags.1 have boolean : Bool := false have __do_jp : Bool → Unit → ExceptT Language.Fault (StateT Language.Heap Part) ℕ := fun (boolean : Bool) (y : Unit) => if boolean = true then have operand := selected.1; have operand_7 := selected.2; have operand := operand.add operand_7; have operand_8 := input.1; have operand_9 := operand_8.1; have operand_10 := operand_9.length; pure (operand.add operand_10) else pure 0 if operand = true then have boolean := flags.2; do let y ← pure () __do_jp boolean y else have boolean := false; do let y ← pure () __do_jp boolean y

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

                                                                                                                              @[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

                                                                                                                                Ordinary mathematical function generated from the same represented source block.

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

                                                                                                                                  Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                                                                                  @[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

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

                                                                                                                                    Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                                                                                    Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                                                                                    Automatic correspondence for the same generated source function, without a machine budget.

                                                                                                                                    Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                                                                                    theorem Complexity.Examples.TypedProgram.NativePairLookup.Source.natBool_contract_iff_triple (pre✝ : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool → Language.Heap → Prop) (post✝ : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool → Language.Heap → ℕ → Language.Heap → Prop) :
                                                                                                                                    natBool_contract pre✝ post✝ ↔ ∀ (values : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool) (initialHeap : Language.Heap), ⦃fun (currentHeap : Language.Heap) => { down := currentHeap = initialHeap ∧ pre✝ values initialHeap }⦄ natBool values ⦃(fun (value : ℕ) (finalHeap : Language.Heap) => { down := post✝ values initialHeap value finalHeap }, fun (x : Language.Fault) (x_1 : Language.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.

                                                                                                                                    Automatic correspondence for the same generated source function, without a machine budget.

                                                                                                                                    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 actual declared argument environment, constructed from ordinary source parameters. This is proof-side parameter transport, not an additional runtime operation.

                                                                                                                                      Equations
                                                                                                                                      Instances For

                                                                                                                                        Ordinary mathematical function generated from the same represented source block.

                                                                                                                                        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

                                                                                                                                            Automatic correspondence for the same generated source function, without a machine budget.

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

                                                                                                                                            theorem Complexity.Examples.TypedProgram.NativePairLookup.Source.boolNat_eq (values : Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) :
                                                                                                                                            boolNat values = have operand := (false, 0); do let selected ← Language.Buffer.Prod.GetD.getBoolNat values 0 operand have condition : Bool := selected.1 if condition = true then pure selected.2 else pure 0

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

                                                                                                                                            Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

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

                                                                                                                                              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.

                                                                                                                                              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.

                                                                                                                                              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]

                                                                                                                                              The source program's declared first-order signatures.

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

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

                                                                                                                                                Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

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

                                                                                                                                                  Added function bodies already typed against the complete linked table.

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

                                                                                                                                                    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 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.

                                                                                                                                                      @[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

                                                                                                                                                        Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                                                                                                        The finite table of actual named source bodies.

                                                                                                                                                        Equations
                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                        Instances For
                                                                                                                                                          theorem Complexity.Examples.TypedProgram.NativePairLookup.Source.boolNat_contract_iff_triple (pre✝ : Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat → Language.Heap → Prop) (post✝ : Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat → Language.Heap → ℕ → Language.Heap → Prop) :
                                                                                                                                                          boolNat_contract pre✝ post✝ ↔ ∀ (values : Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) (initialHeap : Language.Heap), ⦃fun (currentHeap : Language.Heap) => { down := currentHeap = initialHeap ∧ pre✝ values initialHeap }⦄ boolNat values ⦃(fun (value : ℕ) (finalHeap : Language.Heap) => { down := post✝ values initialHeap value finalHeap }, fun (x : Language.Fault) (x_1 : Language.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]

                                                                                                                                                          Signatures of the functions added by this source declaration.

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

                                                                                                                                                            Signature-preserving positions of this imported source program.

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

                                                                                                                                                              Ordinary mathematical function generated from the same represented source block.

                                                                                                                                                              Equations
                                                                                                                                                              Instances For

                                                                                                                                                                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 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

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

                                                                                                                                                                  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
                                                                                                                                                                      theorem Complexity.Examples.TypedProgram.NativePairLookup.Source.natBool_eq (values : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool) :
                                                                                                                                                                      natBool values = have operand := (0, false); do let selected ← Language.Buffer.Prod.GetD.getNatBool values 0 operand have condition : Bool := selected.2 if condition = true then pure selected.1 else pure 0

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

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

                                                                                                                                                                      Both heap-backed column pairs survive successive reads and record packing.

                                                                                                                                                                      Equations
                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                      Instances For
                                                                                                                                                                        theorem Complexity.Examples.TypedProgram.pairLookup_correct :
                                                                                                                                                                        pairLookup.Correct (fun (x : PairLookupInput) => True) fun (input : PairLookupInput) (result : ℕ) => result = if ((input.flags.getD input.index (false, false)).1 && (input.flags.getD input.index (false, false)).2) = true then (input.values.getD input.index (0, 0)).1 + (input.values.getD input.index (0, 0)).2 + input.values.size else 0

                                                                                                                                                                        The contract mentions only the original ordinary arrays, not their columns.

                                                                                                                                                                        Mixed scalar column kinds use the same fixed input selection.

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

                                                                                                                                                                          Column order is preserved, including when the Boolean column comes first.

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

                                                                                                                                                                            Returned pair arrays are observed from their actual two-column handles.

                                                                                                                                                                            Equations
                                                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                                                            Instances For
                                                                                                                                                                              theorem Complexity.Examples.TypedProgram.retainPairs_correct :
                                                                                                                                                                              retainPairs.Correct (fun (x : Array (ℕ × ℕ)) => True) fun (values result : Array (ℕ × ℕ)) => result = values

                                                                                                                                                                              Returning an input view preserves the complete ordinary array value.

                                                                                                                                                                              Nested mathematical arrays retain separate row boundaries and raw payload. The fallback arrays are ordinary independently preloaded fields.

                                                                                                                                                                              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
                                                                                                                                                                                Instances For
                                                                                                                                                                                  theorem Complexity.Examples.TypedProgram.NativeRaggedLookup.Source.lookup_eq (input : (Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat) × (Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool) × Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool × ℕ × ℕ) :
                                                                                                                                                                                  lookup input = have operand := input.1; have operand_1 := input.2; have operand_2 := operand_1.2; have operand_3 := operand_2.2; have operand_4 := operand_3.2; have operand_5 := operand_4.1; have operand_6 := input.2; have operand_7 := operand_6.2; have operand_8 := operand_7.1; do let row ← Language.Buffer.Ragged.GetD.getNat operand operand_5 operand_8 have operand : (Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool) × Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool × ℕ × ℕ := input.2 have operand : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool := operand.1 have operand_9 : (Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool) × Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool × ℕ × ℕ := input.2 have operand_10 : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool × ℕ × ℕ := operand_9.2 have operand_11 : Language.Buffer Language.CellTy.bool × ℕ × ℕ := operand_10.2 have operand_12 : ℕ × ℕ := operand_11.2 have operand_13 : ℕ := operand_12.1 have operand_14 : (Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool) × Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool × ℕ × ℕ := input.2 have operand_15 : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool × ℕ × ℕ := operand_14.2 have operand_16 : Language.Buffer Language.CellTy.bool × ℕ × ℕ := operand_15.2 have operand_17 : Language.Buffer Language.CellTy.bool := operand_16.1 let flags ← Language.Buffer.Ragged.GetD.getBool operand operand_13 operand_17 have operand : (Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool) × Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool × ℕ × ℕ := input.2 have operand : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool × ℕ × ℕ := operand.2 have operand : Language.Buffer Language.CellTy.bool × ℕ × ℕ := operand.2 have operand : ℕ × ℕ := operand.2 have operand : ℕ := operand.2 let enabled ← Language.Buffer.GetD.getBool flags operand false have operand : (Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool) × Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool × ℕ × ℕ := input.2 have operand : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool × ℕ × ℕ := operand.2 have operand : Language.Buffer Language.CellTy.bool × ℕ × ℕ := operand.2 have operand : ℕ × ℕ := operand.2 have operand : ℕ := operand.2 let result ← Language.Buffer.GetD.getNat row operand 0 if enabled = true then have operand := input.1; have operand := operand.1; have operand := operand.length; have operand := operand.sub 1; have operand := result.add operand; have operand_18 := row.length; pure (operand.add operand_18) else pure 0

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

                                                                                                                                                                                  @[reducible, inline]

                                                                                                                                                                                  Signature-preserving positions of this imported source program.

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

                                                                                                                                                                                    Signatures of the functions added by this source declaration.

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

                                                                                                                                                                                      Automatic correspondence for the same generated source function, without a machine budget.

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

                                                                                                                                                                                      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

                                                                                                                                                                                        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.

                                                                                                                                                                                        Added function bodies already typed against the complete linked table.

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

                                                                                                                                                                                          Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

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

                                                                                                                                                                                          Ordinary mathematical function generated from the same represented source block.

                                                                                                                                                                                          Equations
                                                                                                                                                                                          Instances For

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

                                                                                                                                                                                            @[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

                                                                                                                                                                                              The finite table of actual named source bodies.

                                                                                                                                                                                              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

                                                                                                                                                                                                  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 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

                                                                                                                                                                                                    Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

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

                                                                                                                                                                                                      Automatic correspondence for the same generated source function, without a machine budget.

                                                                                                                                                                                                      @[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

                                                                                                                                                                                                        Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                                                                                                                                                        @[reducible, inline]

                                                                                                                                                                                                        Signature-preserving positions of this imported source program.

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

                                                                                                                                                                                                          Ordinary mathematical function generated from the same represented source block.

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

                                                                                                                                                                                                            Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

                                                                                                                                                                                                            Equations
                                                                                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                              theorem Complexity.Examples.TypedProgram.NativeRaggedLookup.Source.lookup_spec {pre✝ : Language.Env [((Language.Ty.buffer Language.CellTy.nat).prod (Language.Ty.buffer Language.CellTy.nat)).prod (((Language.Ty.buffer Language.CellTy.nat).prod (Language.Ty.buffer Language.CellTy.bool)).prod ((Language.Ty.buffer Language.CellTy.nat).prod ((Language.Ty.buffer Language.CellTy.bool).prod (Language.Ty.nat.prod Language.Ty.nat))))] → Language.Heap → Prop} {post✝ : Language.Env [((Language.Ty.buffer Language.CellTy.nat).prod (Language.Ty.buffer Language.CellTy.nat)).prod (((Language.Ty.buffer Language.CellTy.nat).prod (Language.Ty.buffer Language.CellTy.bool)).prod ((Language.Ty.buffer Language.CellTy.nat).prod ((Language.Ty.buffer Language.CellTy.bool).prod (Language.Ty.nat.prod Language.Ty.nat))))] → Language.Heap → ℕ → Language.Heap → Prop} :

                                                                                                                                                                                                              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.

                                                                                                                                                                                                              Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                                                                                                                                                              Row selection followed by cell access uses the same typed program boundary.

                                                                                                                                                                                                              Equations
                                                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                theorem Complexity.Examples.TypedProgram.raggedLookup_correct :
                                                                                                                                                                                                                raggedLookup.Correct (fun (x : RaggedLookupInput) => True) fun (input : RaggedLookupInput) (result : ℕ) => result = if (input.flags.getD input.row input.fallbackFlags).getD input.column false = true then (input.values.getD input.row input.fallback).getD input.column 0 + input.values.size + (input.values.getD input.row input.fallback).size else 0

                                                                                                                                                                                                                Correctness states ordinary nested-array access, with no storage descriptors.

                                                                                                                                                                                                                Nested outputs observe the actual returned boundary and payload buffers.

                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                  theorem Complexity.Examples.TypedProgram.retainRows_correct :
                                                                                                                                                                                                                  retainRows.Correct (fun (x : Array (Array ℕ)) => True) fun (rows result : Array (Array ℕ)) => result = rows

                                                                                                                                                                                                                  A nominal scalar-pair element, not a user-written storage encoding.

                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                    theorem Complexity.Examples.TypedProgram.RecordAllocation.Operations.arrayRead0.getD_total_iff (pre✝ : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool → ℕ → ℕ × Bool → Language.Heap → Prop) (post✝ : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool → ℕ → ℕ × Bool → Language.Heap → ℕ × Bool → Language.Heap → Prop) :
                                                                                                                                                                                                                    getD_contract pre✝ post✝ ↔ ∀ (storage : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool) (index : ℕ) (defaultView : ℕ × Bool) (initialHeap : Language.Heap), pre✝ storage index defaultView initialHeap → ∃ (value : ℕ × Bool) (finalHeap : Language.Heap), getD storage index defaultView initialHeap = Part.some (Except.ok value, finalHeap) ∧ post✝ storage index defaultView 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.Examples.TypedProgram.RecordAllocation.Operations.arrayRead0.getD_contract_iff_triple (pre✝ : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool → ℕ → ℕ × Bool → Language.Heap → Prop) (post✝ : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool → ℕ → ℕ × Bool → Language.Heap → ℕ × Bool → Language.Heap → Prop) :
                                                                                                                                                                                                                    getD_contract pre✝ post✝ ↔ ∀ (storage : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool) (index : ℕ) (defaultView : ℕ × Bool) (initialHeap : Language.Heap), ⦃fun (currentHeap : Language.Heap) => { down := currentHeap = initialHeap ∧ pre✝ storage index defaultView initialHeap }⦄ getD storage index defaultView ⦃(fun (value : ℕ × Bool) (finalHeap : Language.Heap) => { down := post✝ storage index defaultView initialHeap value finalHeap }, fun (x : Language.Fault) (x_1 : Language.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 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

                                                                                                                                                                                                                        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

                                                                                                                                                                                                                          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]

                                                                                                                                                                                                                          Signatures of the functions added by this source declaration.

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

                                                                                                                                                                                                                            Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                              theorem Complexity.Examples.TypedProgram.RecordAllocation.replicate_total_iff (pre✝ : ℕ × ℕ × Bool → Language.Heap → Prop) (post✝ : ℕ × ℕ × Bool → Language.Heap → Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool → Language.Heap → Prop) :
                                                                                                                                                                                                                              replicate_contract pre✝ post✝ ↔ ∀ (input : ℕ × ℕ × Bool) (initialHeap : Language.Heap), pre✝ input initialHeap → ∃ (value : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool) (finalHeap : Language.Heap), replicate input initialHeap = Part.some (Except.ok value, finalHeap) ∧ post✝ input 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 complete signature tables retained from imported source programs.

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

                                                                                                                                                                                                                                Ordinary mathematical function generated from the same represented source block.

                                                                                                                                                                                                                                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
                                                                                                                                                                                                                                    @[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
                                                                                                                                                                                                                                        @[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]

                                                                                                                                                                                                                                          The source program's declared first-order signatures.

                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                            theorem Complexity.Examples.TypedProgram.RecordAllocation.Operations.arrayRead0.getD_eq (storage : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool) (index : ℕ) (defaultView : ℕ × Bool) :
                                                                                                                                                                                                                                            getD storage index defaultView = have columnL := storage.1; have defaultL := defaultView.1; do let valueL ← Language.Buffer.GetD.getNat columnL index defaultL have columnR : Language.Buffer Language.CellTy.bool := storage.2 have defaultR : Bool := defaultView.2 let valueR ← Language.Buffer.GetD.getBool columnR index defaultR pure (valueL, valueR)

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

                                                                                                                                                                                                                                            Actual imported function bodies with their internal calls relocated.

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

                                                                                                                                                                                                                                              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.Examples.TypedProgram.RecordAllocation.emptyLookup_action_rel_native (index : ℕ) (initialHeap✝ : Language.Heap) :
                                                                                                                                                                                                                                              ∃ (returned : Language.Value Language.Ty.nat) (finish : Language.Heap), emptyLookup index initialHeap✝ = Part.some (Except.ok returned, finish) ∧ (Language.Representation.ofEmbedding (Function.Embedding.refl ℕ)).Rel (emptyLookup_model index) returned finish ∧ (fun (finish : Language.Heap) => initialHeap✝.ShapeExtends finish) finish

                                                                                                                                                                                                                                              Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

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

                                                                                                                                                                                                                                              @[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

                                                                                                                                                                                                                                                The finite table of actual named source bodies.

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

                                                                                                                                                                                                                                                  Added function bodies already typed against the complete linked table.

                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                    theorem Complexity.Examples.TypedProgram.RecordAllocation.emptyLookup_total_iff (pre✝ : ℕ → Language.Heap → Prop) (post✝ : ℕ → Language.Heap → ℕ → Language.Heap → Prop) :
                                                                                                                                                                                                                                                    emptyLookup_contract pre✝ post✝ ↔ ∀ (index : ℕ) (initialHeap : Language.Heap), pre✝ index initialHeap → ∃ (value : ℕ) (finalHeap : Language.Heap), emptyLookup index initialHeap = Part.some (Except.ok value, finalHeap) ∧ post✝ index 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]

                                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                                      Automatic correspondence for the same generated source function, without a machine budget.

                                                                                                                                                                                                                                                      theorem Complexity.Examples.TypedProgram.RecordAllocation.emptyLookup_action_rel_native_preserving (index : ℕ) (initialHeap✝ : Language.Heap) :
                                                                                                                                                                                                                                                      ∃ (returned : Language.Value Language.Ty.nat) (finish : Language.Heap), emptyLookup index initialHeap✝ = Part.some (Except.ok returned, finish) ∧ (Language.Representation.ofEmbedding (Function.Embedding.refl ℕ)).Rel (emptyLookup_model index) returned finish ∧ (fun (finish : Language.Heap) => initialHeap✝.ShapeExtends finish ∧ Language.Buffer.PreservesContents initialHeap✝ finish) finish

                                                                                                                                                                                                                                                      Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                                                                                                                                                                                                      @[reducible, inline]

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

                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                        @[reducible, inline]

                                                                                                                                                                                                                                                        Signature-preserving positions of this imported source program.

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

                                                                                                                                                                                                                                                          Signatures of the functions added by this source declaration.

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

                                                                                                                                                                                                                                                            The finite table of actual named source bodies.

                                                                                                                                                                                                                                                            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
                                                                                                                                                                                                                                                                theorem Complexity.Examples.TypedProgram.RecordAllocation.emptyLookup_spec {pre✝ : Language.Env [Language.Ty.nat] → Language.Heap → Prop} {post✝ : Language.Env [Language.Ty.nat] → Language.Heap → ℕ → Language.Heap → Prop} :
                                                                                                                                                                                                                                                                Language.FunctionTotal program emptyLookupId pre✝ post✝ → ∀ (index : ℕ) (continuation : Std.Do.PostCond ℕ (Std.Do.PostShape.except Language.Fault (Std.Do.PostShape.arg Language.Heap Std.Do.PostShape.pure))), ⦃fun (initialHeap : Language.Heap) => { down := pre✝ (Language.Env.cons index Language.Env.empty) initialHeap ∧ ∀ (value : ℕ) (finalHeap : Language.Heap), post✝ (Language.Env.cons index Language.Env.empty) initialHeap value finalHeap → (continuation.1 value finalHeap).down }⦄ emptyLookup index ⦃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.Examples.TypedProgram.RecordAllocation.emptyLookup_eq (index : ℕ) :
                                                                                                                                                                                                                                                                emptyLookup index = have operand := (7, true); do let values ← Language.Buffer.Prod.Replicate.replicateNatBool 0 operand have operand : ℕ × Bool := (11, false) let selected ← Operations.arrayRead0.getD values index operand pure selected.1

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

                                                                                                                                                                                                                                                                The named function's actual independently interpreted source body.

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

                                                                                                                                                                                                                                                                  Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

                                                                                                                                                                                                                                                                  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.Examples.TypedProgram.RecordAllocation.replicate_contract_iff_triple (pre✝ : ℕ × ℕ × Bool → Language.Heap → Prop) (post✝ : ℕ × ℕ × Bool → Language.Heap → Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool → Language.Heap → Prop) :
                                                                                                                                                                                                                                                                    replicate_contract pre✝ post✝ ↔ ∀ (input : ℕ × ℕ × Bool) (initialHeap : Language.Heap), ⦃fun (currentHeap : Language.Heap) => { down := currentHeap = initialHeap ∧ pre✝ input initialHeap }⦄ replicate input ⦃(fun (value : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool) (finalHeap : Language.Heap) => { down := post✝ input initialHeap value finalHeap }, fun (x : Language.Fault) (x_1 : Language.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.

                                                                                                                                                                                                                                                                    Ordinary mathematical function generated from the same represented source block.

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

                                                                                                                                                                                                                                                                      Signature-preserving positions of this imported source program.

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

                                                                                                                                                                                                                                                                        Signature-preserving positions of this imported source program.

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

                                                                                                                                                                                                                                                                          Automatic correspondence for the same generated source function, without a machine budget.

                                                                                                                                                                                                                                                                          theorem Complexity.Examples.TypedProgram.RecordAllocation.replicate_eq (input : ℕ × ℕ × Bool) :
                                                                                                                                                                                                                                                                          replicate input = have operand := input.1; have operand_1 := input.2; do let sourceResult ← Language.Buffer.Prod.Replicate.replicateNatBool operand operand_1 pure sourceResult

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

                                                                                                                                                                                                                                                                          @[reducible, inline]

                                                                                                                                                                                                                                                                          Signature-preserving positions of this imported source program.

                                                                                                                                                                                                                                                                          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
                                                                                                                                                                                                                                                                              theorem Complexity.Examples.TypedProgram.RecordAllocation.emptyLookup_contract_iff_triple (pre✝ : ℕ → Language.Heap → Prop) (post✝ : ℕ → Language.Heap → ℕ → Language.Heap → Prop) :
                                                                                                                                                                                                                                                                              emptyLookup_contract pre✝ post✝ ↔ ∀ (index : ℕ) (initialHeap : Language.Heap), ⦃fun (currentHeap : Language.Heap) => { down := currentHeap = initialHeap ∧ pre✝ index initialHeap }⦄ emptyLookup index ⦃(fun (value : ℕ) (finalHeap : Language.Heap) => { down := post✝ index initialHeap value finalHeap }, fun (x : Language.Fault) (x_1 : Language.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

                                                                                                                                                                                                                                                                                Added function bodies already typed against the complete linked table.

                                                                                                                                                                                                                                                                                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
                                                                                                                                                                                                                                                                                  Instances For

                                                                                                                                                                                                                                                                                    The real initialized pair allocator retains the ordinary record-array result.

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

                                                                                                                                                                                                                                                                                      Empty construction and lookup need no extra fallback-array input.

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

                                                                                                                                                                                                                                                                                        An ordinary record element with a scalar and an array field.

                                                                                                                                                                                                                                                                                        Instances For

                                                                                                                                                                                                                                                                                          The default is a genuine represented record, including its backing array.

                                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                                            @[reducible, inline]

                                                                                                                                                                                                                                                                                            Signature-preserving positions of this imported source program.

                                                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                                                                                              theorem Complexity.Examples.TypedProgram.RecordLookup.Operations.arrayRead0.getD_spec {pre✝ : Language.Env [(Language.Ty.buffer Language.CellTy.nat).prod ((Language.Ty.buffer Language.CellTy.nat).prod (Language.Ty.buffer Language.CellTy.nat)), Language.Ty.nat, Language.Ty.nat.prod (Language.Ty.buffer Language.CellTy.nat)] → Language.Heap → Prop} {post✝ : Language.Env [(Language.Ty.buffer Language.CellTy.nat).prod ((Language.Ty.buffer Language.CellTy.nat).prod (Language.Ty.buffer Language.CellTy.nat)), Language.Ty.nat, Language.Ty.nat.prod (Language.Ty.buffer Language.CellTy.nat)] → Language.Heap → ℕ × Language.Buffer Language.CellTy.nat → Language.Heap → Prop} :
                                                                                                                                                                                                                                                                                              Language.FunctionTotal program getDId pre✝ post✝ → ∀ (storage : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat) (index : ℕ) (defaultView : ℕ × Language.Buffer Language.CellTy.nat) (continuation : Std.Do.PostCond (ℕ × Language.Buffer Language.CellTy.nat) (Std.Do.PostShape.except Language.Fault (Std.Do.PostShape.arg Language.Heap Std.Do.PostShape.pure))), ⦃fun (initialHeap : Language.Heap) => { down := pre✝ (Language.Env.cons storage (Language.Env.cons index (Language.Env.cons defaultView Language.Env.empty))) initialHeap ∧ ∀ (value : ℕ × Language.Buffer Language.CellTy.nat) (finalHeap : Language.Heap), post✝ (Language.Env.cons storage (Language.Env.cons index (Language.Env.cons defaultView Language.Env.empty))) initialHeap value finalHeap → (continuation.1 value finalHeap).down }⦄ getD storage index defaultView ⦃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.

                                                                                                                                                                                                                                                                                              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

                                                                                                                                                                                                                                                                                                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
                                                                                                                                                                                                                                                                                                  @[reducible, inline]

                                                                                                                                                                                                                                                                                                  Signature-preserving positions of this imported source program.

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

                                                                                                                                                                                                                                                                                                    Signatures of the functions added by this source declaration.

                                                                                                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                    Instances For
                                                                                                                                                                                                                                                                                                      theorem Complexity.Examples.TypedProgram.RecordLookup.Operations.arrayRead0.getD_eq (storage : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat) (index : ℕ) (defaultView : ℕ × Language.Buffer Language.CellTy.nat) :
                                                                                                                                                                                                                                                                                                      getD storage index defaultView = have columnL := storage.1; have defaultL := defaultView.1; do let valueL ← Language.Buffer.GetD.getNat columnL index defaultL have columnR : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat := storage.2 have defaultR : Language.Buffer Language.CellTy.nat := defaultView.2 let valueR ← Language.Buffer.Ragged.GetD.getNat columnR index defaultR pure (valueL, valueR)

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

                                                                                                                                                                                                                                                                                                      Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

                                                                                                                                                                                                                                                                                                      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 finite table of actual named source bodies.

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

                                                                                                                                                                                                                                                                                                            Signature-preserving positions of this imported source program.

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

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

                                                                                                                                                                                                                                                                                                              @[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

                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                  Ordinary mathematical function generated from the same represented source block.

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

                                                                                                                                                                                                                                                                                                                    Added function bodies already typed against the complete linked table.

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

                                                                                                                                                                                                                                                                                                                      The finite table of actual named source bodies.

                                                                                                                                                                                                                                                                                                                      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]

                                                                                                                                                                                                                                                                                                                          Signatures of the functions added by this source declaration.

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

                                                                                                                                                                                                                                                                                                                            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.

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

                                                                                                                                                                                                                                                                                                                            theorem Complexity.Examples.TypedProgram.RecordLookup.lookup_eq (input : (Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat) × (ℕ × Language.Buffer Language.CellTy.nat) × ℕ) :
                                                                                                                                                                                                                                                                                                                            lookup input = have operand := input.1; have operand_1 := input.2; have operand_2 := operand_1.2; have operand_3 := input.2; have operand_4 := operand_3.1; do let selected ← Operations.arrayRead0.getD operand operand_2 operand_4 have operand : Language.Buffer Language.CellTy.nat := selected.2 let first ← Language.Buffer.GetD.getNat operand 0 0 have operand : ℕ := selected.1 have operand : ℕ := operand.add first have operand_5 : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat := input.1 have operand_6 : Language.Buffer Language.CellTy.nat := operand_5.1 have operand_7 : ℕ := operand_6.length pure (operand.add operand_7)

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

                                                                                                                                                                                                                                                                                                                            Automatic correspondence for the same generated source function, without a machine budget.

                                                                                                                                                                                                                                                                                                                            @[reducible, inline]

                                                                                                                                                                                                                                                                                                                            Signature-preserving positions of this imported source program.

                                                                                                                                                                                                                                                                                                                            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

                                                                                                                                                                                                                                                                                                                                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.

                                                                                                                                                                                                                                                                                                                                Record-array reading reuses the same fixed program input, not a task codec.

                                                                                                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                                                                                                                                  theorem Complexity.Examples.TypedProgram.recordLookup_correct :
                                                                                                                                                                                                                                                                                                                                  recordLookup.Correct (fun (x : ReadingInput) => True) fun (input : ReadingInput) (result : ℕ) => result = (input.readings.getD input.index input.fallback).tag + (input.readings.getD input.index input.fallback).values.getD 0 0 + input.readings.size

                                                                                                                                                                                                                                                                                                                                  The statement retains ordinary record selection and nested array lookup.

                                                                                                                                                                                                                                                                                                                                  Unequal-length interval rows retain their shared boundaries and pair columns.

                                                                                                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                                                                                                    @[reducible, inline]

                                                                                                                                                                                                                                                                                                                                    Signatures of the functions added by this source declaration.

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

                                                                                                                                                                                                                                                                                                                                      The finite table of actual named source bodies.

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

                                                                                                                                                                                                                                                                                                                                        Signature-preserving positions of this imported source program.

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

                                                                                                                                                                                                                                                                                                                                          Signature-preserving positions of this imported source program.

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

                                                                                                                                                                                                                                                                                                                                            Signature-preserving positions of this imported source program.

                                                                                                                                                                                                                                                                                                                                            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
                                                                                                                                                                                                                                                                                                                                                theorem Complexity.Examples.TypedProgram.IntervalLookup.Operations.arrayRead0.getD_eq (storage : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat) (index : ℕ) (defaultView : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat) :
                                                                                                                                                                                                                                                                                                                                                getD storage index defaultView = have operand := storage.1; have operand_1 := storage.2; have operand_2 := operand_1.1; have columnL := (operand, operand_2); have defaultL := defaultView.1; do let valueL ← Language.Buffer.Ragged.GetD.getNat columnL index defaultL have operand : Language.Buffer Language.CellTy.nat := storage.1 have operand_3 : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat := storage.2 have operand_4 : Language.Buffer Language.CellTy.nat := operand_3.2 have columnR : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat := (operand, operand_4) have defaultR : Language.Buffer Language.CellTy.nat := defaultView.2 let valueR ← Language.Buffer.Ragged.GetD.getNat columnR index defaultR pure (valueL, valueR)

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

                                                                                                                                                                                                                                                                                                                                                @[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
                                                                                                                                                                                                                                                                                                                                                  theorem Complexity.Examples.TypedProgram.IntervalLookup.width_eq (input : (Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat) × (Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat) × ℕ × ℕ) :
                                                                                                                                                                                                                                                                                                                                                  width input = have operand := input.1; have operand_1 := input.2; have operand_2 := operand_1.2; have operand_3 := operand_2.1; have operand_4 := input.2; have operand_5 := operand_4.1; do let intervals ← Operations.arrayRead0.getD operand operand_3 operand_5 have operand : (Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat) × ℕ × ℕ := input.2 have operand : ℕ × ℕ := operand.2 have operand : ℕ := operand.2 have operand_6 : ℕ × ℕ := (0, 0) let interval ← Language.Buffer.Prod.GetD.getNatNat intervals operand operand_6 have operand : ℕ := interval.2 have operand_7 : ℕ := interval.1 have operand : ℕ := operand.sub operand_7 have operand_8 : Language.Buffer Language.CellTy.nat := intervals.1 have operand_9 : ℕ := operand_8.length have operand : ℕ := operand.add operand_9 have operand_10 : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat := input.1 have operand_11 : Language.Buffer Language.CellTy.nat := operand_10.1 have operand_12 : ℕ := operand_11.length have operand_13 : ℕ := operand_12.sub 1 pure (operand.add operand_13)

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

                                                                                                                                                                                                                                                                                                                                                  Added function bodies already typed against the complete linked table.

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

                                                                                                                                                                                                                                                                                                                                                    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 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

                                                                                                                                                                                                                                                                                                                                                      Automatic correspondence for the same generated source function, without a machine budget.

                                                                                                                                                                                                                                                                                                                                                      @[reducible, inline]

                                                                                                                                                                                                                                                                                                                                                      The complete signature tables retained from imported source programs.

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

                                                                                                                                                                                                                                                                                                                                                        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.

                                                                                                                                                                                                                                                                                                                                                        theorem Complexity.Examples.TypedProgram.IntervalLookup.Operations.arrayRead0.getD_spec {pre✝ : Language.Env [(Language.Ty.buffer Language.CellTy.nat).prod ((Language.Ty.buffer Language.CellTy.nat).prod (Language.Ty.buffer Language.CellTy.nat)), Language.Ty.nat, (Language.Ty.buffer Language.CellTy.nat).prod (Language.Ty.buffer Language.CellTy.nat)] → Language.Heap → Prop} {post✝ : Language.Env [(Language.Ty.buffer Language.CellTy.nat).prod ((Language.Ty.buffer Language.CellTy.nat).prod (Language.Ty.buffer Language.CellTy.nat)), Language.Ty.nat, (Language.Ty.buffer Language.CellTy.nat).prod (Language.Ty.buffer Language.CellTy.nat)] → Language.Heap → Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat → Language.Heap → Prop} :

                                                                                                                                                                                                                                                                                                                                                        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.

                                                                                                                                                                                                                                                                                                                                                        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]

                                                                                                                                                                                                                                                                                                                                                          Signature-preserving positions of this imported source program.

                                                                                                                                                                                                                                                                                                                                                          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]

                                                                                                                                                                                                                                                                                                                                                              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

                                                                                                                                                                                                                                                                                                                                                                Ordinary mathematical function generated from the same represented source block.

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

                                                                                                                                                                                                                                                                                                                                                                  The finite table of actual named source bodies.

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

                                                                                                                                                                                                                                                                                                                                                                    Signatures of the functions added by this source declaration.

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

                                                                                                                                                                                                                                                                                                                                                                      Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

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

                                                                                                                                                                                                                                                                                                                                                                        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.

                                                                                                                                                                                                                                                                                                                                                                        Ordinary nested array lookup uses real row slices and scalar column reads.

                                                                                                                                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                                                                                                                                                                                          theorem Complexity.Examples.TypedProgram.intervalWidth_correct :
                                                                                                                                                                                                                                                                                                                                                                          intervalWidth.Correct (fun (x : IntervalRows) => True) fun (input : IntervalRows) (result : ℕ) => have intervals := input.rows.getD input.row input.fallback; have interval := intervals.getD input.column (0, 0); result = interval.2 - interval.1 + intervals.size + input.rows.size

                                                                                                                                                                                                                                                                                                                                                                          Signed values keep their native meaning at the fixed input boundary.

                                                                                                                                                                                                                                                                                                                                                                          Instances For

                                                                                                                                                                                                                                                                                                                                                                            Ordinary mathematical function generated from the same represented source block.

                                                                                                                                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                                                                                                                                            Instances For

                                                                                                                                                                                                                                                                                                                                                                              Automatic correspondence for the same generated source function, without a machine budget.

                                                                                                                                                                                                                                                                                                                                                                              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]

                                                                                                                                                                                                                                                                                                                                                                              Signature-preserving positions of this imported source program.

                                                                                                                                                                                                                                                                                                                                                                              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

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

                                                                                                                                                                                                                                                                                                                                                                                  Added function bodies already typed against the complete linked table.

                                                                                                                                                                                                                                                                                                                                                                                  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

                                                                                                                                                                                                                                                                                                                                                                                      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]

                                                                                                                                                                                                                                                                                                                                                                                        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]

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

                                                                                                                                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                                                                                                                                            theorem Complexity.Examples.TypedProgram.SignedArrays.replicate_contract_iff_triple (pre✝ : Bool × ℕ → Language.Heap → Prop) (post✝ : Bool × ℕ → Language.Heap → Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat → Language.Heap → Prop) :
                                                                                                                                                                                                                                                                                                                                                                                            replicate_contract pre✝ post✝ ↔ ∀ (value : Bool × ℕ) (initialHeap : Language.Heap), ⦃fun (currentHeap : Language.Heap) => { down := currentHeap = initialHeap ∧ pre✝ value initialHeap }⦄ replicate value ⦃(fun (value_1 : Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) (finalHeap : Language.Heap) => { down := post✝ value initialHeap value_1 finalHeap }, fun (x : Language.Fault) (x_1 : Language.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

                                                                                                                                                                                                                                                                                                                                                                                              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 independently interpreted source body.

                                                                                                                                                                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                                                                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                                                                                                                                                                                                  theorem Complexity.Examples.TypedProgram.SignedArrays.missing_total_iff (pre✝ : ℕ → Language.Heap → Prop) (post✝ : ℕ → Language.Heap → Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat → Language.Heap → Prop) :
                                                                                                                                                                                                                                                                                                                                                                                                  missing_contract pre✝ post✝ ↔ ∀ (length : ℕ) (initialHeap : Language.Heap), pre✝ length initialHeap → ∃ (value : Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) (finalHeap : Language.Heap), missing length initialHeap = Part.some (Except.ok value, finalHeap) ∧ post✝ length initialHeap value finalHeap

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

                                                                                                                                                                                                                                                                                                                                                                                                  Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

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

                                                                                                                                                                                                                                                                                                                                                                                                    Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

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

                                                                                                                                                                                                                                                                                                                                                                                                      Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                                                                                                                                                                                                                                                                                                                                                      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.

                                                                                                                                                                                                                                                                                                                                                                                                      Ordinary mathematical function generated from the same represented source block.

                                                                                                                                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                                                                                                                                                        @[reducible, inline]

                                                                                                                                                                                                                                                                                                                                                                                                        Signature-preserving positions of this imported source program.

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

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

                                                                                                                                                                                                                                                                                                                                                                                                          theorem Complexity.Examples.TypedProgram.SignedArrays.lookup_contract_iff_triple (pre✝ : (Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) × (Bool × ℕ) × ℕ → Language.Heap → Prop) (post✝ : (Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) × (Bool × ℕ) × ℕ → Language.Heap → Bool × ℕ → Language.Heap → Prop) :
                                                                                                                                                                                                                                                                                                                                                                                                          lookup_contract pre✝ post✝ ↔ ∀ (input : (Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) × (Bool × ℕ) × ℕ) (initialHeap : Language.Heap), ⦃fun (currentHeap : Language.Heap) => { down := currentHeap = initialHeap ∧ pre✝ input initialHeap }⦄ lookup input ⦃(fun (value : Bool × ℕ) (finalHeap : Language.Heap) => { down := post✝ input initialHeap value finalHeap }, fun (x : Language.Fault) (x_1 : Language.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.

                                                                                                                                                                                                                                                                                                                                                                                                          Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

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

                                                                                                                                                                                                                                                                                                                                                                                                            Ordinary mathematical function generated from the same represented source block.

                                                                                                                                                                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                                                                                                                                                                                                              theorem Complexity.Examples.TypedProgram.SignedArrays.missing_eq (length : ℕ) :
                                                                                                                                                                                                                                                                                                                                                                                                              missing length = have operand := (true, 0); do let sourceResult ← Language.Buffer.Prod.Replicate.replicateBoolNat length operand pure sourceResult

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

                                                                                                                                                                                                                                                                                                                                                                                                              @[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]

                                                                                                                                                                                                                                                                                                                                                                                                                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.Examples.TypedProgram.SignedArrays.replicate_total_iff (pre✝ : Bool × ℕ → Language.Heap → Prop) (post✝ : Bool × ℕ → Language.Heap → Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat → Language.Heap → Prop) :
                                                                                                                                                                                                                                                                                                                                                                                                                  replicate_contract pre✝ post✝ ↔ ∀ (value : Bool × ℕ) (initialHeap : Language.Heap), pre✝ value initialHeap → ∃ (value_1 : Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) (finalHeap : Language.Heap), replicate value initialHeap = Part.some (Except.ok value_1, finalHeap) ∧ post✝ value initialHeap value_1 finalHeap

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

                                                                                                                                                                                                                                                                                                                                                                                                                  theorem Complexity.Examples.TypedProgram.SignedArrays.lookup_eq (input : (Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) × (Bool × ℕ) × ℕ) :
                                                                                                                                                                                                                                                                                                                                                                                                                  lookup input = have operand := input.1; have operand_1 := input.2; have operand_2 := operand_1.2; have operand_3 := input.2; have operand_4 := operand_3.1; do let sourceResult ← Language.Buffer.Prod.GetD.getBoolNat operand operand_2 operand_4 pure sourceResult

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

                                                                                                                                                                                                                                                                                                                                                                                                                  Automatic correspondence for the same generated source function, without a machine budget.

                                                                                                                                                                                                                                                                                                                                                                                                                  The named function's actual independently interpreted source body.

                                                                                                                                                                                                                                                                                                                                                                                                                  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

                                                                                                                                                                                                                                                                                                                                                                                                                      The named function's actual independently interpreted source body.

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

                                                                                                                                                                                                                                                                                                                                                                                                                        Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                                                                                                                                                                                                                                                                                                                                                                        theorem Complexity.Examples.TypedProgram.SignedArrays.missing_contract_iff_triple (pre✝ : ℕ → Language.Heap → Prop) (post✝ : ℕ → Language.Heap → Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat → Language.Heap → Prop) :
                                                                                                                                                                                                                                                                                                                                                                                                                        missing_contract pre✝ post✝ ↔ ∀ (length : ℕ) (initialHeap : Language.Heap), ⦃fun (currentHeap : Language.Heap) => { down := currentHeap = initialHeap ∧ pre✝ length initialHeap }⦄ missing length ⦃(fun (value : Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) (finalHeap : Language.Heap) => { down := post✝ length initialHeap value finalHeap }, fun (x : Language.Fault) (x_1 : Language.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
                                                                                                                                                                                                                                                                                                                                                                                                                        Instances For

                                                                                                                                                                                                                                                                                                                                                                                                                          Automatic correspondence for the same generated source function, without a machine budget.

                                                                                                                                                                                                                                                                                                                                                                                                                          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.

                                                                                                                                                                                                                                                                                                                                                                                                                          Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                                                                                                                                                                                                                                                                                                                                                                          @[reducible, inline]

                                                                                                                                                                                                                                                                                                                                                                                                                          Signatures of the functions added by this source declaration.

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

                                                                                                                                                                                                                                                                                                                                                                                                                            Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                                                                                                                                                                                                                                                                                                                                                                            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.

                                                                                                                                                                                                                                                                                                                                                                                                                            @[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

                                                                                                                                                                                                                                                                                                                                                                                                                              A signed default is an ordinary integer, including when the array is empty.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                Scalar packing and actual initialized columns share one integer observation.

                                                                                                                                                                                                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                                                                                                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                                                                                                                                                                                                                                  theorem Complexity.Examples.TypedProgram.repeatInt_correct :
                                                                                                                                                                                                                                                                                                                                                                                                                                  repeatInt.Correct (fun (x : ℤ) => True) fun (value : ℤ) (result : Array ℤ) => result = Array.replicate 2 value

                                                                                                                                                                                                                                                                                                                                                                                                                                  Negative literals initialize actual columns, rather than encoding an absent result.

                                                                                                                                                                                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                                                                                                                                                                                                    theorem Complexity.Examples.TypedProgram.missingInts_correct :
                                                                                                                                                                                                                                                                                                                                                                                                                                    missingInts.Correct (fun (x : ℕ) => True) fun (length : ℕ) (result : Array ℤ) => result = Array.replicate length (-1)
                                                                                                                                                                                                                                                                                                                                                                                                                                    theorem Complexity.Examples.TypedProgram.missingInts_correctVector :
                                                                                                                                                                                                                                                                                                                                                                                                                                    missingInts.CorrectVector (fun (x : ℕ) => True) id fun (length : ℕ) (result : Vector ℤ (id length)) => result = Vector.replicate length (-1)

                                                                                                                                                                                                                                                                                                                                                                                                                                    The existing source proof command also checks the vector length obligation; it does not need a second program declaration or a vector decoder.

                                                                                                                                                                                                                                                                                                                                                                                                                                    A signed field composes with the other columns of a nominal record.

                                                                                                                                                                                                                                                                                                                                                                                                                                    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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                        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]

                                                                                                                                                                                                                                                                                                                                                                                                                                        Signature-preserving positions of this imported source program.

                                                                                                                                                                                                                                                                                                                                                                                                                                        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
                                                                                                                                                                                                                                                                                                                                                                                                                                              @[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

                                                                                                                                                                                                                                                                                                                                                                                                                                                Added function bodies already typed against the complete linked table.

                                                                                                                                                                                                                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                                                                                                                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                                                                                                                                                                                                                                                  theorem Complexity.Examples.TypedProgram.SignedReadings.Operations.arrayRead0.getD_total_iff (pre✝ : (Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) × Language.Buffer Language.CellTy.bool → ℕ → (Bool × ℕ) × Bool → Language.Heap → Prop) (post✝ : (Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) × Language.Buffer Language.CellTy.bool → ℕ → (Bool × ℕ) × Bool → Language.Heap → (Bool × ℕ) × Bool → Language.Heap → Prop) :
                                                                                                                                                                                                                                                                                                                                                                                                                                                  getD_contract pre✝ post✝ ↔ ∀ (storage : (Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) × Language.Buffer Language.CellTy.bool) (index : ℕ) (defaultView : (Bool × ℕ) × Bool) (initialHeap : Language.Heap), pre✝ storage index defaultView initialHeap → ∃ (value : (Bool × ℕ) × Bool) (finalHeap : Language.Heap), getD storage index defaultView initialHeap = Part.some (Except.ok value, finalHeap) ∧ post✝ storage index defaultView initialHeap value finalHeap

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Ordinary mathematical function generated from the same represented source block.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      The finite table of actual named source bodies.

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                                                                                                                                                                                                        theorem Complexity.Examples.TypedProgram.SignedReadings.Operations.arrayRead0.getD_eq (storage : (Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) × Language.Buffer Language.CellTy.bool) (index : ℕ) (defaultView : (Bool × ℕ) × Bool) :
                                                                                                                                                                                                                                                                                                                                                                                                                                                        getD storage index defaultView = have operand := storage.1; have columnLL := operand.1; have operand := defaultView.1; have defaultLL := operand.1; do let valueLL ← Language.Buffer.GetD.getBool columnLL index defaultLL have operand : Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat := storage.1 have columnLR : Language.Buffer Language.CellTy.nat := operand.2 have operand : Bool × ℕ := defaultView.1 have defaultLR : ℕ := operand.2 let valueLR ← Language.Buffer.GetD.getNat columnLR index defaultLR have columnR : Language.Buffer Language.CellTy.bool := storage.2 have defaultR : Bool := defaultView.2 let valueR ← Language.Buffer.GetD.getBool columnR index defaultR have operand : Bool × ℕ := (valueLL, valueLR) pure (operand, valueR)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                        @[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

                                                                                                                                                                                                                                                                                                                                                                                                                                                          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.

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Signatures of the functions added by this source declaration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                            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
                                                                                                                                                                                                                                                                                                                                                                                                                                                                @[reducible, inline]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Signatures of the functions added by this source declaration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  theorem Complexity.Examples.TypedProgram.SignedReadings.Operations.arrayRead0.getD_contract_iff_triple (pre✝ : (Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) × Language.Buffer Language.CellTy.bool → ℕ → (Bool × ℕ) × Bool → Language.Heap → Prop) (post✝ : (Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) × Language.Buffer Language.CellTy.bool → ℕ → (Bool × ℕ) × Bool → Language.Heap → (Bool × ℕ) × Bool → Language.Heap → Prop) :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getD_contract pre✝ post✝ ↔ ∀ (storage : (Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) × Language.Buffer Language.CellTy.bool) (index : ℕ) (defaultView : (Bool × ℕ) × Bool) (initialHeap : Language.Heap), ⦃fun (currentHeap : Language.Heap) => { down := currentHeap = initialHeap ∧ pre✝ storage index defaultView initialHeap }⦄ getD storage index defaultView ⦃(fun (value : (Bool × ℕ) × Bool) (finalHeap : Language.Heap) => { down := post✝ storage index defaultView initialHeap value finalHeap }, fun (x : Language.Fault) (x_1 : Language.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]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Signature-preserving positions of this imported source program.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    theorem Complexity.Examples.TypedProgram.SignedReadings.coordinate_eq (input : ((Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) × Language.Buffer Language.CellTy.bool) × ((Bool × ℕ) × Bool) × ℕ) :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    coordinate input = have operand := input.1; have operand_1 := input.2; have operand_2 := operand_1.2; have operand_3 := input.2; have operand_4 := operand_3.1; do let reading ← Operations.arrayRead0.getD operand operand_2 operand_4 pure reading.1

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Automatic correspondence for the same generated source function, without a machine budget.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    theorem Complexity.Examples.TypedProgram.SignedReadings.Operations.arrayRead0.getD_spec {pre✝ : Language.Env [((Language.Ty.buffer Language.CellTy.bool).prod (Language.Ty.buffer Language.CellTy.nat)).prod (Language.Ty.buffer Language.CellTy.bool), Language.Ty.nat, (Language.Ty.bool.prod Language.Ty.nat).prod Language.Ty.bool] → Language.Heap → Prop} {post✝ : Language.Env [((Language.Ty.buffer Language.CellTy.bool).prod (Language.Ty.buffer Language.CellTy.nat)).prod (Language.Ty.buffer Language.CellTy.bool), Language.Ty.nat, (Language.Ty.bool.prod Language.Ty.nat).prod Language.Ty.bool] → Language.Heap → (Bool × ℕ) × Bool → Language.Heap → Prop} :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Language.FunctionTotal program getDId pre✝ post✝ → ∀ (storage : (Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) × Language.Buffer Language.CellTy.bool) (index : ℕ) (defaultView : (Bool × ℕ) × Bool) (continuation : Std.Do.PostCond ((Bool × ℕ) × Bool) (Std.Do.PostShape.except Language.Fault (Std.Do.PostShape.arg Language.Heap Std.Do.PostShape.pure))), ⦃fun (initialHeap : Language.Heap) => { down := pre✝ (Language.Env.cons storage (Language.Env.cons index (Language.Env.cons defaultView Language.Env.empty))) initialHeap ∧ ∀ (value : (Bool × ℕ) × Bool) (finalHeap : Language.Heap), post✝ (Language.Env.cons storage (Language.Env.cons index (Language.Env.cons defaultView Language.Env.empty))) initialHeap value finalHeap → (continuation.1 value finalHeap).down }⦄ getD storage index defaultView ⦃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
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @[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 finite table of actual named source bodies.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Signature-preserving positions of this imported source program.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Nested integer arrays retain a real borrowed row and its supplied default.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                theorem Complexity.Examples.TypedProgram.SignedRows.Operations.arrayRead0.getD_spec {pre✝ : Language.Env [(Language.Ty.buffer Language.CellTy.nat).prod ((Language.Ty.buffer Language.CellTy.bool).prod (Language.Ty.buffer Language.CellTy.nat)), Language.Ty.nat, (Language.Ty.buffer Language.CellTy.bool).prod (Language.Ty.buffer Language.CellTy.nat)] → Language.Heap → Prop} {post✝ : Language.Env [(Language.Ty.buffer Language.CellTy.nat).prod ((Language.Ty.buffer Language.CellTy.bool).prod (Language.Ty.buffer Language.CellTy.nat)), Language.Ty.nat, (Language.Ty.buffer Language.CellTy.bool).prod (Language.Ty.buffer Language.CellTy.nat)] → Language.Heap → Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat → Language.Heap → Prop} :

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                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.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The finite table of actual named source bodies.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Ordinary mathematical function generated from the same represented source block.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            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
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @[reducible, inline]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Signature-preserving positions of this imported source program.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                theorem Complexity.Examples.TypedProgram.SignedRows.first_eq (input : (Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) × (Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) × ℕ) :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                first input = have operand := input.1; have operand_1 := input.2; have operand_2 := operand_1.2; have operand_3 := input.2; have operand_4 := operand_3.1; do let row ← Operations.arrayRead0.getD operand operand_2 operand_4 have operand : Bool × ℕ := (true, 0) let sourceResult ← Language.Buffer.Prod.GetD.getBoolNat row 0 operand pure sourceResult

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @[reducible, inline]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Signature-preserving positions of this imported source program.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Automatic correspondence for the same generated source function, without a machine budget.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    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.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @[reducible, inline]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Signatures of the functions added by this source declaration.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      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.Examples.TypedProgram.SignedRows.Operations.arrayRead0.getD_eq (storage : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) (index : ℕ) (defaultView : Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat) :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      getD storage index defaultView = have operand := storage.1; have operand_1 := storage.2; have operand_2 := operand_1.1; have columnL := (operand, operand_2); have defaultL := defaultView.1; do let valueL ← Language.Buffer.Ragged.GetD.getBool columnL index defaultL have operand : Language.Buffer Language.CellTy.nat := storage.1 have operand_3 : Language.Buffer Language.CellTy.bool × Language.Buffer Language.CellTy.nat := storage.2 have operand_4 : Language.Buffer Language.CellTy.nat := operand_3.2 have columnR : Language.Buffer Language.CellTy.nat × Language.Buffer Language.CellTy.nat := (operand, operand_4) have defaultR : Language.Buffer Language.CellTy.nat := defaultView.2 let valueR ← Language.Buffer.Ragged.GetD.getNat columnR index defaultR pure (valueL, valueR)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The finite table of actual named source bodies.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Ordinary mathematical function generated from the same represented source block.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Instances For

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Added function bodies already typed against the complete linked table.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Added function bodies already typed against the complete linked table.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              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.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              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.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Automatic correspondence for the same generated source function, without a machine budget.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @[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]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                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]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The source program's declared first-order signatures.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Signature-preserving positions of this imported source program.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Signature-preserving positions of this imported source program.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Signatures of the functions added by this source declaration.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Successful execution observes the native result in its actual final heap and retains every previously represented immutable list.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            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.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              theorem Complexity.Examples.TypedProgram.signedRowFirst_correct :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              signedRowFirst.Correct (fun (x : SignedRowsInput) => True) fun (input : SignedRowsInput) (result : ℤ) => result = (input.rows.getD input.index input.fallback).getD 0 (-1)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Signed nested results retain every row, including empty rows and negative values.

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