Skip to content

Commit 98f4809

Browse files
committed
format
1 parent ba5e217 commit 98f4809

4 files changed

Lines changed: 18 additions & 59 deletions

File tree

library/foundations/logic/glivenko.anders

Lines changed: 0 additions & 37 deletions
This file was deleted.

library/foundations/mltt/either.anders

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,3 @@ def 6₇ : 𝟕 := inr 𝟑 𝟒 3₄
8181
def ind₇ (C : 𝟕 → U) (c₀ : C 0₇) (c₁ : C 1₇) (c₂ : C 2₇) (c₃ : C 3₇) (c₄ : C 4₇) (c₅ : C 5₇) (c₆ : C 6₇) : Π (x : 𝟕), C x
8282
:= +-ind 𝟑 𝟒 C (ind₃ (λ (x : 𝟑), C (0₂, x)) c₀ c₁ c₂) (ind₄ (λ (x : 𝟒), C (1₂, x)) c₃ c₄ c₅ c₆)
8383

84-
def inl-inj (A B : U) (a a1 : A) (p : Path (+ A B) (inl A B a) (inl A B a1)) : Path A a a1
85-
:= cong (+ A B) A (λ (x : + A B), +-ind A B (λ (_ : + A B), A) (λ (u : A), u) (λ (_ : B), a) x) (inl A B a) (inl A B a1) p
86-
87-
def inr-inj (A B : U) (b b1 : B) (p : Path (+ A B) (inr A B b) (inr A B b1)) : Path B b b1
88-
:= cong (+ A B) B (λ (x : + A B), +-ind A B (λ (_ : + A B), B) (λ (_ : A), b) (λ (v : B), v) x) (inr A B b) (inr A B b1) p
89-
90-
def inlNotinr (A B : U) (a : A) (b : B) (p : Path (+ A B) (inl A B a) (inr A B b)) : 𝟎
91-
:= transp (<i> ind₂ (λ (x : 𝟐), U) 𝟏 𝟎 (p @ i).1) 0 star
92-
93-
def inrNotinl (A B : U) (a : A) (b : B) (p : Path (+ A B) (inr A B b) (inl A B a)) : 𝟎
94-
:= transp (<i> ind₂ (λ (x : 𝟐), U) 𝟎 𝟏 (p @ i).1) 0 star

library/foundations/univalent/path.anders

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,3 +418,4 @@ def propIsProp (A : U) : isProp (isProp A)
418418
def propIsSet (A : U) : isProp (isSet A)
419419
:= λ (f g : isSet A), <i> λ (a b : A) (p q : Path A a b),
420420
propSet (Path A a b) (f a b) p q (f a b p q) (g a b p q) @ i
421+

library/mathematics/algebra/int.anders

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ import library/foundations/univalent/path
88
import library/foundations/univalent/iso
99
import library/foundations/univalent/hedberg
1010

11+
def inl-inj (A B : U) (a a1 : A) (p : Path (+ A B) (inl A B a) (inl A B a1)) : Path A a a1
12+
:= cong (+ A B) A (λ (x : + A B), +-ind A B (λ (_ : + A B), A) (λ (u : A), u) (λ (_ : B), a) x) (inl A B a) (inl A B a1) p
13+
14+
def inr-inj (A B : U) (b b1 : B) (p : Path (+ A B) (inr A B b) (inr A B b1)) : Path B b b1
15+
:= cong (+ A B) B (λ (x : + A B), +-ind A B (λ (_ : + A B), B) (λ (_ : A), b) (λ (v : B), v) x) (inr A B b) (inr A B b1) p
16+
17+
def inlNotinr (A B : U) (a : A) (b : B) (p : Path (+ A B) (inl A B a) (inr A B b)) : 𝟎
18+
:= transp (<i> ind₂ (λ (x : 𝟐), U) 𝟏 𝟎 (p @ i).1) 0 star
19+
20+
def inrNotinl (A B : U) (a : A) (b : B) (p : Path (+ A B) (inr A B b) (inl A B a)) : 𝟎
21+
:= transp (<i> ind₂ (λ (x : 𝟐), U) 𝟎 𝟏 (p @ i).1) 0 star
22+
1123
def Z : U := + ℕ ℕ
1224
def zeroZ : Z := inr ℕ ℕ zero
1325

@@ -38,34 +50,28 @@ def idEquivZ : equiv Z Z := (idfun Z, idIsEquiv Z)
3850
def natDec : discrete ℕ
3951
:= λ (n m : ℕ),
4052
(ℕ-ind (λ (n : ℕ), Π (m : ℕ), dec (Path ℕ n m))
41-
(ℕ-ind (λ (m : ℕ), dec (Path ℕ zero m))
42-
(inl (Path ℕ zero zero) (Path ℕ zero zero → 𝟎) (<_> zero))
53+
(ℕ-ind (λ (m : ℕ), dec (Path ℕ zero m)) (inl (Path ℕ zero zero) (Path ℕ zero zero → 𝟎) (<_> zero))
4354
(λ (m : ℕ) (prev : dec (Path ℕ zero m)), inr (Path ℕ zero (succ m)) (Path ℕ zero (succ m) → 𝟎) (λ (p : Path ℕ zero (succ m)), znots m p)))
4455
(λ (n : ℕ) (prev : Π (m : ℕ), dec (Path ℕ n m)),
4556
ℕ-ind (λ (m : ℕ), dec (Path ℕ (succ n) m))
4657
(inr (Path ℕ (succ n) zero) (Path ℕ (succ n) zero → 𝟎) (λ (p : Path ℕ (succ n) zero), snotz n p))
4758
(λ (m : ℕ) (prevM : dec (Path ℕ (succ n) m)),
4859
+-ind (Path ℕ n m) (Path ℕ n m → 𝟎) (λ (_ : dec (Path ℕ n m)), dec (Path ℕ (succ n) (succ m)))
4960
(λ (p : Path ℕ n m), inl (Path ℕ (succ n) (succ m)) (Path ℕ (succ n) (succ m) → 𝟎) (<i> succ (p @ i)))
50-
(λ (np : Path ℕ n m → 𝟎), inr (Path ℕ (succ n) (succ m)) (Path ℕ (succ n) (succ m) → 𝟎) (λ (p : Path ℕ (succ n) (succ m)), np (prednat n m p)))
51-
(prev m)))) n m
61+
(λ (np : Path ℕ n m → 𝟎), inr (Path ℕ (succ n) (succ m)) (Path ℕ (succ n) (succ m) → 𝟎) (λ (p : Path ℕ (succ n) (succ m)), np (prednat n m p))) (prev m)))) n m
5262

5363
def orDisc (A B : U) (dA : discrete A) (dB : discrete B) (z z1 : + A B) : dec (Path (+ A B) z z1)
5464
:= +-ind A B (λ (x : + A B), dec (Path (+ A B) x z1))
5565
(λ (a : A), +-ind A B (λ (y : + A B), dec (Path (+ A B) (inl A B a) y))
5666
(λ (a1 : A), +-ind (Path A a a1) (Path A a a1 → 𝟎) (λ (_ : dec (Path A a a1)), dec (Path (+ A B) (inl A B a) (inl A B a1)))
5767
(λ (p : Path A a a1), inl (Path (+ A B) (inl A B a) (inl A B a1)) (Path (+ A B) (inl A B a) (inl A B a1) → 𝟎) (<i> inl A B (p @ i)))
58-
(λ (np : Path A a a1 → 𝟎), inr (Path (+ A B) (inl A B a) (inl A B a1)) (Path (+ A B) (inl A B a) (inl A B a1) → 𝟎) (λ (p : Path (+ A B) (inl A B a) (inl A B a1)), np (inl-inj A B a a1 p)))
59-
(dA a a1))
60-
(λ (b : B), inr (Path (+ A B) (inl A B a) (inr A B b)) (Path (+ A B) (inl A B a) (inr A B b) → 𝟎) (inlNotinr A B a b))
61-
z1)
68+
(λ (np : Path A a a1 → 𝟎), inr (Path (+ A B) (inl A B a) (inl A B a1)) (Path (+ A B) (inl A B a) (inl A B a1) → 𝟎) (λ (p : Path (+ A B) (inl A B a) (inl A B a1)), np (inl-inj A B a a1 p))) (dA a a1))
69+
(λ (b : B), inr (Path (+ A B) (inl A B a) (inr A B b)) (Path (+ A B) (inl A B a) (inr A B b) → 𝟎) (inlNotinr A B a b)) z1)
6270
(λ (b : B), +-ind A B (λ (y : + A B), dec (Path (+ A B) (inr A B b) y))
6371
(λ (a : A), inr (Path (+ A B) (inr A B b) (inl A B a)) (Path (+ A B) (inr A B b) (inl A B a) → 𝟎) (inrNotinl A B a b))
6472
(λ (b1 : B), +-ind (Path B b b1) (Path B b b1 → 𝟎) (λ (_ : dec (Path B b b1)), dec (Path (+ A B) (inr A B b) (inr A B b1)))
6573
(λ (p : Path B b b1), inl (Path (+ A B) (inr A B b) (inr A B b1)) (Path (+ A B) (inr A B b) (inr A B b1) → 𝟎) (<i> inr A B (p @ i)))
66-
(λ (np : Path B b b1 → 𝟎), inr (Path (+ A B) (inr A B b) (inr A B b1)) (Path (+ A B) (inr A B b) (inr A B b1) → 𝟎) (λ (p : Path (+ A B) (inr A B b) (inr A B b1)), np (inr-inj A B b b1 p)))
67-
(dB b b1))
68-
z1) z
74+
(λ (np : Path B b b1 → 𝟎), inr (Path (+ A B) (inr A B b) (inr A B b1)) (Path (+ A B) (inr A B b) (inr A B b1) → 𝟎) (λ (p : Path (+ A B) (inr A B b) (inr A B b1)), np (inr-inj A B b b1 p))) (dB b b1)) z1) z
6975

7076
def ZSet : isSet Z := hedberg Z (orDisc ℕ ℕ natDec natDec)
7177

0 commit comments

Comments
 (0)