Exact correctness of deterministic computations

Lax489179.DeterministicSemantics · concepts/Lax489179/DeterministicSemantics.lean · lax-489179

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Lemma

    For a deterministic program the bounded-error specification is equivalent to exact correctness on the all-zero random tape. Thus the common probability-based definition gives ordinary deterministic decision and computation when randomness is forbidden.

    Concept map
    5 concepts
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A
    Evidence

    This concept declares 2 statements. Each proof establishes one of them relative to its assumptions.

    Lean source view on GitHub

    1import Lax489179.TuringMachine
    2import Lax489179.WordPrograms
    3
    4/-!
    5---
    6title: Exact correctness of deterministic computations
    7type: lemma
    8---
    9For a deterministic program the bounded-error specification is
    10equivalent to exact correctness on the all-zero random tape. Thus
    11the common probability-based definition gives ordinary deterministic
    12decision and computation when randomness is forbidden.
    13-/
    14
    15namespace Lax489179.DeterministicSemantics
    16
    17axiom turing_exact (M : TuringMachine.Machine) (h : TuringMachine.Deterministic M)
    18 (input : List Bool) (answer : Prop) (t : ℕ) :
    19 TuringMachine.DecidesWithin M input answer t ↔
    20 ∃ b, (TuringMachine.run M t (fun _ => false) (TuringMachine.init M input)).answer =
    21 some b ∧ (b = true ↔ answer)
    22
    23axiom word_exact (w : ℕ) (p : WordPrograms.Program) (h : WordPrograms.Deterministic p)
    24 (input : List ℕ) (correct : List ℕ → Prop) (t : ℕ) :
    25 WordPrograms.ComputesWithin w p input correct t ↔
    26 ∃ y, WordPrograms.output (WordPrograms.run w p t (fun _ => false)
    27 (WordPrograms.init input)) = some y ∧ correct y
    28
    29end Lax489179.DeterministicSemantics
    30
    Show ProofShow Proof
    Builds on
    Used by

    none

    From Mathlib

    none

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…