diff --git a/proofs/agda/EchoSearch.agda b/proofs/agda/EchoSearch.agda index 4f36f24..892d880 100644 --- a/proofs/agda/EchoSearch.agda +++ b/proofs/agda/EchoSearch.agda @@ -67,20 +67,23 @@ -- ∧ trace.last ≡ x ∧ f x ≡ y`. The current `EchoS` projects from -- that by collapsing the trace to its terminal index. -- --- * A *bounded-search-is-decidable* lemma in the presence of --- decidable equality on `B`: search up to `n` either yields an +-- * (LANDED) A *bounded-search-is-decidable* lemma in the presence +-- of decidable equality on `B`: search up to `n` either yields an -- `EchoS enum f y n` or proves `¬ EchoS enum f y n`. This is the --- concrete bridge to `EchoDecidable`, kept as a separate slice --- because it needs a `_≟_` on `B` and a finite-walk recursion. +-- concrete bridge to `EchoDecidable`; it needs a `_≟_` on `B` and a +-- finite-walk recursion on the budget. See `bounded-search-is-decidable` +-- at the bottom of this module. module EchoSearch where open import Function.Base using (_∘_; id) open import Data.Nat.Base using (ℕ; zero; suc; _≤_; _<_; z≤n; s≤s) -open import Data.Nat.Properties using (≤-<-trans; <-≤-trans) +open import Data.Nat.Properties + using (≤-<-trans; <-≤-trans; <-cmp; <-trans; ≤-trans; ≤-refl; <-irrefl) open import Data.Empty using (⊥; ⊥-elim) open import Data.Product.Base using (Σ; _,_; _×_; proj₁; proj₂) -open import Relation.Nullary using (¬_) +open import Relation.Nullary using (¬_; Dec; yes; no) +open import Relation.Binary.Definitions using (Tri; tri<; tri≈; tri>) open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; trans; cong) @@ -156,3 +159,38 @@ echo-search-postcompose : EchoS enum f y n → EchoS enum (g ∘ f) (g y) n echo-search-postcompose enum f g (k , k _ _ n