feat(builtin/kernel): add rewrite rules for if-then-else
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
5b810d11eb
commit
bc2d504ccc
2 changed files with 2 additions and 0 deletions
|
@ -677,6 +677,8 @@ theorem if_a_a {A : TypeU} (c : Bool) (a: A) : (if c then a else a) = a
|
|||
(λ H : ¬ c, calc (if c then a else a) = (if false then a else a) : { eqf_intro H }
|
||||
... = a : if_false a a)
|
||||
|
||||
add_rewrite if_true if_false if_a_a
|
||||
|
||||
theorem if_congr {A : TypeU} {b c : Bool} {x y u v : A} (H_bc : b = c)
|
||||
(H_xu : ∀ (H_c : c), x = u) (H_yv : ∀ (H_nc : ¬ c), y = v) :
|
||||
(if b then x else y) = if c then u else v
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue