Zulip Chat Archive

Stream: new members

Topic: simplify vector expressions?


Malvin Gattinger (Nov 18 2021 at 13:12):

Is there a tactic to prove things like a = ((a::ᵥ nil).append (c::ᵥ nil)).head without doing it manually?

Malvin Gattinger (Nov 18 2021 at 13:14):

haha, never mind, refl already works :laughter_tears:

Alex J. Best (Nov 18 2021 at 13:36):

Does simp also work?

Malvin Gattinger (Nov 18 2021 at 16:20):

Hmm, but then why does a = ((a::ᵥ b::ᵥ ys).append (c::ᵥ nil)).head not get solved by refl? How can I show that ys really does not matter here?
Edit: okay, cases, refl does it.

Scott Morrison (Nov 19 2021 at 04:34):

When simp doesn't do something that it obviously should, you should PR the additional @[simp] lemma!

Scott Morrison (Nov 19 2021 at 04:34):

lemma vector.cons_append_head ...


Last updated: Dec 20 2023 at 11:08 UTC