{-# OPTIONS --safe #-}
module Cubical.Algebra.OrderedCommMonoid.Instances where

open import Cubical.Foundations.Prelude

open import Cubical.Algebra.OrderedCommMonoid.Base

open import Cubical.Data.Nat
open import Cubical.Data.Nat.Order

ℕ≤+ : OrderedCommMonoid ℓ-zero ℓ-zero
ℕ≤+ .fst = 
ℕ≤+ .snd .OrderedCommMonoidStr._≤_ = _≤_
ℕ≤+ .snd .OrderedCommMonoidStr._·_ = _+_
ℕ≤+ .snd .OrderedCommMonoidStr.ε = 0
ℕ≤+ .snd .OrderedCommMonoidStr.isOrderedCommMonoid =
  makeIsOrderedCommMonoid
         isSetℕ
         +-assoc +-zero  _  refl) +-comm
          _ _  isProp≤)  _  ≤-refl)  _ _ _  ≤-trans)  _ _  ≤-antisym)
          _ _ _  ≤-+k)  _ _ _  ≤-k+)

ℕ≤· : OrderedCommMonoid ℓ-zero ℓ-zero
ℕ≤· .fst = 
ℕ≤· .snd .OrderedCommMonoidStr._≤_ = _≤_
ℕ≤· .snd .OrderedCommMonoidStr._·_ = _·_
ℕ≤· .snd .OrderedCommMonoidStr.ε = 1
ℕ≤· .snd .OrderedCommMonoidStr.isOrderedCommMonoid =
  makeIsOrderedCommMonoid
        isSetℕ
        ·-assoc ·-identityʳ ·-identityˡ ·-comm
         _ _  isProp≤)  _  ≤-refl)  _ _ _  ≤-trans)  _ _  ≤-antisym)
         _ _ _  ≤-·k) lmono
  where lmono : (x y z : )  x  y  z · x  z · y
        lmono x y z x≤y = subst ((z · x) ≤_) (·-comm y z) (subst (_≤ (y · z)) (·-comm x z) (≤-·k x≤y))