# HG changeset patch # User Shinji KONO # Date 1572497606 -32400 # Node ID b9679ebd115611f7618afd9a88470b721ff83161 # Parent 8f0efa93b354d33cc2c44d8d5e3699a246b84f28 ... diff -r 8f0efa93b354 -r b9679ebd1156 agda/automaton-text.agda --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/agda/automaton-text.agda Thu Oct 31 13:53:26 2019 +0900 @@ -0,0 +1,97 @@ +module automaton-text where + +-- open import Level renaming ( suc to succ ; zero to Zero ) +open import Data.Nat +open import Data.List +open import Data.Maybe +-- open import Data.Bool using ( Bool ; true ; false ; _∧_ ) +open import Relation.Binary.PropositionalEquality hiding ( [_] ) +open import Relation.Nullary using (¬_; Dec; yes; no) +open import logic +-- open import Data.Bool renaming ( _∧_ to _and_ ; _∨_ to _or ) + +open import automaton + +open Automaton + + +lemma4 : {i n : ℕ } → i < n → i < suc n +lemma4 {0} {0} () +lemma4 {0} {suc n} lt = s≤s z≤n +lemma4 {suc i} {0} () +lemma4 {suc i} {suc n} (s≤s lt) = s≤s (lemma4 lt) + +lemma5 : {n : ℕ } → n < suc n +lemma5 {zero} = s≤s z≤n +lemma5 {suc n} = s≤s lemma5 + +record accept-n { Q : Set } { Σ : Set } (M : Automaton Q Σ ) (astart : Q ) (n : ℕ ) (s : {i : ℕ } → (i < n) → Σ ) : Set where + field + r : (i : ℕ ) → i < suc n → Q + accept-1 : r 0 (s≤s z≤n) ≡ astart + accept-2 : (i : ℕ ) → (i