leanprover-community / mathlib

  • Home
  • Zulip archive
  • API documentation
  • Lean web editor
  • Links

Zulip Chat Archive

Stream: new members

Topic: Convert dite to tactic


Felipe (Nov 14 2022 at 19:37):

I'm trying to get better at writing tactics. One pattern I end up using often is:

by
  ...
  exact
    if h: someCondition
    then by <tactics using h>
    else by <other tactics using h>

Is there a way to 'lift' the dite into tactics directly?

Junyan Xu (Nov 14 2022 at 19:42):

by_cases h : someCondition


Last updated: May 02 2025 at 03:31 UTC

Theme Simple by wildflame © 2016 Powered by jekyll