Skip to content

Instantly share code, notes, and snippets.

@luxbock
Last active September 8, 2018 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luxbock/853bdcdde0f333502055c6913fc91e9c to your computer and use it in GitHub Desktop.
Save luxbock/853bdcdde0f333502055c6913fc91e9c to your computer and use it in GitHub Desktop.
open classical
variables (α : Type) (p q : α → Prop)
variable a : α
variable r : Prop
example : (∃ x, p x) ↔ ¬ (∀ x, ¬ p x) :=
iff.intro
(λ ⟨a, hpa⟩, (λ ax, ax a hpa))
(λ nanpx : (∀ x, p x → false) → false,
suffices hpa : p a, from ⟨a, hpa⟩,
by_contradiction
(λ hnpa,
nanpx (λ ha, hnpa))
-- type mismatch at application
-- nanpx (λ (ha : α), hnpa)
-- term
-- λ (ha : α), hnpa
-- has type
-- α → ¬p a
-- but is expected to have type
-- ∀ (x : α), p x → false
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment