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
21 lines
420 B
Text
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
|