lean2/hott/logic.hlean
Jakob von Raumer 1042f6c29d feat(hott): port finite ordinal sets from the std library, with all things related to nat.mod and to fintype still missing.
create a logic.hlean file for further extension of the logic theory in the prelude. add distributivity lemmas for products and sums.
2016-02-09 09:58:10 -08:00

18 lines
674 B
Text

/-
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
theorem dif_pos {c : Type} [H : decidable c] [P : is_hprop c] (Hc : c)
{A : Type} {t : c → A} {e : ¬ c → A} : dite c t e = t Hc :=
by induction H with Hc Hnc; apply ap t; apply is_hprop.elim; apply absurd Hc Hnc
theorem dif_neg {c : Type} [H : decidable c] (Hnc : ¬c)
{A : Type} {t : c → A} {e : ¬ c → A} : dite c t e = e Hnc :=
by induction H with Hc Hnc; apply absurd Hc Hnc; apply ap e; apply is_hprop.elim