Zulip Chat Archive
Stream: Is there code for X?
Topic: decompose conjuction/existence chain
Jelmer Firet (Oct 17 2021 at 14:59):
Suppose H is an hypothesis with conjuctions and existentials;
for example H = a /\ b /\ exists x, c
Is there a tactic that splits this into all it's parts, something like this:
H : A ∧ B ∧ ∃ x : ℕ, C
======================
Goal
decompose H with a b x c,
a : A
b : B
x : ℕ
c : C x
=======
Goal
Instead of having to write
cases H with a H,
cases H with b H,
cases H with x c,
Eric Wieser (Oct 17 2021 at 15:00):
tactic#rcases and tactic#obtain both do that
Eric Wieser (Oct 17 2021 at 15:01):
obtain ⟨a, b, x, c⟩ := H
Jelmer Firet (Oct 17 2021 at 15:01):
I will check those out, thanks!
Last updated: Dec 20 2023 at 11:08 UTC