lean4-htt/tests/lean/run/section_var_bug.lean
Leonardo de Moura 0ba60e62d7 feat(kernel/quotient/quotient): make quotient module robust against users that define their own prelude's
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
2017-01-24 15:59:38 -08:00

11 lines
217 B
Text

section
variable {A : Type}
variable [s : setoid A]
variable {B : quotient s → Type}
include s
attribute [reducible]
protected definition ex (f : Π a, B ⟦a⟧) (a : A) : Σ q, B q :=
sigma.mk ⟦a⟧ (f a)
end