{-# OPTIONS --safe #-}
open import Axiom.Set using (Theory)
module Ledger.Introduction (th : Theory) where
open import Prelude
import Data.Maybe as Maybe
open import Data.Maybe.Properties
open import Interface.STS hiding (_⊢_⇀⟦_⟧*_)
open import Relation.Binary.PropositionalEquality
private variable
C S Sig : Type
Γ : C
s s' s'' : S
b sig : Sig
sigs : List Sig
module _ (_⊢_⇀⟦_⟧_ : C → S → Sig → S → Type) where
data _⊢_⇀⟦_⟧*_ : C → S → List Sig → S → Type where
RTC-base :
Γ ⊢ s ⇀⟦ [] ⟧* s
RTC-ind :
∙ Γ ⊢ s ⇀⟦ sig ⟧ s'
∙ Γ ⊢ s' ⇀⟦ sigs ⟧* s''
───────────────────────────────────────
Γ ⊢ s ⇀⟦ sig ∷ sigs ⟧* s''
record Computational (_⊢_⇀⦇_,X⦈_ : C → S → Sig → S → Type) : Type where
field
compute : C → S → Sig → Maybe S
≡-just⇔STS : compute Γ s b ≡ just s' ⇔ Γ ⊢ s ⇀⦇ b ,X⦈ s'
nothing⇒∀¬STS : compute Γ s b ≡ nothing → ∀ s' → ¬ Γ ⊢ s ⇀⦇ b ,X⦈ s'
nothing⇒∀¬STS comp≡nothing s' h rewrite ≡-just⇔STS .Equivalence.from h =
case comp≡nothing of λ ()
open Theory th using (_∈_) renaming (Set to ℙ)
private variable
a c : Level
A : Type a
Σ-syntax' : (A : Type a) → (A → Type c) → Type _
Σ-syntax' = Σ
syntax Σ-syntax' A (λ x → B) = x ∈ A ﹐ B
_⊆_ : {A : Type} → ℙ A → ℙ A → Type
X ⊆ Y = ∀ {x} → x ∈ X → x ∈ Y
_≡ᵉ_ : {A : Type} → ℙ A → ℙ A → Type
X ≡ᵉ Y = X ⊆ Y × Y ⊆ X
Rel : Type → Type → Type
Rel A B = ℙ (A × B)
left-unique : {A B : Type} → Rel A B → Type
left-unique R = ∀ {a b b'} → (a , b) ∈ R → (a , b') ∈ R → b ≡ b'
_⇀_ : Type → Type → Type
A ⇀ B = r ∈ Rel A B ﹐ left-unique r