namespace BidirTT

abbrev Name := String

inductive Raw where
  | var  : Name → Raw
  | lam  : Name → Raw → Raw
  | app  : Raw → Raw → Raw
  | pi   : Name → Raw → Raw → Raw
  | sig  : Name → Raw → Raw → Raw
  | pair : Raw → Raw → Raw
  | fst  : Raw → Raw
  | snd  : Raw → Raw
  | univ : Nat → Raw
  | letE : Name → Raw → Raw → Raw → Raw
  | ann  : Raw → Raw → Raw
  deriving Repr, Inhabited, BEq, DecidableEq

inductive Tm where
  | var  : Nat → Tm
  | lam  : Tm → Tm
  | app  : Tm → Tm → Tm
  | pi   : Tm → Tm → Tm
  | sig  : Tm → Tm → Tm
  | pair : Tm → Tm → Tm
  | fst  : Tm → Tm
  | snd  : Tm → Tm
  | univ : Nat → Tm
  | letE : Tm → Tm → Tm → Tm
  deriving Repr, Inhabited, BEq, DecidableEq

end BidirTT
