lean4-htt/tests/lean/1074b.lean
2022-03-25 17:36:30 -07:00

12 lines
286 B
Text

inductive Term
| id: Term -> Term
inductive Brx: Term -> Prop
| id: Brx z -> Brx (Term.id n)
def Brx.interp {a} (H: Brx a): Nat :=
match a with
| Term.id n => by
have ⟨Hn, Hz⟩: True ∧ Brx z
:= by cases H <;> exact ⟨by simp, by assumption⟩;
exact Hz.interp