module ind-ind where open import Data.Unit mutual data Type : Set where ℕ : Type Bool : Type Eq : (A : Type) → Term A → Term A → Type data Term : Type → Set where zero : Term ℕ succ : Term ℕ → Term ℕ true : Term Bool false : Term Bool -- Eq is usuful to define things like refl refl : (A : Type) → (x : Term A) → Type refl A x = Eq A x x -- The BaseOrInd type family encodes information about whether an element of type Term t -- is a "base" or "inductive" case, defaulting to ⊤ for all possibilities. BaseOrInd : {t : Type} → Term t → Set BaseOrInd zero = ⊤ BaseOrInd (succ b) = BaseOrInd b BaseOrInd true = ⊤ BaseOrInd false = ⊤