This commit is contained in:
Leon Vatthauer 2024-03-11 18:15:55 +01:00
parent c631cf1bc3
commit 5f836b4d89
Signed by: leonv
SSH key fingerprint: SHA256:G4+ddwoZmhLPRB1agvXzZMXIzkVJ36dUYZXf5NxT+u8

View file

@ -323,11 +323,9 @@ To show preservation we need some facts about discretizing setoids:
cong (disc-dom {X} f) {x} {y} x≡y rewrite x≡y = ≡-refl (Delay.₀ A ⊎ₛ ‖ X ‖)
iter-g-var : ∀ {X : Setoid } → (g : X ⟶ (Delay≈.₀ A ⊎ₛ X)) → ∀ {x} → [ A ][ (iter {A} {X} < g >) x (iter {A} {‖ X ‖} (disc-dom g)) ⟨$⟩ x ]
iter-g-var : ∀ {X : Setoid } → (g : X ⟶ (Delay≈.₀ A ⊎ₛ X)) → ∀ {x} → [ A ][ (iter {A} {X} < g >) x (iter {A} {‖ X ‖} (disc-dom g)) ⟨$⟩ x ]
force (iter-g-var {X} g {x}) = iter-g-var {X} g {x}
iter-g-var {X} g {x} with g ⟨$⟩ x
... | inj₁ a = -refl A
... | inj₂ a = later (iter-g-var {X} g {a})
... | inj₂ a = later λ { .force → iter-g-var {X} g {a} }
```
Now we show that helper # is iteration preserving: