This PR develops custom simprocs for dealing with `ite`/`dite` expressions in `cbv` tactics, based on equivalent simprocs from `Sym.simp`, with the difference that if the condition is not reduced to `True`/`False`, we make use of the decidable instance and calculate to what the condition reduces to. Stacked on top of #12391.
31 lines
655 B
Text
31 lines
655 B
Text
set_option cbv.warning false
|
|
|
|
example : (if (true = false) then 5 else 7) = 7 := by
|
|
conv =>
|
|
lhs
|
|
cbv
|
|
|
|
example : (if (true = ((fun x => x) true)) then 5 else 7) = 5 := by
|
|
conv =>
|
|
lhs
|
|
cbv
|
|
|
|
example : (if (String.Pos.Raw.mk 1 = String.Pos.Raw.mk 2) then 5 else 42) = 42 := by
|
|
conv =>
|
|
lhs
|
|
cbv
|
|
|
|
example : (if (String.Pos.Raw.mk 1 = String.Pos.Raw.mk 1) then 5 else 42) = 5 := by
|
|
conv =>
|
|
lhs
|
|
cbv
|
|
|
|
example : (if _ : String.Pos.Raw.mk 1 = String.Pos.Raw.mk 2 then 5 else 42) = 42 := by
|
|
conv =>
|
|
lhs
|
|
cbv
|
|
|
|
example : (if _ : String.Pos.Raw.mk 1 = String.Pos.Raw.mk 1 then 5 else 42) = 5 := by
|
|
conv =>
|
|
lhs
|
|
cbv
|