module _ where open import nat open import eq open import sum open import bool open import bool-thms open import nat-thms open import product open import product-thms {- prove that if the maximum and the minimum of two numbers are the same, the numbers themselves must also be the same minmax≡ : ∀ n m -> min n m ≡ max n m -> n ≡ m HINT: consider all four cases of `n` and `m` as either `zero` or `(suc n)`. Three will either be impossible or trivial. For the last one, look in nat-thms.agda to see if you find some useful rewrites. You may need to do a case split on n < m (which is interesting, as you are trying to prove that it never happens) -} minmax≡ : ∀ n m -> min n m ≡ max n m -> n ≡ m minmax≡ = {!!} {- consider this alternative definition of less than: -} _≥2_ : nat -> nat -> bool zero ≥2 zero = tt zero ≥2 (suc m) = ff (suc n) ≥2 zero = tt (suc n) ≥2 (suc m) = n ≥2 m {- prove that it is the same as the other definition, i.e. prove these two results: ≥2->≥ : ∀ n m -> n ≥2 m ≡ tt -> n ≥ m ≡ tt ≥->≥2 : ∀ n m -> n ≥ m ≡ tt -> n ≥2 m ≡ tt -} ≥2->≥ : ∀ n m -> n ≥2 m ≡ tt -> n ≥ m ≡ tt ≥2->≥ = {!!} ≥->≥2 : ∀ n m -> n ≥ m ≡ tt -> n ≥2 m ≡ tt ≥->≥2 = {!!}