lean4-htt/tests/lean/run/simp5.lean
Leonardo de Moura 9528c1abd7 chore: add basic simp lemmas
TODO: consistent naming convention for theorems.

cc @Kha
2021-02-15 11:32:19 -08:00

14 lines
271 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

def f {α} (a b : α) := a
theorem f_Eq {α} (a b : α) : f a b = a :=
rfl
theorem ex1 (a b c : α) : f (f a b) c = a := by
simp [f_Eq]
#print ex1
theorem ex2 (p : Nat → Bool) (x : Nat) (h : p x = true) : (if p x then 1 else 2) = 1 := by
simp [h]
#print ex2