Skip to content

split_ifs doesn't completely split hypotheses #760

Closed

Description

@kim-em

In Lean 3, we had:

import tactic.split_ifs
import tactic.localized

open_locale classical

example (P Q : Prop) (w : if P then (if Q then true else true) else true = true) : true :=
begin
  split_ifs at w,
  -- 3 goals, no `if`s in `w`
  all_goals { trivial, }
end

while currently in mathlib4 we have:

import Mathlib.Tactic.SplitIfs

open Classical

example (P Q : Prop) (w : if P then (if Q then true else true) else true = true) : true := by
  split_ifs at w
  -- two goals here, and in the first `w : if Q then true else true`

This first came up in porting Logic.Embedding.Basic.

Activity

  1. digama0 commented on Nov 28, 2022

    @digama0
    Member

    The new behavior looks more useful. I'm inclined to just mathport split_ifs to repeat' split_if or make split_ifs a macro for that.

  2. dwrensha commented on Nov 28, 2022

    @dwrensha
    Member

    @semorrison thanks for the report.

    @digama0 my feeling is that we should try to make mathlib4 split_ifs match mathlib3 split_ifs as closely as possible, in order to streamline the porting effort. (Though I think eventually all of the split_ifs usages may become split from Lean 4 core.)

  3. added a commit that references this issue on Nov 28, 2022
    b863d2a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions