diff --git a/src/Data/Nat.hs b/src/Data/Nat.hs index 58fd4a7..e53f1aa 100644 --- a/src/Data/Nat.hs +++ b/src/Data/Nat.hs @@ -170,10 +170,15 @@ plus_assoc (SS a) b c = cong SS (plus_assoc a b c) -- | Commutative property of addition plus_commut ∷ Sℕ n → Sℕ m → (n :+ m) :≡ (m :+ n) -plus_commut n SZ = plus_right_id n +plus_commut n SZ = plus_right_id n plus_commut n (SS m) = sym (succ_right n m) ∾ cong SS (plus_commut n m) ∾ succ_left m n +-- | Left identity of multiplication +cross_left_id ∷ Sℕ n → (S Z) :× n :≡ n +cross_left_id SZ = Refl +cross_left_id (SS n) = cong SS (cross_left_id n) + -- | Minimum of itself min_self ∷ Sℕ n → Min n n :≡ n min_self SZ = Refl