module Fam where
open import Agda.Primitive
open import Lib
record Fam : Set₁ where
field Ty : Set
Tm : Ty → Set
open Fam public
Fam-⊤ : Fam
Fam-⊤ .Ty = ⊤
Fam-⊤ .Tm _ = ⊤
_∗_ : Fam → Fam → Fam
(C ∗ D) .Ty = Σ (C .Ty) λ A → C .Tm A → D .Ty
(C ∗ D) .Tm (A , B) = Σ (C .Tm A) λ a → D .Tm (B a)
LIxTele : ℕ → Fam → Fam
LIxTele zero C = Fam-⊤
LIxTele (suc n) C = LIxTele n C ∗ C
LTele : Fam → Fam
LTele C .Ty = Σ ℕ λ n → LIxTele n C .Ty
LTele C .Tm (n , A) = LIxTele n C .Tm A
LIxTele₁ : ℕ → Fam → Fam
LIxTele₁ zero C = C
LIxTele₁ (suc n) C = LIxTele₁ n C ∗ C
RIxTele : ℕ → Fam → Fam
RIxTele zero C = Fam-⊤
RIxTele (suc n) C = C ∗ RIxTele n C
RTele : Fam → Fam
RTele C .Ty = Σ ℕ λ n → RIxTele n C .Ty
RTele C .Tm (n , A) = RIxTele n C .Tm A