Added templates and some code done
This commit is contained in:
31
0Trinitarianism/Quest2.agda
Normal file
31
0Trinitarianism/Quest2.agda
Normal file
@@ -0,0 +1,31 @@
|
||||
module 0Trinitarianism.Quest2 where
|
||||
|
||||
open import 0Trinitarianism.Preambles.P2
|
||||
|
||||
isEven : ℕ → Type
|
||||
isEven zero = ⊤
|
||||
isEven (suc zero) = ⊥
|
||||
isEven (suc (suc n)) = isEven n
|
||||
|
||||
{-
|
||||
This is a comment block.
|
||||
Remove this comment block and formulate
|
||||
'there exists an even natural' here.
|
||||
-}
|
||||
|
||||
_×_ : Type → Type → Type
|
||||
A × C = Σ A (λ a → C)
|
||||
|
||||
div2 : Σ ℕ isEven → ℕ
|
||||
div2 (zero , snd₁) = zero
|
||||
div2 (suc (suc fst₁) , snd₁) = suc (div2 ( fst₁ , snd₁))
|
||||
|
||||
private
|
||||
postulate
|
||||
A B C : Type
|
||||
|
||||
uncurry : (A → B → C) → (A × B → C)
|
||||
uncurry f x = f (fst x) (snd x)
|
||||
|
||||
curry : (A × B → C) → (A → B → C)
|
||||
curry f a b = f (a , b)
|
||||
Reference in New Issue
Block a user