Start working on the evaluation operation.
Proving monotonicity is the main hurdle here. Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
@@ -54,6 +54,11 @@ All-x∈xs : ∀ {a} {A : Set a} (xs : List A) → All (λ x → x ∈ xs) xs
|
||||
All-x∈xs [] = []
|
||||
All-x∈xs (x ∷ xs') = here refl ∷ map there (All-x∈xs xs')
|
||||
|
||||
x∈xs⇒fx∈fxs : ∀ {a b} {A : Set a} {B : Set b} (f : A → B) {x : A} {xs : List A} →
|
||||
x ∈ xs → (f x) ∈ mapˡ f xs
|
||||
x∈xs⇒fx∈fxs f (here refl) = here refl
|
||||
x∈xs⇒fx∈fxs f (there x∈xs') = there (x∈xs⇒fx∈fxs f x∈xs')
|
||||
|
||||
iterate : ∀ {a} {A : Set a} (n : ℕ) → (f : A → A) → A → A
|
||||
iterate 0 _ a = a
|
||||
iterate (suc n) f a = f (iterate n f a)
|
||||
|
||||
Reference in New Issue
Block a user