mirror of
				https://github.com/nmvdw/HITs-Examples
				synced 2025-11-04 07:33:51 +01:00 
			
		
		
		
	Make everything work with the new notation
This commit is contained in:
		@@ -223,7 +223,7 @@ Section enumerated_fset.
 | 
			
		||||
    end.
 | 
			
		||||
  
 | 
			
		||||
  Lemma list_to_fset_ext (ls : list A) (a : A):
 | 
			
		||||
    listExt ls a -> isIn a (list_to_fset ls).
 | 
			
		||||
    listExt ls a -> a ∈ (list_to_fset ls).
 | 
			
		||||
  Proof.
 | 
			
		||||
    induction ls as [|x xs]; simpl.
 | 
			
		||||
    - apply idmap.
 | 
			
		||||
@@ -269,7 +269,7 @@ Section fset_dec_enumerated.
 | 
			
		||||
    - intros a X Hls.
 | 
			
		||||
      strip_truncations. apply tr.
 | 
			
		||||
      destruct Hls as [ls Hls].
 | 
			
		||||
      exists (cons a ls). intros b. simpl.
 | 
			
		||||
      exists (cons a ls). intros b. cbn.
 | 
			
		||||
      f_ap.
 | 
			
		||||
    - intros. apply path_ishprop.
 | 
			
		||||
    - intros. apply path_ishprop.
 | 
			
		||||
@@ -294,16 +294,16 @@ Section subobjects.
 | 
			
		||||
  Definition enumeratedS (P : Sub A) : hProp :=
 | 
			
		||||
    enumerated (sigT P).
 | 
			
		||||
  
 | 
			
		||||
  Lemma enumeratedS_empty : enumeratedS empty_sub.
 | 
			
		||||
  Lemma enumeratedS_empty : closedEmpty enumeratedS.
 | 
			
		||||
  Proof.
 | 
			
		||||
    unfold enumeratedS.
 | 
			
		||||
    apply tr. exists nil. simpl.
 | 
			
		||||
    intros [a Ha]. assumption.
 | 
			
		||||
  Defined.
 | 
			
		||||
 | 
			
		||||
  Lemma enumeratedS_singleton (x : A) : enumeratedS (singleton x).
 | 
			
		||||
  Lemma enumeratedS_singleton : closedSingleton enumeratedS.
 | 
			
		||||
  Proof.
 | 
			
		||||
    apply tr. simpl.
 | 
			
		||||
    intros x. apply tr. simpl.
 | 
			
		||||
    exists (cons (x;tr idpath) nil).
 | 
			
		||||
    intros [y Hxy]. simpl.
 | 
			
		||||
    strip_truncations. apply tr.
 | 
			
		||||
@@ -417,7 +417,7 @@ Section subobjects.
 | 
			
		||||
    end.
 | 
			
		||||
 | 
			
		||||
  Lemma list_weaken_to_fset_ext (P : Sub A) (ls : list (sigT P)) (a : A) (Ha : P a):
 | 
			
		||||
    listExt ls (a;Ha) -> isIn a (list_weaken_to_fset P ls).
 | 
			
		||||
    listExt ls (a;Ha) -> a ∈ (list_weaken_to_fset P ls).
 | 
			
		||||
  Proof.
 | 
			
		||||
    induction ls as [|[x Hx] xs]; simpl.
 | 
			
		||||
    - apply idmap.
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@ Section k_finite.
 | 
			
		||||
  Context (A : Type).
 | 
			
		||||
  Context `{Univalence}.
 | 
			
		||||
 | 
			
		||||
  Definition map (X : FSet A) : Sub A := fun a => isIn a X.
 | 
			
		||||
  Definition map (X : FSet A) : Sub A := fun a => a ∈ X.
 | 
			
		||||
 | 
			
		||||
  Global Instance map_injective : IsEmbedding map.
 | 
			
		||||
  Proof.
 | 
			
		||||
@@ -69,37 +69,35 @@ Section structure_k_finite.
 | 
			
		||||
  Context (A : Type).
 | 
			
		||||
  Context `{Univalence}.
 | 
			
		||||
 | 
			
		||||
  Lemma map_union : forall X Y : FSet A, map (U X Y) = max_fun (map X) (map Y).
 | 
			
		||||
  Lemma map_union : forall X Y : FSet A, map (X ∪ Y) = max_fun (map X) (map Y).
 | 
			
		||||
  Proof.
 | 
			
		||||
    intros.
 | 
			
		||||
    unfold map, max_fun.
 | 
			
		||||
    reflexivity.
 | 
			
		||||
  Defined.
 | 
			
		||||
 | 
			
		||||
  Lemma k_finite_union : hasUnion (Kf_sub A).
 | 
			
		||||
  Lemma k_finite_union : closedUnion (Kf_sub A).
 | 
			
		||||
  Proof.
 | 
			
		||||
    unfold hasUnion, Kf_sub, Kf_sub_intern.
 | 
			
		||||
    unfold closedUnion, Kf_sub, Kf_sub_intern.
 | 
			
		||||
    intros.
 | 
			
		||||
    destruct X0 as [SX XP].
 | 
			
		||||
    destruct X1 as [SY YP].
 | 
			
		||||
    exists (U SX SY).
 | 
			
		||||
    exists (SX ∪ SY).
 | 
			
		||||
    rewrite map_union.
 | 
			
		||||
    rewrite XP, YP.
 | 
			
		||||
    reflexivity.
 | 
			
		||||
  Defined.
 | 
			
		||||
 | 
			
		||||
  Lemma k_finite_empty : hasEmpty (Kf_sub A).
 | 
			
		||||
  Lemma k_finite_empty : closedEmpty (Kf_sub A).
 | 
			
		||||
  Proof.
 | 
			
		||||
    unfold hasEmpty, Kf_sub, Kf_sub_intern, map, empty_sub.
 | 
			
		||||
    exists E.
 | 
			
		||||
    exists ∅.
 | 
			
		||||
    reflexivity.
 | 
			
		||||
  Defined.
 | 
			
		||||
 | 
			
		||||
  Lemma k_finite_singleton : hasSingleton (Kf_sub A).
 | 
			
		||||
  Lemma k_finite_singleton : closedSingleton (Kf_sub A).
 | 
			
		||||
  Proof.
 | 
			
		||||
    unfold hasSingleton, Kf_sub, Kf_sub_intern, map, singleton.
 | 
			
		||||
    intro.
 | 
			
		||||
    exists (L a).
 | 
			
		||||
    exists {|a|}.
 | 
			
		||||
    cbn.
 | 
			
		||||
    apply path_forall.
 | 
			
		||||
    intro z. 
 | 
			
		||||
@@ -108,7 +106,7 @@ Section structure_k_finite.
 | 
			
		||||
 | 
			
		||||
  Lemma k_finite_hasDecidableEmpty : hasDecidableEmpty (Kf_sub A).
 | 
			
		||||
  Proof.
 | 
			
		||||
    unfold hasDecidableEmpty, hasEmpty, Kf_sub, Kf_sub_intern, map.
 | 
			
		||||
    unfold hasDecidableEmpty, closedEmpty, Kf_sub, Kf_sub_intern, map.
 | 
			
		||||
    intros.
 | 
			
		||||
    destruct X0 as [SX EX].
 | 
			
		||||
    rewrite EX.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user