STRATA
Skip to study
XLVII

X.09 / SHARED INSTRUMENTS

Formal logic, proof, verification, and scientific software

Which assumptions must hold for a proof about a program to cover the calculation run in the laboratory?

A source-led introduction1 source references0 related experiments

Start with the question.

Formal logic and proof make the steps from assumptions to conclusions explicit. Lean's documentation offers a concrete view of propositions and proof objects checked against a formal language. Verification of scientific software adds a specification problem: the checked statement must correspond to the intended calculation. A valid proof about an incomplete model and a passing test on a few examples establish different things.

Separate a theorem from a test case.

Consider the claim that a function preserves a nonnegative quantity for every allowed input. A test suite can inspect selected inputs, while a proof must use the function definition and assumptions to cover the stated domain. Then ask whether the implemented numeric representation introduces rounding or overflow absent from the formal statement.

What would you inspect?

  • The exact specification, assumptions, input domain, and trusted components.
  • The distinction between mathematical correctness, numerical behavior, and scientific adequacy.

Take the next step.

Choose one small scientific-software invariant and write its specification before deciding whether a proof, a numerical check, or both are needed.

Read the supporting material.

  1. Theorem Proving in Lean 4: Propositions and Proofs

    Lean documentation contributors · Formal propositions and proof objects; program verification depends on a stated formal specification.

Continue through the versioned study records.

Follow the comparisons.

Read the neighboring questions.