Before this commit, an user could define their own prelude and change the types of quot, quot.mk, quot.lift or quot.ind. By doing that, they could prove false. This commit prevents this kind of abuse. It also modifies the definition of `quot` and avoids the `setoid` dependency. The previous `quot` type is now called `quotient`, and it is defined using the new `quot` type provided by the kernel. See discussion at #1330
18 lines
529 B
Text
18 lines
529 B
Text
open tactic
|
|
|
|
def g : nat → nat :=
|
|
λ n, 0
|
|
|
|
meta def show_pos (n : name) : command :=
|
|
do env ← get_env,
|
|
pos ← returnopt (env^.decl_pos_info n),
|
|
olean ← returnopt (env^.decl_olean n) <|> return "current file",
|
|
trace $ to_string n ++ " was defined at " ++ olean ++ " : " ++ to_string pos
|
|
|
|
run_command show_pos `add
|
|
run_command show_pos `nat.succ
|
|
run_command show_pos `subsingleton.intro
|
|
run_command show_pos `subsingleton.rec
|
|
run_command show_pos `nat.add
|
|
run_command show_pos `quotient
|
|
run_command show_pos `g
|