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.
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import HoTT.Truncations.Require Import Universes.BAut Universes.Rigid.Require Import ExcludedMiddle.LocalOpen Scope trunc_scope.LocalOpen Scope path_scope.(** * The universe *)(** ** Automorphisms of the universe *)(** See "Parametricity, automorphisms of the universe, and excluded middle" by Booij, Escardó, Lumsdaine, Shulman. *)(** If two inequivalent types have equivalent automorphism oo-groups, then assuming LEM we can swap them and leave the rest of the universe untouched. *)SectionSwapTypes.(** Amusingly, this does not actually require univalence! But of course, to verify [BAut A <~> BAut B] in any particular example does require univalence. *)Context `{Funext} `{ExcludedMiddle}.Context (AB : Type) (ne : ~(A <~> B)) (e : BAut A <~> BAut B).
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B
Type <~> Type
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B
Type <~> Type
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B
{x : Type & merely (x = A)} +
{x : Type & ~ merely (x = A)} <~>
{x : Type & merely (x = A)} +
{x : Type & ~ merely (x = A)}
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B
merely (equiv_swap_types A = B)
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B
merely (equiv_swap_types A = B)
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B ea: (funZ : Type => trunctype_type (merely (Z = B)))
(e (point (BAut A))).1
merely (equiv_swap_types A = B)
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B ea: Trunc (-1) ((e (point (BAut A))).1 = B)
merely (equiv_swap_types A = B)
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B ea: (e (point (BAut A))).1 = B
equiv_swap_types A = B
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B ea: (e (point (BAut A))).1 = B
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B ea: (e (point (BAut A))).1 = B ne': ~ merely (B = A)
inr
((e (A; tr 1)).1;
funq : Trunc (-1) ((e (A; tr 1)).1 = A) =>
Trunc_ind
(fun_ : Trunc (-1) ((e (A; tr 1)).1 = A) => Empty)
(funq0 : (e (A; tr 1)).1 = A =>
Trunc_ind
(fun_ : Trunc (-1) ((e (A; tr 1)).1 = B) =>
Empty)
(funp : (e (A; tr 1)).1 = B =>
match
q0 in (_ = T)
return
(~ (T <~> B) -> BAut T <~> BAut B -> Empty)
with
| 1 =>
fun (ne : ~ ((e (A; tr 1)).1 <~> B))
(_ : BAut (e (A; tr 1)).1 <~> BAut B) =>
ne (equiv_path (e (A; tr 1)).1 B p)
end ne e) (e (A; tr 1)).2) q) = inr (B; ne')
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B ea: (e (point (BAut A))).1 = B ne': ~ merely (B = A)
(e (A; tr 1)).1 = B
exact ea.Defined.
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B
equiv_swap_types <> 1%equiv
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B
equiv_swap_types <> 1%equiv
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B p: equiv_swap_types = 1%equiv
Empty
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B p: equiv_swap_types = 1%equiv q: merely (equiv_swap_types A = B)
Empty
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B p: equiv_swap_types = 1%equiv q: equiv_swap_types A = B
Empty
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B p: equiv_swap_types = 1%equiv q: equiv_swap_types A = B
A <~> B
H: Funext H0: ExcludedMiddle A, B: Type ne: ~ (A <~> B) e: BAut A <~> BAut B p: equiv_swap_types = 1%equiv q: equiv_swap_types A = B
A = B
rewrite p in q; exact q.Qed.EndSwapTypes.(** In particular, we can swap any two distinct rigid types. *)
H: Univalence H0: ExcludedMiddle A, B: Type H1: IsRigid A H2: IsRigid B ne: ~ (A <~> B)
Type <~> Type
H: Univalence H0: ExcludedMiddle A, B: Type H1: IsRigid A H2: IsRigid B ne: ~ (A <~> B)
Type <~> Type
H: Univalence H0: ExcludedMiddle A, B: Type H1: IsRigid A H2: IsRigid B ne: ~ (A <~> B)
BAut A <~> BAut B
exact equiv_contr_contr.Defined.(** Such as [Empty] and [Unit]. *)Definitionequiv_swap_empty_unit `{Univalence} `{ExcludedMiddle}
: Type <~> Type
:= equiv_swap_rigid Empty Unit (fune => e^-1 tt).(** In this case we get an untruncated witness of the swapping. *)
H: Univalence H0: ExcludedMiddle A, B: Type H1: IsRigid A H2: IsRigid B ne: ~ (A <~> B)
equiv_swap_rigid A B ne A = B
H: Univalence H0: ExcludedMiddle A, B: Type H1: IsRigid A H2: IsRigid B ne: ~ (A <~> B)
equiv_swap_rigid A B ne A = B
H: Univalence H0: ExcludedMiddle A, B: Type H1: IsRigid A H2: IsRigid B ne: ~ (A <~> B)
H: Univalence H0: ExcludedMiddle A, B: Type H1: IsRigid A H2: IsRigid B ne: ~ (A <~> B) ne': ~ merely (B = A)
inr
(B;
funq : Trunc (-1) (B = A) =>
Trunc_ind (fun_ : Trunc (-1) (B = A) => Empty)
(funq0 : B = A =>
match
q0 in (_ = T)
return
(~ (T <~> B) -> BAut T <~> BAut B -> Empty)
with
| 1 =>
fun (ne : ~ (B <~> B))
(_ : BAut B <~> BAut B) =>
ne (equiv_path B B 1)
end ne equiv_contr_contr) q) = inr (B; ne')
H: Univalence H0: ExcludedMiddle A, B: Type H1: IsRigid A H2: IsRigid B ne: ~ (A <~> B) ne': ~ merely (B = A)
B = B
exact ((path_contr (center (BAut B)) (point (BAut B)))..1).Defined.(** We can also swap the products of two rigid types with another type [X], under a connectedness/truncatedness assumption. *)
H: Univalence H0: ExcludedMiddle X, A, B: Type n: trunc_index ne: ~ (X * A <~> X * B) H1: IsRigid A H2: IsConnected (Tr n.+1) A H3: IsRigid B H4: IsConnected (Tr n.+1) B IsTrunc0: IsTrunc n.+1 X
Type <~> Type
H: Univalence H0: ExcludedMiddle X, A, B: Type n: trunc_index ne: ~ (X * A <~> X * B) H1: IsRigid A H2: IsConnected (Tr n.+1) A H3: IsRigid B H4: IsConnected (Tr n.+1) B IsTrunc0: IsTrunc n.+1 X
Type <~> Type
H: Univalence H0: ExcludedMiddle X, A, B: Type n: trunc_index ne: ~ (X * A <~> X * B) H1: IsRigid A H2: IsConnected (Tr n.+1) A H3: IsRigid B H4: IsConnected (Tr n.+1) B IsTrunc0: IsTrunc n.+1 X
BAut (X * A) <~> BAut (X * B)
H: Univalence H0: ExcludedMiddle X, A, B: Type n: trunc_index ne: ~ (X * A <~> X * B) H1: IsRigid A H2: IsConnected (Tr n.+1) A H3: IsRigid B H4: IsConnected (Tr n.+1) B IsTrunc0: IsTrunc n.+1 X
BAut (X * A) <~> BAut X
H: Univalence H0: ExcludedMiddle X, A, B: Type n: trunc_index ne: ~ (X * A <~> X * B) H1: IsRigid A H2: IsConnected (Tr n.+1) A H3: IsRigid B H4: IsConnected (Tr n.+1) B IsTrunc0: IsTrunc n.+1 X
BAut X <~> BAut (X * B)
H: Univalence H0: ExcludedMiddle X, A, B: Type n: trunc_index ne: ~ (X * A <~> X * B) H1: IsRigid A H2: IsConnected (Tr n.+1) A H3: IsRigid B H4: IsConnected (Tr n.+1) B IsTrunc0: IsTrunc n.+1 X
BAut (X * A) <~> BAut X
symmetry; exact (baut_prod_rigid_equiv X A n).
H: Univalence H0: ExcludedMiddle X, A, B: Type n: trunc_index ne: ~ (X * A <~> X * B) H1: IsRigid A H2: IsConnected (Tr n.+1) A H3: IsRigid B H4: IsConnected (Tr n.+1) B IsTrunc0: IsTrunc n.+1 X
BAut X <~> BAut (X * B)
exact (baut_prod_rigid_equiv X B n).Defined.(** Conversely, from some nontrivial automorphisms of the universe we can deduce nonconstructive consequences. *)
H: Univalence f: Type <~> Type eu: f Unit = Empty
ExcludedMiddle_type
H: Univalence f: Type <~> Type eu: f Unit = Empty
ExcludedMiddle_type
H: Univalence f: Type <~> Type eu: f Unit = Empty P: Type X: IsHProp P
{Q : Type & P <-> ~ Q}
H: Univalence f: Type <~> Type eu: f Unit = Empty P: Type X: IsHProp P
P -> ~ f P
H: Univalence f: Type <~> Type eu: f Unit = Empty P: Type X: IsHProp P
~ f P -> P
H: Univalence f: Type <~> Type eu: f Unit = Empty P: Type X: IsHProp P
P -> ~ f P
H: Univalence f: Type <~> Type eu: f Unit = Empty P: Type X: IsHProp P p: P
~ f P
H: Univalence f: Type <~> Type eu: f Unit = Empty P: Type X: IsHProp P p: P X0: Contr P
~ f P
H: Univalence f: Type <~> Type eu: f Unit = Empty P: Type0 X: IsHProp P p: P X0: Contr P q: Unit = P
~ f P
H: Univalence f: Type <~> Type eu: f Unit = Empty X: IsHProp Unit p: Unit X0: Contr Unit
~ f Unit
H: Univalence f: Type <~> Type eu: f Unit = Empty X: IsHProp Unit p: Unit X0: Contr Unit
~ Empty
auto.
H: Univalence f: Type <~> Type eu: f Unit = Empty P: Type0 X: IsHProp P
~ f P -> P
H: Univalence f: Type <~> Type eu: f Unit = Empty P: Type0 X: IsHProp P nfp: ~ f P
P
H: Univalence f: Type <~> Type eu: f Unit = Empty P: Type0 X: IsHProp P nfp: ~ f P q: f P = Empty
P
H: Univalence f: Type <~> Type eu: f Unit = Empty P: Type0 X: IsHProp P nfp: ~ f P q: f P = f Unit
P
H: Univalence f: Type <~> Type eu: f Unit = Empty P: Type0 X: IsHProp P nfp: ~ f P q: P = Unit
P
rewrite q; exact tt.Defined.
H: Univalence A, P: Type a: merely A IsHProp0: IsHProp P
P <-> P * A = A
H: Univalence A, P: Type a: merely A IsHProp0: IsHProp P
P <-> P * A = A
H: Univalence A, P: Type a: merely A IsHProp0: IsHProp P
P -> P * A = A
H: Univalence A, P: Type a: merely A IsHProp0: IsHProp P
P * A = A -> P
H: Univalence A, P: Type a: merely A IsHProp0: IsHProp P
P -> P * A = A
H: Univalence A, P: Type a: merely A IsHProp0: IsHProp P p: P
IsEquiv snd
H: Univalence A, P: Type a: merely A IsHProp0: IsHProp P p: P
(funx : A => snd (p, x)) == idmap
H: Univalence A, P: Type a: merely A IsHProp0: IsHProp P p: P
(funx : P * A => (p, snd x)) == idmap
H: Univalence A, P: Type a: merely A IsHProp0: IsHProp P p: P
(funx : A => snd (p, x)) == idmap
intros x; reflexivity.
H: Univalence A, P: Type a: merely A IsHProp0: IsHProp P p: P
(funx : P * A => (p, snd x)) == idmap
H: Univalence A, P: Type a: merely A IsHProp0: IsHProp P p, p': P x: A
H: Univalence A, P: Type a: merely A IsHProp0: IsHProp P
P * A = A -> P
H: Univalence A, P: Type a: merely A IsHProp0: IsHProp P q: P * A = A
P
H: Univalence A, P: Type IsHProp0: IsHProp P q: P * A = A a: A
P
H: Univalence A, P: Type IsHProp0: IsHProp P q: P * A <~> A a: A
P
exact (fst (q^-1 a)).Defined.
H: Univalence f: Type <~> Type A: Type a: merely A eu: f A = Empty
ExcludedMiddle_type
H: Univalence f: Type <~> Type A: Type a: merely A eu: f A = Empty
ExcludedMiddle_type
H: Univalence f: Type <~> Type A: Type a: merely A eu: f A = Empty P: Type X: IsHProp P
{Q : Type & P <-> ~ Q}
H: Univalence f: Type <~> Type A: Type a: merely A eu: f A = Empty P: Type X: IsHProp P
P -> ~ f (P * A)
H: Univalence f: Type <~> Type A: Type a: merely A eu: f A = Empty P: Type X: IsHProp P
~ f (P * A) -> P
H: Univalence f: Type <~> Type A: Type a: merely A eu: f A = Empty P: Type X: IsHProp P
P -> ~ f (P * A)
H: Univalence f: Type <~> Type A: Type a: merely A eu: f A = Empty P: Type X: IsHProp P p: P
~ f (P * A)
H: Univalence f: Type <~> Type A: Type a: merely A eu: f A = Empty P: Type X: IsHProp P p: P q: P * A = A
~ f (P * A)
H: Univalence f: Type <~> Type A: Type a: merely A eu: f A = Empty P: Type X: IsHProp P p: P q: f (P * A) = f A
~ f (P * A)
H: Univalence f: Type <~> Type A: Type a: merely A eu: f A = Empty P: Type X: IsHProp P p: P q: f (P * A) = Empty
~ f (P * A)
rewrite q; auto.
H: Univalence f: Type <~> Type A: Type a: merely A eu: f A = Empty P: Type X: IsHProp P
~ f (P * A) -> P
H: Univalence f: Type <~> Type A: Type a: merely A eu: f A = Empty P: Type X: IsHProp P q: ~ f (P * A)
P
H: Univalence f: Type <~> Type A: Type a: merely A eu: f A = Empty P: Type X: IsHProp P q: f (P * A) <~> Empty
P
H: Univalence f: Type <~> Type A: Type a: merely A eu: f A = Empty P: Type X: IsHProp P q: f (P * A) = Empty
P
H: Univalence f: Type <~> Type A: Type a: merely A eu: f A = Empty P: Type X: IsHProp P q: f (P * A) = f A
P
H: Univalence f: Type <~> Type A: Type a: merely A eu: f A = Empty P: Type X: IsHProp P q: P * A = A
P
exact (snd (equiv_hprop_idprod A P a) q).Defined.(** If you can derive a constructive taboo from an automorphism of the universe such that [g X <> X], then you get [X]-many beers; see <https://groups.google.com/d/msg/homotopytypetheory/8CV0S2DuOI8/blCo7x-B7aoJ>. *)
H: Univalence g: Type <~> Type ge: g Empty <> Empty
~~ ExcludedMiddle_type
H: Univalence g: Type <~> Type ge: g Empty <> Empty
~~ ExcludedMiddle_type
H: Univalence g: Type <~> Type ge: g Empty <> Empty f:= g^-1%equiv: Type <~> Type
~~ ExcludedMiddle_type
H: Univalence g: Type <~> Type ge: g Empty <> Empty f:= g^-1%equiv: Type <~> Type nlem: ~ ExcludedMiddle_type
Empty
H: Univalence g: Type <~> Type ge: g Empty <> Empty f:= g^-1%equiv: Type <~> Type nlem: ~ ExcludedMiddle_type
g Empty = Empty
H: Univalence g: Type <~> Type ge: g Empty <> Empty f:= g^-1%equiv: Type <~> Type nlem: ~ ExcludedMiddle_type gz: g Empty
Empty
H: Univalence g: Type <~> Type ge: g Empty <> Empty f:= g^-1%equiv: Type <~> Type nlem: ~ ExcludedMiddle_type gz: g Empty
ExcludedMiddle_type
H: Univalence g: Type <~> Type ge: g Empty <> Empty f:= g^-1%equiv: Type <~> Type nlem: ~ ExcludedMiddle_type gz: g Empty
f (g Empty) = Empty
unfold f; apply eissect.Defined.
H: Univalence g: Type <~> Type ge: g ExcludedMiddle_type <> ExcludedMiddle_type
~~ ExcludedMiddle_type
H: Univalence g: Type <~> Type ge: g ExcludedMiddle_type <> ExcludedMiddle_type
~~ ExcludedMiddle_type
H: Univalence g: Type <~> Type ge: g ExcludedMiddle_type <> ExcludedMiddle_type nlem: ~ ExcludedMiddle_type
Empty
H: Univalence g: Type <~> Type ge: g ExcludedMiddle_type <> ExcludedMiddle_type nlem: ~ ExcludedMiddle_type nlem':= equiv_to_empty nlem: ExcludedMiddle_type <~> Empty
Empty
H: Univalence g: Type <~> Type ge: g ExcludedMiddle_type <> ExcludedMiddle_type nlem: ~ ExcludedMiddle_type nlem': ExcludedMiddle_type = Empty
Empty
H: Univalence g: Type <~> Type ge: g Empty <> Empty nlem: ~ ExcludedMiddle_type nlem': ExcludedMiddle_type = Empty
Empty
H: Univalence g: Type <~> Type ge: ~~ ExcludedMiddle_type nlem: ~ ExcludedMiddle_type nlem': ExcludedMiddle_type = Empty