feat(library/init/classical): simpler choice axiom

This commit is contained in:
Jeremy Avigad 2017-03-02 22:00:41 -05:00 committed by Leonardo de Moura
parent d9da6f05b5
commit f460cbdf2e
4 changed files with 9 additions and 5 deletions

View file

@ -1,7 +1,7 @@
/-
Copyright (c) 2015 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Jeremy Avigad
Authors: Leonardo de Moura, Jeremy Avigad, Mario Carneiro
-/
prelude
import init.data.subtype.basic init.funext
@ -11,7 +11,11 @@ namespace classical
universes u v
/- the axiom -/
axiom indefinite_description {α : Sort u} (p : α → Prop) : (∃ x, p x) → {x // p x}
axiom choice {α : Sort u} : nonempty αα
noncomputable theorem indefinite_description {α : Sort u} (p : α → Prop) :
(∃ x, p x) → {x // p x} :=
λ h, choice (let ⟨x, px⟩ := h in ⟨⟨x, px⟩⟩)
/- Diaconescu's theorem: using function extensionality and propositional extensionality,
we can get excluded middle from this. -/

View file

@ -1,3 +1,3 @@
quot.sound : ∀ {α : Type u} {r : αα → Prop} {a b : α}, r a b → quot.mk r a = quot.mk r b
classical.indefinite_description : Π {α : Sort u} (p : α → Prop), (∃ (x : α), p x) → {x // p x}
classical.choice : Π {α : Sort u}, nonempty αα
propext : ∀ {a b : Prop}, (a ↔ b) → a = b

View file

@ -1,3 +1,3 @@
quot.sound : ∀ {α : Type u} {r : αα → Prop} {a b : α}, r a b → quot.mk r a = quot.mk r b
classical.indefinite_description : Π {α : Sort u} (p : α → Prop), (∃ (x : α), p x) → {x // p x}
classical.choice : Π {α : Sort u}, nonempty αα
propext : ∀ {a b : Prop}, (a ↔ b) → a = b

View file

@ -2,7 +2,7 @@ print_ax3.lean:13:6: warning: declaration 'foo5' uses sorry
no axioms
------
quot.sound : ∀ {α : Type u} {r : αα → Prop} {a b : α}, r a b → quot.mk r a = quot.mk r b
classical.indefinite_description : Π {α : Sort u} (p : α → Prop), (∃ (x : α), p x) → {x // p x}
classical.choice : Π {α : Sort u}, nonempty αα
propext : ∀ {a b : Prop}, (a ↔ b) → a = b
------
theorem foo3 : 0 = 0 :=