fix(library/init/nat): recursor attribute should be in the top-level since nat was defined in the top-level

This commit is contained in:
Leonardo de Moura 2016-04-28 16:34:37 -07:00
parent 5fc90adf6b
commit f05e52e59f

View file

@ -10,15 +10,15 @@ open eq.ops decidable or
notation `` := nat
namespace nat
protected definition rec_on [reducible] [recursor] [unfold 2]
protected definition rec_on [reducible]
{C : → Type} (n : ) (H₁ : C 0) (H₂ : Π (a : ), C a → C (succ a)) : C n :=
nat.rec H₁ H₂ n
protected definition induction_on [recursor]
protected definition induction_on
{C : → Prop} (n : ) (H₁ : C 0) (H₂ : Π (a : ), C a → C (succ a)) : C n :=
nat.rec H₁ H₂ n
protected definition cases_on [reducible] [recursor] [unfold 2]
protected definition cases_on [reducible]
{C : → Type} (n : ) (H₁ : C 0) (H₂ : Π (a : ), C (succ a)) : C n :=
nat.rec H₁ (λ a ih, H₂ a) n
@ -271,3 +271,7 @@ namespace nat
theorem sub_lt_succ_iff_true [simp] (a b : ) : a - b < succ a ↔ true :=
iff_true_intro !sub_lt_succ
end nat
attribute [recursor] nat.induction_on
attribute [recursor] [unfold 2] nat.cases_on
attribute [recursor] [unfold 2] nat.rec_on