lean4-htt/tests/lean/unsound.lean
Leonardo de Moura db38bc4043 fix: missing check at infer_proj
We should not allow `h.1` if `h` is a proposition and the result is
not. The recursor for `h`'s type can only eliminate into `Prop`.
2022-02-25 07:15:34 -08:00

3 lines
155 B
Text

def foo (h : ∃ x: Nat, True) := h.1
theorem contradiction : False :=
(by decide : 0 ≠ 1) (show foo ⟨0, trivial⟩ = foo ⟨1, trivial⟩ from rfl)