diff options
author | Jacques Comeaux <jacquesrcomeaux@protonmail.com> | 2024-02-20 21:23:29 -0600 |
---|---|---|
committer | Jacques Comeaux <jacquesrcomeaux@protonmail.com> | 2024-02-20 21:23:29 -0600 |
commit | 5e30f210d4d510649ca87a02b7e9a409ee74d13a (patch) | |
tree | b8e0b88f115888a0923a43f54dd5c2d4505cb3c0 /Util.agda | |
parent | e585420fc6eb90f0ecdce76e1f48085b2cfe0466 (diff) |
Prove merge lemmas
Diffstat (limited to 'Util.agda')
-rw-r--r-- | Util.agda | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Util.agda b/Util.agda new file mode 100644 index 0000000..23da7cc --- /dev/null +++ b/Util.agda @@ -0,0 +1,16 @@ +module Util where + +open import Data.Fin using (Fin; toℕ) +open import Data.Nat using (ℕ; _≤_; _<_ ; z<s; s≤s) +open import Data.Product using (_×_) + + +_<_≤_ : ℕ → ℕ → ℕ → Set +_<_≤_ i j k = (i < j) × (j ≤ k) + +_<_<_ : ℕ → ℕ → ℕ → Set +_<_<_ i j k = (i < j) × (j < k) + +toℕ< : {n : ℕ} → (i : Fin n) → toℕ i < n +toℕ< Fin.zero = z<s +toℕ< (Fin.suc i) = s≤s (toℕ< i) |