Zulip Chat Archive
Stream: general
Topic: how do you make ite/dite compute in tactic mode
Slavomir Kaslev (May 10 2020 at 11:40):
Suppose the context is
a b x : ℕ,
h : x < a
⊢ dite (x < a) (λ (h : x < a), sum.inl ⟨x, h⟩) (λ (h_1 : ¬x < a), sum.inr ⟨x - a, _⟩) = sum.inl ⟨x, h⟩
since we know x < a is true (h), how does one make dite reduce to its "then" value sum.inl ⟨x, h⟩?
Reid Barton (May 10 2020 at 11:42):
The lemma you need is dif_pos.
Scott Morrison (May 10 2020 at 12:31):
(and you can find this by typing library_search)
Slavomir Kaslev (May 10 2020 at 18:58):
That's exactly it. Thank you so much, Reid!
Yury G. Kudryashov (May 10 2020 at 19:00):
If you don't have x < a in the environment, then you can also use split_ifs tactic that will run by_cases on relevant conditions, then simplify using if_pos, if_neg, dif_pos, dif_neg.
Last updated: May 02 2025 at 03:31 UTC