changed definition

This commit is contained in:
Leon Vatthauer 2024-01-14 12:48:54 +01:00
parent 291b33abbe
commit 5557dd1d6a
Signed by: leonv
SSH key fingerprint: SHA256:G4+ddwoZmhLPRB1agvXzZMXIzkVJ36dUYZXf5NxT+u8

View file

@ -244,12 +244,14 @@ module Monad.Instance.Setoids.K { : Level} where
out-cong {.(now _)} {.(now _)} (now x≡y) = inj₁ x≡y out-cong {.(now _)} {.(now _)} (now x≡y) = inj₁ x≡y
out-cong {.(later _)} {.(later _)} (later xy) = inj₂ (record { force = force xy }) out-cong {.(later _)} {.(later _)} (later xy) = inj₂ (record { force = force xy })
-- TODO move
nowₛ : ∀ {X} → X ⟶ Delayₛ X
nowₛ {X} = record { _⟨$⟩_ = now ; cong = {! !} }
laterₛ : ∀ {X} → Delayₛ X ⟶ Delayₛ X
laterₛ {X} = record { _⟨$⟩_ = later ; cong = {! !} }
out⁻¹ : ∀ {X} → X ⊎ₛ Delayₛ X ⟶ Delayₛ X out⁻¹ : ∀ {X} → X ⊎ₛ Delayₛ X ⟶ Delayₛ X
out⁻¹ {X} = record { _⟨$⟩_ = out⁻¹ ; cong = out⁻¹-cong } out⁻¹ {X} = [ nowₛ , laterₛ ]ₛ
where
out⁻¹-cong : ∀ {x y} → [ X ⊎ₛ (Delayₛ X) ][ x ≡ y ] → [ X ][ out⁻¹ x out⁻¹ y ]
out⁻¹-cong {.(inj₁ _)} {.(inj₁ _)} (inj₁ x≡y) = now x≡y
out⁻¹-cong {.(inj₂ _)} {.(inj₂ _)} (inj₂ xy) = later (record { force = force xy })
-- TODO out∘out⁻¹≡id and out⁻¹∘out≡id -- TODO out∘out⁻¹≡id and out⁻¹∘out≡id