lean4-htt/tests/lean/magical.lean
Gabriel Ebner 3746005f5f fix: reject projection (_ : ∃ x, p).2
The inferred type of this projection does not even type check, in general.
2022-03-01 09:00:46 -08:00

5 lines
258 B
Text

-- Projection to the witness should be rejected.
def witness : Nat := (⟨1, Nat.le_refl _⟩ : ∃ x, x ≥ 1).1
-- Projection to the property as well (it could contain the witness projection).
theorem witness_eq (h : ∃ x : Nat, True) : h.2 = h.2 := rfl