Cleaning in iso

This commit is contained in:
Niels van der Weide 2017-09-19 17:22:15 +02:00
parent 2cd3beec43
commit 8e143c5285
2 changed files with 15 additions and 23 deletions

View File

@ -5,15 +5,7 @@ Require Import list_representation list_representation.operations
Require Import kuratowski.kuratowski_sets. Require Import kuratowski.kuratowski_sets.
Section Iso. Section Iso.
Context {A : Type}. Context {A : Type} `{Univalence}.
Context `{Univalence}.
Definition dupl' (a : A) (X : FSet A) :
{|a|} {|a|} X = {|a|} X := assoc _ _ _ @ ap ( X) (idem _).
Definition comm' (a b : A) (X : FSet A) :
{|a|} {|b|} X = {|b|} {|a|} X :=
assoc _ _ _ @ ap ( X) (comm _ _) @ (assoc _ _ _)^.
Definition FSetC_to_FSet: FSetC A -> FSet A. Definition FSetC_to_FSet: FSetC A -> FSet A.
Proof. Proof.
@ -21,10 +13,10 @@ Section Iso.
- apply E. - apply E.
- intros a x. - intros a x.
apply ({|a|} x). apply ({|a|} x).
- intros. cbn. - intros a X.
apply dupl'. apply (assoc _ _ _ @ ap ( X) (idem _)).
- intros. cbn. - intros a X Y.
apply comm'. apply (assoc _ _ _ @ ap ( Y) (comm _ _) @ (assoc _ _ _)^).
Defined. Defined.
Definition FSet_to_FSetC: FSet A -> FSetC A. Definition FSet_to_FSetC: FSet A -> FSetC A.

View File

@ -5,8 +5,8 @@ Require Import list_representation list_representation.operations.
Section properties. Section properties.
Context {A : Type}. Context {A : Type}.
Definition append_nl : forall (x: FSetC A), x = x Definition append_nl (x: FSetC A) : x = x
:= fun _ => idpath. := idpath.
Lemma append_nr : forall (x: FSetC A), x = x. Lemma append_nr : forall (x: FSetC A), x = x.
Proof. Proof.
@ -15,16 +15,16 @@ Section properties.
- intros. apply (ap (fun y => a;;y) X). - intros. apply (ap (fun y => a;;y) X).
Defined. Defined.
Lemma append_assoc {H: Funext}: Lemma append_assoc :
forall (x y z: FSetC A), x (y z) = (x y) z. forall (x y z: FSetC A), x (y z) = (x y) z.
Proof. Proof.
hinduction intros x y z.
; try (intros ; apply path_forall ; intro hinduction x ; try (intros ; apply path_ishprop).
; apply path_forall ; intro ; apply set_path2). - cbn.
- reflexivity. reflexivity.
- intros a x HR y z. - intros.
specialize (HR y z). cbn.
apply (ap (fun y => a;;y) HR). f_ap.
Defined. Defined.
Lemma append_singleton: forall (a: A) (x: FSetC A), Lemma append_singleton: forall (a: A) (x: FSetC A),