lean4-htt/tests/lean/1074a.lean
Leonardo de Moura a2e467eb32 fix: mkEqnTypes
stop as soon as `lhs` and `rhs` are definitionally equal, and avoid
unnecessary case analysis.

This commit fixes the last issue exposed by #1074

fixes #1074
2022-03-25 19:13:21 -07:00

21 lines
420 B
Text

inductive Term
| id2: Term -> Term -> Term
inductive Brx: Term -> Prop
| id2: Brx z -> Brx (Term.id2 n z)
def Brx.interp {a} (H: Brx a): Nat :=
match a with
| Term.id2 n z => by
let ⟨Hn, Hz⟩: True ∧ Brx z
:= by cases H <;> exact ⟨by simp, by assumption⟩;
exact Hz.interp
def Brx.interp_nil (H: Brx a): H.interp = H.interp
:=
by {
unfold interp
rfl
}
#check Brx.interp._eq_1