feat(library/standard/classical): add Peirce's law
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
e3f364e1ee
commit
f942c6f64c
2 changed files with 11 additions and 0 deletions
|
@ -154,3 +154,8 @@ theorem not_forall_exists {A : Type} {P : A → Bool} (H : ¬ ∀ x, P x) : ∃
|
|||
have H2 : ∀ x, ¬ ¬ P x, from not_exists_forall H1,
|
||||
have H3 : ∀ x, P x, from take x, not_not_elim (H2 x),
|
||||
absurd H3 H)
|
||||
|
||||
theorem peirce (a b : Bool) : ((a → b) → a) → a
|
||||
:= assume H, by_contradiction (λ Hna : ¬ a,
|
||||
have Hnna : ¬ ¬ a, from not_implies_left (mt H Hna),
|
||||
absurd (not_not_elim Hnna) Hna)
|
||||
|
|
|
@ -42,6 +42,12 @@ theorem absurd_not_true (H : ¬ true) : false
|
|||
theorem not_false_trivial : ¬ false
|
||||
:= assume H : false, H
|
||||
|
||||
theorem not_implies_left {a b : Bool} (H : ¬ (a → b)) : ¬ ¬ a
|
||||
:= assume Hna : ¬ a, absurd (assume Ha : a, absurd_elim b Ha Hna) H
|
||||
|
||||
theorem not_implies_right {a b : Bool} (H : ¬ (a → b)) : ¬ b
|
||||
:= assume Hb : b, absurd (assume Ha : a, Hb) H
|
||||
|
||||
inductive and (a b : Bool) : Bool :=
|
||||
| and_intro : a → b → and a b
|
||||
|
||||
|
|
Loading…
Reference in a new issue