Homotopy Type Theory
integers > history (Rev #7, changes)
Showing changes from revision #6 to #7:
Added | Removed | Changed
Contents
Idea
The integers as familiar from school mathematics.
Definitions
The type of integers , denoted ℤ \mathbb{Z} , has several definitions as a higher inductive type .
Definition 1
The integers are defined as the higher inductive type generated by:
A function inj : 2 × ℕ → ℤ inj : \mathbf{2} \times \mathbb{N} \rightarrow \mathbb{Z} .
An identity representing that positive and negative zero are equal: ν 0 : inj ( 0 , 0 ) = inj ( 1 , 0 ) \nu_0: inj(0, 0) = inj(1, 0) .
Definition 2
The integers are defined as the higher inductive type generated by:
A term 0 : ℤ 0 : \mathbb{Z} .
A function s : ℤ → ℤ s : \mathbb{Z} \to \mathbb{Z} .
A function p 1 : ℤ → ℤ p_1 : \mathbb{Z} \to \mathbb{Z} .
A function p 2 : ℤ → ℤ p_2 : \mathbb{Z} \to \mathbb{Z} .
A dependent product of identities representing that p 1 p_1 is a section of s s :σ : ∏ a : ℤ p 1 ( s ( a ) ) = a \sigma: \prod_{a:\mathbb{Z}} p_1(s(a)) = a
A dependent product of identities representing that p 2 p_2 is a retracion of s s :ρ : ∏ a : ℤ s ( p 2 ( a ) ) = a \rho: \prod_{a:\mathbb{Z}} s(p_2(a)) = a
Definition 3
The integers are defined as the higher inductive type generated by:
A term 0 : ℤ 0 : \mathbb{Z} .
A function s : ℤ → ℤ s : \mathbb{Z} \to \mathbb{Z} .
A function p : ℤ → ℤ p : \mathbb{Z} \to \mathbb{Z} .
A dependent product of identities representing that p p is a section of s s :σ : ∏ a : ℤ p ( s ( a ) ) = a \sigma: \prod_{a:\mathbb{Z}} p(s(a)) = a
A dependent product of identities representing that p p is a retracion of s s :ρ : ∏ a : ℤ s ( p ( a ) ) = a \rho: \prod_{a:\mathbb{Z}} s(p(a)) = a
A dependent product of identities representing the coherence condition:κ : ∏ a : ℤ ap s ( σ ( a ) ) = ρ ( a ) \kappa: \prod_{a:\mathbb{Z}} ap_s(\sigma(a)) = \rho(a)
Definition 4
The integers are defined as the higher inductive type generated by:
A term 0 : ℤ 0 : \mathbb{Z} .
A function s : ℤ → ℤ s : \mathbb{Z} \to \mathbb{Z} .
A function n : ℤ → ℤ n : \mathbb{Z} \to \mathbb{Z} .
An identity representing that zero and negative zero are equal: ν : n ( 0 ) = 0 \nu: n(0) = 0 .
A dependent product of identities representing that negation is an involution:ι : ∏ a : ℤ n ( n ( a ) ) = a \iota: \prod_{a:\mathbb{Z}} n(n(a)) = a
A dependent product of identities representing the coherence condition for the above:κ ι : ∏ a : ℤ ap n ( ι ( a ) ) = ι ( a ) \kappa_\iota: \prod_{a:\mathbb{Z}} ap_n(\iota(a)) = \iota(a)
A dependent product of identities representing that n ∘ s ∘ n n \circ s \circ n is a section of s s :σ : ∏ a : ℤ n ( s ( n ( s ( a ) ) ) ) = a \sigma: \prod_{a:\mathbb{Z}} n(s(n(s(a)))) = a
A dependent product of identities representing that n ∘ s ∘ n n \circ s \circ n is a retracion of s s :ρ : ∏ a : ℤ s ( n ( s ( n ( a ) ) ) ) = a \rho: \prod_{a:\mathbb{Z}} s(n(s(n(a)))) = a
A dependent product of identities representing the coherence condition:κ : ∏ a : ℤ ap s ( σ ( a ) ) = ρ ( a ) \kappa: \prod_{a:\mathbb{Z}} ap_s(\sigma(a)) = \rho(a)
Definition 5
The integers are defined as the higher inductive type generated by:
A function inj : ℕ × ℕ → ℤ inj : \mathbb{N} \times \mathbb{N} \rightarrow \mathbb{Z} .
A dependent product of functions between identities representing that equivalent differences are equal:equivdiff : ∏ a : ℕ ∏ b : ℕ ∏ c : ℕ ∏ d : ℕ ( a + d = c + b ) → ( inj ( a , b ) = inj ( c , d ) ) equivdiff : \prod_{a:\mathbb{N}} \prod_{b:\mathbb{N}} \prod_{c:\mathbb{N}} \prod_{d:\mathbb{N}} (a + d = c + b) \to (inj(a,b) = inj(c,d))
A set-truncatorτ 0 : ∏ a : ℤ ∏ b : ℤ isProp ( a = b ) \tau_0: \prod_{a:\mathbb{Z}} \prod_{b:\mathbb{Z}} isProp(a=b)
Properties
TODO: Show that the integers are a ordered Heyting integral domain with decidable equality, decidable apartness, and decidable linear order, and that the integers are initial in the category of ordered Heyting integral domains.
Commutative ring structure on the integers
We assume in this section that the integers are defined according to definition 1.
Definition
The integer zero 0 : ℤ 0:\mathbb{Z} is defined as
0 ≔ inj ( 0 , 0 ) 0 \coloneqq inj(0, 0)
Definition
The binary operation addition ( − ) + ( − ) : ℤ × ℤ → ℤ (-)+(-):\mathbb{Z} \times \mathbb{Z} \to \mathbb{Z} is inductively defined as
inj ( 0 , a ) + inj ( 0 , b ) ≔ inj ( 0 , a + b ) inj(0,a) + inj(0,b) \coloneqq inj(0,a+b) inj ( 1 , a ) + inj ( 1 , b ) ≔ inj ( 1 , a + b ) inj(1,a) + inj(1,b) \coloneqq inj(1,a+b) inj ( 0 , 0 ) + inj ( 1 , a ) ≔ inj ( 1 , a ) inj(0,0) + inj(1,a) \coloneqq inj(1,a) inj ( 0 , a ) + inj ( 1 , 0 ) ≔ inj ( 0 , a ) inj(0,a) + inj(1,0) \coloneqq inj(0,a) inj ( 0 , s ( a ) ) + inj ( 1 , s ( b ) ) ≔ inj ( 0 , a ) + inj ( 1 , b ) inj(0,s(a)) + inj(1,s(b)) \coloneqq inj(0,a) + inj(1,b) inj ( 1 , 0 ) + inj ( 0 , a ) ≔ inj ( 0 , a ) inj(1,0) + inj(0,a) \coloneqq inj(0,a) inj ( 1 , a ) + inj ( 0 , 0 ) ≔ inj ( 1 , a ) inj(1,a) + inj(0,0) \coloneqq inj(1,a) inj ( 1 , s ( a ) ) + inj ( 0 , s ( b ) ) ≔ inj ( 1 , a ) + inj ( 0 , b ) inj(1,s(a)) + inj(0,s(b)) \coloneqq inj(1,a) + inj(0,b)
for a : ℕ a:\mathbb{N} , b : ℕ b:\mathbb{N} , ( − ) + ( − ) : ℕ × ℕ → ℕ (-)+(-):\mathbb{N} \times \mathbb{N} \to \mathbb{N} , s : ℕ → ℕ s:\mathbb{N} \to \mathbb{N} .
Definition
The unary operation negation − ( − ) : ℤ → ℤ -(-):\mathbb{Z} \to \mathbb{Z} is defined as
− inj ( a , b ) ≔ inj ( ¬ a , b ) -inj(a, b) \coloneqq inj(\neg a, b)
for a : 2 a:\mathbf{2} , b : ℕ b:\mathbb{N} , ¬ : 2 → 2 \neg:\mathbf{2} \to \mathbf{2}
Definition
The binary operation subtraction ( − ) − ( − ) : ℤ × ℤ → ℤ (-)-(-):\mathbb{Z} \times \mathbb{Z} \to \mathbb{Z} is defined as
inj ( a , b ) − inj ( c , d ) ≔ inj ( a , b ) + inj ( ¬ c , d ) inj(a, b) - inj(c, d) \coloneqq inj(a, b) + inj(\neg c, d)
for a : 2 a:\mathbf{2} , b : ℕ b:\mathbb{N} , c : 2 c:\mathbf{2} , d : ℕ d:\mathbb{N} .
Definition
The integer number one 1 : ℤ 1:\mathbb{Z} is defined as
1 ≔ inj ( 0 , 1 ) 1 \coloneqq inj(0,1)
Definition
The binary operation multiplication ( − ) ⋅ ( − ) : ℤ × ℤ → ℤ (-)\cdot(-):\mathbb{Z} \times \mathbb{Z} \to \mathbb{Z} is defined as
inj ( a , b ) ⋅ inj ( c , d ) ≔ inj ( a ⊕ c , b ⋅ d ) inj(a,b) \cdot inj(c,d) \coloneqq inj(a \oplus c,b \cdot d)
for a : 2 a:\mathbf{2} , b : ℕ b:\mathbb{N} , c : 2 c:\mathbf{2} , d : ℕ d:\mathbb{N} , ( − ) ⋅ ( − ) : ℕ × ℕ → ℕ (-)\cdot(-):\mathbb{N} \times \mathbb{N} \to \mathbb{N} , ( − ) ⊕ ( − ) : 2 × 2 → 2 (-)\oplus(-):\mathbf{2} \times \mathbf{2} \to \mathbf{2} (exclusive or binary operation in 2 \mathbf{2} ).
Definition
The right ℕ \mathbb{N} -action exponentiation ( − ) ( − ) : ℤ × ℕ → ℤ (-)^{(-)}:\mathbb{Z} \times \mathbb{N} \to \mathbb{Z} is inductively defined as
inj ( a , b ) 0 ≔ inj ( 0 , 1 ) inj(a,b)^0 \coloneqq inj(0,1) inj ( a , b ) 2 n ≔ inj ( 0 , b 2 n ) inj(a,b)^{2n} \coloneqq inj(0,b^{2n}) inj ( a , b ) 2 n + 1 ≔ inj ( a , b 2 n + 1 ) inj(a,b)^{2n+1} \coloneqq inj(a,b^{2n+1})
for a : 2 a:\mathbf{2} , b : ℕ b:\mathbb{N} , n : ℕ n:\mathbb{N} , ( − ) ( − ) : ℕ × ℕ → ℕ (-)^{(-)}:\mathbb{N} \times \mathbb{N} \to \mathbb{N} .
See also
References
HoTT book
Thorsten Altinkirch, The Integers as a Higher Inductive Type , (abs:2007.00167 )
Marc Bezem, Ulrik Buchholtz, Pierre Cagne, Bjørn Ian Dundas, Daniel R. Grayson, Symmetry , (pdf )
Revision on February 27, 2022 at 08:37:31 by
Anonymous? .
See the history of this page for a list of all contributions to it.