@[instance_reducible]
Equations
Instances For
@[instance_reducible]
Equations
Instances For
Equations
- kol.memory = Map.insertD 0 (Map.insertD 0 (Map.insertD 0 (Emanator.initMem Emanator.progKol) 1 ↑kol.back) 6 ↑kol.front) 26 (Emanator.kolToInt kol.current) ∪ Emanator.initMem (List.replicate 27 0 ++ List.map Emanator.kolToInt (kol.output ++ kol.queue))
Instances For
Equations
- kol.steps n = Emanator.Kol.step^[n] kol
Instances For
theorem
Emanator.steps_progKol_aux₁
(kol : Kol)
(B₁ : ℕ)
(C₁ : ℤ)
(h₅ :
Map.getD 0 (Map.insertD 0 (Map.insertD 0 kol.memory kol.back (kolToInt kol.current)) B₁ (kolToInt kol.current))
kol.front = C₁)
(h₆ : C₁ = 0 ∨ C₁ = -1)
(h₇ : kol.queue.head?.getD kol.current = if C₁ = 0 then 1 else 2)
(h₂ : ↑B₁ = ↑kol.back - Map.getD 0 (Map.insertD 0 kol.memory kol.back (kolToInt kol.current)) kol.front)
(c : ℤ)
(i : ℕ)
(H₅ : ¬kol.front + i = B₁)
(H₆ : ¬kol.front + i = kol.back)
:
theorem
Emanator.steps_progKol_aux₂
{inp : List ℕ}
(n : ℕ)
(kol : Kol)
(h : initKol.steps n = kol)
(h₁ : kol.current = if Even n then 1 else 2)
(B : ℕ)
(h₂ : ↑B + Map.getD 0 (Map.insertD 0 kol.memory kol.back (kolToInt kol.current)) kol.front = ↑kol.back)
(h₄ : 27 ≤ B)
(C : ℤ)
(h₅ :
Map.getD 0 (Map.insertD 0 (Map.insertD 0 kol.memory kol.back (kolToInt kol.current)) B (kolToInt kol.current))
kol.front = C)
(h₆ : C = 0 ∨ C = -1)
:
{ memory :=
Map.insertD 0
(Map.insertD 0
(Map.insertD 0
(Map.insertD 0
(Map.insertD 0 (Map.insertD 0 (Map.insertD 0 kol.memory kol.back (kolToInt kol.current)) 1 ↑B) B
(kolToInt kol.current))
1 (↑B + 1))
6 (↑kol.front + 1))
26 (-1 - kolToInt kol.current))
0 1,
input := inp, output := (49 - C).toNat :: (List.map (fun (x : ℕ) => x + 48) kol.output).reverse, halted := false } = kol.step.state inp
@[simp]
@[simp]