TheHoTTGame/Trinitarianism/Quest2Solutions.agda
2021-07-29 20:43:09 +01:00

24 lines
576 B
Agda
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module Trinitarianism.Quest2Solutions where
open import Trinitarianism.Preambles.P2
_+_ :
n + zero = n
n + suc m = suc (n + m)
_+'_ :
zero +' n = n
suc m +' n = suc (m +' n)
SumOfEven : (x : Σ isEven) (y : Σ isEven) isEven (x .fst + y .fst)
SumOfEven x (zero , hy) = x .snd
SumOfEven x (suc (suc y) , hy) = SumOfEven x (y , hy)
{-
Sum'OfEven : (x : Σ isEven) → (y : Σ isEven) → isEven (x .fst +' y .fst)
Sum'OfEven x (zero , hy) = x .snd
Sum'OfEven x (suc (suc y) , hy) = Sum'OfEven x (y , hy)
-}