{-# OPTIONS --without-K --safe #-}
module Data.Fin.Induction where
open import Data.Fin.Base using (Fin; toℕ; _<_; _≺_)
open import Data.Fin.Properties using (≺⇒<′)
open import Data.Nat.Base using (ℕ)
import Data.Nat.Induction as ℕ
open import Induction
open import Induction.WellFounded as WF
import Relation.Binary.Construct.On as On
open WF public using (Acc; acc)
<-wellFounded : ∀ {n} → WellFounded {A = Fin n} _<_
<-wellFounded = On.wellFounded toℕ ℕ.<-wellFounded
≺-Rec : ∀ {ℓ} → RecStruct ℕ ℓ ℓ
≺-Rec = WfRec _≺_
≺-wellFounded : WellFounded _≺_
≺-wellFounded = Subrelation.wellFounded ≺⇒<′ ℕ.<′-wellFounded
module _ {ℓ} where
open WF.All ≺-wellFounded ℓ public
renaming
( wfRecBuilder to ≺-recBuilder
; wfRec to ≺-rec
)
hiding (wfRec-builder)
≺-rec-builder = ≺-recBuilder
{-# WARNING_ON_USAGE ≺-rec-builder
"Warning: ≺-rec-builder was deprecated in v0.15.
Please use ≺-recBuilder instead."
#-}
≺-well-founded = ≺-wellFounded
{-# WARNING_ON_USAGE ≺-well-founded
"Warning: ≺-well-founded was deprecated in v0.15.
Please use ≺-wellFounded instead."
#-}