lean4-htt/tests/lean/run/simp_match_reducibility_issue.lean
Leonardo de Moura 8979663164 feat(library/tactic/simplify): relax reducibility constraints when matching implicit arguments
Motivation: if the explicit part matches (what the user sees), then the implicit part must morally match too.
If it doesn't because of reducibility setting, the behavior is usually counterintuitive.
2017-03-08 20:08:54 -08:00

27 lines
607 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace test
universes u v
def vector (α : Type u) (n : ) := { l : list α // list.length l = n }
namespace vector
open subtype list
variable {α : Type u}
def nil : vector α 0 := ⟨[], rfl⟩
def append {m n : } : vector α m → vector α n → vector α (m + n)
| ⟨v, _⟩ ⟨w, _⟩ := ⟨v ++ w, by abstract {simph}⟩
end vector
section
open vector
variable α : Type u
variables m n k :
variable v : vector α m
variable w : vector α n
theorem append_nil : append v nil = v :=
by cases v; simp [vector.append, vector.nil]; reflexivity
end
end test