Built with Alectryon, running Coq+SerAPI v8.19.0+0.19.3. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use ⌘ instead of Ctrl.
(** * Equivalence induction *)
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import Types.Equiv Types.Prod Types.Forall Types.Sigma Types.Universe.(** We define typeclasses and tactics for doing equivalence induction. *)LocalOpen Scope equiv_scope.ClassRespectsEquivalenceL@{i j k s0 s1} (A : Type@{i}) (P : forall (B : Type@{j}), (A <~> B) -> Type@{k})
:= respects_equivalenceL : sig@{s0 s1} (fune' : forallB (e : A <~> B), P A (equiv_idmap A) <~> P B e => Funext -> equiv_idmap _ = e' A (equiv_idmap _) ).ClassRespectsEquivalenceR@{i j k s0 s1} (A : Type@{i}) (P : forall (B : Type@{j}), (B <~> A) -> Type@{k})
:= respects_equivalenceR : sig@{s0 s1} (fune' : forallB (e : B <~> A), P A (equiv_idmap A) <~> P B e => Funext -> equiv_idmap _ = e' A (equiv_idmap _) ).(** We use a sigma type rather than a record for two reasons: 1. In the dependent cases, where one equivalence-respectfulness proof will show up in the body of another goal, it might be the case that using sigma types allows us to reuse the respectfulness lemmas of sigma types, rather than writing new ones for this type. 2. We expect it to be significantly useful to see the type of the fields than the type of the record, because we expect this type to show up as a goal infrequently. Sigma types have more informative notations than record type names; the user can run [hnf] to see what is left to do in the side conditions. *)GlobalArguments RespectsEquivalenceL : clear implicits.GlobalArguments RespectsEquivalenceR : clear implicits.(** When doing equivalence induction, typeclass inference will either fully solve the respectfulness side-conditions, or not make any progress. We would like to progress as far as we can on the side-conditions, so that we leave the user with as little to prove as possible. To do this, we create a "database", implemented using typeclasses, to look up the refinement lemma, keyed on the head of the term we want to respect equivalence. *)Classrespects_equivalence_db {KTVT} (Key : KT) {lem : VT} : Type0 := make_respects_equivalence_db : Unit.Definitionget_lem' {KTVT} Key {lem} `{@respects_equivalence_db KT VT Key lem} : VT := lem.Notationget_lem key := ltac:(letres := constr:(get_lem' key) inletres' := (evalunfold get_lem' in res) inexact res') (only parsing).Sectionconst.Context {A : Type} {T : Type}.
A, T: Type
RespectsEquivalenceL A
(fun (B : Type) (_ : A <~> B) => T)
A, T: Type
RespectsEquivalenceL A
(fun (B : Type) (_ : A <~> B) => T)
A, T: Type y: Funext
1 = 1
exact idpath.Defined.
A, T: Type
RespectsEquivalenceR A
(fun (B : Type) (_ : B <~> A) => T)
A, T: Type
RespectsEquivalenceR A
(fun (B : Type) (_ : B <~> A) => T)
A, T: Type y: Funext
1 = 1
exact idpath.Defined.Endconst.Instance: forall {T}, @respects_equivalence_db _ _ T (funA => @const_respects_equivalenceL A T) := fun_ => tt.Sectionid.Context {A : Type}.
A: Type
RespectsEquivalenceL A
(fun (B : Type) (_ : A <~> B) => B)
A: Type
RespectsEquivalenceL A
(fun (B : Type) (_ : A <~> B) => B)
A: Type y: Funext
1 = 1
exact idpath.Defined.
A: Type
RespectsEquivalenceR A
(fun (B : Type) (_ : B <~> A) => B)
A: Type
RespectsEquivalenceR A
(fun (B : Type) (_ : B <~> A) => B)
A: Type y: Funext
1 = 1^-1
apply path_forall; intro; reflexivity.Defined.Endid.Sectionunit.Context {A : Type}.Definitionunit_respects_equivalenceL
: RespectsEquivalenceL A (fun__ => Unit)
:= @const_respects_equivalenceL A Unit.Definitionunit_respects_equivalenceR
: RespectsEquivalenceR A (fun__ => Unit)
:= @const_respects_equivalenceR A Unit.Endunit.Sectionprod.
A: Type P, Q: forallB : Type, A <~> B -> Type H: RespectsEquivalenceL A P H0: RespectsEquivalenceL A Q
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e * Q B e)
A: Type P, Q: forallB : Type, A <~> B -> Type H: RespectsEquivalenceL A P H0: RespectsEquivalenceL A Q
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e * Q B e)
A: Type P, Q: forallB : Type, A <~> B -> Type H: RespectsEquivalenceL A P H0: RespectsEquivalenceL A Q
Funext ->
1 =
respects_equivalenceL.1 A 1 *E
respects_equivalenceL.1 A 1
H: Funext A: Type P: forallB : Type, A <~> B -> Type Q: forall (B : Type) (e : A <~> B), P B e -> Type HP: RespectsEquivalenceL A P HQ: foralla : P A 1,
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Q B e (respects_equivalenceL.1 B e a))
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
forallx : P B e, Q B e x)
H: Funext A: Type P: forallB : Type, A <~> B -> Type Q: forall (B : Type) (e : A <~> B), P B e -> Type HP: RespectsEquivalenceL A P HQ: foralla : P A 1,
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Q B e (respects_equivalenceL.1 B e a))
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
forallx : P B e, Q B e x)
H: Funext A: Type P: forallB : Type, A <~> B -> Type Q: forall (B : Type) (e : A <~> B), P B e -> Type HP: RespectsEquivalenceL A P HQ: foralla : P A 1,
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Q B e (respects_equivalenceL.1 B e a)) B: Type e: A <~> B
(fun (B : Type) (e : A <~> B) =>
forallx : P B e, Q B e x) A 1 <~>
(fun (B : Type) (e : A <~> B) =>
forallx : P B e, Q B e x) B e
H: Funext A: Type P: forallB : Type, A <~> B -> Type Q: forall (B : Type) (e : A <~> B), P B e -> Type HP: RespectsEquivalenceL A P HQ: foralla : P A 1,
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Q B e (respects_equivalenceL.1 B e a))
(fune' : forall (B : Type) (e : A <~> B),
(fun (B0 : Type) (e0 : A <~> B0) =>
forallx : P B0 e0, Q B0 e0 x) A 1 <~>
(fun (B0 : Type) (e0 : A <~> B0) =>
forallx : P B0 e0, Q B0 e0 x) B e =>
Funext -> 1 = e' A 1)
(fun (B : Type) (e : A <~> B) => ?Goal)
H: Funext A: Type P: forallB : Type, A <~> B -> Type Q: forall (B : Type) (e : A <~> B), P B e -> Type HP: RespectsEquivalenceL A P HQ: foralla : P A 1,
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Q B e (respects_equivalenceL.1 B e a)) B: Type e: A <~> B
(fun (B : Type) (e : A <~> B) =>
forallx : P B e, Q B e x) A 1 <~>
(fun (B : Type) (e : A <~> B) =>
forallx : P B e, Q B e x) B e
H: Funext A: Type P: forallB : Type, A <~> B -> Type Q: forall (B : Type) (e : A <~> B), P B e -> Type HP: RespectsEquivalenceL A P HQ: foralla : P A 1,
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Q B e (respects_equivalenceL.1 B e a)) B: Type e: A <~> B b: P B e
Q A 1 ((respects_equivalenceL.1 B e)^-1 b) <~> Q B e b
H: Funext A: Type P: forallB : Type, A <~> B -> Type Q: forall (B : Type) (e : A <~> B), P B e -> Type HP: RespectsEquivalenceL A P HQ: foralla : P A 1,
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Q B e (respects_equivalenceL.1 B e a)) B: Type e: A <~> B b: P B e
(respects_equivalenceL.1 B e)^-1 b =
respects_equivalenceL.1 A 1
((respects_equivalenceL.1 B e)^-1 b)
refine (ap10 (ap equiv_fun (respects_equivalenceL.2 _)) _).
H: Funext A: Type P: forallB : Type, A <~> B -> Type Q: forall (B : Type) (e : A <~> B), P B e -> Type HP: RespectsEquivalenceL A P HQ: foralla : P A 1,
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Q B e (respects_equivalenceL.1 B e a))
(fune' : forall (B : Type) (e : A <~> B),
(fun (B0 : Type) (e0 : A <~> B0) =>
forallx : P B0 e0, Q B0 e0 x) A 1 <~>
(fun (B0 : Type) (e0 : A <~> B0) =>
forallx : P B0 e0, Q B0 e0 x) B e =>
Funext -> 1 = e' A 1)
(fun (B : Type) (e : A <~> B) =>
equiv_functor_forall'
(respects_equivalenceL.1 B e)^-1
(funb : P B e =>
equiv_path
(Q B e
(respects_equivalenceL.1 B e
((respects_equivalenceL.1 B e)^-1%function
b))) (Q B e b)
(ap (Q B e)
(eisretr (respects_equivalenceL.1 B e) b))
oE ((HQ ((respects_equivalenceL.1 B e)^-1 b)).1
B e
oE equiv_path
(Q A 1
((respects_equivalenceL.1 B e)^-1 b))
(Q A 1
(respects_equivalenceL.1 A 1
((respects_equivalenceL.1 B e)^-1
b)))
(ap (Q A 1)
(ap10
(ap equiv_fun
(respects_equivalenceL.2 H))
((respects_equivalenceL.1 B e)^-1%function
b))))))
H: Funext A: Type P: forallB : Type, A <~> B -> Type Q: forall (B : Type) (e : A <~> B), P B e -> Type HP: RespectsEquivalenceL A P HQ: foralla : P A 1,
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Q B e (respects_equivalenceL.1 B e a))
(fune' : forall (B : Type) (e : A <~> B),
(fun (B0 : Type) (e0 : A <~> B0) =>
forallx : P B0 e0, Q B0 e0 x) A 1 <~>
(fun (B0 : Type) (e0 : A <~> B0) =>
forallx : P B0 e0, Q B0 e0 x) B e =>
Funext -> 1 = e' A 1)
(fun (B : Type) (e : A <~> B) =>
equiv_functor_forall'
(respects_equivalenceL.1 B e)^-1
(funb : P B e =>
equiv_path
(Q B e
(respects_equivalenceL.1 B e
((respects_equivalenceL.1 B e)^-1%function
b))) (Q B e b)
(ap (Q B e)
(eisretr (respects_equivalenceL.1 B e) b))
oE ((HQ ((respects_equivalenceL.1 B e)^-1 b)).1
B e
oE equiv_path
(Q A 1
((respects_equivalenceL.1 B e)^-1 b))
(Q A 1
(respects_equivalenceL.1 A 1
((respects_equivalenceL.1 B e)^-1
b)))
(ap (Q A 1)
(ap10
(ap equiv_fun
(respects_equivalenceL.2 H))
((respects_equivalenceL.1 B e)^-1%function
b))))))
t.}Defined.
H: Funext A: Type P: forallB : Type, B <~> A -> Type Q: forall (B : Type) (e : B <~> A), P B e -> Type HP: RespectsEquivalenceR A P HQ: foralla : P A 1,
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
Q B e (respects_equivalenceR.1 B e a))
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
forallx : P B e, Q B e x)
H: Funext A: Type P: forallB : Type, B <~> A -> Type Q: forall (B : Type) (e : B <~> A), P B e -> Type HP: RespectsEquivalenceR A P HQ: foralla : P A 1,
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
Q B e (respects_equivalenceR.1 B e a))
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
forallx : P B e, Q B e x)
H: Funext A: Type P: forallB : Type, B <~> A -> Type Q: forall (B : Type) (e : B <~> A), P B e -> Type HP: RespectsEquivalenceR A P HQ: foralla : P A 1,
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
Q B e (respects_equivalenceR.1 B e a)) B: Type e: B <~> A
(fun (B : Type) (e : B <~> A) =>
forallx : P B e, Q B e x) A 1 <~>
(fun (B : Type) (e : B <~> A) =>
forallx : P B e, Q B e x) B e
H: Funext A: Type P: forallB : Type, B <~> A -> Type Q: forall (B : Type) (e : B <~> A), P B e -> Type HP: RespectsEquivalenceR A P HQ: foralla : P A 1,
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
Q B e (respects_equivalenceR.1 B e a))
(fune' : forall (B : Type) (e : B <~> A),
(fun (B0 : Type) (e0 : B0 <~> A) =>
forallx : P B0 e0, Q B0 e0 x) A 1 <~>
(fun (B0 : Type) (e0 : B0 <~> A) =>
forallx : P B0 e0, Q B0 e0 x) B e =>
Funext -> 1 = e' A 1)
(fun (B : Type) (e : B <~> A) => ?Goal)
H: Funext A: Type P: forallB : Type, B <~> A -> Type Q: forall (B : Type) (e : B <~> A), P B e -> Type HP: RespectsEquivalenceR A P HQ: foralla : P A 1,
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
Q B e (respects_equivalenceR.1 B e a)) B: Type e: B <~> A
(fun (B : Type) (e : B <~> A) =>
forallx : P B e, Q B e x) A 1 <~>
(fun (B : Type) (e : B <~> A) =>
forallx : P B e, Q B e x) B e
H: Funext A: Type P: forallB : Type, B <~> A -> Type Q: forall (B : Type) (e : B <~> A), P B e -> Type HP: RespectsEquivalenceR A P HQ: foralla : P A 1,
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
Q B e (respects_equivalenceR.1 B e a)) B: Type e: B <~> A b: P B e
Q A 1 ((respects_equivalenceR.1 B e)^-1 b) <~> Q B e b
H: Funext A: Type P: forallB : Type, B <~> A -> Type Q: forall (B : Type) (e : B <~> A), P B e -> Type HP: RespectsEquivalenceR A P HQ: foralla : P A 1,
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
Q B e (respects_equivalenceR.1 B e a)) B: Type e: B <~> A b: P B e
(respects_equivalenceR.1 B e)^-1 b =
respects_equivalenceR.1 A 1
((respects_equivalenceR.1 B e)^-1 b)
refine (ap10 (ap equiv_fun (respects_equivalenceR.2 _)) _).
H: Funext A: Type P: forallB : Type, B <~> A -> Type Q: forall (B : Type) (e : B <~> A), P B e -> Type HP: RespectsEquivalenceR A P HQ: foralla : P A 1,
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
Q B e (respects_equivalenceR.1 B e a))
(fune' : forall (B : Type) (e : B <~> A),
(fun (B0 : Type) (e0 : B0 <~> A) =>
forallx : P B0 e0, Q B0 e0 x) A 1 <~>
(fun (B0 : Type) (e0 : B0 <~> A) =>
forallx : P B0 e0, Q B0 e0 x) B e =>
Funext -> 1 = e' A 1)
(fun (B : Type) (e : B <~> A) =>
equiv_functor_forall'
(respects_equivalenceR.1 B e)^-1
(funb : P B e =>
equiv_path
(Q B e
(respects_equivalenceR.1 B e
((respects_equivalenceR.1 B e)^-1%function
b))) (Q B e b)
(ap (Q B e)
(eisretr (respects_equivalenceR.1 B e) b))
oE ((HQ ((respects_equivalenceR.1 B e)^-1 b)).1
B e
oE equiv_path
(Q A 1
((respects_equivalenceR.1 B e)^-1 b))
(Q A 1
(respects_equivalenceR.1 A 1
((respects_equivalenceR.1 B e)^-1
b)))
(ap (Q A 1)
(ap10
(ap equiv_fun
(respects_equivalenceR.2 H))
((respects_equivalenceR.1 B e)^-1%function
b))))))
H: Funext A: Type P: forallB : Type, B <~> A -> Type Q: forall (B : Type) (e : B <~> A), P B e -> Type HP: RespectsEquivalenceR A P HQ: foralla : P A 1,
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
Q B e (respects_equivalenceR.1 B e a))
(fune' : forall (B : Type) (e : B <~> A),
(fun (B0 : Type) (e0 : B0 <~> A) =>
forallx : P B0 e0, Q B0 e0 x) A 1 <~>
(fun (B0 : Type) (e0 : B0 <~> A) =>
forallx : P B0 e0, Q B0 e0 x) B e =>
Funext -> 1 = e' A 1)
(fun (B : Type) (e : B <~> A) =>
equiv_functor_forall'
(respects_equivalenceR.1 B e)^-1
(funb : P B e =>
equiv_path
(Q B e
(respects_equivalenceR.1 B e
((respects_equivalenceR.1 B e)^-1%function
b))) (Q B e b)
(ap (Q B e)
(eisretr (respects_equivalenceR.1 B e) b))
oE ((HQ ((respects_equivalenceR.1 B e)^-1 b)).1
B e
oE equiv_path
(Q A 1
((respects_equivalenceR.1 B e)^-1 b))
(Q A 1
(respects_equivalenceR.1 A 1
((respects_equivalenceR.1 B e)^-1
b)))
(ap (Q A 1)
(ap10
(ap equiv_fun
(respects_equivalenceR.2 H))
((respects_equivalenceR.1 B e)^-1%function
b))))))
t.}Defined.Endpi.Sectionsigma.
H: Funext A: Type P: forallB : Type, A <~> B -> Type Q: forall (B : Type) (e : A <~> B), P B e -> Type HP: RespectsEquivalenceL A P HQ: foralla : P A 1,
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Q B e (respects_equivalenceL.1 B e a))
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => {x : _ & Q B e x})
H: Funext A: Type P: forallB : Type, A <~> B -> Type Q: forall (B : Type) (e : A <~> B), P B e -> Type HP: RespectsEquivalenceL A P HQ: foralla : P A 1,
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Q B e (respects_equivalenceL.1 B e a))
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => {x : _ & Q B e x})
H: Funext A: Type P: forallB : Type, A <~> B -> Type Q: forall (B : Type) (e : A <~> B), P B e -> Type HP: RespectsEquivalenceL A P HQ: foralla : P A 1,
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Q B e (respects_equivalenceL.1 B e a)) B: Type e: A <~> B b: P A 1
Q A 1 b <~> Q B e (respects_equivalenceL.1 B e b)
H: Funext A: Type P: forallB : Type, A <~> B -> Type Q: forall (B : Type) (e : A <~> B), P B e -> Type HP: RespectsEquivalenceL A P HQ: foralla : P A 1,
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Q B e (respects_equivalenceL.1 B e a))
(fune' : forall (B : Type) (e : A <~> B),
(fun (B0 : Type) (e0 : A <~> B0) =>
{x : _ & Q B0 e0 x}) A 1 <~>
(fun (B0 : Type) (e0 : A <~> B0) =>
{x : _ & Q B0 e0 x}) B e =>
Funext -> 1 = e' A 1)
(fun (B : Type) (e : A <~> B) =>
equiv_functor_sigma' (respects_equivalenceL.1 B e)
(funb : P A 1 => ?Goal))
H: Funext A: Type P: forallB : Type, A <~> B -> Type Q: forall (B : Type) (e : A <~> B), P B e -> Type HP: RespectsEquivalenceL A P HQ: foralla : P A 1,
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Q B e (respects_equivalenceL.1 B e a)) B: Type e: A <~> B b: P A 1
Q A 1 b <~> Q B e (respects_equivalenceL.1 B e b)
H: Funext A: Type P: forallB : Type, A <~> B -> Type Q: forall (B : Type) (e : A <~> B), P B e -> Type HP: RespectsEquivalenceL A P HQ: foralla : P A 1,
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Q B e (respects_equivalenceL.1 B e a)) B: Type e: A <~> B b: P A 1
b = respects_equivalenceL.1 A 1 b
refine (ap10 (ap equiv_fun (respects_equivalenceL.2 _)) _).
H: Funext A: Type P: forallB : Type, A <~> B -> Type Q: forall (B : Type) (e : A <~> B), P B e -> Type HP: RespectsEquivalenceL A P HQ: foralla : P A 1,
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Q B e (respects_equivalenceL.1 B e a))
(fune' : forall (B : Type) (e : A <~> B),
(fun (B0 : Type) (e0 : A <~> B0) =>
{x : _ & Q B0 e0 x}) A 1 <~>
(fun (B0 : Type) (e0 : A <~> B0) =>
{x : _ & Q B0 e0 x}) B e =>
Funext -> 1 = e' A 1)
(fun (B : Type) (e : A <~> B) =>
equiv_functor_sigma' (respects_equivalenceL.1 B e)
(funb : P A 1 =>
(HQ b).1 B e
oE equiv_path (Q A 1 b)
(Q A 1 (respects_equivalenceL.1 A 1 b))
(ap (Q A 1)
(ap10
(ap equiv_fun
(respects_equivalenceL.2 H)) b))))
H: Funext A: Type P: forallB : Type, A <~> B -> Type Q: forall (B : Type) (e : A <~> B), P B e -> Type HP: RespectsEquivalenceL A P HQ: foralla : P A 1,
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Q B e (respects_equivalenceL.1 B e a))
(fune' : forall (B : Type) (e : A <~> B),
(fun (B0 : Type) (e0 : A <~> B0) =>
{x : _ & Q B0 e0 x}) A 1 <~>
(fun (B0 : Type) (e0 : A <~> B0) =>
{x : _ & Q B0 e0 x}) B e =>
Funext -> 1 = e' A 1)
(fun (B : Type) (e : A <~> B) =>
equiv_functor_sigma' (respects_equivalenceL.1 B e)
(funb : P A 1 =>
(HQ b).1 B e
oE equiv_path (Q A 1 b)
(Q A 1 (respects_equivalenceL.1 A 1 b))
(ap (Q A 1)
(ap10
(ap equiv_fun
(respects_equivalenceL.2 H)) b))))
t.}Defined.
H: Funext A: Type P: forallB : Type, B <~> A -> Type Q: forall (B : Type) (e : B <~> A), P B e -> Type HP: RespectsEquivalenceR A P HQ: foralla : P A 1,
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
Q B e (respects_equivalenceR.1 B e a))
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => {x : _ & Q B e x})
H: Funext A: Type P: forallB : Type, B <~> A -> Type Q: forall (B : Type) (e : B <~> A), P B e -> Type HP: RespectsEquivalenceR A P HQ: foralla : P A 1,
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
Q B e (respects_equivalenceR.1 B e a))
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => {x : _ & Q B e x})
H: Funext A: Type P: forallB : Type, B <~> A -> Type Q: forall (B : Type) (e : B <~> A), P B e -> Type HP: RespectsEquivalenceR A P HQ: foralla : P A 1,
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
Q B e (respects_equivalenceR.1 B e a)) B: Type e: B <~> A b: P A 1
Q A 1 b <~> Q B e (respects_equivalenceR.1 B e b)
H: Funext A: Type P: forallB : Type, B <~> A -> Type Q: forall (B : Type) (e : B <~> A), P B e -> Type HP: RespectsEquivalenceR A P HQ: foralla : P A 1,
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
Q B e (respects_equivalenceR.1 B e a))
(fune' : forall (B : Type) (e : B <~> A),
(fun (B0 : Type) (e0 : B0 <~> A) =>
{x : _ & Q B0 e0 x}) A 1 <~>
(fun (B0 : Type) (e0 : B0 <~> A) =>
{x : _ & Q B0 e0 x}) B e =>
Funext -> 1 = e' A 1)
(fun (B : Type) (e : B <~> A) =>
equiv_functor_sigma' (respects_equivalenceR.1 B e)
(funb : P A 1 => ?Goal))
H: Funext A: Type P: forallB : Type, B <~> A -> Type Q: forall (B : Type) (e : B <~> A), P B e -> Type HP: RespectsEquivalenceR A P HQ: foralla : P A 1,
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
Q B e (respects_equivalenceR.1 B e a)) B: Type e: B <~> A b: P A 1
Q A 1 b <~> Q B e (respects_equivalenceR.1 B e b)
H: Funext A: Type P: forallB : Type, B <~> A -> Type Q: forall (B : Type) (e : B <~> A), P B e -> Type HP: RespectsEquivalenceR A P HQ: foralla : P A 1,
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
Q B e (respects_equivalenceR.1 B e a)) B: Type e: B <~> A b: P A 1
b = respects_equivalenceR.1 A 1 b
refine (ap10 (ap equiv_fun (respects_equivalenceR.2 _)) _).
H: Funext A: Type P: forallB : Type, B <~> A -> Type Q: forall (B : Type) (e : B <~> A), P B e -> Type HP: RespectsEquivalenceR A P HQ: foralla : P A 1,
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
Q B e (respects_equivalenceR.1 B e a))
(fune' : forall (B : Type) (e : B <~> A),
(fun (B0 : Type) (e0 : B0 <~> A) =>
{x : _ & Q B0 e0 x}) A 1 <~>
(fun (B0 : Type) (e0 : B0 <~> A) =>
{x : _ & Q B0 e0 x}) B e =>
Funext -> 1 = e' A 1)
(fun (B : Type) (e : B <~> A) =>
equiv_functor_sigma' (respects_equivalenceR.1 B e)
(funb : P A 1 =>
(HQ b).1 B e
oE equiv_path (Q A 1 b)
(Q A 1 (respects_equivalenceR.1 A 1 b))
(ap (Q A 1)
(ap10
(ap equiv_fun
(respects_equivalenceR.2 H)) b))))
H: Funext A: Type P: forallB : Type, B <~> A -> Type Q: forall (B : Type) (e : B <~> A), P B e -> Type HP: RespectsEquivalenceR A P HQ: foralla : P A 1,
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
Q B e (respects_equivalenceR.1 B e a))
(fune' : forall (B : Type) (e : B <~> A),
(fun (B0 : Type) (e0 : B0 <~> A) =>
{x : _ & Q B0 e0 x}) A 1 <~>
(fun (B0 : Type) (e0 : B0 <~> A) =>
{x : _ & Q B0 e0 x}) B e =>
Funext -> 1 = e' A 1)
(fun (B : Type) (e : B <~> A) =>
equiv_functor_sigma' (respects_equivalenceR.1 B e)
(funb : P A 1 =>
(HQ b).1 B e
oE equiv_path (Q A 1 b)
(Q A 1 (respects_equivalenceR.1 A 1 b))
(ap (Q A 1)
(ap10
(ap equiv_fun
(respects_equivalenceR.2 H)) b))))
A, A': Type P: forallB : Type, A <~> B -> Type P': forallB : Type, A' <~> B -> Type eA: A <~> A' eP: forall (B : Type) (e : A' <~> B),
P B (e oE eA) <~> P' B e HP: RespectsEquivalenceL A P
RespectsEquivalenceL A' P'
A, A': Type P: forallB : Type, A <~> B -> Type P': forallB : Type, A' <~> B -> Type eA: A <~> A' eP: forall (B : Type) (e : A' <~> B),
P B (e oE eA) <~> P' B e HP: RespectsEquivalenceL A P
RespectsEquivalenceL A' P'
A, A': Type P: forallB : Type, A <~> B -> Type P': forallB : Type, A' <~> B -> Type eA: A <~> A' eP: forall (B : Type) (e : A' <~> B),
P B (e oE eA) <~> P' B e HP: RespectsEquivalenceL A P B: Type e: A' <~> B
P' A' 1 <~> P' B e
A, A': Type P: forallB : Type, A <~> B -> Type P': forallB : Type, A' <~> B -> Type eA: A <~> A' eP: forall (B : Type) (e : A' <~> B),
P B (e oE eA) <~> P' B e HP: RespectsEquivalenceL A P
(fune' : forall (B : Type) (e : A' <~> B),
P' A' 1 <~> P' B e => Funext -> 1 = e' A' 1)
(fun (B : Type) (e : A' <~> B) => ?Goal)
A, A': Type P: forallB : Type, A <~> B -> Type P': forallB : Type, A' <~> B -> Type eA: A <~> A' eP: forall (B : Type) (e : A' <~> B),
P B (e oE eA) <~> P' B e HP: RespectsEquivalenceL A P B: Type e: A' <~> B
A, A': Type P: forallB : Type, A <~> B -> Type P': forallB : Type, A' <~> B -> Type eA: A <~> A' eP: forall (B : Type) (e : A' <~> B),
P B (e oE eA) <~> P' B e HP: RespectsEquivalenceL A P
(fune' : forall (B : Type) (e : A' <~> B),
P' A' 1 <~> P' B e => Funext -> 1 = e' A' 1)
(fun (B : Type) (e : A' <~> B) =>
eP B e
oE (HP.1 B (e oE eA) oE (HP.1 A' (1 oE eA))^-1
oE (eP A' 1)^-1))
A, A': Type P: forallB : Type, A <~> B -> Type P': forallB : Type, A' <~> B -> Type eA: A <~> A' eP: forall (B : Type) (e : A' <~> B),
P B (e oE eA) <~> P' B e HP: RespectsEquivalenceL A P
(fune' : forall (B : Type) (e : A' <~> B),
P' A' 1 <~> P' B e => Funext -> 1 = e' A' 1)
(fun (B : Type) (e : A' <~> B) =>
eP B e
oE (HP.1 B (e oE eA) oE (HP.1 A' (1 oE eA))^-1
oE (eP A' 1)^-1))
t.}Defined.
A, A': Type P: forallB : Type, B <~> A -> Type P': forallB : Type, B <~> A' -> Type eA: A' <~> A eP: forall (B : Type) (e : B <~> A'),
P B (eA oE e) <~> P' B e HP: RespectsEquivalenceR A P
RespectsEquivalenceR A' P'
A, A': Type P: forallB : Type, B <~> A -> Type P': forallB : Type, B <~> A' -> Type eA: A' <~> A eP: forall (B : Type) (e : B <~> A'),
P B (eA oE e) <~> P' B e HP: RespectsEquivalenceR A P
RespectsEquivalenceR A' P'
A, A': Type P: forallB : Type, B <~> A -> Type P': forallB : Type, B <~> A' -> Type eA: A' <~> A eP: forall (B : Type) (e : B <~> A'),
P B (eA oE e) <~> P' B e HP: RespectsEquivalenceR A P B: Type e: B <~> A'
P' A' 1 <~> P' B e
A, A': Type P: forallB : Type, B <~> A -> Type P': forallB : Type, B <~> A' -> Type eA: A' <~> A eP: forall (B : Type) (e : B <~> A'),
P B (eA oE e) <~> P' B e HP: RespectsEquivalenceR A P
(fune' : forall (B : Type) (e : B <~> A'),
P' A' 1 <~> P' B e => Funext -> 1 = e' A' 1)
(fun (B : Type) (e : B <~> A') => ?Goal)
A, A': Type P: forallB : Type, B <~> A -> Type P': forallB : Type, B <~> A' -> Type eA: A' <~> A eP: forall (B : Type) (e : B <~> A'),
P B (eA oE e) <~> P' B e HP: RespectsEquivalenceR A P B: Type e: B <~> A'
A, A': Type P: forallB : Type, B <~> A -> Type P': forallB : Type, B <~> A' -> Type eA: A' <~> A eP: forall (B : Type) (e : B <~> A'),
P B (eA oE e) <~> P' B e HP: RespectsEquivalenceR A P
(fune' : forall (B : Type) (e : B <~> A'),
P' A' 1 <~> P' B e => Funext -> 1 = e' A' 1)
(fun (B : Type) (e : B <~> A') =>
eP B e
oE (HP.1 B (eA oE e) oE (HP.1 A' (eA oE 1))^-1
oE (eP A' 1)^-1))
A, A': Type P: forallB : Type, B <~> A -> Type P': forallB : Type, B <~> A' -> Type eA: A' <~> A eP: forall (B : Type) (e : B <~> A'),
P B (eA oE e) <~> P' B e HP: RespectsEquivalenceR A P
(fune' : forall (B : Type) (e : B <~> A'),
P' A' 1 <~> P' B e => Funext -> 1 = e' A' 1)
(fun (B : Type) (e : B <~> A') =>
eP B e
oE (HP.1 B (eA oE e) oE (HP.1 A' (eA oE 1))^-1
oE (eP A' 1)^-1))
t.}Defined.
A: Type P, P': forallB : Type, A <~> B -> Type eP: forall (B : Type) (e : A <~> B), P B e <~> P' B e HP: RespectsEquivalenceL A P
RespectsEquivalenceL A P'
A: Type P, P': forallB : Type, A <~> B -> Type eP: forall (B : Type) (e : A <~> B), P B e <~> P' B e HP: RespectsEquivalenceL A P
RespectsEquivalenceL A P'
A: Type P, P': forallB : Type, A <~> B -> Type eP: forall (B : Type) (e : A <~> B), P B e <~> P' B e HP: RespectsEquivalenceL A P B: Type e: A <~> B
P' A 1 <~> P' B e
A: Type P, P': forallB : Type, A <~> B -> Type eP: forall (B : Type) (e : A <~> B), P B e <~> P' B e HP: RespectsEquivalenceL A P
(fune' : forall (B : Type) (e : A <~> B),
P' A 1 <~> P' B e => Funext -> 1 = e' A 1)
(fun (B : Type) (e : A <~> B) => ?Goal)
A: Type P, P': forallB : Type, A <~> B -> Type eP: forall (B : Type) (e : A <~> B), P B e <~> P' B e HP: RespectsEquivalenceL A P B: Type e: A <~> B
A: Type P, P': forallB : Type, A <~> B -> Type eP: forall (B : Type) (e : A <~> B), P B e <~> P' B e HP: RespectsEquivalenceL A P
(fune' : forall (B : Type) (e : A <~> B),
P' A 1 <~> P' B e => Funext -> 1 = e' A 1)
(fun (B : Type) (e : A <~> B) =>
eP B e
oE (HP.1 B e oE (HP.1 A 1)^-1 oE (eP A 1)^-1))
A: Type P, P': forallB : Type, A <~> B -> Type eP: forall (B : Type) (e : A <~> B), P B e <~> P' B e HP: RespectsEquivalenceL A P
(fune' : forall (B : Type) (e : A <~> B),
P' A 1 <~> P' B e => Funext -> 1 = e' A 1)
(fun (B : Type) (e : A <~> B) =>
eP B e
oE (HP.1 B e oE (HP.1 A 1)^-1 oE (eP A 1)^-1))
t.}Defined.
A: Type P, P': forallB : Type, B <~> A -> Type eP: forall (B : Type) (e : B <~> A), P B e <~> P' B e HP: RespectsEquivalenceR A P
RespectsEquivalenceR A P'
A: Type P, P': forallB : Type, B <~> A -> Type eP: forall (B : Type) (e : B <~> A), P B e <~> P' B e HP: RespectsEquivalenceR A P
RespectsEquivalenceR A P'
A: Type P, P': forallB : Type, B <~> A -> Type eP: forall (B : Type) (e : B <~> A), P B e <~> P' B e HP: RespectsEquivalenceR A P B: Type e: B <~> A
P' A 1 <~> P' B e
A: Type P, P': forallB : Type, B <~> A -> Type eP: forall (B : Type) (e : B <~> A), P B e <~> P' B e HP: RespectsEquivalenceR A P
(fune' : forall (B : Type) (e : B <~> A),
P' A 1 <~> P' B e => Funext -> 1 = e' A 1)
(fun (B : Type) (e : B <~> A) => ?Goal)
A: Type P, P': forallB : Type, B <~> A -> Type eP: forall (B : Type) (e : B <~> A), P B e <~> P' B e HP: RespectsEquivalenceR A P B: Type e: B <~> A
A: Type P, P': forallB : Type, B <~> A -> Type eP: forall (B : Type) (e : B <~> A), P B e <~> P' B e HP: RespectsEquivalenceR A P
(fune' : forall (B : Type) (e : B <~> A),
P' A 1 <~> P' B e => Funext -> 1 = e' A 1)
(fun (B : Type) (e : B <~> A) =>
eP B e
oE (HP.1 B e oE (HP.1 A 1)^-1 oE (eP A 1)^-1))
A: Type P, P': forallB : Type, B <~> A -> Type eP: forall (B : Type) (e : B <~> A), P B e <~> P' B e HP: RespectsEquivalenceR A P
(fune' : forall (B : Type) (e : B <~> A),
P' A 1 <~> P' B e => Funext -> 1 = e' A 1)
(fun (B : Type) (e : B <~> A) =>
eP B e
oE (HP.1 B e oE (HP.1 A 1)^-1 oE (eP A 1)^-1))
t.}Defined.Endequiv_transfer.Sectionequiv.
H: Funext A: Type P, Q: forallB : Type, A <~> B -> Type HP: RespectsEquivalenceL A P HQ: RespectsEquivalenceL A Q
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e <~> Q B e)
H: Funext A: Type P, Q: forallB : Type, A <~> B -> Type HP: RespectsEquivalenceL A P HQ: RespectsEquivalenceL A Q
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e <~> Q B e)
H: Funext A: Type P, Q: forallB : Type, A <~> B -> Type HP: RespectsEquivalenceL A P HQ: RespectsEquivalenceL A Q B: Type e: A <~> B
(fun (B : Type) (e : A <~> B) => P B e <~> Q B e) A 1 <~>
(fun (B : Type) (e : A <~> B) => P B e <~> Q B e) B e
H: Funext A: Type P, Q: forallB : Type, A <~> B -> Type HP: RespectsEquivalenceL A P HQ: RespectsEquivalenceL A Q y: Funext
1 = (fun (B : Type) (e : A <~> B) => ?Goal) A 1
H: Funext A: Type P, Q: forallB : Type, A <~> B -> Type HP: RespectsEquivalenceL A P HQ: RespectsEquivalenceL A Q B: Type e: A <~> B
(fun (B : Type) (e : A <~> B) => P B e <~> Q B e) A 1 <~>
(fun (B : Type) (e : A <~> B) => P B e <~> Q B e) B e
A: Type P, Q: forallB : Type, A <~> B -> A HP: RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e = Q B e)
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
e (P B e) = e (Q B e))
A: Type P, Q: forallB : Type, A <~> B -> A HP: RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e = Q B e)
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
e (P B e) = e (Q B e))
A: Type P, Q: forallB : Type, A <~> B -> A HP: RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e = Q B e) B: Type e: A <~> B
(fun (B : Type) (e : A <~> B) => e (P B e) = e (Q B e))
A 1 <~>
(fun (B : Type) (e : A <~> B) => e (P B e) = e (Q B e))
B e
A: Type P, Q: forallB : Type, A <~> B -> A HP: RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e = Q B e) y: Funext
1 = (fun (B : Type) (e : A <~> B) => ?Goal) A 1
A: Type P, Q: forallB : Type, A <~> B -> A HP: RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e = Q B e) B: Type e: A <~> B
(fun (B : Type) (e : A <~> B) => e (P B e) = e (Q B e))
A 1 <~>
(fun (B : Type) (e : A <~> B) => e (P B e) = e (Q B e))
B e
A: Type P, Q: forallB : Type, A <~> B -> A HP: RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e = Q B e) B: Type e: A <~> B
P A 1 = Q A 1 <~> P B e = Q B e
refine (respects_equivalenceL.1 B e).
A: Type P, Q: forallB : Type, A <~> B -> A HP: RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e = Q B e) y: Funext
1 =
(fun (B : Type) (e : A <~> B) =>
equiv_ap' e (P B e) (Q B e)
oE (respects_equivalenceL.1 B e
:
1 (P A 1) = 1 (Q A 1) <~> P B e = Q B e)) A 1
A: Type P, Q: forallB : Type, A <~> B -> A HP: RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e = Q B e) y: Funext
1 =
(fun (B : Type) (e : A <~> B) =>
equiv_ap' e (P B e) (Q B e)
oE (respects_equivalenceL.1 B e
:
1 (P A 1) = 1 (Q A 1) <~> P B e = Q B e)) A 1
t.}Defined.
A: Type P, Q: forallB : Type, A <~> B -> B HP: RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e = Q B e)
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
e^-1 (P B e) = e^-1 (Q B e))
A: Type P, Q: forallB : Type, A <~> B -> B HP: RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e = Q B e)
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
e^-1 (P B e) = e^-1 (Q B e))
A: Type P, Q: forallB : Type, A <~> B -> B HP: RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e = Q B e) B: Type e: A <~> B
(fun (B : Type) (e : A <~> B) =>
e^-1 (P B e) = e^-1 (Q B e)) A 1 <~>
(fun (B : Type) (e : A <~> B) =>
e^-1 (P B e) = e^-1 (Q B e)) B e
A: Type P, Q: forallB : Type, A <~> B -> B HP: RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e = Q B e) y: Funext
1 = (fun (B : Type) (e : A <~> B) => ?Goal) A 1
A: Type P, Q: forallB : Type, A <~> B -> B HP: RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e = Q B e) B: Type e: A <~> B
(fun (B : Type) (e : A <~> B) =>
e^-1 (P B e) = e^-1 (Q B e)) A 1 <~>
(fun (B : Type) (e : A <~> B) =>
e^-1 (P B e) = e^-1 (Q B e)) B e
A: Type P, Q: forallB : Type, A <~> B -> B HP: RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e = Q B e) B: Type e: A <~> B
P A 1 = Q A 1 <~> P B e = Q B e
refine (respects_equivalenceL.1 B e).
A: Type P, Q: forallB : Type, A <~> B -> B HP: RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e = Q B e) y: Funext
1 =
(fun (B : Type) (e : A <~> B) =>
equiv_ap' e^-1 (P B e) (Q B e)
oE (respects_equivalenceL.1 B e
:
1^-1 (P A 1) = 1^-1 (Q A 1) <~> P B e = Q B e)) A
1
A: Type P, Q: forallB : Type, A <~> B -> B HP: RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => P B e = Q B e) y: Funext
1 =
(fun (B : Type) (e : A <~> B) =>
equiv_ap' e^-1 (P B e) (Q B e)
oE (respects_equivalenceL.1 B e
:
1^-1 (P A 1) = 1^-1 (Q A 1) <~> P B e = Q B e)) A
1
t.}Defined.
A: Type P, Q: forallB : Type, B <~> A -> B HP: RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => P B e = Q B e)
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
e (P B e) = e (Q B e))
A: Type P, Q: forallB : Type, B <~> A -> B HP: RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => P B e = Q B e)
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
e (P B e) = e (Q B e))
A: Type P, Q: forallB : Type, B <~> A -> B HP: RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => P B e = Q B e) B: Type e: B <~> A
(fun (B : Type) (e : B <~> A) => e (P B e) = e (Q B e))
A 1 <~>
(fun (B : Type) (e : B <~> A) => e (P B e) = e (Q B e))
B e
A: Type P, Q: forallB : Type, B <~> A -> B HP: RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => P B e = Q B e) y: Funext
1 = (fun (B : Type) (e : B <~> A) => ?Goal) A 1
A: Type P, Q: forallB : Type, B <~> A -> B HP: RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => P B e = Q B e) B: Type e: B <~> A
(fun (B : Type) (e : B <~> A) => e (P B e) = e (Q B e))
A 1 <~>
(fun (B : Type) (e : B <~> A) => e (P B e) = e (Q B e))
B e
A: Type P, Q: forallB : Type, B <~> A -> B HP: RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => P B e = Q B e) B: Type e: B <~> A
P A 1 = Q A 1 <~> P B e = Q B e
refine (respects_equivalenceR.1 B e).
A: Type P, Q: forallB : Type, B <~> A -> B HP: RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => P B e = Q B e) y: Funext
1 =
(fun (B : Type) (e : B <~> A) =>
equiv_ap' e (P B e) (Q B e)
oE (respects_equivalenceR.1 B e
:
1 (P A 1) = 1 (Q A 1) <~> P B e = Q B e)) A 1
A: Type P, Q: forallB : Type, B <~> A -> B HP: RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => P B e = Q B e) y: Funext
1 =
(fun (B : Type) (e : B <~> A) =>
equiv_ap' e (P B e) (Q B e)
oE (respects_equivalenceR.1 B e
:
1 (P A 1) = 1 (Q A 1) <~> P B e = Q B e)) A 1
t.}Defined.
A: Type P, Q: forallB : Type, B <~> A -> A HP: RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => P B e = Q B e)
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
e^-1 (P B e) = e^-1 (Q B e))
A: Type P, Q: forallB : Type, B <~> A -> A HP: RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => P B e = Q B e)
RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) =>
e^-1 (P B e) = e^-1 (Q B e))
A: Type P, Q: forallB : Type, B <~> A -> A HP: RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => P B e = Q B e) B: Type e: B <~> A
(fun (B : Type) (e : B <~> A) =>
e^-1 (P B e) = e^-1 (Q B e)) A 1 <~>
(fun (B : Type) (e : B <~> A) =>
e^-1 (P B e) = e^-1 (Q B e)) B e
A: Type P, Q: forallB : Type, B <~> A -> A HP: RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => P B e = Q B e) y: Funext
1 = (fun (B : Type) (e : B <~> A) => ?Goal) A 1
A: Type P, Q: forallB : Type, B <~> A -> A HP: RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => P B e = Q B e) B: Type e: B <~> A
(fun (B : Type) (e : B <~> A) =>
e^-1 (P B e) = e^-1 (Q B e)) A 1 <~>
(fun (B : Type) (e : B <~> A) =>
e^-1 (P B e) = e^-1 (Q B e)) B e
A: Type P, Q: forallB : Type, B <~> A -> A HP: RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => P B e = Q B e) B: Type e: B <~> A
P A 1 = Q A 1 <~> P B e = Q B e
refine (respects_equivalenceR.1 B e).
A: Type P, Q: forallB : Type, B <~> A -> A HP: RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => P B e = Q B e) y: Funext
1 =
(fun (B : Type) (e : B <~> A) =>
equiv_ap' e^-1 (P B e) (Q B e)
oE (respects_equivalenceR.1 B e
:
1^-1 (P A 1) = 1^-1 (Q A 1) <~> P B e = Q B e)) A
1
A: Type P, Q: forallB : Type, B <~> A -> A HP: RespectsEquivalenceR A
(fun (B : Type) (e : B <~> A) => P B e = Q B e) y: Funext
1 =
(fun (B : Type) (e : B <~> A) =>
equiv_ap' e^-1 (P B e) (Q B e)
oE (respects_equivalenceR.1 B e
:
1^-1 (P A 1) = 1^-1 (Q A 1) <~> P B e = Q B e)) A
1
t.}Defined.Endap.(** We now write the tactic that partially solves the respectfulness side-condition. We include cases for generic typeclass resolution, keys (heads) with zero, one, two, and three arguments, and a few cases that cannot be easily keyed (where the head is one of the arguments, or [forall]), or the head is [paths], for which we have only ad-hoc solutions at the moment. *)Ltacstep_respects_equiv :=
idtac;
match goal with
| _ => progressintros
| _ => assumption
| _ => progressunfold respects_equivalenceL
| _ => progresscbn
| _ => exact _ (* case for fully solving the side-condition, when possible *)
| [ |- RespectsEquivalenceL _ (fun__ => ?T) ] => rapply (get_lem T)
| [ |- RespectsEquivalenceL _ (fun__ => ?T _) ] => rapply (get_lem T)
| [ |- RespectsEquivalenceL _ (fun__ => ?T _ _) ] => rapply (get_lem T)
| [ |- RespectsEquivalenceL _ (fun__ => ?T _ _ _) ] => rapply (get_lem T)
| [ |- RespectsEquivalenceL _ (funBe => equiv_fun e _ = equiv_fun e _) ] => refine equiv_ap_respects_equivalenceL
| [ |- RespectsEquivalenceL _ (funBe => equiv_inv e _ = equiv_inv e _) ] => refine equiv_ap_inv_respects_equivalenceL
| [ |- RespectsEquivalenceL _ (funB_ => B) ] => refine idmap_respects_equivalenceL
| [ |- RespectsEquivalenceL _ (fun__ => forall_, _) ] => refine forall_respects_equivalenceL
end.Ltacequiv_induction p :=
generalize dependent p;
letp' := freshinintro p';
lety := matchtype of p' with?x <~> ?y => constr:(y) endinmove p' at top;
generalize dependent y;
letP := match goal with |- forallyp, @?P y p => constr:(P) endin(* We use [(fun x => x) _] to block automatic typeclass resolution in the hole for the equivalence respectful proof. *)refine ((fungHBe => (@respects_equivalenceL _ P H).1 B e g) _ (_ : (funx => x) _));
[ intros | repeat step_respects_equiv ].
Funext ->
forall (AB : Type) (e : A <~> B),
A ->
{y : B &
forallQ : Type,
Contr Q -> (e^-1 y = e^-1 y <~> y = y) * Q}
H: Funext A, B: Type e: A <~> B a: A
{y : B &
forallQ : Type,
Contr Q -> (e^-1 y = e^-1 y <~> y = y) * Q}
A: Type H: Funext a: A
{y : A &
forallQ : Type,
Contr Q -> (1^-1 y = 1^-1 y <~> y = y) * Q}
A: Type H: Funext a, a0: A a1: Type
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
Contr (?Goal1.1 B e a1))
A: Type H: Funext a, a0: A a1: Type a2: Contr (?Goal1.1 A 1 a1)
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
e^-1%function (?Goal0.1 B e a0) =
e^-1%function (?Goal0.1 B e a0))
A: Type H: Funext a, a0: A a1: Type a2: Contr (?Goal1.1 A 1 a1)
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) =>
?Goal0.1 B e a0 = ?Goal0.1 B e a0)
A: Type H: Funext a, a0: A a1: Type a2: Contr (?Goal1.1 A 1 a1)
RespectsEquivalenceL A
(fun (B : Type) (e : A <~> B) => ?Goal1.1 B e a1)
A: Type H: Funext a: A
{y : A &
forallQ : Type,
Contr Q -> (1^-1 y = 1^-1 y <~> y = y) * Q}
A: Type H: Funext a: A
{y : A &
forallQ : Type, Contr Q -> (y = y <~> y = y) * Q}