2016-02-02 18:44:01 +00:00
|
|
|
/-
|
|
|
|
Copyright (c) Jakob von Raumer. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
Authors: Jakob von Raumer
|
|
|
|
|
|
|
|
Logic lemmas we don't want/need in the prelude.
|
|
|
|
-/
|
|
|
|
import types.pi
|
|
|
|
|
|
|
|
open eq is_trunc decidable
|
|
|
|
|
2016-02-15 20:18:07 +00:00
|
|
|
theorem dif_pos {c : Type} [H : decidable c] [P : is_prop c] (Hc : c)
|
2016-02-02 18:44:01 +00:00
|
|
|
{A : Type} {t : c → A} {e : ¬ c → A} : dite c t e = t Hc :=
|
2016-02-15 20:18:07 +00:00
|
|
|
by induction H with Hc Hnc; apply ap t; apply is_prop.elim; apply absurd Hc Hnc
|
2016-02-02 18:44:01 +00:00
|
|
|
|
|
|
|
theorem dif_neg {c : Type} [H : decidable c] (Hnc : ¬c)
|
|
|
|
{A : Type} {t : c → A} {e : ¬ c → A} : dite c t e = e Hnc :=
|
2016-02-15 20:18:07 +00:00
|
|
|
by induction H with Hc Hnc; apply absurd Hc Hnc; apply ap e; apply is_prop.elim
|