lean4-htt/old_tests/tests/lean/run/simp_norm.lean
2018-04-10 12:56:55 -07:00

11 lines
381 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.

universes u v
axiom map_bind_lemma : ∀ {α β : Type u} {m : Type u → Type v} [monad m] (f : α → β) (x : m α), f <$> x = x >>= pure ∘ f
attribute [norm] function.comp map_bind_lemma
example : nat.succ <$> [1, 2] = [2, 3] :=
begin
simp with norm,
guard_target [1, 2] >>= (λ x, pure (nat.succ x)) = [2, 3],
simp [has_bind.bind, pure, has_pure.pure, list.ret]
end