1
0
mirror of https://github.com/nmvdw/HITs-Examples synced 2025-11-03 15:13:51 +01:00

Added some lemmata from paper

This commit is contained in:
Niels van der Weide
2017-10-02 17:23:03 +02:00
parent 81f5dbcbd5
commit 9a2a81047b
3 changed files with 87 additions and 6 deletions

View File

@@ -67,13 +67,16 @@ Section length.
Variable (length : FSet A -> nat)
(length_singleton : forall (a : A), length {|a|} = 1)
(length_one : forall (X : FSet A), length X = 1 -> {a : A & X = {|a|}}).
(length_one : forall (X : FSet A), length X = 1 -> hexists (fun a => X = {|a|})).
Theorem dec_length (a b : A) : Decidable(merely(a = b)).
Proof.
destruct (dec (length ({|a|} {|b|}) = 1)).
- destruct (length_one _ p) as [c Xc].
refine (inl _).
- refine (inl _).
pose (length_one _ p) as Hp.
simple refine (Trunc_rec _ Hp).
clear Hp ; intro Hp.
destruct Hp as [c Xc].
assert (merely(a = c) * merely(b = c)).
{ split.
* pose (transport (fun z => a z) Xc) as t.