Skip to content

Commit 8c1baa2

Browse files
committed
Add changes for Coq report
1 parent a06477a commit 8c1baa2

File tree

2 files changed

+26
-55
lines changed

2 files changed

+26
-55
lines changed

theory/ua_homomorphism.v

Lines changed: 24 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ Section is_homomorphism.
5959
Defined.
6060
End is_homomorphism.
6161

62-
(** Gival algebras [A B : Algebra σ] a homomorphism [Homomorphism A B]
62+
(** Given algebras [A B : Algebra σ] a homomorphism [Homomorphism A B]
6363
is a family of functions [f : ∀ (s : Sort σ), A s → B s] where
6464
[IsHomomorphism f] holds. *)
6565

6666
Record Homomorphism {σ} {A B : Algebra σ} : Type := BuildHomomorphism
6767
{ def_hom : ∀ (s : Sort σ), A s → B s
6868
; is_homomorphism_hom : IsHomomorphism def_hom }.
6969

70-
Arguments Homomorphism {σ} A B.
70+
Arguments Homomorphism {σ}.
7171

7272
Arguments BuildHomomorphism {σ A B} def_hom {is_homomorphism_hom}.
7373

@@ -336,43 +336,21 @@ Section hom_compose.
336336
Qed.
337337
End hom_compose.
338338

339-
Lemma path_forall_recr_beta `{Funext} {A : Type} {B : A → Type}
340-
(a : A) (P : (∀ x, B x) → B a → Type) (f g : ∀ a, B a)
341-
(e : f == g) (Pa : P f (f a))
342-
: transport (fun f => P f (f a)) (path_forall f g e) Pa
343-
= transport (fun x => P x (g a))
344-
(path_forall f g e) (transport (fun y => P f y) (e a) Pa).
345-
Proof.
346-
rewrite <- (eissect (path_forall f g) e).
347-
change ((_^-1 (path_forall f g e))) with ((apD10 (path_forall f g e))).
348-
destruct (path_forall f g e).
349-
unfold apD10.
350-
rewrite (path_forall_1 f).
351-
reflexivity.
352-
Defined.
339+
(** If [f : ∀ i, F i <~> G i] is a family of equivalences,
340+
then by function extensionality composed with univalence there is
341+
a path [F = G]. *)
353342

354-
(** The following section proves that there is a path between
343+
Definition path_equiv_family `{Univalence} {I : Type}
344+
{F G : I → Type} (f : ∀ i, F i <~> G i)
345+
: F = G
346+
:= path_forall F G (λ i, path_universe (f i)).
347+
348+
(** The following section shows that there is a path between
355349
isomorphic algebras. *)
356350

357351
Section path_isomorphism.
358352
Context `{Univalence} {σ : Signature} {A B : Algebra σ}.
359353

360-
(** Recall that there is an implicit coercion
361-
362-
<<
363-
Coercion carriers : Algebra >-> Funclass
364-
>>
365-
366-
so that [A s] is notation for [carriers A s]. *)
367-
368-
(** If [f : ∀ (s : Sort σ), A s <~> B s] is a family of equivalences,
369-
then by function extensionality and univalence there is a path
370-
between the carriers, [carriers A = carriers B]. *)
371-
372-
Definition path_carriers_equiv {I : Type} {X Y : I → Type} (f : ∀ i, X i <~> Y i)
373-
: X = Y
374-
:= path_forall X Y (λ i, path_universe (f i)).
375-
376354
(** Given a family of equivalences [f : ∀ (s : Sort σ), A s <~> B s]
377355
which is [OpPreserving f α β] with respect to algebra operations
378356
@@ -381,34 +359,27 @@ Section path_isomorphism.
381359
β : B s1 → B s2 → ... → B sn → B t
382360
>>
383361
384-
By transporting [α] along the path [path_carriers_equiv f] we
362+
By transporting [α] along the path [path_equiv_family f] we
385363
find a path from the transported operation [α] to [β]. *)
386364

387-
Lemma path_operations_equiv (f : ∀ (s : Sort σ), A s <~> B s)
388-
{w : SymbolType σ} (α : Operation A w) (β : Operation B w)
389-
(P : OpPreserving f α β)
365+
Lemma path_operations_equiv {w : SymbolType σ}
366+
(α : Operation A w) (β : Operation B w)
367+
(f : ∀ (s : Sort σ), A s <~> B s) (P : OpPreserving f α β)
390368
: transport (λ C : Carriers σ, Operation C w)
391-
(path_carriers_equiv f) α = β.
369+
(path_equiv_family f) α = β.
392370
Proof.
393-
unfold path_carriers_equiv.
371+
unfold path_equiv_family.
394372
induction w; simpl in *.
395-
- rewrite (path_forall_recr_beta t (λ _ x, x) A B (λ s, path_universe (f s)) α).
396-
induction (path_forall A B (λ s : Sort σ, path_universe (f s))).
397-
(* transport_path_forall_hammer. *)
398-
373+
- transport_path_forall_hammer.
399374
exact (ap10 (transport_idmap_path_universe (f t)) α @ P).
400375
- funext y.
401-
402-
set (Λ := λ (a : Sort σ → Type) (b:Type), b → Operation a w).
403-
rewrite (path_forall_recr_beta t Λ A B (λ s, path_universe (f s)) α).
404-
(*transport_path_forall_hammer.*)
405-
376+
transport_path_forall_hammer.
406377
rewrite transport_forall_constant.
407378
rewrite transport_arrow_toconst.
408379
rewrite (transport_path_universe_V (f t)).
380+
apply IHw.
409381
specialize (P ((f t)^-1 y)).
410-
rewrite (eisretr (f t)) in P.
411-
exact (IHw (α ((f t)^-1 y)) (β y) P).
382+
by rewrite (eisretr (f t) y) in P.
412383
Qed.
413384

414385
(** Suppose [u : Symbol σ] is a function symbol. Recall that
@@ -420,12 +391,12 @@ Section path_isomorphism.
420391
be a function symbol. Since [f] is a homomorphism, the induced
421392
family of equivalences [e] satisfies [OpPreserving e (u^^A) (u^^B)].
422393
By [path_operations_equiv] above, we can then transport [u^^A] along
423-
the path [path_carriers_equiv e] and obtain a path to [u^^B]. *)
394+
the path [path_equiv_family e] and obtain a path to [u^^B]. *)
424395

425396
Lemma path_operations_isomorphism (f : Homomorphism A B)
426397
`{!IsIsomorphism f} (u : Symbol σ)
427398
: transport (λ C : Carriers σ, Operation C (σ u))
428-
(path_carriers_equiv (equiv_carriers_isomorphism f)) (u^^A)
399+
(path_equiv_family (equiv_carriers_isomorphism f)) (u^^A)
429400
= u^^B.
430401
Proof.
431402
apply path_operations_equiv. apply (op_preserving f).
@@ -437,7 +408,7 @@ Section path_isomorphism.
437408
: A = B.
438409
Proof.
439410
apply path_algebra.
440-
exists (path_carriers_equiv (equiv_carriers_isomorphism f)).
411+
exists (path_equiv_family (equiv_carriers_isomorphism f)).
441412
funext u.
442413
exact (transport_forall_constant _ _ u
443414
@ path_operations_isomorphism f u).

theory/ua_prod_algebra.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ Section bin_prod_algebra.
126126
Definition BinProdAlgebra : Algebra σ :=
127127
ProdAlgebra Bool bin_prod_algebras.
128128

129-
Definition pr1_prod_algebra : Homomorphism BinProdAlgebra A
129+
Definition fst_prod_algebra : Homomorphism BinProdAlgebra A
130130
:= hom_projection_prod_algebra Bool bin_prod_algebras false.
131131

132-
Definition pr2_prod_algebra : Homomorphism BinProdAlgebra B
132+
Definition snd_prod_algebra : Homomorphism BinProdAlgebra B
133133
:= hom_projection_prod_algebra Bool bin_prod_algebras true.
134134
End bin_prod_algebra.
135135

0 commit comments

Comments
 (0)