Lax489179.DeterministicSemantics
Exact correctness of deterministic computations
concepts/Lax489179/DeterministicSemantics.lean · lax-489179
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
Evidence
This concept declares 2 statements. Each proof establishes one of them relative to its assumptions.
1st statement turing_exact proven
2nd statement word_exact proven
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.
Lean source view on GitHub
| 1 | import Lax489179.TuringMachine |
| 2 | import Lax489179.WordPrograms |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Exact correctness of deterministic computations |
| 7 | type: lemma |
| 8 | --- |
| 9 | For a deterministic program the bounded-error specification is |
| 10 | equivalent to exact correctness on the all-zero random tape. Thus |
| 11 | the common probability-based definition gives ordinary deterministic |
| 12 | decision and computation when randomness is forbidden. |
| 13 | -/ |
| 14 | |
| 15 | namespace Lax489179.DeterministicSemantics |
| 16 | |
| 17 | axiom 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 | |
| 23 | axiom 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 | |
| 29 | end Lax489179.DeterministicSemantics |
| 30 |
Community review
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above; your ORCID profile must share a public name.
0 comments