Quest 3 - Side Quests
Decidability of isEven
Try to express and prove in agda the statement
Problem statement
Every natural number is even or not even.
We make a summary of what is needed:
a definition of the type
A ⊕ B(input\oplus), which has interpretationsthe proposition “
AorB”the construction with two ways of making recipes
left : A → A ⊕ Bandright : B → A ⊕ B.the disjoint sum of two spaces
the coproduct of two objects
AandB. The type needs to take in parametersA : TypeandB : Typedata _⊕_ (A : Type) (B : Type) : Type where ???
a definition of negation. One can motivate it by the following
Define
A ↔ B : Typefor two typesA : TypeandB : Type.Show that for any
A : Typewe have(A ↔ ⊥) ↔ (A → ⊥)Define
¬ : Type → Typeto beλ A → (A → ⊥).
a formulation and proof of the statement above