Documentation

LeanCert.Examples.Basic

Basic Examples #

This file demonstrates LeanCert's verified interval arithmetic core.

All examples in this file use only the fully-verified subset of expressions: const, var, add, mul, neg, sin, cos

The correctness theorems (evalInterval_correct, evalDual_val_correct) are FULLY PROVED with no sorry, no axioms for this subset.

Building supported expressions #

Proof that x² is in the supported subset

Equations
Instances For

    The expression x² + 2x + 1 = (x + 1)²

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

      Proof that x² + 2x + 1 is in the supported subset

      Equations
      Instances For

        Proof that sin(x) + cos(x) is in the supported subset

        Equations
        Instances For

          Interval construction #

          The unit interval [0, 1]

          Equations
          Instances For

            A small interval around 0: [-1/10, 1/10]

            Equations
            Instances For

              Interval membership examples #

              Expression evaluation examples #

              Verified interval evaluation #

              Using smart constructors #

              Build x² using smart constructors that carry the support proof

              Equations
              Instances For

                Multi-variable example #

                The expression x * y (product of two variables)

                Equations
                Instances For