2015-02-26 01:00:10 +00:00
|
|
|
inductive list (T : Type) : Type := nil {} : list T | cons : T → list T → list T
|
2014-11-12 17:11:19 +00:00
|
|
|
|
|
|
|
namespace explicit
|
|
|
|
|
|
|
|
inductive ftree.{l₁ l₂} (A : Type.{l₁}) (B : Type.{l₂}) : Type.{max 1 l₁ l₂} :=
|
2015-02-26 01:00:10 +00:00
|
|
|
leafa : A → ftree A B |
|
|
|
|
leafb : B → ftree A B |
|
2014-11-12 17:11:19 +00:00
|
|
|
node : (A → ftree A B) → (B → ftree A B) → ftree A B
|
|
|
|
|
|
|
|
end explicit
|
|
|
|
|
|
|
|
namespace implicit
|
|
|
|
|
|
|
|
inductive ftree (A : Type) (B : Type) : Type :=
|
2015-02-26 01:00:10 +00:00
|
|
|
leafa : ftree A B |
|
2014-11-12 17:11:19 +00:00
|
|
|
node : (A → B → ftree A B) → (B → ftree A B) → ftree A B
|
|
|
|
|
|
|
|
set_option pp.universes true
|
|
|
|
check ftree
|
|
|
|
end implicit
|
|
|
|
|
|
|
|
|
|
|
|
namespace implicit2
|
|
|
|
|
|
|
|
inductive ftree (A : Type) (B : Type) : Type :=
|
2015-02-26 01:00:10 +00:00
|
|
|
leafa : A → ftree A B |
|
|
|
|
leafb : B → ftree A B |
|
2014-11-12 17:11:19 +00:00
|
|
|
node : (list A → ftree A B) → (B → ftree A B) → ftree A B
|
2015-12-09 19:24:37 +00:00
|
|
|
set_option pp.universes true
|
2014-11-12 17:11:19 +00:00
|
|
|
check ftree
|
|
|
|
end implicit2
|