Skip to content

Commit

Permalink
Cleanup various things
Browse files Browse the repository at this point in the history
  • Loading branch information
WhatisRT committed Jan 13, 2025
1 parent 13e73ad commit 3c28c2a
Show file tree
Hide file tree
Showing 9 changed files with 180 additions and 443 deletions.
2 changes: 0 additions & 2 deletions formal-spec/Everything.agda
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{-# OPTIONS --erasure #-}

module Everything where

open import Leios.Simplified
Expand Down
7 changes: 4 additions & 3 deletions formal-spec/Leios/Base.agda
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ record BaseAbstract : Type₁ where
field Cert : Type
VTy : Type
initSlot : VTy
V-chkCerts : List PubKey EndorserBlock × Cert Type
V-chkCerts : List PubKey EndorserBlock × Cert Bool

data Input : Type where
INIT : (EndorserBlock × Cert Type) Input
data Input : Type where
INIT : (EndorserBlock × Cert Bool) Input
SUBMIT : RankingBlock Input
FTCH-LDG : Input

Expand All @@ -34,6 +34,7 @@ record BaseAbstract : Type₁ where
record Functionality : Type₁ where
field State : Type
_-⟦_/_⟧⇀_ : State Input Output State Type
SUBMIT-total : {s b} ∃[ s' ] s -⟦ SUBMIT b / EMPTY ⟧⇀ s'

open Input public
open Output public
1 change: 1 addition & 0 deletions formal-spec/Leios/FFD.agda
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ record FFDAbstract : Type₁ where
field State : Type
initFFDState : State
_-⟦_/_⟧⇀_ : State Input Output State Type
FFD-total : {ffds i o} ∃[ ffds' ] ffds -⟦ i / o ⟧⇀ ffds'

open Input public
open Output public
7 changes: 7 additions & 0 deletions formal-spec/Leios/Prelude.agda
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,10 @@ filter P = L.filter ¿ P ¿¹
instance
IsSet-List : {A : Set} IsSet (List A) A
IsSet-List .toSet A = fromList A

open import Data.List.Relation.Unary.Any
open Properties

finite⇒A≡∅⊎∃a∈A : {X : Type} {A : ℙ X} finite A (A ≡ᵉ ∅) ⊎ Σ[ a ∈ X ] a ∈ A
finite⇒A≡∅⊎∃a∈A ([] , h) = inj₁ (∅-least (λ a∈A ⊥-elim (case Equivalence.to h a∈A of λ ())))
finite⇒A≡∅⊎∃a∈A (x ∷ _ , h) = inj₂ (x , Equivalence.from h (here refl))
1 change: 1 addition & 0 deletions formal-spec/Leios/Protocol.agda
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ record LeiosState : Type where

addUpkeep : LeiosState SlotUpkeep LeiosState
addUpkeep s u = let open LeiosState s in record s { Upkeep = Upkeep ∪ ❴ u ❵ }
{-# INJECTIVE_FOR_INFERENCE addUpkeep #-}

initLeiosState : VTy StakeDistr B.State LeiosState
initLeiosState V SD bs = record
Expand Down
287 changes: 0 additions & 287 deletions formal-spec/Leios/Simple.agda

This file was deleted.

Loading

0 comments on commit 3c28c2a

Please sign in to comment.