Zulip Chat Archive
Stream: general
Topic: Shorthand for decomposing a pair
Andrej Bauer (Sep 16 2021 at 07:27):
Suppose my goal is ∀ p : α × β, A
. Is there a shorthand for intro xy, cases xs with x y
? In Coq this is intros [x y]
and in Agda it's just pattern matching against (x,y)
.
Johan Commelin (Sep 16 2021 at 07:27):
rintro \<x,y\>
Johan Commelin (Sep 16 2021 at 07:28):
Where \<
and \>
should be replaced by funny unicode brackets
Eric Wieser (Sep 16 2021 at 07:30):
⟨x, y⟩
Andrej Bauer (Sep 16 2021 at 07:31):
While I have your attention, is there a simple logic solver, along the lines of Coq tauto
and firstorder
?
Johan Commelin (Sep 16 2021 at 07:31):
tauto
exists, I don't know if it does what you want
Johan Commelin (Sep 16 2021 at 07:32):
I think there is even tauto!
!
Johan Commelin (Sep 16 2021 at 07:32):
For more oompf
Mario Carneiro (Sep 16 2021 at 10:23):
Andrej Bauer said:
Suppose my goal is
∀ p : α × β, A
. Is there a shorthand forintro xy, cases xs with x y
? In Coq this isintros [x y]
and in Agda it's just pattern matching against(x,y)
.
The term mode syntax \lam \<x, y\>,
also works same as in agda, and that doesn't need any mathlib tactics
Yaël Dillies (Sep 16 2021 at 10:26):
It's a bit fragile though. It doesnt always work in refine λ ⟨x, y⟩, _
for example.
Mario Carneiro (Sep 16 2021 at 10:31):
That's because it sets up a separate proof context in an auxiliary, so it can't share metavariables with the original proof. You can always do exact λ ⟨x, y⟩, begin ... end
if you want to keep tacticking
Mario Carneiro (Sep 16 2021 at 10:33):
the same thing happens if you use match
Last updated: Dec 20 2023 at 11:08 UTC