Löb's theorem

open data  | tt
open data 

open data Con : Type
  | 
  | infix  Con Ty

open data Ty : Type
  | infixr ‘→’ Ty Ty
  | ‘⊤’
  | ‘⊥’
  | ‘□’ Ty

open data Tm (Γ : Con) Ty : Type
  | Γ,     A ‘→’ Blam (Tm (Γ  A) B)
  | Γ  A, Bapp (Tm Γ (A ‘→’ B))
  | Γ,     ‘⊤’‘tt’
  | ,     PLöb (Tm  (‘□’ P ‘→’ P))

def Tm 

def interpTy (A : Ty) : Type
  | ‘⊤’
  | ‘⊥’
  | ‘□’ P P
  | A ‘→’ BinterpTy AinterpTy B

def interpCon (Γ : Con) : Type
  | 
  | Γ  AΣ (interpCon Γ) ** (interpTy A)

def interpTm {Γ : Con} {T : Ty} (t : Tm Γ T) (ic : interpCon Γ) : interpTy T
  | lam f,   Γᵥfn a ⇒ (interpTm f (Γᵥ, a))
  | app f,   (Γᵥ, a) ⇒ (interpTm f Γᵥ) a
  | ‘tt’,    Γᵥtt
  | Löb f,   ttinterpTm f tt (Löb f)

def fixl ¬   (A : Type) : TypeA
def fixl ‘¬’ (A : Ty)   : TyA ‘→’ ‘⊥’

def consistent : ¬  ‘⊥’fn falseinterpTm false tt
def incomplete : ¬  (‘¬’ (‘□’ ‘⊥’))
  ⇒ fn lobinterpTm (Löb lob) tt