Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions proofs/agda/EchoBitNarrowingNumeric.agda
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module EchoBitNarrowingNumeric where

open import Data.Nat.Base using (ℕ; zero; suc; _+_; _*_; _^_; _<_; _≤_; z≤n; s≤s)
open import Data.Nat.Properties using (+-suc; +-identityʳ; *-assoc; ≤-step)
open import Data.Nat.Properties using (+-suc; +-identityʳ; *-assoc; m≤n⇒m≤1+n)
open import Data.Vec.Base using (Vec; []; _∷_)
open import Relation.Binary.PropositionalEquality
using (_≡_; refl; cong; sym; trans; subst; module ≡-Reasoning)
Expand Down Expand Up @@ -48,7 +48,7 @@ private
double-mono (s≤s p) = s≤s (s≤s (double-mono p))

join-bound : ∀ {m n} → m < n → ∀ b → joinBit m b < double n
join-bound (s≤s p) O = s≤s (≤-step (double-mono p))
join-bound (s≤s p) O = s≤s (m≤n⇒m≤1+n (double-mono p))
join-bound (s≤s p) I = s≤s (s≤s (double-mono p))

-- The bit-vector reconstruction has the exact arithmetic shape of the API.
Expand Down
8 changes: 6 additions & 2 deletions proofs/agda/EchoExampleParser.agda
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,14 @@ paren-pair = LP ∷ RP ∷ LP ∷ RP ∷ []
-- The auxiliary's signature `ℕ → List Token → Bool` mirrors a state
-- machine. We pattern-match on the token first (Agda-friendly recursion
-- shape) and on the depth only in the RP case (the abort condition).
-- The LP clause comes first so the case tree splits on the token
-- before the depth: every clause then holds definitionally, which
-- `--exact-split` requires.

parses-aux : ℕ → List Token → Bool
parses-aux d (LP ∷ ts) = parses-aux (suc d) ts
parses-aux zero [] = true
parses-aux (suc _) [] = false
parses-aux d (LP ∷ ts) = parses-aux (suc d) ts
parses-aux zero (RP ∷ _) = false
parses-aux (suc d) (RP ∷ ts) = parses-aux d ts

Expand Down Expand Up @@ -111,7 +114,8 @@ paren-nested≢paren-pair p =
where
second-token : List Token → Token
second-token (_ ∷ t ∷ _) = t
second-token _ = LP -- default; never reached for these inputs
second-token [] = LP -- default; never reached for these inputs
second-token (_ ∷ []) = LP

paren-empty≢paren-nested : paren-empty ≢ paren-nested
paren-empty≢paren-nested p =
Expand Down
2 changes: 1 addition & 1 deletion proofs/agda/EchoTropical.agda
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ infixl 6 _⊕_

_⊕_ : ℕ → ℕ → ℕ
zero ⊕ n = n
m ⊕ zero = m
suc m ⊕ zero = suc m
suc m ⊕ suc n = suc (m ⊕ n)

-- Basic tropical properties (simplified for bridge purposes)
Expand Down
Loading