open import Agda.Builtin.Equality
open import Data.Product
open import Level
open import Relation.Unary using (_β_)
module is-lib.InfSys.Induction {π} where
private
variable
U : Set π
open import is-lib.InfSys.Base {π}
open MetaRule
open IS
data Indβ¦_β§ {πc πp πn : Level} (is : IS {πc} {πp} {πn} U) : U β Set (π β πc β πp β πn) where
fold : β{u} β ISF[ is ] Indβ¦ is β§ u β Indβ¦ is β§ u
ind[_] : β{πc πp πn π'}
β (is : IS {πc} {πp} {πn} U)
β (S : U β Set π')
β ISClosed is S
β Indβ¦ is β§ β S
ind[ is ] S cl (fold (rn , c , refl , pr)) = cl rn c Ξ» i β ind[ is ] S cl (pr i)
apply-ind : β{πc πp πn}{is : IS {πc} {πp} {πn} U} β (rn : is .Names) β RClosed (is .rules rn) Indβ¦ is β§
apply-ind {is = is} rn = prefixβclosed (is .rules rn) {P = Indβ¦ _ β§} Ξ»{(c , refl , pr) β fold (rn , c , refl , pr)}
ind-postfix : β{πc πp πn}{is : IS {πc} {πp} {πn} U} β Indβ¦ is β§ β ISF[ is ] Indβ¦ is β§
ind-postfix (fold x) = x
ind-prefix : β{πc πp πn}{is : IS {πc} {πp} {πn} U} β ISF[ is ] Indβ¦ is β§ β Indβ¦ is β§
ind-prefix x = fold x