lean2/tests/lean/run/elab_failure.lean
Leonardo de Moura b07b82cf43 fix(library/definitional): marking cases_on and rec_on as reducible
The idea is to avoid counter-intuitive behavior
2014-11-12 15:03:30 -08:00

15 lines
424 B
Text

import data.nat.basic data.bool
open bool nat
reducible nat.rec_on
definition is_eq (a b : nat) : bool :=
nat.rec_on a
(λ b, nat.cases_on b tt (λb₁, ff))
(λ a₁ r₁ b, nat.cases_on b ff (λb₁, r₁ b₁))
b
example (a₁ : nat) (b : nat) : true :=
@nat.cases_on (λ (n : nat), true) b
true.intro
(λ (b₁ : _),
have aux : is_eq a₁ b₁ = is_eq (succ a₁) (succ b₁), from rfl,
true.intro)