Zulip Chat Archive

Stream: Is there code for X?

Topic: Splitting product-like hypotheses


Jannis Limperg (May 06 2021 at 01:18):

Is there a tactic for splitting all product-like hypotheses? E.g. for the goal

A B X : Type,
P Q : Prop,
R : X  Prop,
h : P  Q,
i :  (x : X), R x,
j : A × B
 false

the tactic would produce

A B X : Type,
P Q : Prop,
R : X  Prop,
h_1 : P
h_2 : Q
i_1 : X
i_2 : R i_1
j_1 : A
j_2 : B

Eric Rodriguez (May 06 2021 at 01:29):

https://leanprover-community.github.io/mathlib_docs/tactics.html#cases_matching%20/%20casesm or the next one maybe

Jannis Limperg (May 06 2021 at 01:33):

Thanks! This doesn't do exactly what I want (I'd like to split things like ∀ x, P x ∧ Q x as well), so I'll probably have to implement it myself.


Last updated: Dec 20 2023 at 11:08 UTC